Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How to add new item (cloth) to DB

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jan 22, 2011
Messages
11
Reaction score
0
I want to add new cloths set like
-Concert Set (ProjectG 2nd album)
-Pangya Portable outfit
-Vocaloid Set
-Others(Those which not appear in "PANGYA_ITEM_TYPELIST" table)
I try to add to userID directly ,but it's doesn't work.
I think I have to add new item rows to "PANGYA_ITEM_TYPELIST" first ,but I wonder if I need to do more than that.

someone have any idea about this?

***sorry for my dizzily english
 
Junior Spellweaver
Joined
Jan 18, 2011
Messages
113
Reaction score
25
USE [Pangya_S4_TH]
GO

IF EXISTS ( SELECT TYPEID FROM PANGYA_ITEM_TYPELIST WHERE TYPEID = 1879113856 )
BEGIN
UPDATE PANGYA_ITEM_TYPELIST
SET NAME = N'Crimson Ring'
, ICON = N''
, PRICE = 1000
, ISCASH = 0
WHERE TYPEID = 1879113856
END
ELSE
BEGIN
INSERT INTO PANGYA_ITEM_TYPELIST
( [TYPEID], [NAME], [ICON], [PRICE], [ISCASH] )
VALUES ( 1879113856, N'Crimson Ring', N'', 1000, 0 )
END

GO

just edit that script to the name and item number and run it
 
Last edited:
Deny everything.
Joined
Jun 17, 2005
Messages
488
Reaction score
110
Well, that's only a quarter of it.

You need to edit the part.iff file, add the new item to the file, copy the models, icons, textures and sound effects from the source to a new target file structure, repack all that again and deploy the pangya_th.iff with the new items to your server.

Luckily at least icons, models and textures are directly referenced in the part.iff, so copying them automatically is rather trivial. Sound effects or special cut-ins (like Pangya! logos) are harder to come by and require a bit of effort.

Note that just because an item is referenced in the part.iff file doesn't mean the textures and models are in the PAK files (for example: Vocaloid outfit is missing some models and textures). That's usually the reason these items are disabled completely but available in the file.

Adding items to the database is not per-se required for the item to work, the important bit is that they're in the pangya_th.iff and enabled for use.
 
Last edited:
Newbie Spellweaver
Joined
Jan 22, 2011
Messages
11
Reaction score
0
Well, that's only a quarter of it.

You need to edit the part.iff file, add the new item to the file, copy the models, icons, textures and sound effects from the source to a new target file structure, repack all that again and deploy the pangya_th.iff with the new items to your server.

Luckily at least icons, models and textures are directly referenced in the part.iff, so copying them automatically is rather trivial. Sound effects or special cut-ins (like Pangya! logos) are harder to come by and require a bit of effort.

Note that just because an item is referenced in the part.iff file doesn't mean the textures and models are in the PAK files (for example: Vocaloid outfit is missing some models and textures). That's usually the reason these items are disabled completely but available in the file.

Adding items to the database is not per-se required for the item to work, the important bit is that they're in the pangya_th.iff and enabled for use.
Ok,thanks for the advice.

I try on Nell Hanbok (no data in DB but available in part.iff) and I can buy and use.

If I'm not understand in wrong way, Adding to DB is for use procedures those refer to(like procedure add item to userID). If you not use procedures refer to that itemdata ,you not "need" to adding to DB Just edit part.iff and pak file only. right?
 
Last edited:
Newbie Spellweaver
Joined
Jan 22, 2011
Messages
11
Reaction score
0
Oh, I think I understand clearly.

Thanks a lot!
 
Newbie Spellweaver
Joined
Jan 28, 2011
Messages
17
Reaction score
0
Well, that's only a quarter of it.

You need to edit the part.iff file, add the new item to the file, copy the models, icons, textures and sound effects from the source to a new target file structure, repack all that again and deploy the pangya_th.iff with the new items to your server.

Luckily at least icons, models and textures are directly referenced in the part.iff, so copying them automatically is rather trivial. Sound effects or special cut-ins (like Pangya! logos) are harder to come by and require a bit of effort.

Note that just because an item is referenced in the part.iff file doesn't mean the textures and models are in the PAK files (for example: Vocaloid outfit is missing some models and textures). That's usually the reason these items are disabled completely but available in the file.

Adding items to the database is not per-se required for the item to work, the important bit is that they're in the pangya_th.iff and enabled for use.

I also want to add some clothes/items in the database.
I've spent a lot of time reading the forums and trying to figure things out but I feel like I'm not making any progress and I'm stuck.

how do you edit the part.iff file ^^" ? I tried using the fileXplorer, but it doesnt allow me to write anything? What program do you use to edit that file?

I am sorry that I sound so n00b :(, I am really new to this, but I am very dedicated/willing to learn this :)

any help would be very much appreciated! :D
 
Newbie Spellweaver
Joined
Dec 31, 2010
Messages
11
Reaction score
1
I also want to add some clothes/items in the database.
I've spent a lot of time reading the forums and trying to figure things out but I feel like I'm not making any progress and I'm stuck.

how do you edit the part.iff file ^^" ? I tried using the fileXplorer, but it doesnt allow me to write anything? What program do you use to edit that file?

