editing some things :p

we plan to deploy new weapons to future events, how to do it .... do not know many tools, and we have nothing good in hands, we know that from a Lee program can edit parameters of the weapons, but our intention and just add not touch anything existing. another doubt is .. deploying skins for new weapons. and that you can do it in an easy way. without affecting the quality of the game. and get new fusion items as well.
 

tofuman

Administrator
Staff member
Adding items to the game may be a struggle. Lee's tool will give you the ability however Ultima own this and it is not available publicly.

I also have an editor which I made that will give you the ability but this isn't available publicly.

I can post the structure which will enable anyone with programming skills to make a program.

However for the time being there are unused weapons in the itempmt such as 00d000 and 00d100. There are unused mags 0503 to 0507. There are a load of unused shields (rings) so adding addition items may not be needed.

There are guides on replacing skins in psobb about the internet which can help with that
 
but there is another problem. We create weapons that appear in tmp but the maker item they do not appear. many gms use this tool as it is a shortcut in both, and when we create these items followed their codes appears it. ?????
and when the skins would be for the same or anise weapons but heard in this forum a maker that you the freedom to change the colors of the weapons but the link is invalid. but I desnessessario. not the maker but the color change because everything can be done by lee tool, which at the moment is the best we have in hand.
 

tofuman

Administrator
Staff member
The locked items were removed on a client I uploaded on the tethealla.net IIRC either way I'll get it uploaded here soon. This will allow you to create 00d000 and 00d100 also Sonicteam armor and so on.

There are IIRC 5 models unused and 5 unused skins which you can repurpose. There are currently no public tools which allow you to add these either so utilizing unused skins/models may be your only option. I don't have a tool to add these myself. Although I believe Lee was working on such a tool.
 
and tofu, how can I do to edit the name of the items?
this information would be very welcome.
I need a tool to edit the names? or can I use BBpmt.?
and in the case of merging items, I can add functions and make them more arms to be combined?
I do not know if it can be published, but if someone can give me support my name is in Skipe (Ismael_i.am)
but I believe that all servers can evolve if we all work for the good of the community psoBB
 

tofuman

Administrator
Staff member
The name of items can be changed by by editing the unitxt file. Teth comes with the unitxt converter which will allow you to do this.

As for adding combinations in not sure if lee's public pmt tool allows for adding combinations. Else there isn't a public tool which will allow such things although I can publish the file structure so that people can develop a tool. The latest teth will show you how to process the file so will be a good starting point for a itempmt editor.
 
I'm editing some items in the game, but his images untekked are still original.
how to configure the untekked images?
what would be the position of your offset?
I've been checking the images in the date folder, show the pictures of the items.
I just did not modified not be sure that they are actually untekked.
 

divie

Member
tofuman said:
Adding items to the game may be a struggle. Lee's tool will give you the ability however Ultima own this and it is not available publicly.

I also have an editor which I made that will give you the ability but this isn't available publicly.

I can post the structure which will enable anyone with programming skills to make a program.

However for the time being there are unused weapons in the itempmt such as 00d000 and 00d100. There are unused mags 0503 to 0507. There are a load of unused shields (rings) so adding addition items may not be needed.

There are guides on replacing skins in psobb about the internet which can help with that

I'd like to get the structure please.
 

tofuman

Administrator
Staff member
Here is the structure:
Code:
/* ItemPMT Structure */

typedef struct NO_ALIGN st_pmt_armor {
	unsigned int id;
	short type;
	short skin;
	int teampoints;
	short dfp;
	short evp;
	unsigned char blockparticle;
	unsigned char blockeffect;
	unsigned char _class;
	unsigned char reserved1;
	unsigned char requiredlevel;
	unsigned char efr;
	unsigned char eth;
	unsigned char eic;
	unsigned char edk;
	unsigned char elt;
	unsigned char dfprange;
	unsigned char evprange;
	unsigned char statboost;
	unsigned char techboost;
	short unknown1;
} PMT_ARMOR;

