Step 1: Choose the GRF you need
Choose the GRF you need. If you have a pre-renewal server, use “KamishiElementalPalettes-PreRenewal.grf”, else use “KamishiElementalPalettes-All.grf”.
Step 2: Add the GRF in your client
Add the GRF inside the your client’s folder. Then add it’s name in data.ini, before everything other grf.
Example below:
[data]
0=kamishipalettes.grf
1=yourserver.grf
2=data.grf
Step 4: Update your client.conf
Open conf/Battle/client.conf, make sure you have set the following values to the correct numbers:
min_hair_style: 0
max_hair_style: 100 // Set this to your max hair style number.
min_hair_color: 0
max_hair_color: 1340
min_cloth_color: 0
max_cloth_color: 1340
Step 5: Install “GRF Classes Corrections” from Me & Haziel
Pre-renewal classes corrections :
https://rathena.org/board/files/file/2447-corrected-classes-head-sprites/
Costumes corrections :
http:// https://rathena.org/board/files/file/3437-third-job-costumes-corrected/
Step 6: Make sure your current stylist does not offer “elementals” palette numbers
Check your Stylist script, and make sure it doesn’t go higher than 700 for the clothes and hairs. Depending on your stylist script, you will have to do some changes yourself, for instance force a maximum value of 700 in number selection.
Step 7: Decide how you want to use the “race hats”.
You have 3 possibilities :
- [No Hats] No hats at all, you only change the skin color of the player.
- [Disguise To Race] When a player talks to the “Elemental race changer”, his race is changed permanenly, and the middle hat is disguised to the race’s hat.
- [Equip to Change Race] When a player equip a race hat, its skin change to the selected race. When he unequips it, he come back to human again.
Once you took your decision, install only one of the three script in Scripts/ folder.
No Hats :
With that system, you must offer to your player either a NPC or an item that can trigger the following function :
callfunc "TransformToRaceElemental", <race_id>;
With <race_id> being one of the following races numbers:
11 // Earth Element
12 // Wind Element
13 // Water Element
14 // Fire Element
15 // Electric Element
16 // Shadow Element
17 // Ghost Element
18 // Poison Element
19 // Holy Element
20 // Undead Element
You can find an example of a NPC doing that (it is called “ElementalMaster”) in Elemental_No_Hats.txt
Disguise To Race :
Please follow all the step in “No Hats”. Then, you must add the race hats in your server and client, which means, add the sprites in the grf, update various .txt or luas client-side. If you don’t know how to add sprites in your server, please follow some guides on how to add custom items.
Now, you will only care about the “View ID” of the hat, which is the one that you can see in accessoryid.lua
ACCESSORY_Elem_Earth = 946,
ACCESSORY_Elem_Wind = 947,
ACCESSORY_Elem_Water= 948,
ACCESSORY_Elem_Fire = 949,
ACCESSORY_Elem_Electric = 950,
ACCESSORY_Elem_Shadow = 951,
ACCESSORY_Elem_Ghost = 952,
ACCESSORY_Elem_Poison = 953,
ACCESSORY_Elem_Holy = 954,
ACCESSORY_Elem_Undead = 955,
If your View ID are different that the ones above, then you need to adapt the function called setRaceElementalHat.
Equip to Change Race :
First of all, you must add the race hats in your server and client, which means, add the sprites in the grf, update various .txt or luas client-side. If you don’t know how to add sprites in your server, please follow some guides on how to add custom items.
Then, you have to change the “equip script” and “unequip script” of each of the race hat so when a player equip an hat, it calls the “TransformToRaceElemental” method.
============================================================
ITEM EQUIP SCRIPT :
------------------------------------------------------------
callfunc "TransformToRaceElemental", <race_id>;
============================================================
ITEM UNEQUIP SCRIPT :
------------------------------------------------------------
callfunc "TransformFromElementalToHuman";
============================================================
With <race_id> being one of the following races numbers:
11 // Earth Element
12 // Wind Element
13 // Water Element
14 // Fire Element
15 // Electric Element
16 // Shadow Element
17 // Ghost Element
18 // Poison Element
19 // Holy Element
20 // Undead Element
Step 8: Test if it works
If you followed the steps correctly, it should be working fine. If you have a problem, please contact me on laetitiakami[@]gmail.com