genbtc / AutoTrimps

Automation for the idle incremental game 'Trimps'
36 stars 51 forks source link

Silly assumption that "level to two" is always right. #162

Open keybounce opened 6 years ago

keybounce commented 6 years ago

Is there any way to get AutoTrimps to not buy level II on all pieces of equipment automatically? Perhaps a better question: why does AutoTrimps assume that level II is the best use of your metal 100% of the time? I'm not asking, how do I stop AutoTrimps from buying levels. I'm asking, how do I make AutoTrimps buy whatever level is currently the best instead of assuming that level II of the cheapest prestige is always better than, say, Abalest or Gambeson. (Typical use case: auto leveling turned off, until near the end of the run; at that point, I want to manually buy levels, and I want to know what my best use of resources at that point is. Right now, I have to use a calculator on every item in my equipment list; that's what a computer tool should do for me.)

keybounce commented 6 years ago

OK, so the code section is:

//AlwaysLvl2 - Was AlwaysArmorLvl2 (now default)
if (gameResource.level < 2 && MODULES["equipment"].alwaysLvl2) {
    Factor = 999 - gameResource.prestige;
}

there is no GUI control for MODULES["equipment"].alwaysLvl2

ghost commented 6 years ago

Level 2 IS the best use of your metal, it is the most efficient level on every equip. When it wasn’t there, the script would often forget to level armour above lvl1, and you’d lose time by dying. While you’re rushing zones the resource use is negligible, and at the end of your run, if you can’t afford l2 of an equip you’re probably pushing too far.

keybounce commented 6 years ago

Sorry, I have run the numbers on the Arbalest and the Gambeson. Level II on these is very frequently better than level II on anything else. Level III on these can be better than level II on other equipment.

There is a difference between "a fix for the script is not leveling anything" and "always buy level II on everything".

And while you say "negligible", I say "any time not spent buying trimps early in the game is time wasted/Tauntimp potential lost". Maybe this changes when you get overkill, liquification, etc., but for now the time spent progressing is best spent buying housing; anything that gets in the way of buying housing is a loss.

There is a difference between "when you first buy the first available prestige, level II in that prestige is always the best use of your metal at that time" (I have not run the numbers for this), and "when I reach the point of needing to level, I want to know what is the best equipment to improve that I have" (and this is where it is not always best to go to level II in sequential order).

On a similar note, I saw that the script only considers "don't buy equipment before level 60" for levels 58 and 59; for me, none of the equipment between 50 and 59 is purchased until 60. (Considering that I have purchased it all at 45, and if I did go to 55 while buying stuff I would have all bought to 60, trying to save metal for the 90% cost reduction means stopping early enough that I'm going to be saving a noticeable amount of metal).

keybounce commented 6 years ago

So what I'm noticing is this: if I have more than one prestige available to buy, AutoTrimps will always buy the first available, without regard to the most efficient available.

I can understand the view that if I have exactly one unbought weapon/armor prestige, and all of my others have been bought and leveled up to two, then the most efficient use of my metal is to buy the next and level it to two. But that is rarely the case.

As a general rule, if I only have one unbought prestige, I'm not needing to level; the most efficient use in that case is to buy and not level. Equally, I will (relatively) quickly reach the point where I don't need to buy armor. AutoTrimps will even say that I don't need more armor. Yet it insists on buying them in order.

What I would like to see: when it decides that I do need more armor, decide which is the most efficient armor upgrade available, and buy that -- regardless of order. This is the exact same behavior when buying levels -- buy the most efficient level, rather than the next sequential level.

Now repeat that for weapons when I need weapons. Of course, since I'm always buying weapons, the only time this will be a factor is when I am dropping two books, but can only afford to buy one -- at that point, I am now building up a library of "potential to purchase" and the question of "what is the most efficient?" now becomes a real question.