• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[NEW YEAR 2019] Adding Custom Skills

Junior Spellweaver
Joined
Apr 10, 2010
Messages
183
Reaction score
27
Hi, I'm Wanger@MNDT from Taiwan.

So far the only way most people know to add(not replace the skin) custom skills had been posted a long time ago through adding the skill composite property like Mercedes' skills did.

This method, however, is only viable for the version after GMS 117, and it isn't so smooth to active the custom skills since you need to actuate trigger skills first.

If you have tried to add new skills, they will appear in the skill UI but have no responses when you click or press them because NEXON specifies each skill's function in UserLocal::DoActiveSkill. The skill which doesn't be placed in the code there would have no function. For example, a snippet code of UserLocal::DoActiveSkill from TWMS 147 is as follow:

Code:
	if (v10 <= 2111004)
	{
		if (v10 == 2111004)
			goto LABEL_807;
		if (v10 <= 2101002)
		{
			if (v10 != 2101002)
			{
				if (v10 == 1321012)
					goto LABEL_658;
                         ....
	}

The assembly code:
Code:
Address1:  cmp     edi, 142834h //1321012
Address2:  jz      ActiveAttackSkillAddr
Address3:  cmp     edi, 1E8869h
Address4:  jle     ....

The code above designate the skill 1321012 as an attack skill and will redirect it to corresponding DoActiveSkill function which sends the packet with opcode CLOSE_RANGE_ATTACK (OdinMS).

Now if we want to put a new attack skill 1321013 into game, we NEED TO modify the code as follow(instructive):
Code:
	if (v10 <= 2111004)
	{
		if (v10 == 2111004)
			goto LABEL_807;
		if (v10 <= 2101002)
		{
			if (v10 != 2101002)
			{
				if (v10 == 1321012 || v10 == 1321013) // << we need to modify the code here
					goto LABEL_658;
                         ....
	}

I will show a simple instructive code by injecting the dll to patch the client, you can, of course, patch the following code in the available section in client and jmp to correct address. Yet I don't actually recommend you patch the code in the client directly.

Code:
	int activeAttackSkillAddr = ActiveAttackSkillAddr;
	int jumpBack1 = Address3;
	void __declspec(naked) DispatchActiveSkill()
	{
		__asm
		{
			cmp edi, 0x142834 //1321012 
			jz JumpToAttackSkillAddr
			cmp edi, 0x142835 //1321013
			jz JumpToAttackSkillAddr
			jmp [jumpBack1] //If the skill id doesn't match skill ids above, jump back to next check.

		JumpToAttackSkillAddr: 
			jmp[activeAttackSkillAddr]
		}
	}

        //You need to modify the instruction in client

Address1:  jmp DispatchActiveSkill // You can patch here to jump to our own dispatch function.
Address2:  ?? ?? // the code will be broken here since jmp instruction would fill with cmp, but NVM.
Address3:  cmp     edi, 1E8869h //Keep checking other skills
Address4:  jle     ....

The result is here:
nf1CLeQ - [NEW YEAR 2019] Adding Custom Skills - RaGEZONE Forums


The problem is that the versions before ZERO JOB been introduced(I guess, not test yet) have messy skills designation paths. It may be somehow painful to patch every job. The newer versions, however, use switch-case(jump table), it would be easier to patch each job.

Hope you guys can have brand new GMS 117/83/62 OR TWMS 113 btw LOL.
 
Experienced Elementalist
Joined
Feb 10, 2008
Messages
249
Reaction score
161
The secret is out boys!!! Now lets see how many people in here can pull it off ;D
 
Newbie Spellweaver
Joined
Mar 25, 2016
Messages
13
Reaction score
0
:eek:tt:Good job, I'm just starting on this ...
:blush:I have a question what programs should I use to achieve this?

... I need inject dll?? :/:
 
Experienced Elementalist
Joined
Sep 27, 2016
Messages
217
Reaction score
68


Creds to MiLin because it wouldn't work when I tried adding it to 4th job, and somehow magically worked in 1st job
 
Last edited:
Junior Spellweaver
Joined
Apr 10, 2010
Messages
183
Reaction score
27
It depends on your skill activation paths, you need figure out the correct place to add skill id. In my case, I successfully added skills to 4th job.
 
Junior Spellweaver
Joined
Jan 10, 2017
Messages
105
Reaction score
6


Creds to MiLin because it wouldn't work when I tried adding it to 4th job, and somehow magically worked in 1st job

Wow how did you do to enlarge your screen in that way?
 
Newbie Spellweaver
Joined
Sep 27, 2018
Messages
93
Reaction score
20
Some client editing, it'll never be fully implemented though since I can't make it perfect. Just for testing purposes I guess

Either way, that's awesome! Both the widescreen edit and custom skill. Good work.

I need to git gud at that stuff. (I'm such a newbie)
 
Experienced Elementalist
Joined
Apr 29, 2016
Messages
269
Reaction score
4
Has anyone tried modifying the logic of added skills? Projectile behavior, speed, direction, and targeting? I'd like to try my hand at "porting" a newer skill into an older version, but I think I'd be better off trying to recreate the skill rather than port it directly.
 
Back
Top