#Ore Crusher/Dust Up-Tierer

65 messages · Page 1 of 1 (latest)

opaque oxide
#

Instead of configuring a fixed amount of dust to keep at each tier, it uses ratios (i.e. keep the same amount of T2 as T1, but keep half as much T4 as T1.) This allows it to scale well, no matter if you are just starting or an endgame player with an enormous dust stockpile. Despite that, it needs only 9 lines and one script. The default ratios should work well for basically everyone.

It also supports keeping a buffer of un-crushed ore for use with the Crafter. If you don't want this, you can disable it by editing the first line.

This works with the factory AI, but using them at the same time can get slow. If you experience extreme slowness or other issues, disable this script while using the factory AI.

Import code, as well as more details, examples, and other scripts available at my github: https://github.com/d0sboots/PerfectTower/blob/main/README.md#dust-up-tierer

GitHub

AI Scripts and Utilities for Perfect Tower II. Contribute to d0sboots/PerfectTower development by creating an account on GitHub.

sullen saffron
#

is there a way to force the script to prioritize higher tier ore/dust without the manual override? Or does that break it somehow?

opaque oxide
#

Wdym by "prioritize?" Currently it does things in smallish chunks so that it doesn't (typically) get stuck doing T1 ore forever.

hollow olive
cinder fjord
#

depends on alot of factors

#

level of ur machines, town perks, power plant boost, maybe fps

opaque oxide
#

Also depends on #infinity-phase stuff. Basically, it would totally impractical early-game, easy to do late-game.

long shadow
opaque oxide
#

The button is in the headquarters XD
(Just disable the script)

tropic tendonBOT
#

@long shadow has earned the Wildfire role!

cinder fjord
#

And then to turn off just press f4 twice

opaque oxide
#

It's normally fine to run this and the factory at the same time.
You only run into issues if you run completely out of some type of dust. In this case both scripts will fight over use of the mixer, and the factory will get confused about how much of certain dust there is. But the point of the up-tierer is to balance dust, so that this doesn't happen. (Unless you ask for an unrealistically large craft.)

sour pulsar
#

what constitutes "unrealistically large" ?

#

like we talking 100 items or 1e5+

opaque oxide
mellow bluff
#

those this work while im in tower testing?

visual raven
#

no

mellow bluff
#

sad

neat matrix
#

Is there a way to make it so you activate and deactivate it with a hotkey? seems to me messing with the Factory Automation at times

opaque oxide
#

afraid not, if you're having conflicts I suggest just disabling it by right-clicking in the headquarters

neat matrix
#

I made it so it only starts once I press Q in the factory 🙂

#

and then turn it off with F4

#

thanks for your incredible work btw!

opaque oxide
#

True, changing the impulse is easy enough, but it makes it easy to forget. No moreso than disabling it entirely though...

meager marsh
#

a couple scripts display their impulses, the same could be done here

eager holly
#

@opaque oxide, would it be possible to invert the order that the script puts in the mixer? I wanted to put from the highest dust tier to the lowest, just like you already do with the crusher, if you can help me, I'd appreciate it 🙂 because I don't understand almost anything about how to work with the scripts in the game

tropic tendonBOT
#

@eager holly has earned the Spark role!

opaque oxide
#

The reason it goes in the order it does is because of the math it uses for determining when things are balanced, it wouldn't work out right going the opposite direction.

#

IIRc

#

I think if you shift-click the mixer you can get it to "skip" the current tier it is working on and move on to the next, though

opaque dagger
#

just revisiting this and have a question: regarding the ore_buffer variable - may i set it to a high enough value so that it just disregards crushing ores altogether and just balances the already existing dust?

currently, my largest ore stack is 3e15 of t1 ore and lower stacks for all the rest. also, currently have stacks of all tiers of dust (t1 - t10).

i attempted to set the ore_buffer to an equivalent value of 1e16 (in normal full notation of course since the in-game ai doesn't accept alphabetical inputs for double type vars). when i went into factory it still picked up the ores and put them into the crusher.

is the value too large for this setting? or it's not actually meant for the purpose that i intend to use it?

appreciate advise. TIA!

opaque oxide
#

There's also a thing where it will still crush ore if you have more ore than dust (or some ratio thing), to ensure that even when starting out you don't get stuck waiting for ore_buffer. So if you set ore_buffer to infinity, there will still be that.

#

If you want it to not crush at all, you could remove it from the code pretty easily, though

opaque dagger
#

understood. thanks for the clarification!

green solstice
#

Is there a place that lists the 'ideal' ratio between raw tier resources? (i usually do ingots so i can up-tier dust without messing up my counts).. i tried doing some napkin math on a few higher tier recipes and wasnt as clear as I was hoping.. of course it depends on what your making but it seemed like T1 and T2 are almost on-par, then like T3 was 60% of the T1/T2 use and then it got nutty

opaque oxide
# green solstice Is there a place that lists the 'ideal' ratio between raw tier resources? (i usu...

You can extract what I consider the "ideal" ratio from the top line of this AI... it's based on looking at the dust needed to make multiple different high-tier items, with some other minor adjustments that I don't remember.

One thing to remember is that (until very recently) the boiler was complete trash, and even now it's a pain to use (no scripts or workers that I know of both up-tier and down-tier), so it's better to save a little extra low-tier dust rather than run out. Because of the exponential nature of lumps, trying to eke out the absolute maximum doesn't actually buy you much extra high-tier dust.

wary gale
#

I am new to the game and the script has been very useful. But I am at the point where i get so many ores that it only does crushing and uptiering and disregard the factory automation. Is there a way to limit the number of lumps and ores at a time that it processes?

opaque oxide
drifting spire
opaque oxide
#

It's my passion I guess? Also, I have been programming for 30 years XD

drifting spire
#

Oh

rain furnace
#

i'm still in era phase so maybe there is a reason why this thought is wrong, but i was wondering, wouldn't be better to make a buffer in ingots? so that i can stay in the factory till it makes a nice ingot buffer, then leave and set a worker to make all the dust into a certain tier that i need most and maybe start some job in the crafter, so it will continue doing work while i'm in some other tab in the game

visual raven
#

what do you mean buffer in ingots

rain furnace
#

instead of stacking ores or dust, making a balanced stack in ingots

visual raven
#
  1. its better to keep it as a dust unless needed cuz you noramlly need to use ore lumps a lot
#
  1. creating ingots takes time
rain furnace
#

takes time but it's on a different machine than crushing and mixing, so in my opinion it saves times

#

i mean not convert all dust into ingots, say a half

visual raven
rain furnace
#

obviously you make dust first

#

immagine this same script

#

that balances dust

#

and add that half the dust is made into ingots

visual raven
#

normally we turn dust into ingots only when we craft cuz its fast to create ingots anyway

rain furnace
#

yeah but that way you could have a balanced stack of ingots and dust, then leave the factory and start a worker to unbalance only the dust part to make what you need the most

#

for example

#

i'm now building t2 production boosters

#

and i need lots of t7 dust

#

that way i could leave the factory having some ingots saved and crush the dust to make t7 dust, then come back after a while and spend it all

#

i think this would be a nice upgrade to this already awesome script 🙂

opaque oxide
# rain furnace i'm still in era phase so maybe there is a reason why this thought is wrong, but...

2 reasons:

  1. As dino said, making ingots on-demand is very fast, so it is not a bottleneck when crafting. Thus, there is no need to keep stacks of ingots around, and a good reason not to (it takes up space).
  2. You need ore to use ore lumps. If you make ingots, you have to balance how many you will keep as ore (useful for lumps) vs ingots (no longer useful). The optimum here is "keep everything as ore, so it is all useful."