#Factory Automation v3

1 messages ยท Page 2 of 1

winged pilot
#

nope, sure not

low cedar
#

This is about "if you are showing an 18 digit number, and you increase the top digit, the bottom 4 digits will change"

#

That is too weird to expose people to

winged pilot
#

one sec, I'll do a test rq XD

low cedar
#

you can't

keen swallow
#

not that it would be useful anyway

low cedar
#

there's no simple in-game way to get it to format a large double as an 18 digit number in AI

winged pilot
#

not with the AI
just usual game behaviour

low cedar
#

Oh, if you have e18 of cubes or smth and use full notation this is easy to see

#

This is just an inherent property of floating-point, and the specific limit here is inherent to doubles

winged pilot
#

interesting, so this is what you mean, ye?
1e18 - 1e17 - 1e4

winged pilot
#

playing around with more stuff
turns out that you can tell if you have infinite ore if you place it inside of the crusher
so... I guess that can ensure the AI doesn't get confused?

low cedar
rocky folio
verbal pewter
winged pilot
rocky folio
#

oh that's why

#

i was so used to numbers automatically switching notation once they went to 10B+

#

or 1-10K in tpt2

winged pilot
#

you either get E notation or full notation
no other notation

verbal pewter
winged pilot
#

do you want to do string arithmetic tho?

#

you can, but it's really inconvenient

verbal pewter
winged pilot
#

yea, you can, but do you really want to?

verbal pewter
winged pilot
#

good luck introducing QI by doing that

verbal pewter
#

10^18?

winged pilot
#

ye

verbal pewter
#

sorry, had to go for a sec

#

looks really simple

winged pilot
#

it is simple, technically, but it's still a pain XD

verbal pewter
#
#morethan(x) var >= 10^x
#number(x) i2s(var / 10^x)
number = if({morethan(18)}, {number(18)} . Qi, if({morethan(15)}, {number(15)} . Qa, if({morethan(12)}, {number(12)} . T, if({morethan(9)}, {number(9)} . B, if({morethan(6)}, {number(6)} . M, if({morethan(3)}, {number(3)} . K, var))))))
#

might've missed a parenthesis or 2

winged pilot
#

and now you gotta add the case where you have numbers like 10^18 + 1
and you get a whole mess with losing data

verbal pewter
#

alright well yes it would be a mess

#

just round it at that point ig

winged pilot
#

and lose data?
not that nice to do

verbal pewter
winged pilot
#

you gave it as a solution to string arithmetic
if you do string arithmetic like that, you're losing a lot of detail

verbal pewter
winged pilot
#

I don't
that's why I asked "do you really want to do string arithmetic tho?"
it causes all sorts of problems

verbal pewter
#

at least to make sci notation

winged pilot
#

personally, I'd just change from base 10 to base 32
but man, it's a pain to get this one right, but it's at least easy to automate ๐Ÿ˜…

winged pilot
# verbal pewter at least to make sci notation

it's a real struggle

; Space for convenience

:name Base 32 tester

#alphabet abcdefghijkABCDEFGHIJK

:local double variable
:local string sign
:global string number

key.w()
key.s()

sign = if (contains (number, "-"), "-", "+")
gotoif (if (variable == 0.0, start + 1, assemble_string), sign == "-")

start:
variable = variable + i2d (if (\
    contains ("{alphabet}", sub (number, 0, 1)), \
    10 + index ("{alphabet}", sub (number, 0, 1), 0), \
    s2i (sub (number, 0, 1), 0)\
) * (10 ^ (len (number) - 1)))

number = sub (number, 1, 99)
gotoif (start, len (number) > 0)

variable = a.d (variable, sign, if (contains (impulse(), "key.w"), 1.0, -1.0))

assemble_string:
number = number . if (\
  ceil (variable % 32.0) >= 10.0, \
  sub ("{alphabet}", d2i (variable % 32.0) - 10, 1), \
  d2s (ceil (variable % 32.0))\
)
variable = floor (variable / 32.0)
gotoif (assemble_string, variable > 0.0)

; Space for convenience
#

hey d0s, you don't mind if we turn your post into the new #ai-help, do you? XD
I'm joking ofc

low cedar
#

I thought about this some for extending the number of digits. i2s and s2i makes string arithmetic possible without it being totally terrible, it's just mostly terrible. For the simple(ish) case I need to support where I'm only adding and subtracting, no multiplication or more complicated operations, you can do it by splitting the string into two parts, using s2i and math on the halves plus appropriate combining operations, and then convert back to two string halves. So you can do it all inside a single expression, it's just gross.

winged pilot
#

I would've done a lua macro but I suck too much XD

rocky folio
keen swallow
#

also my windows bluescreened right before I sent this message

winged pilot
#

lua macro would just be to construct the operation up to e 18

winged pilot
#

