Since Ben is moving from city and automatic WIN builds are not working i'll add here a link to a temporal link on my dropbox:
Long time without any news, but I'm here again...
Latest nightly build 2290 (21 may 2015) got a huge improvement on the following internal code:
Of course servers with light wordsave, few players/NPCs or running on a high performance CPU won't notice any significant changes on performance, but this can be useful when we got a heavy worldsave, many players/NPCs or a low performance CPU.
These changes are already live on nightly builds, and as always, feel free to report it on BugTracker if something goes wrong.
As promised, I'm bringing good news to everyone
With some users feedback, I made a huge optimization on sphere internal damage/armor calculations. This means: the code is now lightweight, faster, and support some new features.
If someone want use new features, just enable it and they will be ready to use.
And if someone want keep using old calculations, they still avaible and fully working too.
Removed features (as discussed here):
These changes will be live on next nightly (30/01/15), I recommend everyone make some tests before use it on live servers, and also update your sphere.ini (CombatFlags list) and sphere_msgs.scp (just remove all combat_hit_* messages)
Feel free to test it and make any suggestion
More info about elemental engine (AOS) x old AR engine (pre-AOS):
Spoiler (Click to View)
Elemental resist calculation
It's the AOS damage/resist engine, it will split a single damage value into 5 different types and will use all 5 resists against each one. This will fully use DAM[Physical/Fire/Cold/Poison/Energy] and RES[Physical/Fire/Cold/Poison/Energy] by default.
A single 40 damage can be splitted into 70% physical + 30% cold (DAMPHYSICAL=70 + DAMCOLD=30), so the damage will be 28 physical + 12 cold and this will need physical resist and cold resist to resist this damage.
If the defender has physical resist 40% (RESPHYSICAL=40) and cold resist 30% (RESCOLD=30), the calculation will be like this
1) split the damage:
40 damage = 28 physical + 12 cold
2) apply each resistance:
28 physical damage - 40% physical resist = 16,8
12 cold damage - 30% cold resist = 8,4
final damage = 16,8 + 8,4 = 25
PS: To save hundreds of script lines, sphere will automatically set the DAMPHYSICAL value if it's not set. Eg: if an npc have no DAM* set, sphere will automatically use DAMPHYSICAL=100. And if only DAMPOISON=30 is set, it will use DAMPHYSICAL=70
AR resist calculation:
It's the old pre-AOS combat engine. It uses only 1 damage type and 1 resist (AR).
Sphere always used a wrong AR formula, where the AR is always a random value between 0~AR (example: if you have 50 AR, you will resist a random 0~50 damage).
Now the AR calculation is fixed and it uses the correct AR formula:
max resist = AR * rand(7, 35) / 100
min resist = max / 2
total resist = rand( min, (max-min)+1 )
final damage = total damage - total resist
PS: if for some reason someone still want use the old (wrong) formula, it can be done by scripts too. Just add this simple event on all players/npcs:
This week I took a closer look at the EF_PetSlots feature on sphere.ini to completely rewrite it.
It was unfinished for many years, but on next nightly build from 24 oct 2014 (build 2080) this feature will come back to live.
But as it will involve many pet behaviors, it need some testing before we consider it truly reliable.
It's already included on nightly builds, all we need to do is enable EF_PetSlots on sphere.ini and add MAXFOLLOWER property on all players (otherwise the pet counter will be 0/0 and the char will never be able to get a new pet because it already reached the max limit).
Feel free to test it and report any problem found.
Quote:1) Counter will raise when:
This is to test bug #2362 http://tracker.sphere.torfo.org/bugs/view.php?id=2362
which may affect the attacker system.
There is also a bonus addon not present in the nightly yet. It contains BREAK and CONTINUE for loops in scripts.