Jump to content

  •  

Playtester

Member Since 24 Apr 2013
Offline Last Active Apr 20 2016 09:24 AM
-----

#48702 Follow some rathena stuff

Posted by Playtester on 08 January 2015 - 01:46 PM

Due to my declining health, I probably won't be able to do as many updates on rAthena anymore (but it's pointless if they don't get merged to Hercules anyway), so here are the last two updates I did that should be merged to Hercules if there aren't yet (sorry, no energy to check):

 

1.

https://github.com/r...59f3e999b5f528d

Official behavior of Gravitational Field and official ranges for Ganbantein and Gravitational Field. This makes the skill quite unique and really interesting. For example how it allows to add autocasts to the formula.

I think some of the minor fixes are not needed on Herc due to different damage code.

 

2.

https://github.com/r...022f712be460488

Spiritual Bestowment fix. Not sure if it works properly on Herc. It should only consume a sphere if a sphere is actually transferred (so if the target already has 5 you won't lose any) and also should not work on Gunslingers.

 

Maybe once all my fixes are on Herc I come back. =3




#47242 Non-stackable Storm Gust and Meteor Storm

Posted by Playtester on 04 December 2014 - 06:59 AM

Well all really do stack you just can't duplicate the effect.

 

But it's very easy to implement no skill unit cell stacking. Simply open skill.c and find the function skill_cell_overlap. There you can block every skill unit combination you want.




#46812 Follow some rathena stuff

Posted by Playtester on 24 November 2014 - 02:11 PM

The Land Protector fix was merged so I crossed it out.

 

In meantime I did some more smaller fixes:

 

1.

https://github.com/r...ae4d2a4721a6807

Same issue is on Herc. Autobonus3 is called in skill_onskillusage, but it's only called in skill_attack by default. There are skills that don't use skill_attack in particular nodamage and ground skills. For nodamage skills it was already implemented to separately call skill_onskillusage, but it also needs to be done for position skills.

 

2.

https://github.com/r...c8c420c20a51077

This was mostly correct on Hercules already, except for the bonus from Musical Lessons. Bonus should increase at every even number (2, 4, 6, 8 and 10) instead of every odd number.

 

3.

https://github.com/r...365f7f2207234bc

On officials direction of a unit doesn't change when it attacks, so when a knockback depends on direction, it will depend on the last direction walked into even when attacking in the opposite direction. [color=rgb(0,128,0);]Merged[/color]

 

4.

https://github.com/r...7c00d5f7e585a6a

On one hand fixed 1st Transcendent Spirit. On officials it basically works like Marionette Control, it calculates the bonus at cast (which makes stats go to BaseLevel-10 with a maximum of 50). If there are other buffs later it's added on top of the bonus (except for Agi Up and Blessing which cancel the soullink directly). There was a lot wrong with this skill which is all fixed now. :-)

Even more interesting than that is that I fixed several position lag issues. Basically the client will not display complex paths properly. On official servers, monsters won't even start chasing a target when the path to it is too far. If a monster does anyway (as on emulator) the path of the monster will not be displayed properly. There was also an issue that a monster displayed "irregular movement" which causes high position lags when a status changed ended (e.g. Quagmire) which I also fixed. Finally there was also a problem that sometimes I monster stopped chasing but still displayed as "moving" on the client.

When merging, please also merge the follow up fix: https://github.com/r...3d6235b77123178 [color=rgb(0,128,0);]Merged[/color]

 

5.

https://github.com/r...98ff0d2632cdb53

Seems the skill menu bug is already fixed on Hercules.

The looter behavior is quite wrong on Hercules as much it was on rA, though. Looters should only run to items that are in a linear line of sight (not walk around corners to get an item). Also they will always target the first item that drops (on Herc, it's still closest item). Plus their loot range is only "0" meaning they have to be on the same cell as the loot. It makes quite a difference because it makes them walk around a lot to loot stuff whereas on Herc it's basically just walk to an item and then take everything.




#46500 Follow some rathena stuff

Posted by Playtester on 16 November 2014 - 06:42 PM

More fixes to merge:

 

1.

https://github.com/r...4d8b60dfd037a94

Plant damage code will be hard to fix, probably better to just implement it yourself. I posted all the test data in the corresponding bugreport thread here:

http://rathena.org/b...0-plant-damage/

The skill damage and hit definition can just be merged, though. The fix is still missing that Fire Pillar also should be unable to hit plants, I fixed that in a follow-up (see below).

Found plant code important to fix because I noticed several classes can kill plant mode monsters very easy with certain skills although they shouldn't be able to.

Land Mine fix should be easy to merge (simply didn't make sense that it deals the highest damage and still has AoE like Blast Mine which is much weaker).

Fixed reflect flag - not sure if there's a conflict in Herc as well since it uses different flags.

Sightblaster code improvement is something I got from idAthena, prevents a possible crash fix (even though I have my doubt that sce can be NULL at that point).

 

2.

https://github.com/r...7c6ed37a371c0b2

Several Waterball improvements. Fix is not perfect, but important as it fixes several critical exploits that were possible with the old version.

Removal of knockback of Crimson Fire Formation (bug report is on Herc forums about it).

Bosses ignoring skill induced walk delay should be added at the same time as the Waterball update (so they don't get stuck for 10 seconds).

The timer interval is probably Herc's own decision. We decided in rAthena that accurate emulation takes priority over performance. In any case since it's just changing a define, each server owner can do it himself (but I still like it if the official behavior is the default).

 

3.

https://github.com/r...903ca08ffeeae4d

Finally implemented Land Protector to behave as on official servers. This was the most-wanted bugfix of players / server owners when I asked around, that's why I took the time to investigate and fix it. All the skills and Storm Gust knockback need to be updated at the same time as they are all related to the Land Protector issue.

There's also a bugreport about it on Herc forums. [color=rgb(0,128,0);]Merged[/color]

 

4.

https://github.com/r...ddfa2918370d20d

Follow up to plant damage -> Fire Pillar should not be able to hit plants (you can hit plants because the AoE of level 6-10 is 5x5 so you can place Fire Pillar two cells next to a plant and then let a monster walk over it).

Also fixed Acid Bomb (the ground skill) interval for renewal, although that still doesn't fix it fully as in renewal it should be ATK+MATK and not just ATK. Well the interval was easy to fix so I did that quickly. [color=rgb(0,128,0);]Merged[/color]

 

5.

https://github.com/r...508dcb6793a8dce

Small Magnum Break damage fix. [color=rgb(0,128,0);]Merged[/color]




#46375 is it normal to have vending tax? and how to remove it?

Posted by Playtester on 13 November 2014 - 01:27 PM

Yes 2% vending tax is official behavior. Gravity added this around episode 10 to battle inflation (same reason why they added Rachel Donation, Socket Enchanter and Comodo Gambling). Ragnarok Online easily suffers inflation (= more money "created" by NPCs than money used), the Vending Tax helps to stabilize the economy.


#46244 I want to learn Source code

Posted by Playtester on 11 November 2014 - 11:42 AM

Working on the emulators certainly helped me a lot also learning it. I'm not the type who reads explanations. I just look at examples and then try to imitate them. At first I started with easy code changes like just correcting the damage which is basically just finding it in the code and changing a number and then tried continuously harder things.
Now I set debug messages everywhere and run test cases to figure out complex problems.

But I guess I had programming knowledge even before joining eAthena.

So going back even earlier... well I guess I simply wrote a hello world program. Also looking at an example, copying it, getting it to compile, and be happy that it showed "Hello world". And then I slowly expanded that like "When I press a key I want it to show a second message" and "Now the user should input a number and it should show the square of it" and then I started writing small minigames like "A goblin appears what to you want to do? 1. Hit it 2. Run away".


#46162 How to make 'unitwalk' work when distance to target is too big?

Posted by Playtester on 09 November 2014 - 08:39 PM

You won't be able to make the walkpath much longer, even if you can recode pathfinding to not have any limits, it will become so complex that just a few units will make the CPU busy and require a lot of memory to remember all possible paths.

 

So yes, you need to use waypoints.




#45957 Follow some rathena stuff

Posted by Playtester on 05 November 2014 - 07:04 AM

Oh and I forgot to mention that Herc still has custom ABRACADABRA rates rather than rates depending on level of skill used.
https://github.com/r...e88de93e92c646f
Imo, should have high priority to update as the chance of classchange is more than 10 times higher than officially at the moment.


And MVP drop should check first item first, then second, then third, instead of random order:
https://github.com/r...43eb9973b3cd0ab


#45865 Follow some rathena stuff

Posted by Playtester on 03 November 2014 - 02:55 PM

Just a Heads-up for Michi.

The following changes still need to be merged:


A
https://github.com/r...ee3f59e5ed02e49
Half of the combo code was already working in Herc, I tried to use Herc's structure so it's easier to merge. However when browsing Herc code I found a few bugs that I fixed at the same time:

1. All combos have a hard-coded delay on Aegis, so it won't show up on the Aegis files. By testing I concluded that the canact delay applied is 1000ms - 4*agi - 2*dex whereas the time you can activate a combo is until 1300ms - 4*agi - 2*dex (so effectively you have a 300ms time window to activate them). Even though our old files had different after cast delays specified, my tests on official servers showed that it's same delay for all of them (exactly the same time until I can activate them). The problem is that the current code uses aftercast delay specified in the skill_cast_db and that value was not set for many skills, especially in the renewal database it was missing completely. I solved this by defaulting the aftercast delay of combo skills to 1000ms if not specified otherwise in the skill_cast_db and removing all the delay from the pre-re skill_cast_db. This is still missing on Herc.

Also on rAthena there was the bug that skills that automatically activate but do not go via the Autospell code will not set any canact delay so it was possible use MO_CHAINCOMBO right when triple attack activates rather than after it. We have to manually set canact delay in these cases. This probably needs to be fixed on Herc as well but I'm not sure. Needs to be tested.

Should be easy to merge, on Herc function is called "skill_delay_fix" instead of "skill_delayfix", otherwise identical.

2. Beast Strafing was already fixed on Hercules Renewal, however it was neglected on Pre-Renewal, see this bug report:
http://herc.ws/board...beast-strafing/
Just need to update pre-re/skill_db.txt to fix it as I posted in the thread already. :-)

3. Taekwon combos were already 75% fixed on Hercules. You implemented a new mode "2" of SC_COMBOATTACK which means "set only attack delay but no move delay". I used a similar solution in my commit. However you forgot to forward that variable for TK_COUNTER:
sc_start2(src, src, SC_COMBOATTACK, rate, TK_COUNTER, bl->id,(2000 - 4*sstatus->agi - 2*sstatus->dex));
Just replace this code with sc_start4 as I did in my commit. It's a different function, but the code part is 1:1 identical so it should be easy to merge.

4. This is ONLY bugged on Herc: In unit.c, Herc removed SC_COMBOATTACK when moving. However, my tests showed that I could use combo skills even after moving. That means SC_COMBOATTACK should NOT be removed on moving.

5. Herc doesn't have the function skill_combo, but you can find this code part:
if (combo) { //Possible to chain	if ( (combo = DIFF_TICK32(sd->ud.canact_tick, tick)) < 50 ) combo = 50;/* less is a waste. */	sc_start2(NULL,src,SC_COMBOATTACK,100,skill_id,bl->id,combo);	clif->combo_delay(src, combo);}
As you can see here, it put minimum delay for combos to 50. But actually a delay below aMotion doesn't make any sense because the client will refuse to send skill requests during aMotion in the first place. The only who benefits from a lower delay is a hacker who can send skill requests manually.

6. Monk Spirit should make the 4 Monk Combo skills CHAINCOMBO, COMBOFINISH, TIGERFIST and CHAINCRUSH cost only 2 SP, regardless of original cost. Also easy to merge, code is pretty much the same just search for the line:
req.sp -= req.sp*25/100; //FIXME: Need real data. this is a custom value.
Don't forget to remove MO_TRIPLEATTACK from the case list or else you will make it cost 2 SP instead of 0 SP!

The rest of my changes were already working on Hercules, no need to merge. :-)


B
https://github.com/r...d2011f5be43b5e7
Strongly recommend to use my solution for Icewall instead of the current "can't cast on same cell again" implementation.
Reasons are explained here: http://herc.ws/board...e-7058-icewall/

(Btw you can close this one - http://herc.ws/board...llar-and-traps/)


C
https://github.com/r...a6075937edfb95c
Most of this still needs to be merged. Not sure how easy it is to merge.
I recommend at least updating map.c and add the unit_blown_immune function. Those changes are 100% backwards compatible.
My Skid Trap fix should also be easily possible to directly merge (make it knock back away from original position of caster when the trap was placed and make the affected unit unable to walk for 3000ms).
The rest depends a bit on the existing code structure and might require testing renewal traps, but from a quick look, it looks almost identical to rA, so should be easy to merge I think?


D
https://github.com/r...215ddee66c5976a
Should be merged, autobonus is also bugged on Herc in exactly the same way.
The other half is already merged. :-)


E
https://github.com/r...06759fcc40fc41f
These are also bugged on Herc, but the code is a bit different. However it's not too hard to fix. Basically level 1-5 have duration 30000 and level 6-10 have duration 2000. We originally solved that on rAthena by making the duration divided by 15 for players in the status change defense code. But later it was changed to use Aegis behavior and just define different duration in skill_cast_db.
It is however conflicting with the defense code (divided by 15 TWICE).
Also there is some weird status change resistance code there that shouldn't be there:
sc_def2 = st->vit*25 + st->agi*10 + SCDEF_LVL_CAP(bl, 99) * 20; // Linear Reduction of Rate
That part should be removed. You CAN'T resist buffs.

Also note that SC_ARMORCHANGE on rAthena is SC_STONESKIN on Herc. Otherwise it's quite similar.


Hope this helps, just ask if you have more questions.


#44784 Luck Immunity!!!

Posted by Playtester on 09 October 2014 - 05:39 AM

Well in that case just find:
  //Aegis accuracy  if(rate > 0 && rate%10 != 0) rate += (10 - rate%10);}
And then add:
  //Aegis accuracy  if(rate > 0 && rate%10 != 0) rate += (10 - rate%10);  //Immunity at 300 Luk  if(st->luk > 299) rate = 0;}



#44760 Luck Immunity!!!

Posted by Playtester on 08 October 2014 - 03:18 PM

Well 300 is ugly number, because 10000 can't be divided by it.
You could for example make each Luk give 33 scdef for the corresponding status change.

Maybe I can give other suggestions, but I need to know what your core issue is. Do you think that Luk gives too much resistance right now or too little? Do you only care about a specific status change or do you want all status changes only depend on Luk? Should there be other stats affecting the resistances? How should different resistances stack? Should Luk reduce the chance gradually or should it be 299 Luk 100% chance, 300 Luk 0% chance?

As you can see there are a lot different possible implementations.


#44714 Luck Immunity!!!

Posted by Playtester on 07 October 2014 - 11:19 AM

Deprecated, as the official status resistance formulas have been added and they are very complex and different for every single status change so a general option for luk wasn't viable anymore.

The normal status DEF rate option now applies to all stats that are involved in the resistance:
// Adjustment for the natural rate of resistance from status changes.// If 50, status defense is halved, and you need twice as much stats to block// them (eg: 200 vit to completely block stun)pc_status_def_rate: 100mob_status_def_rate: 100
You can also manually change the individual status resistances fairly easily via the code.
Just look at status.c and search for "int status_get_sc_def".

Just understand sc_def as percentual def and sc_def2 as linear def (kind of like armor DEF / vit DEF in pre-renewal).
tick_def and tick_def2 is for duration respectively. You don't need to set tick_def specifically as by default it uses sc_def.


#43685 Status Resistance

Posted by Playtester on 17 September 2014 - 06:53 AM

Depends a bit on what exactly you want.

Status change resistances are quite complex. They work a bit like normal def as in there is a hard def (percentual reduction) and a soft def (linear reduction).
I wrote a guide about them over on RMS:
http://forum.ratemys...-(pre-renewal)/

So, do you just want all status changes to depend only on LUK? Or get reduced by other stats? What should affect the chance? What should affect the duration? Etc.

You can find the relevant source code for the status changes in the link that csnv posted.

Basically if you want to change the basic stats a status change uses, you need to change it for each status change individually, see explanations in the comments of the source code about how sc_def, sc_def2, tick_def and tick_def2 work (10000 sc_def = 100% resistance). It's actually pretty straight forward. For example if you want each LUK to reduce chance and duration of STUN by 0.25% that code would look like this:
	case SC_STUN:		sc_def = st->luk*25;		break;
(Note: You don't need to set tick_def, it automatically uses sc_def if you don't set it.)

Or if you set the sc_def config to 25 instead of 100 then you would write:
	case SC_STUN:		sc_def = st->luk*100;		break;
The config option is applied at the end:
		if (battle_config.pc_sc_def_rate != 100) {			sc_def = sc_def*battle_config.pc_sc_def_rate/100;			sc_def2 = sc_def2*battle_config.pc_sc_def_rate/100;		}
If you leave the source code as it is and just set the config option to 25, then the status changes simply need 4 times higher stats than they usually need. As LUK has a very high effect on the linear reduction, you will probably be immune to any status change much earlier.


Hope it helps. If you explain in detail why you want to change it and how exactly it should work, I could probably help more.