literally just

  operation = operation .. [[i2d (if (contains ("{alphabet}", sub (number, ]] .. i .. [[, 1)), index ("{alphabet}", sub (number, ]] .. i .. [[, 1), 0) + 10, s2i (sub (number, ]] .. i .. [[, 1))) ร— 10 ^ (17 - i)) + ]]
}
return operation;```
rocky folio
#

Can't say I didn't try at least :p

winged pilot
#

this, but I can't do concatination for some reason :(

keen swallow
#

that's... a weird question to ask

winged pilot
#

by intent :D

rocky folio
winged pilot
#

but youre smart, I'm duuuumb

#

and you actually understand lua, unlike me XD

rocky folio
#

oh, I thought you were talking about my macro ๐Ÿคฃ

winged pilot
#

no
I just wanted to steal you, as the person, to #ai-help

rocky folio
winged pilot
#

yes
you read the stuff and understand the stuff
I read the stuff and understand the stuff for like 5 minutes

full bay
#

is there any way to increase the maximum amouny of items to craft in one instance?

keen swallow
#

you can copy and modify the source code, but with that there would need to be some workarounds so nothing breaks

#

so I went through all that and increased the max amount by 3 more digits

winged pilot
#

I literally made this
you can craft up to 1e14 items with it
and you can do it ingame

uncut pendant
#

at that point its better to use the fabricator

full bay
#

im just lazy

keen swallow
full bay
#

but currently doing that where im fabricating enough to make e12 t2s cuz im out of void essense

winged pilot
keen swallow
#

I do

winged pilot
full bay
#

i wish you could boost the rate you get void essence more

winged pilot
#

juust powerplant, sorry bud

keen swallow
#

yeah that's not happening any time soon
although I think it's planned?

full bay
#

ik i already have that boost

low cedar
winged pilot
#

I made the workspace mainly for you XD

winged pilot
low cedar
#

I dunno, I haven't seen that yet

winged pilot
#

ik, but do you think it's worth using or would you rather have the +1 +2 +4 stuff inside the expressions?
makes it harder to understand for me, but I don't want you to deal with the removal of them, yknow

#

(the reason I know you haven't seen that yet is because, even if you imported the package [which I doubt], you still wouldn't see those comments cus I'm adding them now)

winged pilot
#

I hope this recommented them
not sure

winged pilot
#

oh no, is this why the AI doesn't count ore lumps as dust?previous_amount = count ("lump", _tier) produce ("lump", _tier, min (previous_amount, {get_queue(_tier, lump)}), "mixer") {subtract_queue(_tier, dust, previous_amount - count ("lump", _tier))} {subtract_queue(_tier, lump, previous_amount - count ("lump", _tier))}

low cedar
#

wdym "doesn't count ore lumps as dust?" It does

winged pilot
#

I'd run the AI
Then toggle the AI overlay by accident, and if I told the AI to continue where it left off, it would say I don't have enough dust

low cedar
#

Hmmm. That's odd, but there may well be a bug in there somewhere

winged pilot
#

because it only counts lumps 1 time, not 2 time

low cedar
winged pilot
#

{subtract_queue(_tier, dust, previous_amount - count ("lump", _tier))}
count ("lump", _tier)
these should result in 2 dust, not 1, right?

low cedar
#

That code is for producing lumps Edit: Oops, producing dust from lumps

winged pilot
#

oh damn, that's annoying, cus it's not an obvious problem then

#

welp, good luck
I'm off to re-word your comments so I can understand them XD

low cedar
winged pilot
#

oh fun

wraith tendon
#

there is any way to loop this script? like after finish the crafting of 9999999 of the selected item, auto-start again?

verbal pewter
#

or you can set an autoclicker for F

winged pilot
#

hey d0s
do you like still want to touch factory AI or should I start deconstructing to try and get it updates? XD

low cedar
#

What kind of updates does it need? I still update it for new items.

#

I suppose a UI update that makes use of the UI widgets would be the only other major thing I can think of.

winged pilot
#

There's also updating the item groups

winged pilot
#

but mainly, I meant

do you want factory AI to be a solo venture or would you rather get a hand with it

low cedar
#

I assumed I would be working on it solo, but I am not against PRs that improve things

winged pilot
#

absolutely
I made a fork of it in my account
If I get something you might be interested in, I'll let you know

#

and yea, I'll give it a pull request when I do something you'll like

broken jacinth
#

Hey, quick question. I tried using the script but it wont work. Like, at all. I import it and the turbo exec, activate all of them and start ai mode. But when I go into the Factory my game freezes for 2 or 3 seconds and the ai mode disables itself. Does anyone know what causes this or how to fix it?

keen swallow
#

do you have fast atomic functions enabled?

broken jacinth
#

yeah

#

with 5000ms

keen swallow
#

yeah that breaks turbo iirc

broken jacinth
#

ohhhh

keen swallow
#

turn off fast atomic functions

broken jacinth
#

yeah now it works

#

Thank you

keen swallow
#

fast atomic functions is meant to be a replacement to turbo exec, but it's still in development I think
although the next update should patch out the turbo thing

winged pilot
#

less of a patch and more of an implementation of turbo :D

woeful basalt
#

this ai is too strong
also does it consider items in inventory? or does it craft all from scratch?

keen swallow
#

yes it does consider items from inv

woeful basalt
#

nice

fluid kite
#

also can i ask about the factory ai, does it craft things even if im not in the factory tab?

low cedar
south mist
#

I want to be able to automate this ai, how can I do so

winged pilot
#

what do you mean by automate?
it's already automated XD

barren swallow
#

why do you need to automate the factory ai

south mist
winged pilot
#

well, do you have an example?

it's kinda hard to think of one like this

uncut pendant
winged pilot
#

well hold on, every idea can be worth doing, just needs to be given a chance and explained more thuroughly

uncut pendant
#

then the easy way would be a script that waits until the variable changes that says to press f, execute the script with the f press impulse, and add to where the impulse check of pressed f and if its that script that executed it

south mist
#

About the second part...

uncut pendant
#

yeah you would need the external editor to change it

#

wouldn't be all that hard since you can ctrl + f impulse

#

or you can just put an autoclicker on the f key

winged pilot
#

you actually don't need the external editor for it, you just need to do something weird XD

you can create a script called "key.f" which goes in a loop that executes UI (If I'm remembering the positions correctly)

you can make the loop depend on the mouse state and you just need to put something heavy so it stays pressed down :)

verbal pewter
#

the game doesn't know the difference between impulse: key.f and impulse: script "key.f"?

winged pilot
#

no
why would it XD

verbal pewter
low cedar
#

it does

#

Oh, but if you're doing it through UI then yes you can do it that way, but that's jank because you'd need an autoclicker, at which point your autoclicker could just press f

winged pilot
#

it does?
didn't stop me from activating adventure AI on loop with a script called key.r

low cedar
#

wait, are you saying that you triggered an impulse: key.r with an execute script: key.r?

#

I have to go test this now

winged pilot
#

yea

#

it's the same string

verbal pewter
#

shouldn't work

winged pilot
#

if impulse() returns the same string, it works XD

winged pilot
low cedar
#

Yeah, it doesn't work

winged pilot
#

wait what?
the hell did I do XD

low cedar
#

But I was also misunderstanding what you did

#

Executing a script, and doing it from a script called key.r, makes perfect sense. Although it's also janky.

winged pilot
#

I'm all for jank tho :)

#

but it causes a hell of a lot of headaches XD

low cedar
#

In any case, the answer here is almost certainly "just make a bigger order"

#

If you want to make multiple different things... do them one at a time. (Usually wanting to do that involves misunderstanding how the AI works, and thinking you need to manually craft components.)

winged pilot
#

or if you want to be careful like me on my mt4 save and craft stuff like t2 machine boosters in batches of 120 when I could just ask for 600, but because of my limited budget I need to be more precise

#

if you're in such a case, totally valid, but you also want to remove this precision with further automation XD

south mist
#

Using a script called key.f, I have achieved automated automation

#

It's wonderful how this game works

#

Never mind it doesn't work, i instead used a task recorder

bright mortarBOT
#

@south mist has earned the Ember role!

cloud monolith
#

do i need to stay in the "factory" for it to craft my order? or can i just say build 10000 of X and go in test tower to farm some waves?

keen swallow
#

you have to stay in factory

#

but it will remember that it was crafting something if you leave factory while it's crafting

cloud monolith
#

aight, thought so ;P

#

gues ill have to farm more skillpoints to speed it up more then xD

#

is/was there an easy way to see the recipy's of an item? (boosters) so that i can put the fabricator on making whatever it needs most of?

keen swallow
#

wdym by "an easy way"?

cloud monolith
#

nvm found a fork of the factory calculator that has the boosters ๐Ÿ˜‰

#

bleh misses the machine booster, laame

keen swallow
#

no one is really updating them

ebon stone
#

yoo congrats on V3

keen swallow
#

just noticed?

oblique gate
#

How do I start the ai after I import and enable all the codes ?

keen swallow
#

you go into factory and the UI should appear on the right side

oblique gate
#

Where ??

keen swallow
#

press f4

oblique gate
#

Nope nothing happening

keen swallow
#

wdym nothing happening

oblique gate
#

It the same screen and nothing appeared

keen swallow
#

do you see the AI OVERLAY text on the bottom right?

oblique gate
#

Umm could you send what it should look like cause either it not working for me or my eyes gone bad

keen swallow
#

okay, lemme boot up tpt2 then

#

something like this
(ignore the inventory)

oblique gate
#

Nope nothing like that happened

keen swallow
#

hmm...
can you send a screenshot after pressing f4?

oblique gate
keen swallow
#

and the scripts tab in headquarters?

oblique gate
#

Oh I got it working

keen swallow
#

nice, it works

oblique gate
#

But how do I select things

bright mortarBOT
#

@oblique gate has earned the Spark role!

keen swallow
#

(btw, you can use f12 to screenshot in steam apps)

keen swallow
oblique gate
#

@keen swallow ohh thanks for tip

#

Got it working thanks alot !!!

silent orbit
#

Is there a way to stop the script?

keen swallow
#

turn off ai overlay

silent orbit
#

THanks

true crystal
#

you know what the problem is with these forum things in discord? where is the link? lol

keen swallow
#

It's pinned, usually.

true crystal
#

no pin in this though

#

that would be nice

keen swallow
#

Yes pin.

true crystal
#

oh, you have to full screen it

indigo zephyr
#

discord UI leaves a lot to be desired, yes.

true crystal
#

can't see it from here

low cedar
#

It's still there, just more annoying (see dbuz's point)

#

wow, that doesn't even take you to the pins, it just full-screens it

indigo zephyr
#

discord spending more time developing nitro cosmetics than having a reasonable ui (on both desktop and mobile). :)

hearty kiln
#

ohh nice, Tree production boosters

low cedar
#

not added to the AI yet though, I still need to update

quartz sluice
#

hey is there any reason why the factory ai script isn't crafting nano chips? it doesnt have a warning that I don't have enough resources it just says crafting but nothing happens
im mt 7

#

ohhh wait I think the problem was I had uptiered my dust so I didn't have any tier 3 dust

#

does the ai not automatically downtier?

low cedar
#

Nope

#

But it will uptier for you, so you don't have to do that manually (although it can save time)

#

Always make sure to keep a dust of each tier

indigo pewter
#

Is there an updated version where it includes the Tree Boosters?

indigo pewter
#

@low cedar

low cedar
#

Not yet, I should probably release the flawed version. The issue is that it consumes too much ore due to a prexisting bug

indigo pewter
#

Thank god for infinity ores for the ones who have them then :p

indigo pewter
keen swallow
#

Here's the second issue: the AI locks up completely while trying to process infinite Ore - it puts it into the Crusher again, and again, and again, and- you get the idea.

indigo pewter
#

Sadness insues ๐Ÿ˜ฆ

low cedar
winged pilot
low cedar
#

sure that would be helpful

sterile swift
#

when 3.2.4 will be released?

#

i need that tree producers ;-;

hot notch
#

can you increase the cap on the amount of stuff you can make past 9999999?

uncut pendant
low cedar
#

It wouldn't be technically that hard to increase the cap, the main reason I don't is because there are better ways to do things for big numbers

rapid agate
#

why does the script just randomly stop even if i have the stuff to craft what im crafting

keen swallow
#

Do you have Chemical Lumps tptExoticGem?

rapid agate
#

ohh

#

how can i get 21 exotic gems lol

keen swallow
#

Beat Statue of Cubos bosses.

golden stratus
#

bosses

rapid agate
#

ty for helping

near reef
#

Has anyone played with the AI overlay builder? Im not at all familiar with XML, and am really wanting to try and have a better UI for the factory if possible. Possibly better readability, progression and something that actually shows whats currently happening.

barren swallow
#

its very finicky and annoying honestly

near reef
#

thats saddening a little bit, im suprised with the bulk of resources in this game there arent any third party applications that provide the AI in ways that have a better UI.

winged pilot
low cedar
thin arch
#

The automation knows what it does. It knows by substracting what it has from what it wants to do. From this, it obtains a series of intermediate steps or recipe iterations. The crafting subsystem uses these steps or iterations to generate incremental commands to drive the factory machinery to progress through successive steps, and progressing from what it had, to what it wanted to have.

winged pilot
#

umm no, it doesn't know what it does in the sense you're describing

Let's say you're making a t1 town producer
Internally, that's a position that's used to index a humongous string that contains every factory item as well as every factory recipe

I'm not entirely sure how this looks like internally (if it's the item followed by the recipe or some other weirdness) but it takes that and calculates dust of that ammount

The internals don't know what step they're trying to accomplish (say the recipe needs t3 chips, the AI doesn't know if it's making t1 chips, dust or a completely other component like plates) it just knows that the item count isn't what it's trying to reach, so it's trying to do it over and over again

winged pilot
#

2012 was 12 years ago, omg

lyric frigate
#

how do i add the ai script to the game

uncut pendant
#

and then put it in the import button in the bottom right of ai scripts

tough kraken
#

i think i'm a bit lost cause the wsad for changing things is not working

winged pilot
#

that's interesting, probably need a screenshot to see the context

tough kraken
#

of the script inside the factory ?

winged pilot
#

just of the game

tough kraken
#

ingame ?

winged pilot
#

yes
the context of what's going on ingame, just take and send a screenshot

tough kraken
winged pilot
#

you have global variables turned off from the look of things

#

toggle this off to see what pressing wasd does

tough kraken
#

ah thats why i could not see the change

#

๐ŸŒ

winged pilot
#

yes, it's all global variables

tough kraken
#

i see

#

i was hiding it for all the cluter :p

winged pilot
#

you understand now why the screenshot provided context, right?

tough kraken
#

yup thx

winged pilot
#

no problem, enjoy your factory

tough kraken
#

this is not good i'm going to spend more time in the factory than progressing

iron quail
#

How do i import the Script?

winged pilot
#

use the import code you see on the pinned github link

iron quail
#

found it and managed to get it working

viscid dust
#

which button is it for the seeing of the scripts?

viscid dust
keen swallow
#

F4 to activate the AI overlay.

tough kraken
#

f4 to activate and f7 to deactivate

winged pilot
#

f4 activates and deactivates the overlay

f7 enables Facility AI's click recording functionality

tough kraken
#

oh ya my bad for the bad advice haha

near reef
#

Is there a function that adds the ability for the AI to utilize the fabricator and dissolver in its task? This could make this work twice as fast!

winged pilot
#

while waiting for d0s to finish working on the new version of factory AI, here's a version that includes the tree boosters

silent quail
#

Does the script still do stuff if I leave the factory? Or will it pick up where it left off if I leave it for a bit and come back?

keen swallow
#

It will pick up where it left off, assuming you didn't close the AI overlay.

silent quail
#

Awesome okay thank you I was so worried to screw it up if I left to turn on my power plant

carmine belfry
#

It will not work for me

#

even though I have the neccesary mats

#

anybody knows what the issue might be?

#

It stays like that

#

nvm

#

works now

low cedar
#

you need TE2.2, the link is with the factory package or the pins

carmine belfry
#

yeah

bright mortarBOT
#

@carmine belfry has earned the Spark role!

carmine belfry
#

I mistakenly dowloaded the 2.1

#

thats why it was running really slow

eternal junco
#

can i get help?

#

its not working for me

low cedar
eternal junco
silent quail
#

I wanna make sure this thing isnโ€™t messing with me, does it really take like 128m+196m t1 dust for a t10 boiler?

keen swallow
#

Most likely so, but higher tier Dust counts as way more Dust for the script than T1, because of Ore Lumps.

silent quail
#

Thatโ€™s fair, okay Iโ€™ll keep bringing in 1 t10 ore every like 45 min and Iโ€™ll go from there, I guess I donโ€™t need the boiler really I just was filling out my machines, time to finally make some producers

keen swallow
#

You really only need a T5 Town Producer, and boost it in Trading Post.

silent quail
#

Okay, I was gonna make one of each of the producers at t5 to get the grid filled out

bright mortarBOT
#

@silent quail has earned the Ember role!

ebon stone
#

its unfair how advanced that brlt is compared to the rest

copper goblet
#

Hello. How can I change the max count of 9999999?

uncut pendant
#

I highly wouldn't recommend it

keen swallow
#

You don't without modifying the script.

copper goblet
astral sparrow
#

Hello! I have a question, why does it keeps like this?

uncut pendant
astral sparrow
#

Okey okey, then im trying tomorrow with more dust, didnt know that was so expensive

uncut pendant
#

though you might want a higher tier belt first

#

as that increases the speed of the refine

astral sparrow
#

Actually i was thinking of getting all my machines T5 and the belt T10 before start getting the town producers

#

But I didn't know I need 1 T9 ore, so that's pretty useful, thanks!

vocal geode
#

like 99% of my time in factory now since unlocking AI seems to be waiting for the mixer to finish processing

spiral nova
#

where would I find the dust recipes with this? the only dust related thing I could find was rainbow_dust in the crft group, but I can't change the tier of that one and trying to craft it does nothing besides writing in yellow that crafting is in process(suspect I don't have the recipe for it)

keen swallow
#

I don't think it has those? Although maybe the grup option would craft it (along with everything else in the group).

spiral nova
#

I see, thanks

winged pilot
keen swallow
#

What's a void stone?
Also Ores themselves.

spiral nova
#

ok, took a bit to get used to, but now that I did I can say this is probably the best ai I found so far

#

saves so much annoying steps that made me put off upgrading my stuff xd

astral sparrow
#

Guys it worked perfectly after obtaining the ores, thx for the help!!

bright mortarBOT
#

@astral sparrow has earned the Spark role!

spiral nova
#

any idea why this renamed my mine worker to factory<seemingly random numbers>?

winged pilot
#

it's worker storage lib, that's how it remembers the state of its UI after you close the AI

spiral nova
#

I see

#

is it always the worker on top that gets renamed?

winged pilot
#

it first checks to see if there's a worker that already has the [factory] prefix, if there's none, it searches for a worker that hasn't been touched by worker storage lib and selects the first one it can

spiral nova
#

ok, guess I'll just rename my idle one to [factory] and it should leave my miner alone then?

winged pilot
#

should be fine, yea

spiral nova
#

got it, thanks

winged pilot
#

no worry

keen swallow
#

Or you could put the Factory Worker on dissolving, if you have Factory F2. (Although it's not recommended to take it until MT12.)

winged pilot
#

no, it doesn't target the worker with the dissolving task, it just shuts it off it it happens to get the dissolver

keen swallow
#

I know. The Worker that has the [factory] prefix should go on the dissolving duty for that reason.

winged pilot
#
If you assign "Adding items to the dissolve queue" to the worker that the factory uses, then it will auto-pause that worker when crafting, to avoid losing items. Otherwise, it's just a regular worker with a funny name.
#

it doesn't even look at the workers job

#

this is the only time it looks at the worker task, nowhere else```
; Pause/unpause a dissolve worker, if it occupies our data slot.
; If it's a different type of worker, leave it alone by dummying out the name.
worker.pauseName(
if(
contains(worker.task(worker.name(worker_slot)), "factory.dissolveManagement"),
worker.name(worker_slot),
"{garbage_requested}"
),
contains(gsg({status}), "Crafting")
)

