- Joined
- Apr 6, 2009
- Messages
- 1,873
- Reaction score
- 384
Ok, first off, this is not a guide for making new items. I don't even know how to mess with .dds or .o3d files.
This guide is for if you already have a set of .dds and .o3d files, and how to make them show up in your server.
Edit: To clarify, this guide is specifically for Armors, Weapons, Shields, CS fashion, Masks, and Cloaks.
I'm going to divide the files up into understandable categories and deal with them one at a time.
The .o3d File
This is the file that gets loaded by the client when you equip the item (the one that appears on your character). It will always go into the Model folder of both the client files and server files. It also determines one of the names that you have to add to the mdlDyna.inc file. In the case of CS fashion items, there will be male and female versions, starting with m, male, f, or female.
The .dds Files
There are actually 2 kinds of .dds files. The first are the texture files, which go in Model/Texture and Model/TextureMid. Make sure to put these in the proper folders (the creator will know where they go). The other .dds file is the inventory icon. Be sure NOT to mix them up, putting inventory icons into the Texture folders will surely cause your client to crash. The inventory Icons go into the Item folder.
This is what makes them work on your server. Not doing this correctly will cause them to not show up at all in the game. All the files listed are in the Resource folder of your server files.
Editing mdlDyna.inc
Find the file, right-click it and click edit. It will open up in Notepad. Find any item that is the same type as what you are adding (armor, weapon, shield, cs clothes, etc.). Copy the entire line, make some blank space (find a blank line and press enter twice and move the cursor in the middle), and paste the line that you copied. The name on the left in quotes almost directly matches the name of the .o3d file. To determine the name, take the file name (ex. Item_ArmSkelShield.o3d) and keep everything between the "_" and the "." (ex. ArmSkelShield). Take that name, and put it in between the quotes on the line that you pasted in mdlDyna.inc. The name that comes after that (ex. II_ARM_SKEL_SHIELD), is what binds things to that .o3d file. The exact name you give it, doesn't matter all that much, as long as it has the "II_" at the beginning and using underscores ("_") instead of spaces. Although it is a good idea to make it similar to the name in quotes so it'll be easier to find if you need. Write this name down somewhere exactly as it is, or you'll have problems in later parts of the guide. The final product of what you added should look like this (this is for a shield):
"ArmSkelShield" II_ARM_SKEL_SHI MODELTYPE_MESH "" 0 MD_NEAR 0 1.0f 0 1 ATEX_NONE 1
For CS fashion items, the first name in quotes is always GenMatSuitbox. The names from the .o3d files for the male and female versions go somewhere else depending on the item type. For unisex items (masks and cloaks) the names both go here:
MODELTYPE_MESH "male/female"
The male name from the .o3d file always goes first, but both names go in the same item line. For all other CS fashion, you need seperate entries for male and female:
MODELTYPE_MESH "male" OR
MODELTYPE_MESH "female"
Editing defineItem.h
This file is quite easy to do. Open it in notepad like you did with the previous file and scroll ALL the way to the bottom. Put your cursor right before "#endif" and press enter a few times to make some space. Pick a spot that you're happy with, and type:
@define "item binding" XXXXX
What you put into "item binding" (without any quotes) must be exactly the same as what you wrote down from mdlDyna.inc (the one that starts with "II_"). Put any number into XXXXX, but before deciding on one, search the file (Ctrl + F) to make sure it's not already used somewhere. Try not to make the number too long, this is the number you use with the /ci command in game to make the item. Also, if the number is too long, it won't show up properly on your character when equipped.
Editing propItem.txt.txt
Open this one normally, it automatically opens in Notepad by default. This is the other file that's easy to edit. Scroll all the way to the bottom. Copy any one of the lines and paste it at the bottom on it's own line. Change the number at the end of it to whatever you want that's not already somewhere else in the file (I just take the number above it and add 1 to it). Change the text on the right, to what you want the name of the item to be. Make another blank line, and paste again, changing the number again. This will be the description for the item (which is frequently left blank). Copy both of these down (along with the "II_" one). Now for the most complicated file...
Editing propItem.txt
There are 2 ways to open this. Opening it in Notepad like all the rest (which looks really messy) or Microsoft Excel if you have it (which is a lot easier to look at). Depending on what you choose, there are different instructions.
Notepad
Excel
Now that you have copied them from the proper item types, you have them mostly ready. Now it's time to make them specific to your items, and possibly customize them as well.
I'm going to describe the columns (for what I know, I don't know every column) in terms of viewing it on Excel. Excel columns are letters (A, B, C, etc.), to "translate" to Notepad convert the letter to a number, and count to that number value in the block of text you copied to the bottom of the file. Example, A=1, the first value in the block of text. B=2, the second value, etc. Gets a little different at AA. Since Z=26, AA=27. In a similar fashion, AZ=52 so BA=53 and so on.
Once again, I'm only listing the important columns that I know of. If a column has just an "=" in it, then that means it is blank. Also, when editing it in Notepad, be sure to use TAB between columns NOT spacebar, that will cause errors in the file.
(Credit goes to Cait for that part)
Column B = Item binding name that starts with "II_"
Column C = The first row that you added into propItem.txt, this will be the item name that shows in-game
Column E = Maximum stack size
Column I = Required job to equip the item. If Master is required, it will have _MASTER at the end. You could change this on an item to allow chars to equip other class items, but I've never tried it and don't blame me if it breaks your server =3
Column L = Gender specification of an item for clothes/CS clothes other than masks/cloaks. Should be either SEX_MALE or SEX_FEMALE
Column M = Penya cost for if it was in a shop, half this is the NPC selling price
Column AE = For Armors/shields/CS clothes, minimum defense rate. For weapons, minimum attack rate.
Column AF = Same as above, except this is the maximum defense/attack rates.
Column BB = Stat bonus 1
Column BC = Stat bonus 2
Column BD = Stat bonus 3
Column BE = Value of stat bonus 1
Column BF = Value of stat bonus 2
Column BG = Value of stat bonus 3
Column CN = [Weapons only] To make it ultimate, put in WEAPON_ULTIMATE
Column DM = Level requirement
Column DQ = File name for Inventory Icon. Put the exact file name of the file that goes into the Item folder. (If you don't have an inventory icon for it, don't worry. You can really set it to any icon you want that is in the Item folder)
Column DT (the very last column) = The second line that you added to propItem.txt. This corresponds to the item description in-game (which would be blank if you chose to).
Those are all the columns which I see fit to change. Anything else, I don't know what they're used for.
Once you have completed changing all the columns you want for your item, Congratulations, you have just finished the hard part of adding items to a server (unless you count making the .dds and .o3d files).
Now all the files are setup for the items to be on your Server. Next is making them show up in your client. For this, you will need Flyff ResEditor (I will not provide a link, if you pay attention to the website at all, you'll know where to find it). Do make sure it is ResEditor, ResHack is not the same thing and won't work.
Open up Flyff ResEditor and open up the data.res file in the Flyff client's folder (not the server files). Find defineItem.h and mdlDyna.inc and remove both of them. The click "Add a File" and browse to your ServerFiles/Resource folder. Add defineItem.h and mdlDyna.inc to the list of files in ResEditor. Don't forget to press the Save button, or no changes will be made. Now go to open again, this time opening dataSub2.res. Remove propItem.txt and propItem.txt.txt. Press "Add a File" again, and add in those 2 files from your Resource folder.
Congratulations, you are now done adding the item(s) to your server. Start up the server files, login to the client, and use /ci with the number you put into defineItem.h, and you'll have it in your inventory.
This guide is for if you already have a set of .dds and .o3d files, and how to make them show up in your server.
Edit: To clarify, this guide is specifically for Armors, Weapons, Shields, CS fashion, Masks, and Cloaks.
Step One: Item Files
I'm going to divide the files up into understandable categories and deal with them one at a time.
The .o3d File
This is the file that gets loaded by the client when you equip the item (the one that appears on your character). It will always go into the Model folder of both the client files and server files. It also determines one of the names that you have to add to the mdlDyna.inc file. In the case of CS fashion items, there will be male and female versions, starting with m, male, f, or female.
The .dds Files
There are actually 2 kinds of .dds files. The first are the texture files, which go in Model/Texture and Model/TextureMid. Make sure to put these in the proper folders (the creator will know where they go). The other .dds file is the inventory icon. Be sure NOT to mix them up, putting inventory icons into the Texture folders will surely cause your client to crash. The inventory Icons go into the Item folder.
Step Two: Editing the Resource Files
This is what makes them work on your server. Not doing this correctly will cause them to not show up at all in the game. All the files listed are in the Resource folder of your server files.
Editing mdlDyna.inc
Find the file, right-click it and click edit. It will open up in Notepad. Find any item that is the same type as what you are adding (armor, weapon, shield, cs clothes, etc.). Copy the entire line, make some blank space (find a blank line and press enter twice and move the cursor in the middle), and paste the line that you copied. The name on the left in quotes almost directly matches the name of the .o3d file. To determine the name, take the file name (ex. Item_ArmSkelShield.o3d) and keep everything between the "_" and the "." (ex. ArmSkelShield). Take that name, and put it in between the quotes on the line that you pasted in mdlDyna.inc. The name that comes after that (ex. II_ARM_SKEL_SHIELD), is what binds things to that .o3d file. The exact name you give it, doesn't matter all that much, as long as it has the "II_" at the beginning and using underscores ("_") instead of spaces. Although it is a good idea to make it similar to the name in quotes so it'll be easier to find if you need. Write this name down somewhere exactly as it is, or you'll have problems in later parts of the guide. The final product of what you added should look like this (this is for a shield):
"ArmSkelShield" II_ARM_SKEL_SHI MODELTYPE_MESH "" 0 MD_NEAR 0 1.0f 0 1 ATEX_NONE 1
For CS fashion items, the first name in quotes is always GenMatSuitbox. The names from the .o3d files for the male and female versions go somewhere else depending on the item type. For unisex items (masks and cloaks) the names both go here:
MODELTYPE_MESH "male/female"
The male name from the .o3d file always goes first, but both names go in the same item line. For all other CS fashion, you need seperate entries for male and female:
MODELTYPE_MESH "male" OR
MODELTYPE_MESH "female"
Editing defineItem.h
This file is quite easy to do. Open it in notepad like you did with the previous file and scroll ALL the way to the bottom. Put your cursor right before "#endif" and press enter a few times to make some space. Pick a spot that you're happy with, and type:
@define "item binding" XXXXX
What you put into "item binding" (without any quotes) must be exactly the same as what you wrote down from mdlDyna.inc (the one that starts with "II_"). Put any number into XXXXX, but before deciding on one, search the file (Ctrl + F) to make sure it's not already used somewhere. Try not to make the number too long, this is the number you use with the /ci command in game to make the item. Also, if the number is too long, it won't show up properly on your character when equipped.
Editing propItem.txt.txt
Open this one normally, it automatically opens in Notepad by default. This is the other file that's easy to edit. Scroll all the way to the bottom. Copy any one of the lines and paste it at the bottom on it's own line. Change the number at the end of it to whatever you want that's not already somewhere else in the file (I just take the number above it and add 1 to it). Change the text on the right, to what you want the name of the item to be. Make another blank line, and paste again, changing the number again. This will be the description for the item (which is frequently left blank). Copy both of these down (along with the "II_" one). Now for the most complicated file...
Editing propItem.txt
There are 2 ways to open this. Opening it in Notepad like all the rest (which looks really messy) or Microsoft Excel if you have it (which is a lot easier to look at). Depending on what you choose, there are different instructions.
Notepad
- Press Ctrl+F and search for an item of the same type as what you're adding (same as in mdlDyna.inc)
- Copy all of it (the entire block of text that applies to it (I can give screenshots, if needed))
- Scroll all the way to the bottom
- Paste it there (add some space and paste on it's own line)
Excel
- Press Ctrl+F and search for an item of the same type as what you're adding (same as in mdlDyna.inc)
- Right-click on the row number on the left of it
- Click copy
- Scroll all the way to the bottom
- Paste it there (Right-click an empty row at the very bottom and choose paste)
Now that you have copied them from the proper item types, you have them mostly ready. Now it's time to make them specific to your items, and possibly customize them as well.
I'm going to describe the columns (for what I know, I don't know every column) in terms of viewing it on Excel. Excel columns are letters (A, B, C, etc.), to "translate" to Notepad convert the letter to a number, and count to that number value in the block of text you copied to the bottom of the file. Example, A=1, the first value in the block of text. B=2, the second value, etc. Gets a little different at AA. Since Z=26, AA=27. In a similar fashion, AZ=52 so BA=53 and so on.
Once again, I'm only listing the important columns that I know of. If a column has just an "=" in it, then that means it is blank. Also, when editing it in Notepad, be sure to use TAB between columns NOT spacebar, that will cause errors in the file.
(Credit goes to Cait for that part)
Column B = Item binding name that starts with "II_"
Column C = The first row that you added into propItem.txt, this will be the item name that shows in-game
Column E = Maximum stack size
Column I = Required job to equip the item. If Master is required, it will have _MASTER at the end. You could change this on an item to allow chars to equip other class items, but I've never tried it and don't blame me if it breaks your server =3
Column L = Gender specification of an item for clothes/CS clothes other than masks/cloaks. Should be either SEX_MALE or SEX_FEMALE
Column M = Penya cost for if it was in a shop, half this is the NPC selling price
Column AE = For Armors/shields/CS clothes, minimum defense rate. For weapons, minimum attack rate.
Column AF = Same as above, except this is the maximum defense/attack rates.
Column BB = Stat bonus 1
Column BC = Stat bonus 2
Column BD = Stat bonus 3
Column BE = Value of stat bonus 1
Column BF = Value of stat bonus 2
Column BG = Value of stat bonus 3
Column CN = [Weapons only] To make it ultimate, put in WEAPON_ULTIMATE
Column DM = Level requirement
Column DQ = File name for Inventory Icon. Put the exact file name of the file that goes into the Item folder. (If you don't have an inventory icon for it, don't worry. You can really set it to any icon you want that is in the Item folder)
Column DT (the very last column) = The second line that you added to propItem.txt. This corresponds to the item description in-game (which would be blank if you chose to).
Those are all the columns which I see fit to change. Anything else, I don't know what they're used for.
Once you have completed changing all the columns you want for your item, Congratulations, you have just finished the hard part of adding items to a server (unless you count making the .dds and .o3d files).
The Final Step: Client Resource Files
Now all the files are setup for the items to be on your Server. Next is making them show up in your client. For this, you will need Flyff ResEditor (I will not provide a link, if you pay attention to the website at all, you'll know where to find it). Do make sure it is ResEditor, ResHack is not the same thing and won't work.
Open up Flyff ResEditor and open up the data.res file in the Flyff client's folder (not the server files). Find defineItem.h and mdlDyna.inc and remove both of them. The click "Add a File" and browse to your ServerFiles/Resource folder. Add defineItem.h and mdlDyna.inc to the list of files in ResEditor. Don't forget to press the Save button, or no changes will be made. Now go to open again, this time opening dataSub2.res. Remove propItem.txt and propItem.txt.txt. Press "Add a File" again, and add in those 2 files from your Resource folder.
Congratulations, you are now done adding the item(s) to your server. Start up the server files, login to the client, and use /ci with the number you put into defineItem.h, and you'll have it in your inventory.
Last edited: