viewing paste Neo | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
[Guide] Adding Custom Homunculus!
 
Hello Hercules,
 
Here is a Guide on how to ADD a Custom Homunculus into your Server and Client .
Special Thanks to "Neo" for helping me and providing me the xDiff file for it :)
 
The Hardcoded Client Limit of Homunculus are 6052,  The xDiff file raises this 
limit till 7000. So we can use many Custom Homunculus now :)
 
For this Guide I'm using the IDs 6080 and 6081, you can use any ID between 6053 - 7000.
 
Server Side Configuration.
----------------------------------------------------
 
First we need to ADD our Custom Homunculus in the db/homunculus_db.txt
Simply follow the existing format. 
 
In my example here I am using ID 6080 for my Custom Homunculus ID and 6081 will be the Evolved Custom Homunculus ID
 
6080,6081,Hercules,537,60000,0,1,7,0,700,150,40,17,20,15,35,24,12,60,100,4,9,5,19,5,19,5,19,4,20,6,20,6,20,1,10,10,20,1,5,1,4,1,5,4,10,1,10,1,3
 
Now let add some skills for them. Open db/homun_skill_tree_db.txt
Here we need to set all Skill for our New Homunculus , in my Example I Used the Skill from the Vanilmirth Homunculus.
 
//Hercules Custom Homunculus
6080,8013,5,0,0,0,0,0,0,0,0,0,0,0 //HVAN_CAPRICE
6080,8014,5,8013,3,0,0,0,0,0,0,0,0,0 //HVAN_CHAOTIC
6080,8015,5,8013,5,0,0,0,0,0,0,0,0,0 //HVAN_INSTRUCT
 
Server Source code Modifications
----------------------------------------------------
Now lets move on to the SRC folder.
Open mmo.h (SRC/COMMON/mmo.h)
 
search for this  line
#define MAX_HOMUNCULUS_CLASS    52
 
Currently this limits usable IDs to 6001-6052
 
Change to 
#define MAX_HOMUNCULUS_CLASS    1001
 
now we can use IDs from 6053-7000 as well for Homunculus.
 
Remember the xDiff only raises till 7000 now so if you add it beyond that range you are out of luck for now.
 
Next we open the homunculus.c (SRC/MAP/homunculus.c)
 
here we search for
 
// Normal Homunculus
 
you will see a few case statements following this line. We need to add our Regular Homunculus here
In my example I am adding case 6080: (it should look like this)
 
    // Normal Homunculus
        case 6001: case 6005:
        case 6002: case 6006:
        case 6003: case 6007:
        case 6004: case 6008:
        case 6080:
 
Same way below it you will see the cases for Evolved Homunculus so we add ours there.
In my example I am adding case 6081: (it should look like this - you can skip this step if you dont have an evolved one)
 
    // Evolved Homunculus
        case 6009: case 6013:
        case 6010: case 6014:
        case 6011: case 6015:
        case 6012: case 6016:
        case 6081:
        
Now save the file. Source code modifications are done so recompile the server.
 
Client Side Changes.
-------------------------------------------
First what you need is a client that supports the addition of custom Homunculus. 
Make your patched client (better to have official patches already patched up first).
Download the xDiff file for your client date from http://sourceforge.net/p/neocustoms/code/HEAD/tree/xDiffs/
Patch your client with the downloaded xDiff File using xDiffPatcher (Select Enable Custom Homunculus) 
 
You are Ready to Rumble.
 
Now that you have the client, let's make it use our homun sprites.
First we add the Homunculus ID to npcidentity.lub at the end. (data\luafiles514\lua files\datainfo\npcidentity.lub)
Mine are as follows.
 
JT_MER_Water_Ghost = 6080,
JT_MER_Water_Ghost2 = 6081
 
You will also notice the following line in the same file 
JT_MER_LAST = 6053,
Now that we have more 6052 it would be wise to set it to the max value + 1 = 7001 to avoid confusion i.e.
JT_MER_LAST = 7001,
 
Save & Close npcidentity.lub
 
Now we add the sprite information in jobname.lub at the end (data\luafiles514\lua files\datainfo\jobname.lub)
the same way you would add for a mob or npc.
 
[jobtbl.JT_MER_Water_Ghost] = "Water_Ghost",
[jobtbl.JT_MER_Water_Ghost2] = "Water_Ghost2"
 
Now that the Lua files are done we can add the sprite files into the appropriate folder which is => data/sprite/homun
In my example I will add the following files to that folder : Water_Ghost.spr, Water_Ghost.act, Water_Ghost2.spr and Water_Ghost2.act
 
All the files are set . Now you can start your client and test out your homunculus.
Fastest way to check => use @makehomun 6080
 
Enjoy your Custom Homunculus!!
Viewed 843 times, submitted by Guest.