I am sorry that I sound so n00b :(, I am really new to this, but I am very dedicated/willing to learn this :)

any help would be very much appreciated! :D

You have to use a hex editor... You know how to extract the stuff out of the pangya_th.iff, right? Rename it to .zip (or just install 7zip, it'll give you a right-click option to extract it)...
 
Junior Spellweaver
Joined
Oct 31, 2007
Messages
192
Reaction score
59
You can also wait for chreadie to release his "more advanced" version of FileXplorer. The new version will support writing.
 
Newbie Spellweaver
Joined
Jan 28, 2011
Messages
17
Reaction score
0
yes, i know how to extract the iff files out of pangya_th.iff .
but I have no idea on how to actually add the item to the database.
Do i need to replace the values of an item i dont want, to make the new item available in the shop instead of that one?

how do you add a new item, without replacing code/removing other item?
 
Deny everything.
Joined
Jun 17, 2005
Messages
488
Reaction score
110
AznSW, you can append items to the IFF files without big trouble.

Here's how it goes:
  • Open the file you want to edit in a good hex editor (my choice is WinHex).
  • Note the file size in bytes
  • Select the first 4 bytes in the file and interpret them as a UInt32 value, you will get the amount of items in the file.
  • Now fire up a calculator and process (file size of the file - 8) / (number of items in file). The result will be the record length of each item record in that file.
  • You can now open i.e. an US part.iff file and browse through it (warning: If you're not using a US file but KR or JP instead, remember that the record size is different from US/TH!), start at an offset of 8 bytes and jump forward by the number of record-size to get from record to record.
  • If you are at the record you want to copy, copy it (remember how many bytes to copy, it has to be the exact record size!) and append these bytes at the end of the file you want to edit.
  • Now go back to the first 4 bytes of the file, select the first 4 bytes and interpret them as a UInt32 value again. Increase the value by 1 (because you added one new item).
  • Important: Also copy over textures, models and icons for the item from the US PAKs if you do this sort of thing.

A few notes:
  • You start jumping from record to record at an offset of 8 bytes because most item-centric IFF files contain a header of 8 bytes which contains the number of items in the file and the region code. That's also the reason you subtract 8 bytes from the file-size when calculating the recordset length.
  • You cannot simply copy & paste records from KR/JP to US/TH because the KR/JP records are a bit longer. If you delete the excess bytes at the correct positions, the items will work fine.
  • If you're using WinHex, you should familiarize yourself with the Templates system the program brings. It allows you to create easy-to-navigate masks for file-types.

Yes, this is already the easiest way to explain it.

If you have no idea what I just said you either scratch the idea, start reading/experimenting (chreadie's tool can be a valuable help) or wait for someone to release an idiot-proof editor that doesn't require any knowledge.
 
Last edited:
Newbie Spellweaver
Joined
Jan 28, 2011
Messages
17
Reaction score
0
AznSW, you can append items to the IFF files without big trouble.

Here's how it goes:
  • Open the file you want to edit in a good hex editor (my choice is WinHex).
  • Note the file size in bytes
  • Select the first 4 bytes in the file and interpret them as a UInt32 value, you will get the amount of items in the file.
  • Now fire up a calculator and process (file size of the file - 8) / (number of items in file). The result will be the record length of each item record in that file.
  • You can now open i.e. an US part.iff file and browse through it (warning: If you're not using a US file but KR or JP instead, remember that the record size is different from US/TH!), start at an offset of 8 bytes and jump forward by the number of record-size to get from record to record.
  • If you are at the record you want to copy, copy it (remember how many bytes to copy, it has to be the exact record size!) and append these bytes at the end of the file you want to edit.
  • Now go back to the first 4 bytes of the file, select the first 4 bytes and interpret them as a UInt32 value again. Increase the value by 1 (because you added one new item).
  • Important: Also copy over textures, models and icons for the item from the US PAKs if you do this sort of thing.

Ok, just to make sure I got this right..

lizardo - How to add new item (cloth) to DB - RaGEZONE Forums


i want to add a clubset to the database, the filesize is 7028 bytes. then i have to select the first 4 bytes and interpret them as a UInt32 value.
This is the part that I don't understand. the first 4 bytes for me is 2700. what is the uint32 value for 2700 :S?
I don't know what uint32 value is, I just know you said it means its 4 bytes long in an other thread.
Do I have to use the Data Interpreter in WinHEx? and if so, i dont see an option that make me select uint32 value :( ?

then the next step would be ( 7028 -8 )/ the number of items, to get the record length of each clubset.
is this correct? sorry if i'm completely wrong here :(:
 

Attachments

You must be registered for see attachments list
Deny everything.
Joined
Jun 17, 2005
Messages
488
Reaction score
110
First thing, you only selected 2 bytes (as indicated by the "Size" status bar in WinHex).

I don't want to get to the basics here, so just a quick rundown:
1 byte = 8 bits
4 bits are represented by a value ranging from 0 to F.

Second thing, select the value from the lowest bit to the highest (in this case, from the back to the front).

Third thing, if you want to copy clubsets make sure you also copy the clubs from club.iff.

Apart from that: Yep, that's it.
 
Last edited:
Status
Not open for further replies.
Back
Top