low cedar
#

Really funny instance of two people arguing about how hard they agree

teal prairie
#

Does it like include auto buy material in shop to decrease dust/ ore required

keen swallow
#

No, it doesn't, as there is no in-game function to buy items from the shop.

teal prairie
#

How to speedup refining beside powerplant

low cedar
#

better belt

#

also MT6 stuff

teal prairie
#

I'm in MT8 atm and just start factory (I know I'm late)

#

Also why AI suddenly freeze on crafting belt T4

toxic cipher
teal prairie
#

I upgraded all building exotic upgrades

#

Spending hours on boss fight helps

#

Only solved by restock more from shop

ebon stone
#

maybe make a bigger screenshot

#

honestly just make the buildings

torpid wharf
#

this one cant craft "Manufacture" items right?

winged pilot
#

you mean boosters?
yes it can

winged pilot
torpid wharf
#

oh i didnt find the caterogy for manufacture

winged pilot
#

it's in prod

supple hemlock
#

I'm not in the factory right now, but I think yesterday I couldn't find the tree booster

keen swallow
#

Yes, it is not in the script.

supple hemlock
#

I feel lied to by Cod then ๐Ÿ˜‰

winged pilot
supple hemlock
#

๐Ÿคฆ

low cedar
#

it's because of a deeper bug and i should feel bad

winged pilot
#

I mean, we are programmers, it's not normal to feel bad?

winged pilot
low cedar
#

the bug is the fact that ore isn't handled properly in recipes and trees need ore to make

#

well, not handled properly in the whole dependency calculation, not really recipes per se

#

ore assumes it will be crushed to dust

winged pilot
low cedar
#

so this is present already when making trees, but it becomes violently apparent when making tree boosters, which needa lot of trees

#

basically, there are lots of times where it gets stuck

winged pilot
#

oh, gotcha

low cedar
#

instead of telling you you need more ore. Or, you might actually have enough ore, except it erroneously crushes some of it

#

if it were easy to fix, I would have done it already, but it requires reworking some of the relations at the base of how the factory calculates things

winged pilot
#

the crushing too much part

oooh, it's because the ore gets added too the queue, but produce dust expects all queued ore to be crushed

low cedar
#

on the upside, once it's fixed lumps should be craftable too

winged pilot
#

I did think it was a weird choice to make the queue just the ore ID, yea

#

ore ID, not dust ID

low cedar
#