typedef struct NO_ALIGN st_pmt_shield {
	unsigned int id;
	short type;
	short skin;
	int teampoints;
	short dfp;
	short evp;
	unsigned char blockparticle;
	unsigned char blockeffect;
	unsigned char _class;
	unsigned char reserved1;
	unsigned char requiredlevel;
	unsigned char efr;
	unsigned char eth;
	unsigned char eic;
	unsigned char edk;
	unsigned char elt;
	unsigned char dfprange;
	unsigned char evprange;
	unsigned char statboost;
	unsigned char techboost;
	short unknown1;
} PMT_SHIELD;

typedef struct NO_ALIGN st_pmt_unit {
	unsigned int id;
	short type;
	short skin;
	int teampoints;
	short stat;
	short statamount;
	unsigned char plusminus;
	unsigned char reserved[3];
} PMT_UNIT;

typedef struct NO_ALIGN st_pmt_mag {
	unsigned int id;
	short type;
	short skin;
	int teampoints;
	unsigned char feedtable;
	unsigned char unknown1;
	char photonblast;
	unsigned char activation;
	unsigned char pbfull;
	unsigned char lowhp;
	unsigned char death;
	unsigned char boss;
	unsigned char pbfullflag;
	unsigned char lowhpflag;
	unsigned char deathflag;
	unsigned char bossflag;
	unsigned char _class;
	unsigned char reserved[3];
} PMT_MAG;

typedef struct NO_ALIGN st_pmt_item {
	unsigned int id;
	signed short type;
	signed short skin;
	signed int teampoints;
	signed short amount;
	signed short tech;
	signed int cost;
	unsigned char itemflag;
	unsigned char reserved[3];
} PMT_ITEM;

typedef struct NO_ALIGN st_pmt_weapon {
	unsigned int id;
	short type;
	short skin;
	int teampoints;
	unsigned char _class;
	unsigned char reserved;
	short atpmin;
	short atpmax;
	short atpreq;
	short mstreq;
	short atareq;
	short mst;
	unsigned char maxgrind;
	char photon;
	unsigned char special;
	unsigned char ata;
	unsigned char statboost;
	unsigned char projectile;
	char photontrail1x;
	char photontrail1y;
	char photontrail2x;
	char photontrail2y;
	char photontype;
	char unknown1;
	char unknown2;
	char unknown3;
	char unknown4;
	char unknown5;
	unsigned char techboost;
	unsigned char combotype;
} PMT_WEAPON;

typedef struct NO_ALIGN st_pmt_magfeeditem {
	char defence;
	char power;
	char dexterity;
	char mind;
	char iq;   // Reversed iq / sync 8/15/2015
	char sync;
	char reserved[2];
} PMT_MAGFEEDITEM;

typedef struct NO_ALIGN st_pmt_magfeed {
	PMT_MAGFEEDITEM item[11];
} PMT_MAGFEED;

typedef struct NO_ALIGN st_pmt_magfeedtable {
	PMT_MAGFEED table[8];
} PMT_MAGFEEDTABLE;

typedef struct NO_ALIGN st_pmt_starvalue {
	unsigned char starvalue;
} PMT_STARVALUE;

typedef struct NO_ALIGN st_pmt_special {
	short type;
	short amount;
} PMT_SPECIAL;

typedef struct NO_ALIGN st_pmt_statboost {
	unsigned char stat1;
	unsigned char stat2;
	short amount1;
	short amount2;
} PMT_STATBOOST;

typedef struct NO_ALIGN st_pmt_techuseclass {
	char _class[12];
} PMT_TECHUSECLASS;

typedef struct NO_ALIGN st_pmt_techusetable {
	PMT_TECHUSECLASS tech[19];
} PMT_TECHUSETABLE;

typedef struct NO_ALIGN st_pmt_combination {
	unsigned char useitem[3];
	unsigned char equippeditem[3];
	unsigned char itemresult[3];
	unsigned char maglevel;
	unsigned char grind;
	unsigned char level;
	unsigned char _class;
	unsigned char reserved[3];
} PMT_COMBINATION;

typedef struct NO_ALIGN st_pmt_techboost {
	int tech1;
	float boost1;
	int tech2;
	float boost2;
	int tech3;
	float boost3;
} PMT_TECHBOOST;

