Page 1 of 1
wep damage code changing
Posted: Thu Mar 20, 2008 11:33 pm
by Red Squirrel
I'll be totally recoding how weapon damage is applied. Currently theres like 4 functions that damage calculation goes through, RunUO made a real mess with this and it's time to redo it from scratch. This is very complex so please give me time. I realize stuff is out of whack, but you have to realize how horrible the code behind this is, so its very hard to work in.
Archived topic from AOV, old topic ID:2526, old post ID:16068
wep damage code changing
Posted: Fri Mar 21, 2008 12:10 am
by d.
Yea, while you guys have been trying to balance stuff, dexxer dmg has been too low/too high, up down up down etc. Not your fault, just seems really hard to find a good balance with all the code it has to check through. I look forward to testing the new system when it's done.
Archived topic from AOV, old topic ID:2526, old post ID:16069
wep damage code changing
Posted: Fri Mar 21, 2008 12:15 am
by Red Squirrel
I'm planing to do it the OSI way. I may even just do the same with the wep speed formula. (ts very close now just small tweaks)
FORMULAS:
Tactics Damage Bonus% = Tactics ÷ 1.6 (Add 6.25% if Tactics >= 100)
Anatomy Damage Bonus% = (Anatomy ÷ 2) + 5
Lumberjack Damage Bonus% = Lumberjack ÷ 5 (Add 10% if Lumberjacking >= 100)
Strength Damage Bonus% = Strength * 0.3 (Add 5% if Strength >= 100)
Final Damage Bonus% = Tactics Bonus + Anatomy Bonus + Lumber Bonus + Strangth Bonus + Damage Increase Items*
Final Damage = Base Damage + (Base Damage * Final Damage Bonus%)
The current code for this spans like 500+ lines, I can probably do all of that in maybe oh, 30 lines? maybe less. Will be more efficient and easier to work with, and more accurate. Right now I think some stuff is even calculated twice throughout the code since its such a brutal pot of spegatti.
Archived topic from AOV, old topic ID:2526, old post ID:16071
wep damage code changing
Posted: Fri Mar 21, 2008 12:16 am
by Death
d. wrote:Yea, while you guys have been trying to balance stuff, dexxer dmg has been too low/too high, up down up down etc. Not your fault, just seems really hard to find a good balance with all the code it has to check through. I look forward to testing the new system when it's done.
Ya finding the medium is not an easy task, especially with spaghetti code.
Archived topic from AOV, old topic ID:2526, old post ID:16072
wep damage code changing
Posted: Fri Mar 21, 2008 6:40 am
by d.
yea, it will be a bit of work to reduce all the code and simplify it, but any changes made after that will be x10 easier. Should be much much easier to try to find those happy mediums to have the majority of the playerbase agree that things are balanced etc.
Archived topic from AOV, old topic ID:2526, old post ID:16083
wep damage code changing
Posted: Fri Mar 21, 2008 8:46 am
by sliptongue69
To simplify how RUO is coded: think of a plate of spaghetti. How the noodles are all overlapping each other and when you try to get a bites worth twirlled around your fork; you end up getting half the plate twisted around the fork.
Archived topic from AOV, old topic ID:2526, old post ID:16089
wep damage code changing
Posted: Fri Mar 21, 2008 11:32 am
by dprantl
I really can't understand why RunUO code is the way it is. It brings new meaning to the phrase "code bloat". I bet you could write a server that had 50% fewer lines of code and work 10 times better.
Archived topic from AOV, old topic ID:2526, old post ID:16097
wep damage code changing
Posted: Fri Mar 21, 2008 12:39 pm
by Red Squirrel
Oh I probably could. The tough parts are the core stuff like packets and LOS calculations but once I got that settled the rest would just be longer then anything. Like remaking all the mobiles and stuff. But yeah I've thought of just making one from scratch. If I did not work full time I probably would work on one, then once its stable enough I'd convert to it. I'd release it to public and this would become the official shard for it, so we'd be as big as Demise easily, if bigger once people realize how much better mine is.
But it would take at least a year maybe two, to make it decent.
Archived topic from AOV, old topic ID:2526, old post ID:16099
wep damage code changing
Posted: Fri Mar 21, 2008 1:16 pm
by Death
dprantl wrote:I really can't understand why RunUO code is the way it is. It brings new meaning to the phrase "code bloat". I bet you could write a server that had 50% fewer lines of code and work 10 times better.
Half the time I'm surprised their code actually runs. Ever debug somebody's program, sit there for 5 minutes and go "How the fuck did this even compile?".
There was a really good example of that in runuo I came across a few months ago, think it was either in crafting or fishing (Probably crafting).
Archived topic from AOV, old topic ID:2526, old post ID:16113
wep damage code changing
Posted: Fri Mar 21, 2008 1:33 pm
by Red Squirrel
Oh crafting is probably the most brutal code. Wonder why I made my own recipe system? yeah, thats why. The less time I have to spend in that system the more red hairs I get to keep. Gray ones really stand out, don't need more.
Archived topic from AOV, old topic ID:2526, old post ID:16116
wep damage code changing
Posted: Fri Mar 21, 2008 1:40 pm
by Death
Red Squirrel wrote:Oh crafting is probably the most brutal code. Wonder why I made my own recipe system? yeah, thats why. The less time I have to spend in that system the more red hairs I get to keep. Gray ones really stand out, don't need more.
Your recipe system's more flexible anyways. At least you can use a recipe a few times and still sell it to somebody. The double/triple skill requirements is also a lot better and creates an advantage for strange, hybrid classes to make special "unique" items (Like how mage carpenters make abbatoirs/pentagrams).
Archived topic from AOV, old topic ID:2526, old post ID:16122
wep damage code changing
Posted: Sat Mar 22, 2008 12:19 am
by Red Squirrel
Yeah the uses option is nice, since the OSI way you have the recipe forever, so once you have them all, you're basically "done" and getting recipes is not rewarding anymore.
I finished the damage calculation, it should be better now. I'll leave it update automatically at SW. The changes are minor enough that it should not cause the server to require my interaction. if yes then it will be down for like at least a good 5 hours since I'll be sleeping.
If I happen to wakeup early near after SW time I'll try to get up and check real quick before falling asleep.
Archived topic from AOV, old topic ID:2526, old post ID:16146