It's partly a legacy thing (I evolved this from Xenos' earlier factory script), and partly to deal with the fact that it's only there where multiple different things can produce the same thing

#

the thing being dust

winged pilot
#

which is why dust is a special item instead of a produce item since adding a recipe through {produce} doesn't let you define 2 or more different machines to it

low cedar
#

ye

#

basically i need to add a bunch more special items

#

and get the math to line up

winged pilot
#

it does work via ID, so ore could just get an extra flag for if it's crushable or not and then produce dust just accesses the queued crushable ore

low cedar
#

it's better if there are fewer special cases, I'd rather introduce fake internal items that can't be made

winged pilot
teal prairie
ebon stone
#

you look a bit too broke to craft it

#

do you even have t9 dust?

winged pilot
#

aren't both adding fake internal uncraftable items?

low cedar
#

that is basically what I was talking about

winged pilot
#

Oh, great
I thought you were talking about something else XD

good news, I just pushed an update to my D0S.factory under the factory compactor that basically does that

marble mantle
#

Is there a way to auto buy rubber?

winged pilot
#

just use an autoclicker script

D0S.Superclick should do it

marble mantle
#

That was my only tought.
Well then.

bright mortarBOT
#

@marble mantle has earned the Spark role!

spiral nova
marble mantle
#

