[quote author=Paragon link=topic=1410.msg8100#msg8100 date=1210568506]
Yea... I saw that when I was writing the script in the beginning. It was my little secret I didn't want to deal with. Each thing is meant to check the highest value... hacking a fix would be possible. To be perfectly honest this is by far the most used item of code I have ever created. But this is kind of where my lack of experience shows through. I am currently deciding to do a complete re-write or if I should grit my teeth and stich this project back together. As soon as I figure that out I'll release a version that addresses the speed issue, the cheifstaff problem (It's tricker than you think even with item_type returning cheifstaff), the idea of giving a primary and secondary attribute to maximize and this problem.
BTW: Sorry if this msg is odd, my head is in the clouds right now.
[/quote]
A quick fix to give the ability to maximize noncombats would be to add a noncombat field. For every item that adds to the combat % this would be a negative number. For every item that decreases combat % it would be a positive (the opposite of the combats field). You'd then be able to maximize non-combats.
I did something similar for farming. I wanted items that are +meat AND +items to be used first instead of similar items that are just +meat. So like instead of "toy maglev monorail" which is +10 meat it would use mayfly bait necklace because it's +10 meat as well, but also +10 items...so it's "better" for farming.
So I added a "farm" field calculated as: meat + (items / 2). So mayfly bait necklace I gave a 15 for farm, because it's 10 meat, 10 items. A 20 meat item is still "better", so if I have one it'll use that instead. But it makes the mayfly bait necklace favored instead of a similar item that's +meat only.
I think the formula is a little skewed, as it then makes rabbit's foot necklace used instead of toy maglev monorail. So which is really better, +10 meat only or +7 meat and +7 items?
Anyone have any thoughts? Note that I didn't change any code - just edited ItemMap.txt
Yea... I saw that when I was writing the script in the beginning. It was my little secret I didn't want to deal with. Each thing is meant to check the highest value... hacking a fix would be possible. To be perfectly honest this is by far the most used item of code I have ever created. But this is kind of where my lack of experience shows through. I am currently deciding to do a complete re-write or if I should grit my teeth and stich this project back together. As soon as I figure that out I'll release a version that addresses the speed issue, the cheifstaff problem (It's tricker than you think even with item_type returning cheifstaff), the idea of giving a primary and secondary attribute to maximize and this problem.
BTW: Sorry if this msg is odd, my head is in the clouds right now.
[/quote]
A quick fix to give the ability to maximize noncombats would be to add a noncombat field. For every item that adds to the combat % this would be a negative number. For every item that decreases combat % it would be a positive (the opposite of the combats field). You'd then be able to maximize non-combats.
I did something similar for farming. I wanted items that are +meat AND +items to be used first instead of similar items that are just +meat. So like instead of "toy maglev monorail" which is +10 meat it would use mayfly bait necklace because it's +10 meat as well, but also +10 items...so it's "better" for farming.
So I added a "farm" field calculated as: meat + (items / 2). So mayfly bait necklace I gave a 15 for farm, because it's 10 meat, 10 items. A 20 meat item is still "better", so if I have one it'll use that instead. But it makes the mayfly bait necklace favored instead of a similar item that's +meat only.
I think the formula is a little skewed, as it then makes rabbit's foot necklace used instead of toy maglev monorail. So which is really better, +10 meat only or +7 meat and +7 items?
Anyone have any thoughts? Note that I didn't change any code - just edited ItemMap.txt