• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Magic Percent Increase (Solved)

Guitar Freak

_LüA_n☺b_
Joined
Dec 27, 2008
Messages
831
Reaction score
13
Location
Caracas, Venezuela
Hello everyone.

First of all, I posted this question here in "general" Support instead of LUA/XML, because I highly doubt this can be done on LUA/XML.

Also, as the title says, Ill be repping (10 rep power) but only to helpful responses. Here we go.

♠ Compatibility:

Im using TFS 0.3.5pl1 for my proyect, but if you know how to do this only for 0.3.6+ thats ok too, I might change everything to that version if this can only be done to it.

But again, preference is 0.3.5pl1.

♠ Description:

Well, we all probably remember those old Evolution XML servers where we had an item attribute called "increaseMagicPercent", if you havent heard of it, it was an attribute that would increase the total Magic damage dealt of the player using a percentage.

This was usually seen on old 7.6 servers aswell, like when you worn a blue robe you would hit XX% more on everything magic-related (spells, wands, etc).

So anyway, Ive been all over TFS sources and there is nothing like this that my little knowledge on C++ can tell.

The only thing similar is the "magicpointspercent" attribute which modifies by a percentage the magic level, which is not what Im looking for.

I want it so when you wear an item, your total magic damage percent increases, period. So.. how in hell??

Storages is the way to check if the item is worn or not, but then I have no idea of how to modify this "total magic damage" of a player in TFS, Ive checked all functions in doc/sources and almost everything else in sources and after 2 weeks, Im just clueless.

It is possible since Ive seen 8.5 proyects with this.
Maybe my mental block from failed-attemps these past 2 weeks is keeping me from seeing a silly mistake that you guys can spot.

To clear any doubts, Im looking for help or even leeching, on creating this new item attribute OR lua function, that does what I specified up there.

Thanks in advance.
 
Last edited:
This is very interesting, I also wonder what did actually happen with the percent value..

Alot of servers had blue robe increase magic damage..
I guess you can just make your own formula and implement the attribute key yourself.

Should be somewhere in items.cpp I suppose.


Just trying to help since im also interested :)
 
I guess you can just make your own formula and implement the attribute key yourself.

Should be somewhere in items.cpp I suppose.


Just trying to help since im also interested :)

Thanks for trying, but I dont think you understood exactly what Im asking for here, its a bit confusing.

See, I dont mind making my own formula and whatnot, but the problem is not that. The problem is, how can I "define" this "total magic damage" dealt by the player so I can even apply a percent/formula to it?

For example, in player.cpp you can see the lines that manage this:

"You deal XX damage to XX."

That would be the total damage the player hits to something else, but how can I do it so I can 'call' this "total damage" a variable in LUA or in XML, and more to the point of this thread, how can I "extract" from that total damage the "magic damage" only, in the way that I can later do in lua/xml "if X item is worn, set Z variable (this would be the damage) * percent (or formula, etc)", and so on.

Its confusing and Im not sure how to explain it correctly but I hope someone understands what Im looking for and could help, I really need this thing, and I really dont know how to pull if off.
 
ahhh i know what you mean! i remember hyperdrive use to have it where only specific types of damages are increased say by 15% per item worn (if it had that attribute), so if exori vis hit 100, itd hit 115. thats a tricky one.
Yay for amplifying damage
 
Back
Top