Sadly not.
And superclick is also not very usefull, because of "waitting time" everytime you buy stuff.
(but you can skip that "waitting time" when spamming right click tho, so maybye there's a way)

low cedar
#

With the buyable upgrades, you can manually buy enough rubber quickly (~1 minute of effort) that it'll last you until later things unlock

silent quail
#

Is there any way to get a higher craft amount? I just unlocked my first infinity item and was curious if I could craft up to 1e18 or something, if not thatโ€™s cool, I was just curious

winged pilot
#

you can, but it's not supported because it's a pain to work with :D

silent quail
#

Ahh okay, then I will just stick with what I got, thank you

keen swallow
#

The problem with crafting more than 1e14 lies in double floating point's (im)precision - only the first 15 digits are saved after rounding to the nearest floating number, so you can't really change higher digits without changing the lower digits.

winged pilot
#

oh right, we also end up with double overflow

which is why I made the base whatever script, but that's just complicating things even more XD

keen swallow
#

"Double overflow" isn't really a thing - past 1.798e308 it just says โ™พ๏ธ.
That's just the precision limit of doubles.

low cedar
#

The real reason for the current cap is that it just takes an impractically long time to craft

#

And adding more digits requires UI work

teal prairie
#

Can you add auto buy rubber

#

Worker doesn't have that as availiable option

keen swallow
#

There isn't a function to buy items from the shop either.

spiral nova
bleak lotus
#

inf spoilers ||there's also an infinity stone perk that gives you, basically, infinite rubber||

ebon stone
#

lol

#

blud comes from 2021

#

fabricator far outpaces it

#

and 250k isnt infinite

silent quail
#

I was gonna say I was 25% of the way to inf rubber when I was at 1e12 but thatโ€™s not how math maths up, inf stone works but would take a while to get to inf

ebon stone
#

fabricator.

teal prairie
#

Inf is lua limit which is 2^1024

keen swallow
#

Factory limit is 1e18.

carmine bison
#

How much work would go into excluding producers from the "All" group?

#

(or more precisely, making a "Parts+Machines" group)

keen swallow
#

Doesn't look like you need to edit a whole lot in the external editor.

#

Although, apparently Parts+Machines already exists. But it's only used in the all group.

low cedar
#

If you're minimally comfortable in the external editor, you should be able to make a local copy and hack that part out for yourself pretty easily.

shadow radish
#

it cant make tree boosters?

keen swallow
ionic grove
#

I tried to craft a t8 belt, it crafted a t7 belt and kept saying it's "crafting", but it was stuck. There wasn't enough t8 materials.

low cedar
#

That can happen in certain circumstances, such as if you don't have Chemical Lumps or are missing a tier of resources. Get more resources, turn it off and back on again.

ionic grove
#

I have chemical lumps

ionic grove
faint pivot
#

Factory Ai recognizes your inventory, so it uses the one you allready created

#

As long as is in your inventory

stark ridge
#

Can someone help me. I have not used one of thses scripts before and I want to get a t5 white producer

winged pilot
#

well, are you experiencing any issues?

#

or, are you confused about what on earth is going on

stark ridge
#

consfused about everything lol

#

I am MT 5 and am trying to progress

winged pilot
#

aha, alright
maybe send a few messages in #off-topic until you get the spark role and then you'll be able to send a screenshot of your game screen

#

I can guide you through what the script is telling you

stark ridge
#

okay thx 1 sec

#

this is what I have so far

winged pilot
#

wait, how the heck were you able to send a picture?
I guess forum posts aren't protected?

uncut pendant
#

you're always allowed to post pictures

#

just can't send links

stark ridge
#

lol

winged pilot
#

damn XD

winged pilot
# stark ridge

alright, so you want to press f4 and then enter the factory

#

you can press f4 in the factory as well

#

and send a ss of your game screen after doing this

stark ridge
#

I think it worked but I can't tell because of a keybind thing on my laptop. I can change it if I need too

winged pilot
#

so, you're on laptop?
do you have an fn key?
to activate facility AI you'll want to press fn + f4

barren swallow
#

doesnt the script require some machines first?

winged pilot
#

nah, it'll be fine
the script will just get stuck... but that's ok because the script can be used to make the t1 machines

#

oh, you should get the chemical lumps upgrade, I see that none of them have been obtained

stark ridge
#

no I am trying to figure it out becasue it keeps opening windows casting and its very annyoing lol

bright mortarBOT
#

@stark ridge has earned the Spark role!

winged pilot
#

I can tell you if it worked, just need screenshots to see what you're seeing

stark ridge
#

nothing has changed from the last one

winged pilot
#

picture of your keyboard layout maybe?

stark ridge
#

yeah 1 sec

#

I am going to go beat a boss quick to unlock the lumps upgrade

barren swallow
#

so you tried both f4 alone and fn + f4?

winged pilot
#

aha, gotcha

Yea, I should have the same layout... pressing fn and then f4 should bring up the AI Overlay

stark ridge
#

When I do anything with f4 this pops up

winged pilot
#

so, the same thing whilst pressing and holding fn?

faint pivot
#

F4 without fn too?

#

does it have FN lock maybe?

winged pilot
#

fn is for function.
While it's held, pressing f(1-12) makes the input be registered as the f(1-12) key.
Without it, pressing f(1-12) just does something else, without sending over an f(1-12) key

faint pivot
#

or maybe a keyboard config that makes F keys work as special button instead of the F?

uncut pendant
#

you can also just change the hotkey in settings if you need

stark ridge
winged pilot
#

ah, right, you change it in AI settings now, I always forget about it XD

stark ridge
#

I just got the clumps thing

winged pilot
stark ridge
#

there we go

#

thx

winged pilot
#

nicely done

#

so, now, what you want is to make the other 9 machines

barren swallow
winged pilot
#

it's been a long time since I looked at the controls menu, but one of the updates made me think that the AI hotkey was now hard coded

barren swallow
#

ive been able to use the ai for a long time on my phone, and that requires changing the keybind

winged pilot
#

the heck was I on

#

well, medically speaking

stark ridge
#

once I have all the machines how fast can I unlock the higher tier white producers

#

I am stuck on world 14 is this the way I should be going?

winged pilot
#

well, it depends on if the thing limiting you is your resource count

stark ridge
#

it kind of is. I can't damage them enough I have the ultimite attack 8

winged pilot
#

well, progression wise, I believe this is a blueprint problem

But, on relevant to factory, you'll want to first upgrade your machines and then get the T5 producer

stark ridge
#

is there some recommned blueprints I have kinda just tossed stuff in

#

also is there a script to farm mods?

winged pilot
winged pilot
# stark ridge also is there a script to farm mods?

it's such an easy script, nobody has made one that's specifically for farming mods

  1. you just need a script that restarts the game for you after x amount of rounds have passed... really easy to make
  2. once you've got all the modules, that script becomes useless
stark ridge
#

ah okay thx

winged pilot
#

if you want, I can make one rq for you, if you want a module farmer script

stark ridge
#

sure lol

winged pilot
# stark ridge sure lol

in theory, this should be all you needbVFBboMwEPzLHnJCFiTtBTUiyhtyKxyM2birgI3sdWkVRf16ZROkinIZ2bP2zOzuHbxyNLKH8v0OUjFZE89QhzzPUaNBR0poy5audaus8SwNp+o+4UvCfI1FoewwSkfeGuHZkdGz5OwnaBhD73ElOYvtj8dN/vWG3wIhg9lgCTdJ4umDekyPrn98W2v7f2E6G9oea9ZyQDHJz+0MxduKPmz3ueDp57Tdy26XEhySHfmLndBd0DMZHTtxHAnh0LN0HBkzM/hFDE0GypqOlrU0GTwHl5a0zCNpG5ycDaaLn4wcEEqoqqqCDEapblJHAjJoQ6eRoSzyIoPg8fy8swv4aB6/it restarts after you survive for 500 waves and you can press key.e to exit towertesting

#

I say in theory cus I'm not 100% sure that this restarts, it might just exit XD

stark ridge
#

okay I am testing it now lol

#

it just exits LMAO

winged pilot
#

easy to fix, at least```
bVFBboMwEPzLHnJCCJrmghoR5Q25FQ7GLO4qYCN7XVpFUb9e2QQpIlxW9tg7Mzt7Ayctjeyg+LyBkExGhzNUPssyVKjRkkyVYUNd1UijHQvN8fUt1kOs2brmuTTDKCw5o1PHlrSaKWe9lIbR9w5XlO8z8fG4iR+u+JsiJDALLOYmQTx9UY/xU/ek2xjTv5hpjW96rFiJAdNJfG97yD9W8H57zqWe/k7bs+x20cE+ypG7mAntBR2TVmESywFILToWlgPSPYe+jly+KocePbPgDzHUCUijW1pWWSfwCDsudskw+tE4WeN1G5q0GBAKKMuyhARGIa9CBQASaHyrkKHIszwB7/D8uLP1eK/v/w==

stark ridge
#

perfect thank you so much

winged pilot
#

no worry

winged pilot
#

around a value that I remember using... idk man, I haven't entered tower testing in months

stark ridge
#

how much farther does this game go lol

winged pilot
#

until mt20

barren swallow
#

we only havbe mt15 right now

winged pilot
#

it's ok to lie to newcomers

stark ridge
#

XD

stark ridge
#

Could anyone tell me how to automate a skill script

faint pivot
#

There's a video in #ai-help

shadow radish
#

no factory refining ai?

winged pilot
#

wut?

winged pilot
shadow radish
barren swallow
#

ai can't type numbers, there's a worker task though, or just do longer refinements i guess

winged pilot
#

ai can't type in this box

shadow radish
faint pivot
#

Worker can handle that pretty well, and if you need an high ammount just set a big number

winged pilot
ebon stone
#

just set off month long refinery

ionic grove
#

I like the infinite ores

pastel moon
keen swallow
#

Only really feasible in the post-game.

ionic grove
keen swallow
#

You can only claim them once it reaches 100%.

carmine bison
#

i thought you could only claim them once the time runs out
(due to rounding shenanigans you can get it to show 100% without actually being done refining)

keen swallow
#

...I forgot about that.

ionic grove
tired valley
#

How in the world does this work

mellow kestrel
#

is it just me or is there no option to order ore lumps with this?

keen swallow
#

You're right, there isn't. I think it does craft them in a group, though.

mellow kestrel
#

I wanted to use it to quickly craft X lumps for the crafter unlocks while my crafting grid was full of excess stuff ๐Ÿ˜›

winged pilot
#

ore lumps are considered a terminal item, in that, you can not tell the script to craft them

Other terminal items include pumpkins and void essence

I thought ore was a special item too, but I guess not?

#

ah, ore is a special item, just not placed at the bottom like I expected

#

; Transforms ore into dust, tiers 1-10
; Because of an implementation detail, this must come before any
; scannable items.
; This doesn't show up in any category in the UI.
{special(ore, 10, "ore")}

;Tries to make dust from ores and lower-tier dusts, tiers 1-10
; Doesn't appear in the UI
{item(dust, 10, "dust")}

; Tiers up dust, tiers 1-9
; These are ore lumps, plus putting them into the mixer.
; There is no "only make ore lumps, without mixing them" option right now.
; Doesn't appear in the UI
{special(lump, 9, "lump")}

; Can only be made from saplings
; Doesn't appear in the UI
{item(void_essence, 1, "essence.void")}

; Can only be gotten through the Halloween event
; Doesn't appear in the UI
{item(pumpkin, 1, "pumpkin")}

; Rubber, tier 1 only
; Doesn't appear in the UI
{item(rubber, 1, "rubber")}

winged pilot
delicate apex
#

Hey all! ๐Ÿ˜„ Pretty new to this, but I've run into 2 problems hoping someone knows how to handle.

  1. When I try to make a T5 Crusher (with a T4 in inv) I get an error saying Turbo Exec isnt running. Not sure why, Turbo Exec is installed and the Factory AI script has made all my machines up to T4 without issue so far.

  2. When I try to make a T4 Town Producer (with a T3 in inv) it changes to "crafting" but then does nothing o-o. At least for some of the other T4 producers it will tell me I dont have enough dust or something. Have made up to T3 for most of the producers using this script.

uncut pendant
#

or maybe don't have enough rubber / red resources

delicate apex
#

well i dont have all tiers dust for sure but so far its just upleveled dust for me as needed

uncut pendant
#

well it needs at least one of the required tier, it'll still try to make it if it has the resources required, even if its missing the tier of dust required to uptier

delicate apex
#

ah it must be that then, since i have up to 1x t6 dust but looking at the recipe T7 plates and such are used

uncut pendant
#

not sure about 1 though, starting the recipe seems to work just fine then, you can try reimporting just incase and it might fix it, just incase you accidently modified the script somehow

delicate apex
#

i'll give that a shot! ๐Ÿ™‚

#

btw thank you so much for your guide on the challenges. ive been using it all day yesterday and today

uncut pendant
#

though I do have my own bps that you might use in later phases

delicate apex
#

oh yeah i skimmed through that last night. im sure ill bother you with questions when i get to that stage. seems the earliest ones are around MT12

dusky stream
#

Why is this not working?

keen swallow
#

Because you don't have Turbo Execute.

dusky stream
#

How can I have it? .-.

keen swallow
#

(The bug behind this is going to get patched out in v1.0. I assume the budget version is in the works, but I'm not certain.)

winged pilot
#

The budget version is as simple as adding a budget cap of max to the package

dusky stream
#

Oooohhh

#

Thx so much

#

Now I can make all the things in Factory automated

delicate jewel
keen swallow
#

There's the thing called execution budget that appears on every script you click in the Facility AI tab. Set that to a negative number for all the Factory scripts.

delicate jewel
#

do i also need to do that for TE2.2?

keen swallow
#

No... if you have TE2.2, you don't need that at all. For now, as it's getting patched out in v1.0.

delicate jewel
#

ok i'll wait since if i have the execution budget set to -1 it does freeze for a bit then just disables the AI when i enter the factory

keen swallow
#

Okay... budget and TE don't go together very well.

delicate jewel
#

and thats without TE as well

#

ah nope i figured it out because i set init to -1 in the execution budget, that was my bad

low cedar
#

Factory v3.3.0 is released, updated for v1.0

If you don't have v1.0 yet, it'll still work but the recipe for T1 town producers will be wrong until you get the update.

Changelog:

  • Collapse the number of scripts from 6 to 2, by taking advantage of the larger lines limit that was added a while ago.
  • Convert to using the budget system, instead of the (now non-functional) turbo exec.
  • Change the T1 town producer recipe, since it was changed in v1.0
  • (Finally) add tree booster recipe.
    • Known issue: Items with ore in their recipes will consume excess ore. This is a fundamental issue, related to the inability to make lumps. This is most noticeable with high-level tree boosters.
winged pilot
#

time to crack open the package XD

fleet bloom
#

where is the import code?

winged pilot
#

pin

keen swallow
#

On the GitHub.

fleet bloom
#

i found it after the message, my fault

quiet thistle
#

for the script, do i need to keep a previous tier copy of the thing im wanting to make in my inventory in order for it to be produced? or should i expect it to grab the current version of it out of my machines to use in the recipe?

keen swallow
#

You have to take it out before starting the craft, then put it back in if necessary.

barren swallow
#

take the machune out, run the script, put it back in, then once you have just tge last step left take it out again

quiet thistle
#

then in the case of machines that require themselves to make some of the parts should i just time it carefully?

keen swallow
#

There's no need, it'll just wait until you put the machine back in. And you just take it out on the very last step to finish the craft.

quiet thistle
#

huh ok

#

so if i wanted to upgrade all my machines to t5 all at once i should remove every one of them, kick it off. add them all into my machines, wait until the automation finishes, pull them back out into my inventory where they get upgraded, then put them back in

keen swallow
#

Yeah, seems right, although I don't think I've seen people upgrade them all at once.

carmine bison
#

it's generally not a good idea to do all the machines at once due both to machines needing themselves and most machines needing their own output as well

#

but it can be done

gaunt swan
#

would it be possible to support e12, currently only supports e6 (yes it's a VERY long time to craft it. but certain things make that a desirable limit) if that is too much. I understand.

#

maybe it should be done by another thing since it's a large number and that's a good enough answer too. I'm currently doing both at the time

low cedar
#

The limit is at e6 because of some internal reasons and also the time it takes to craft. Once you are looking to go beyond that, generally you should be using the fabricator or crafter, both of which can run in the background.

gaunt swan
#

ok sounds good. thanks ๐Ÿ‘

keen swallow
#

And Crafter is better now, since it can actually handle Ore Lumps properly.

charred forge
#

Anyone have a working Factory script please?

winged pilot
#

do you have the script imported?

#

or are you just looking for the scrip?
Because it's in the pinned message

keen swallow
charred forge
winged pilot
#

are you experienced any problems with the script, or is it all good?

charred forge
#

Now its ok and script is working..... DOS. factory v3.3.0 :))
but v 3.2.3 is not working ๐Ÿ˜…

winged pilot
#

ofc 3.2.3 isn't working, 3.3.0 was made for a reason.... yknow, that's what updates are for, to use the updated version instead of the version pre-update

charred forge
#

ye i know i know.... I was looking for the version 3.3 after game uprade on v 1.0
So... problem solved
But thanks for answers.

true crystal
#

the mining ai script doesn't seem to be working? was there a key you push after you open the mine to start it?

uncut pendant
#

but it should just work

true crystal
#

oh, for some reason i only seen this and cordineyes towertesting

true crystal
#

what about scripts in general? maybe it is a memory limit? been so long since i've done this. i think i can't get any of them to work lol

uncut pendant
#

its probably not the last one

barren swallow
#

impulse is wake up or open mine

true crystal
#

f4 was the reason

#

found the answer in readme

dusky trout
#

I'm sure I'm just being dumb, but I can't for the life of me figure out what I am doing wrong. Recently returned, started over. When crafting items, even something I have the individual components for, it won't craft for some reason. Just jumps back and forth between L12 and L30 in Craft and L17/L18 in Main. This is a T1 Assembly machine. I can manually put the items in and craft the machine, but the script seemingly won't.

bright mortarBOT
#

@dusky trout has earned the Ember role!

keen swallow
#

That's... ahem... a few too many scripts.

#

(I think, at least.)

dusky trout
#

That's weird, the only scripts I have imported right now are this and Autominer V3. With Autominer disabled, it does the same thing still. Something with Factory being weird?

#

Reimported, same deal. Maybe it's just something funky with T1 stuff

#

Restarted the game, fixed it. Must have been the game mishandling things somehow.

low cedar
dusky trout
#

Will do. I did restart the AI a few times to see. I also removed and reimported the script, ended up in that state regardless of what I did. When starting it, it was fine, just the Scripts (Active) in the top left and the starting variables. As soon as I hit F to craft, it went into that death loop.

low cedar
#

That means it was probably being triggered by a specific combination of what you were crafting + your inventory

#

And maybe also your machines, if you didn't have all of them

#

I don't think I tested that, not having some of the machines

dusky trout
#

Yeah possibly. It was extremely strange. Didn't change anything after the restart, just went back in and started the craft, which went thtrough. Been going fine as well. I did try to use it fairly early on before I had all of the machines and it was doing it then as well. For that screenshot, I did have all of them though. But something may have been stuck earlier on when I didn't have them all? But I would also assume restarting the AI would have cleared anything out. Not sure what changed with the restart, but it's been happily going along since then.

low cedar
#

Definitely restarting AI clears everything

#

Another possibility is running out of resources

dusky trout
#

I figured it may have been that as well, but I did have all of the components to make the assembly machine. Like the final products that go into actually making it. Oddly, it would make some of the pieces when I would start it, then just stop.

low cedar
#

Have Chemical Lumps?

dusky trout
#

I do not

low cedar
#

That can definitely cause issues, although usually not one that looks like that, just stuck crafting

dusky trout
#

Yeah, and I had the base materials as well for T1 machines. Rubber, T1 ingots, a ton of dust. I did just grab Chemical lumps, I forgot to do that. Was just extremely weird

low cedar
#

Well, it will either won't happen again, or we'll figure it out someday XD

dusky trout
#

Haha, well I will keep in mind what I am doing and if it does happen I'll let you know! We can just chalk it up to something odd and hope it doesn't come back xD

iron mango
#

This script feels very hands on. like its making the parts for the motors, but not the motors themselves when trying to craft a belt. is that normal, or am i doing something wrong?

shell edge
#

It should craft everything step by step until complete, check that you have enough red cubes to complete the craft and have all the required parts and no active machines it's trying to use

carmine bison
#

for motors you need the presser, refiner, shaper, and cutter

#

can you screenshot your machines the next time it fails to make the motors?

iron mango
#

yea. one sec, ill pokle at it now.

#

so, its doing this now,

#

then it did some other stuff, made some cables, wires, etc and got to here, but its just not doing anything else?

barren swallow
#

what is going on, why are there so many craft scripts, what did d0s break

iron mango
#

haha, no idea. ^_^

#

but i did find the exact issue. one sec

barren swallow
#

you at least have the presser though

iron mango
#

dont have the motor.

#

Pump*

#

but defnitally have all the parts.

barren swallow
#

is your inventory full?

iron mango
#

negative.

barren swallow
#

please sort your inventory, why do you have 4 different t1 shapers and 2 different t1 pumps

iron mango
#

i mean, sure. does that break the AI? ^_^

barren swallow
#

no, it just breaks my eyes

iron mango
#

and to answer. like 90% of it is because i have no idea what im doing. so im just kinda clicking stuff. and sometimes... 4 t1 shapers

#

but, from the sounds of it, its not supposed to be this hands on, yes? something is wonky.

barren swallow
#

tell it to craft a few t3 pumps, it should be able to do it easily given how you already have the stuff, idk how to trouble shoot this and i can't read the scripts anyway

iron mango
#

unless im doing something wrong here, its not doing

#

Ohh... ohh.... it might be doing.....

#

might have something to do with not having shut down the game for over 48 hours........ i restarted it, and it seems to be behaving....

#

at least now its not covered in weird code.

carmine bison
#

yeah whenever it gets covered in weird code like that you want to press f4 a couple times to restart the scripting interface

#

best guess - you had multiple copies of the script all trying to do the same thing at the same time

barren swallow
#

and none of them ended up doing anything

dusky trout
#

This happened to me yesterday as well. I assumed it was likely from extended opening of the game as well. We just kinda chalked it up to something weird, but may be related to the game being open for extended periods that causes something to get weird. Restart fixed it for me as well, multiple F4 restarts of AI did not.

iron mango
#

same, multiple restarts didnt do anything.

low cedar
#

This is super duper weird. Restarting the game should definitely not do anything that an AI restart with F4 doesn't.
If anyone can reproduce this reliably, I'd really like to know about it. I'm pretty sure this is something subtle I broke when upgrading this to budget, and not any issue in the game itself.

#

The fact that it's showing all the CQ values narrows down what is happening, but I don't think I'll be able to track it down without seeing the behavior myself

carmine bison
#

I will say that I have not seen this happen on my new-for-v1 save

misty glade
#

i havent had this either one v1 save

brisk heath
#

....I'm still amazed at what could possibly even be done with Ai bro-

coral skiff
#

It says its crafting the tier 8 belt yet its doing nothing

#

Am i doing something wrong

keen swallow
#

Are you missing a tier of items? Do you have Chemical Lumps tptExoticGem?

coral skiff
#

All my machines are still tier 4 if that makes any difference

keen swallow
#

You need all Dust from T1 to T8 to craft this.

coral skiff
keen swallow
#

Then you're likely missing T7 Dust.

coral skiff
#

Oh okay, thanks

prime mulch
#

Just curious what is the priority scheme of the script for when it makes parts for a recipe? I'm trying to decide if I want to use the script or just use the crafter and I noticed that the crafter makes final parts (directly used in the recipe) before intermediate parts (parts for parts that go into the final recipe) which leads to some inefficiencies since it could be using more machines at once if it made the intermediate parts first

#

for example I started a craft for 1M Resource drop boosters T1 and it made all of the T3 plates before starting to make the t2 and t1 plates that are required to make the chips

ebon stone
#

damn bpt 2415? not bad

low cedar
patent cargo
#

is there an update to this script for 1.0? it behaves a bit weird (very slow sometimes)

keen swallow
#

It was updated, yeah.

low cedar
#

I have noticed the low FPS sometimes (on the latest version), haven't tried to debug yet

woeful lynx
#

evening, I think I'm just a little confused how this works, it'd be nice for this script to essentially.... do everything for the factory automatically, and my brain isn't fully getting how exactly to get it to do that, do I have to at least have dust for this to start doing things like that? Or is there maybe a bit of a video I can watch to help me understand? Text doesn't really help me sadly.

If not, all good but definitely would appreciate confirmation

keen swallow
woeful lynx
#

yeh yeh I saw the fact to do f4 to turn it on that part I got just... the rest of it lmao, but thank you

low cedar
#

The UI is text-based so that might be difficult for you, but you navigate with WASD and select a quantity and item and it makes it for you

woeful lynx
#

yeah I got that part, it's just a bit overwhelming especially for something that's supposed to make everything automated, so not too sure how much I'll stick with it even if it seems like factory is the way to go to make things easier for where I'm at.

Thank you anyway

serene parcel
#

so a question about the up-tierer you also have d0sboots could it have the ore keep values seperated out? as i specifically want to only keep t9 ores until i can get the scan for rubber trees done but none of the others.

winged pilot
#

it has a variable called ore_buffer
just increase the buffer to whatever value you need in order to scan t9 ore and the dustmanager won't let you go under that amount of ore unless you have less dust than the buffer allows

serene parcel
#

i am aware of that i have it set to 50 but i dont want to hoard the rest of the ores

#

it was set to 1000 and i reduced it as i have all ores scaned and only seemingly need another 50 t9 for rubber then thy are done

#

which honestly is only going to take a day or 2 to get but though i should ask incase it was a simple thing to change

winged pilot
#

well it is simple enough, sure... you only want it to keep an ore buffer of t9 ore, nothing else?

winged pilot
serene parcel
#

wait no i think i found it

winged pilot
#

I modified it for your case tho, so even if you imported that, ore_buffer would still act the same

serene parcel
#

but im still confused as to how to import the string you possted here

winged pilot
serene parcel
#

yep that fixed it

#

sorry for the bother

#

at least i now know discord fails to select all at times

winged pilot
golden stratus
winged pilot
#

no, I checked it. If it was too long it'd say something like xKB more or something like that

golden stratus
#

then i guess you double clicked? It stops at +.

serene parcel
#

yeah

bright mortarBOT
#

@serene parcel has earned the Spark role!

brisk heath
serene parcel
winged pilot
#

welp, I tried

serene parcel
#

im going to try and re-import it again

keen swallow
serene parcel
#

if it dosent work this time i will just get the original and babysit the other ores

winged pilot
serene parcel
#

oh i will try that one then

#

nope still eatss the green ones

winged pilot
#

mmm, good

#

at this point, it's better to just not

serene parcel
#

ima just use the base

#

thanks for trying though

#

do i use your version or dos's

#

which is newer

winged pilot
#

they're essentially identical

mine is newer and has something that calculates how much needs to be used such that your machine is used for only x ammount of time.
If you want that, go for mine, if not, d0s's is probably better

serene parcel
#

sounds like a usefull feature to let autocrafting work still

winged pilot
serene parcel
#

yeah i got it

#

once i work out somethings location in a repo im generaly good at remembering it

#

unlike my cup of coffee

#

i can put that down and forget where it is after turning away from it

serene parcel
winged pilot
#

want the link?

serene parcel
#

i may be a little on the dumb side

winged pilot
#

ah, nice XD

serene parcel
#

i will try AGAIN

#

first one seems to work

true crystal
#

I seem to be getting a bug when making exotic producers or something because I have 3 assembly, 3 shapers, 1 t6 boiler???

#

something weird is going on

#

i also only intended to have 1x of these, but some weird tier amounts happened and I made them all T5 to fix it:

#

is there a known bug with exotic producer and this script?

ebon stone
#

thats...

#

thats the F2 mine

#

thats the asteroid rewards

#

an ingame mechanic

low cedar
#

To expand: It randomly gives you stuff (assuming you assigned workers on it and then forgot about it)

hazy cloud
#

Using the script, my PC and laptop alike get pretty laggy, when i execute larger work orders. Right now working on my first exotic gem producer. Crusher and Mixer are loaded, and the game slows down, with my fans ramping up, although task manager shows not much of utilization on cpu and gpu.

storm wadi
#

has there been a patch for saplings yet

low cedar
#

They can be crafted, but they still cause extra refining of ore

placid mortar
#

dude this pmo stop it

#

please check your script i have workers that need to have specefic names to do sht

#

@low cedar

winged pilot
placid mortar
#

yep

#

i need atleast 4 workers with a specefic name to work thats why im annoyed

winged pilot
#

interesting. ok, lemme test it then

placid mortar
#

tyvm

winged pilot
#

I'm unable to reproduce it, sorry.
so what do you mean it needs a specific name to work?

placid mortar
#

well i use an ai

#

that cycle throu diff tasks

#

but to do that the worker needs to be named specefically

winged pilot
#

ah, I see, so it's interfering with your other AI?

placid mortar
#

yep

winged pilot
#

yea, that's not the fault of Factory AI XD
We can go over in #ai-help to update your AI tho. Unfortunately, factory AI needs permanent storage for the UI and stuff

winged pilot
placid mortar
#

bc hes the owner of this script?

#

just looked who the op of this is and pinged

winged pilot
#

yea, and his script isn't the one interfering with your script, your script is interfering with his.
so let's go over to #ai-help to sort this out, ok?

placid mortar
#

i use the factory script only sometimes while the other ai is active constantly

#

so his script interferes with "mine"

winged pilot
#

yup. If your script actually changed worker names, you would've interfered with his, but nope.
tldr, somehow worker_storage_lib fails to stop incrementing worker_slot when a worker has the correct worker_prefix.

It's hard to reproduce and it makes no sense that it'd fail, but somehow it does

low cedar
#

Pinging me is fine, although I also would've checked here eventually. I'm glad cod was able to devote some one-on-one time to looking into this, because it looks like it's a really weird one.

trail idol
#

is it possible to make it also try to boil higher tier dust when lower tier is not enough?
mixing from lower tier to higher tier takes most of the crafting time, so I would want to use a worker to do it offline.

winged pilot
#

D0S.Factory does not downtier dust for the following reasons:

  1. This script is built on TE2.2, and the extra calculations required to handle downtiering dust weren't worth it
  2. There's not all that much of an improvement in performance when downtiering dust. It's just not that good of an implementation.
  3. There's already issues with how the AI handles ore in recipes. If a change was made where dust could also be obtained through dust, that'd just be a nightmare.

I am making C0D.Factory which will include boiling. The problem with that is just that... it's complex so working on it is pretty slow

unkempt urchin
#

is it normal for this script to absolutely crush my fps when it's waiting on an item that was originally in the inventory but isn't there now, such as a machine that I was upgrading and had to put back in the slot to be able to make stuff

winged pilot
#

that sounds likely, yea. It's no longer as controlled now that TE2.2 is gone so whereas before it'd only lag when it's processing, now it lags when it tries (and fails) to do stuff

unkempt urchin
#

and the only real way to get around it would be to add an artificial delay in there

winged pilot
#

yea, it'd be to actually wait for the inventory to match the queue, but that's a big ask

unkempt urchin
#

no even just a tiny delay whenever it loops

winged pilot
#

oh, slow the whole thing down?

unkempt urchin
#

yeah effectively

low cedar
#

If you're just waiting in the factory, you don't really need that fps XD
But I will keep it in the back of my mind, there may be a CPU-gobbling loop in there that can be tuned

prisma zinc
#

@low cedar
The script is actually so majestic
What a fine piece of art
Crazy work by you

fluid ice
#

i love the sript

rose beacon
#

Why canโ€™t the script auto craft every machine?

keen swallow
#

It should be able to?

rose beacon
#

It doesnโ€™t give me the option for the oven, assembly, refiner, cutter and boiler

keen swallow
#

Are you in the mach group? I mean, I expect you to be, since some of the machines are present.

rose beacon
#

I fixed it i put the script in again

#

And that fixed it

#

Maybe the machine werenโ€™t unlocked when i imported the script

carmine bison
#

the script doesn't limit what's listed based on what's unlocked, likely something got corrupted

#

(in the script you can see listings for "boosters" even if you don't have factory 2f yet)

strong osprey
#

Is it possible to tell the scripts to ignore the crafting grid, in the same way that workers ignore stuff in the crafting grid?

barren swallow
#

why?

strong osprey
#

Because I may want to hide uncrushed ore in there. Especially if I'm trying to uptier dust and there's a lot of surplus tier 1 ore that I don't want to waste time on, I want the rest of the stuff up to tiers 8-10 ahead of time.

carmine bison
#

the only ore that you'd really need that functionality for is t9 ore, since it's directly used in some factory 2f recipes

#

all things being equal, it's faster to crush ore than to uptier dust

#

if your crusher is chronically clogged, might I suggest removing the "crush ores" worker task?

tawdry violet
#

whenever i try to paste in the import code, it doesnt seem to work, anyone know why/how to fix possibly?

barren swallow
#

are you copying the entire import code?

tawdry violet
#

should be

#

unless the webside is screwing me

ornate notch
tawdry violet
#

thats what i did, and it just doesnt seem to work

bright mortarBOT
#

@tawdry violet has earned the Spark role!

tawdry violet
#

no clue why

ornate notch
#

how many servers do you have in your technology tab?

#

this is the max possible

uncut pendant
#

Servers won't change it

#

Even if there was a line restriction from it (which there isn't anymore) it would give a warning

#

Most likely the copy is just malformed when pasting

#

Saw someone else have a similar issue a bit ago

#

Not sure how to fix it other than doing the import manually

tawdry violet
#

my servers are maxxed

#

yeah probably would havve to do the import manually

#

that sounds ass but w/e

unkempt urchin
# tawdry violet

did you try clicking on the export tab and then back to the import tab?

tawdry violet
#

no actually

#

lemme try that

unkempt urchin
#

I get that problem a lot and that's what I've usually done to get past it

tawdry violet
#

welp didnt work

unkempt urchin
#

ahh damn

tawdry violet
#

worth a shot, thanks anyway

barren swallow
#

going to have to check the import code you have copied

winged pilot
tawdry violet
#

logs?

#

wouldnt know hwere to find that

winged pilot
#

yea

#

!logs

bold notchBOT
#
Logfile location

%userprofile%\appdata\locallow\Fire Sword Studios\The Perfect Tower II
Current log: perfect.log
Previous log: perfect.1.log

tawdry violet
#

ok found them

#

theres 3 files, not sure which one to look at

winged pilot
#

any of the files have more than 2kb in them?

tawdry violet
#

2 do

winged pilot
#

oh?
can you send the 2 files that do then?

tawdry violet
#

here?

winged pilot
#

if you don't mind

tawdry violet
#

dont mind just making sure, still new around here lol

winged pilot
#

wonderful, thank you

tawdry violet
#

of course, thank you for being so helpful

winged pilot
#

yup, that explains why you can't import it. For some reason, trying to import something fails XD
fun

tawdry violet
#

yipee

winged pilot
#
04.04.2026 19:27:10 [Error] System.ArgumentException: Invalid JSON string literal; unexpected escape character. At line 1, column 45206.
  at System.Runtime.Serialization.Json.JavaScriptReader.ReadStringLiteral () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.Serialization.Json.JavaScriptReader.ReadCore () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.Serialization.Json.JavaScriptReader.ReadCore () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.Serialization.Json.JavaScriptReader.ReadCore () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.Serialization.Json.JavaScriptReader.ReadCore () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.Serialization.Json.JavaScriptReader.ReadCore () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Json.JsonValue.Load (System.IO.TextReader textReader) [0x00000] in <00000000000000000000000000000000>:0 
  at TPT2.TowerVisualization.TowerStyle.ReadImportData (System.String data) [0x00000] in <00000000000000000000000000000000>:0 
  at TPT2.TowerVisualization.TowerStyle.FromString (System.String importString) [0x00000] in <00000000000000000000000000000000>:0 
  at TPT2.IO.ImportController.TryToLoadAsTowerStyle (System.String preview) [0x00000] in <00000000000000000000000000000000>:0 
  at TPT2.UIImport.FixedUpdate () [0x00000] in <00000000000000000000000000000000>:0 
UnityEngine.Debug:LogError(Object)
TPT2.TowerVisualization.TowerStyle:FromString(String)
TPT2.IO.ImportController:TryToLoadAsTowerStyle(String)
TPT2.UIImport:FixedUpdate()
```So this basically means that the game failed to parse the imported string to json
keen swallow
#

unexpected escape character
๐Ÿค”

tawdry violet
#

huh

#

any idea how to resolve that?

barren swallow
#

you could try to verify the integrity of the game files

winged pilot
#

well, it'd help if I can repro... but I can not :/

tawdry violet
#

all good, i appreciate the help regardless

#

ig ill try verifying the integrity and see how that goes

#

ok just did that

#

no change

#

:(

winged pilot
tawdry violet
#

i just clicked the copy button and pasted it directly in

#

huh mine looks a little different

#

weird

winged pilot
#

mhm, mind pasting the import code here please?

tawdry violet
#

thats what i get when i copy the code

winged pilot
#

what in the great googly moogly is going on XD
How did you manage to get 2 different chunks from the actual import XD

tawdry violet
#

LOL

#

i have no clue

#

that would explain a lot though

winged pilot
#

like seriously, these 2 blocks are different

tawdry violet
#

like i said, no clue

winged pilot
tawdry violet
#

ok

#

thanks

winged pilot
#

even tho it's the exact same import from the github, stuff can be weird like that ig

tawdry violet
#

ok ill try it in a sec

#

well it seems that my copy paste only grabs a chunk of it

#

for some reason

winged pilot
#

Ah, nono, download, don't copy from discord, it's too big and discord doesn't let you select it all

tawdry violet
#

yeah im doing that, it looks even weirder now

#

i copied the text, pasted it into the import tab, and pasted the text from the import tab back into notepad

#

looks like somewhere in the middle something gets added

#

somehow?

#

not sure

winged pilot
#

how in the heck?

Well now. Surprise, tpt2 identified something weird with your system ig XD

keen swallow
#

(Strangely enough, not the first time this is encountered.)

tawdry violet
#

top row is the code you sent me

#

bottom 2 are what actually get imported it seems

#

everything before that point seems identical

#

but there it changes something and then its cooked from there

winged pilot
#

hmm, maybe it's actually tpt2 not liking your clipboard then XD

Have you been able to import anything else before?

tawdry violet
#

yeah

#

nothing this big afaik but everything else ive tried to import worked flawlessly

winged pilot
tawdry violet
#

rip

#

could be worse i guess

#

its probably not perma broken

winged pilot
# tawdry violet its probably not perma broken

update, turns out it's royaly fucked and I can't track down a cause for this weirdness, so it's gonna have to be up to the devs on this one.
Care to make a bug report in #1020252255141756969 about what you're experiencing please?

low cedar
#

I highly doubt this is anything to do with TPT2. It seems their clipboard itself is fucked.

winged pilot
tawdry violet
#

just did some sanity checking and i think its my clipboard

#

somehow

#

whenever i paste the inital code it turns into the broken one

#

even in notepad

winged pilot
#

don't tell me I've been slamming my head against assembly for nothing
Gad dangit, why didn't I ever ask you to make sure to paste the code in notepad directly

winged pilot
tawdry violet
#

yeah shoulod have thought of that

ornate notch
tawdry violet
#

...

#

bruh

#

microsoft

ornate notch
#

I'm still on win 10

#

since I don't have win 11, I don't know how to fix it, sorry

tawdry violet
#

no worries, thanks for all the help

barren swallow
#

why did they need to change the clipboard

tawdry violet
#

idk man i dont snort enough coke to understand them

uncut pendant
winged pilot
opal hound
#

I don't know if this was stated before but I had an issue where the AI wouldn't finalize the requested craft. It would make all the prerequisite matterials but stop at the end. I tried restarting the overlay and reinitiating the craft, change the request, restart the game, and reinstall the script. None of that worked. What did work was randomizing the names of the workers with [factory] names.

keen swallow
#

Do you have enough resources to finish the craft?

carmine bison
#

the script warns you for dust and rubber, but not factory resources

#

(this is frighteningly common when making t2 and t3 boosters)

opal hound
#

After it froze, I could manually complete the craft

carmine bison
#

did you figure out why it stopped?

#

(I should put together a "Sanity Check Checklist" for ruling out common problems - you'd be surprised how often the script fails because someone's missing a machine)

winged pilot
opal hound
#

T3 machine boosters only 299

#

When i cleared the workers names that were used by the AI, I was able to try again and the AI works just fine.

#

It could have had problems with my run of the 'GRUP' items to scan. My inventory got quite full so the AI might have misshandled the jam.

carmine bison
#

does the script warn for void essence?

#

I can see that being a trip point

#

(general case - if you're making t3 boosters, use the script to make the first thousand you need to register them with the 2f crafter, then have the crafter do the bulk work instead of the script - crafter runs while not in the factory)

winged pilot
# carmine bison does the script warn for void essence?

yes
It checks```
; If we're missing the resources needed to complete the recipe, set error.
gss(
{action},
if(
{get_queue(1, ore)} * 2. < {get_queue(1, dust)},
"<color=#fb3>Missing " . ({get_queue(1, dust)} - {get_queue(1, ore)} * 2.) . " T1 dust<br>and/or higher tier dust/ore!</color>",
if(
{get_queue(1, rubber)} > 0.,
"<color=#fb3>Missing " . {get_queue(1, rubber)} . " rubber!</color>",
if(
{get_queue(1, void_essence)} > 0.,
"<color=#fb3>Missing " . {get_queue(1, void_essence)} . " void essence!</color>",
if(
{get_queue(1, pumpkin)} > 0.,
"<color=#fb3>Missing " . {get_queue(1, pumpkin)} . " pumpkin(s)!</color>",
""
)
)
)
)
)

winged pilot
carmine bison
opal hound
#

After I reset the workers names used to set the requested craft, it was able to craft them just fine. It had some kind of hang-up that prevented it from finishing it before. Possibly a process got out of sync when I did the GRUP craft for all and my inventory was filled.

carmine bison
#

yeah, that would do it too.
I generally avoid the ALL grup and do the subgrups separately - parts, then machines, then producers

#

especially given higher tier machines/prods cause a lot of clog

winged pilot
winged pilot
opal hound
#

Ya, I understand that. The issue I had was after clearing out the mess made by the All craft and reseting the overlay, it still wouldn't finalize the craft for the T3 machine boosters. It had all required resources including void essence and made all the subcomponents needed to craft the boosters. It just wouldn't complete it. My guess is something in the script got stuck that relies on the worker name and likely another part of the script that doesn't was able to get to a point that even deleting and re-importing the script wouldn't fix. Manually renaming the worker allowed the final 'flush' needed to get it working again. I haven't had any problems since and have produce over 20k of those boosters as well.

winged pilot
#

hmm, you maybe got the log from that monent?

#

or have you opened the game 3 times since then?

#

if it's been at least 3 times, then the log is gone...
It's more likely to be a script problem than a game problem, sure, but hey, probably worth checking

opal hound
#

I think it was all in one session that I had the problem. Thankfully it's not there now. Maybe later I'll try to recreate the problem.

low cedar
carmine bison
#

so "possible but labor-intensive and low priority"

thorny basin
#

anyway to combat the lag or delay when crafting at 1000 and up?

thorny basin
nimble sequoia
#

it doesnt seem to work with rainbow plates, i was hoping i could automate the machine usage (instead of constantly putting rainbow ingots in)

#

i can select it but it just says its missing a ton of t1 dust which it doesnt even require

#

okay nevermind, it does work, i guess it was because i didn't have enough rainbow ingots

#

i just needed to set a lower number