RareBeast
25-01-2007, 08:52 AM
Hi all,
I'm new to modding (and programming). Trying my hand at writing one that rates gear based on it's stats I'm just not sure how to get the various stats off the tool tip of the item. I think I know how to search for "+4 Agility" in the tooltip, but not how to extract the numerical value of the stat.
Search for "%+(%d+) Agility" - I know the brackets bit isn't quite right. But how do I say Item_Agility = (%d+) so that in the above example, the Item_Agility would have a "value" of 4?
I have looked at many mods LUA files (equipcompare, itemscore, outfitter, tankpoints) and can understand bits, but none of them seem to be clearly doing what I want (i'm sure their solutions are more elegant) in a way I can understand :)
Thanks for any advice :)
I'm new to modding (and programming). Trying my hand at writing one that rates gear based on it's stats I'm just not sure how to get the various stats off the tool tip of the item. I think I know how to search for "+4 Agility" in the tooltip, but not how to extract the numerical value of the stat.
Search for "%+(%d+) Agility" - I know the brackets bit isn't quite right. But how do I say Item_Agility = (%d+) so that in the above example, the Item_Agility would have a "value" of 4?
I have looked at many mods LUA files (equipcompare, itemscore, outfitter, tankpoints) and can understand bits, but none of them seem to be clearly doing what I want (i'm sure their solutions are more elegant) in a way I can understand :)
Thanks for any advice :)