typedef struct NO_ALIGN st_pmt_eventitem {
	unsigned char item[3];
	unsigned char chance;
} PMT_EVENTITEM;

typedef struct NO_ALIGN st_pmt_unsealable {
	unsigned char item[3];
	unsigned char reserved;
} PMT_UNSEALABLE;

typedef struct NO_ALIGN st_weaponsaledivisor {
	float saledivisor[165];
} PMT_WEAPONSALEDIVISOR;

typedef struct NO_ALIGN st_saledivisor {
	float armor;
	float shield;
	float unit;
	float mag;
} PMT_SALEDIVISOR;

typedef struct st_pmt_attack_animation {
	unsigned char animation;
} PMT_ATTACKANIMATION;

typedef struct NO_ALIGN st_pmt_lookup_table_item {
	int pointer;
} PMT_LOOKUP_TABLE_ITEM;

typedef struct st_pmt_item_count {
	unsigned weapon_count;
	unsigned armor_count;
	unsigned shield_count;
	unsigned unit_count;
	unsigned item_count;
	unsigned mag_count;
	unsigned starvalue_count;
	unsigned special_count;
	unsigned statboost_count;
	unsigned combination_count;
	unsigned techboost_count;
	unsigned unwrap_count;
	unsigned xmasitem_count;
	unsigned easteritem_count;
	unsigned halloweenitem_count;
	unsigned unsealable_count;
} PMT_ITEM_COUNT;

typedef struct st_itempmt {
	PMT_ITEM_COUNT item_count;
	PMT_LOOKUP_TABLE_ITEM pmt_lookup_table[0x04][0xFF][0xFF];
	PMT_MAGFEEDTABLE * magfeedtable;
	PMT_STARVALUE * starvaluetable;
	unsigned starvalueOffset;
	PMT_SPECIAL * specialtable;
	PMT_STATBOOST * statboosttable;
	PMT_TECHUSETABLE * techusetable;
	PMT_COMBINATION * combinationtable;
	PMT_TECHBOOST * techboosttable;
	PMT_ATTACKANIMATION * attackanimationtable;
	PMT_EVENTITEM * xmasitemtable;
	PMT_EVENTITEM * easteritemtable;
	PMT_EVENTITEM * halloweenitemtable;
	PMT_UNSEALABLE * unsealabletable;
	PMT_WEAPONSALEDIVISOR * weaponsaledivisortable;
	PMT_SALEDIVISOR * saledivisortable;
} ITEMPMT;

The file contains many pointers. The pointers are located at the end of the file. To process the file first read the pointer located at the end of the file minus 16 bytes (filesize - 16). The original value at this offset is 0x15064. This pointer is the Weapon pointer table. Once at offset 0x15064 increment by 4 bytes for the other tables.

0x15064 : Weapon Pointer Table (0x1489C)
0x15068 : Armor Pointer Table (0x147A4)
0x1506c : Units Pointer Table (0x147B4)
0x15070 : Item Pointer Table (0x147C4)
0x15074 : Mag Pointer Table (0x147BC)
0x15078 : Attack Animation Table (0xF4CC)
0x1507c : Photon Colour Table (0xDE7C)
0x15080 : Weapon Range Table (0xE194)
0x15084 : Weapon Sales Divisor Table Pointer (0xF5BC)
0x15088 : Sales Divisor Table Pointer (0xF850)
0x1508c : Mag Feed Table Pointer (0x15044)
0x15090 : Star Value Table Pointer (0xFB20)
0x15094 : Special Data Table Pointer (0xFE50)
0x15098 : Weapon SFX Table Pointer (0xFEF4)
0x1509c : Stat Boost Table Pointer (0x12770)
0x150a0 : Shield SFX Table Pointer (0x11C94)
0x150a4 : Tech use table Pointer (0x128A8)
0x150a8 : Combination Table Pointer (0x1500C)
0x150ac : Unknown01 Table Pointer (0x12768)
0x150b0 : Tech Boosts Table Pointer (0x1428C)
0x150b4 : Unwrap Table Pointer (0x1502C)
0x150b8 : Unsealable Table Pointer (0x15034)
0x150bc : Ranged Special Table Pointer (0x1503c)

