|Anonymous | Login | Signup for a new account||19-02-20 06:14 CET|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002546||SphereServer||executable - generic||public||14-08-15 20:12||29-12-15 14:19|
|Target Version||Fixed in Version|
|Summary||0002546: NPC movement speed|
|Description||Since someone (me included) finds the actual NPC movement speed calculation worse (less flexible and more difficult to set up properly) than the past one, i suggest having a .ini setting (like CombatSpeedEra) which allows to set the old formula, the actual or a new one which rely only on MOVERATE (like 0-100% of the max speed).|
|Tags||No tags attached.|
|Nightly Version||Automated (specify build number)|
|Internal Build Number|
The old formula was like:
TICK_PER_SEC is 10.
iTickNext = TICK_PER_SEC + Calc_GetRandVal( (100-iDex) / CONST ) * TICK_PER_SEC / 10;
This was then scaled like iTickNext = (iTickNext * MOVERATE)/100
The new formula is:
iTickNext = TICK_PER_SEC + Calc_GetRandVal( (100-(iDex * MOVERATE) / 100) / CONST ) * TICK_PER_SEC / 10;
I need more feedback on how this is a problem for you.
You cant just scale between 0 - 100% of the Dex Value. You can scale to 150% too. Naturally there is a limit where the npc wont become faster if you hit 0 Ticks between steps.
Before you were scaling the result of the above formula, and now the Input value (Dex) is scaled. How's that a problem in your case?
The main problems that make this formula uncomfortable are 2:
1) Every monster has different dex from the others (not the same mob, but the others, like between ogre and zombie). So, as example, in order to obtain the same movement speed for these two monsters i need very different values of MOVERATE. A MOVERATE value does not mean a precise speed or a speed "range" of values, so i need to do multiple tests with different values for every single npc to get the speed i want for each of them. That is boring and long to do, while having a 0-100% variable (like the new "formula" i suggested) or a formula not so relieving on dex (like the old one) would be simpler and faster, and that become significant with lots of npcs to check and adjust.
2) I may want to have npcs with very high dex (800+) or very low dex (like < 50). In these cases, high variations in MOVERATE results in very tiny variations of the speed, and i can't have a monster lightning fast with 50 dex, or the opposite.
Other related issue, even if i don't think it's caused by the formula: an npc with MT_WALK but not MT_RUN, 800 dex and 130 MOVERATE will still do short pauses between two consecutive steps. Isn't it supposed to walk without pauses, at full "walk speed" (like a player walking)?
|Apparently, the problem isn't about the formula itself, but inside SetTimeout (called in CChar::NPC_WalkToPoint, from CCharNPCAct.cpp) or in OnTick stuff. Bypassing the formula by using SetTimeout(1), which should be the minimum value, makes the NPC run at somewhat like 95-100% the speed of a player running without horse. In the past, a SetTimeout(1), so max speed, made the char move a lot faster (even 4 tiles per tick? i can't remember), so the solution would be to have again a higher tiles per tick cap.|
|14-08-15 20:12||nolok||New Issue|
|16-08-15 21:28||matex||Note Added: 0002946|
|16-08-15 22:30||nolok||Note Added: 0002947|
|01-09-15 09:57||nolok||Note Added: 0002956|
|29-12-15 14:19||nolok||Note Added: 0003003|
|Copyright © 2000 - 2010 MantisBT Group|