You can read a lot of the above tables by using the above method. I personally only read the Weapon Sales Divisor Table Pointer and Sales Divisor Table Pointer from there.

I use the other pointer table to read the other tables. If you look at the pointer value located at filesize - 32 bytes. The original value at this offset you should find the value of 0x150c0. Next to this value is 0x13a and next to that is 0x01. This indicates that there is 1 pointer table containing 314 entries (0x13a) and it is located at 0x150c0. This pointer table structure is a table of short values. The original values are 0x49d2, 0x01, 0x02, 0x01, 0x02 and so on.
To read this you multiply the value by 4 and add it to the previous value. This will give you the pointer. for example the first value of 0x49d2 would give you 0x12748 this pointer is Hit SFX table pointer which will be 0x121bc:

0x150c0 : Short 0x49d2 x 4 = Pointer 0x12748 = 0x121bc - Hit SFX Force
0x150c2 : Short 0x01 x 4 + 0x12748 = Pointer 0x1274c = 0x12364 - Hit SFX Force
0x150c4 : Short 0x02 x 4 + 0x1274c = Pointer 0x12754 = 0x12394 - Hit SFX Hunter
0x150c6 : Short 0x01 x 4 + 0x12754 = Pointer 0x12758 = 0x1253c - Hit SFX Hunter
0x150c8 : Short 0x02 x 4 + 0x12758 = Pointer 0x12760 = 0x1256c - Hit SFX Ranger
0x150ca : Short 0x01 x 4 + 0x12760 = Pointer 0x12764 = 0x12714 - Hit SFX Ranger
0x150cc : Short 0x02 x 4 + 0x12764 = Pointer 0x1276c = 0x12744 - Hit SFX Force Default
0x150ce : Short 0x080f x 4 + 0x1276c = Pointer 0x147A8 = 0x1500 - Armour Table
0x150d0 : Short 0x02 x 4 + 0x147A8 = Pointer 0x147b0 = 0x40 - Shields Table
0x150d2 : Short 0x02 x 4 + 0x147b0 = Pointer 0x147b8 = 0x2020 - Units Table
0x150d4 : Short 0x02 x 4 + 0x147b8 = Pointer 0x147c0 = 0x2804 - Mags Table
0x150d6 : Short 0x02 x 4 + 0x147c0 = Pointer 0x147c8 = 0x3118 - Items Table (Mates)
0x150d8 : Short 0x02 x 4 + 0x147c8 = Pointer 0x147d0 = 0x3160 - Items Table (Fluids)

And so on.

The number of items in each table is specified also with each pointer. For instance the Armour table. Pointer at 0x147A8 to the left of this value is 0x59 (89 dec) and there are 89 armours by default (including the ????/Unknown last entry).

Reading the file is the easy part adding to the file requires that you update all of the pointers and item counts. Also maintaining the ???? item as the last entry in the tables and insuring you renumber the item ID numbers when adding items so that the star values will work correctly.

Hope you find the above info useful.
 

divie

Member
Thanks for this. I'm happy that you released it.

Edit: And yes, it's really useful info. I'm actually working on a tool right now, lol.
 

Broomop

Member
yes nice info if i get time ill make an application to add items and stuff. But another idea is for example if you want ultima items just make a proxy for it and dump the file it uses to set the items. Then move it to your server and you will have everything Ultima has. What would be good is using schthacks old one. I might even have a copy of the latest weapon file for that for servers if you want it?
 

tofuman

Administrator
Staff member
How is that an acceptable alternative? Can't edit the file your self steal someone else's. Not that I would expect anything else coming from broomop.

A modified itempmt also requires client changes. The modification that are done to ultimas file requires a simple Change. However my util modifies the file differently. I'd argue my util edits the file correctly. But requires alot more changes to the client.

Also don't forget the unitxt.

I still don't get the requirement for adding to the file when there are plenty unused items in the file already. You just need to remove them from the blocked item array in the client.
 
Top