#Factory Automation v3
1 messages ยท Page 2 of 1
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
one sec, I'll do a test rq XD
you can't
not that it would be useful anyway
there's no simple in-game way to get it to format a large double as an 18 digit number in AI
not with the AI
just usual game behaviour
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
interesting, so this is what you mean, ye?
1e18 - 1e17 - 1e4
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?
Sure, that's a manifestation of the same underlying issue
how do you make those numbers appear in e notation? Mine are in full notation even if I turn on scientific notation in settings.
you need to do stuff with a string i'm pretty sure
either that or it turns into e notation at very large values? tho i don't think that's it
you just need a double with 15 or more digits
oh that's why
i was so used to numbers automatically switching notation once they went to 10B+
or 1-10K in tpt2
you either get E notation or full notation
no other notation
well again, you can do a string :p
number = if(var >= 1000, i2s(variable / 1000) . K, i2s(var))
yea, you can, but do you really want to?
yes
good luck introducing QI by doing that
10^18?
ye
it is simple, technically, but it's still a pain XD
#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
and now you gotta add the case where you have numbers like 10^18 + 1
and you get a whole mess with losing data
if you have 10^18 + 1 it'd say 1.00...1
alright well yes it would be a mess
just round it at that point ig
and lose data?
not that nice to do
well if you wanted to be that accurate why do all this in the first place
you gave it as a solution to string arithmetic
if you do string arithmetic like that, you're losing a lot of detail
how do you want me to do string arithmetic then
I don't
that's why I asked "do you really want to do string arithmetic tho?"
it causes all sorts of problems
but me likey
at least to make sci notation
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 ๐
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
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.
I would've done a lua macro but I suck too much XD
#to_enotation(num) {lua(return string.format("e", {num}))}
If the documentation is to be believed, string.format is the Lua equivalent of C's sprintf
does this even do anything? probably not.
also my windows bluescreened right before I sent this message
game already converts to e notation
I want to increase the base
lua macro would just be to construct the operation up to e 18
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;```
Can't say I didn't try at least :p
this, but I can't do concatination for some reason :(
can I steal you to #ai-help?
that's... a weird question to ask
by intent :D
If you can upgrade it it's all yours, since fireball said it didn't do anything
oh, I thought you were talking about my macro ๐คฃ
no
I just wanted to steal you, as the person, to #ai-help
and I'm actually not that good in lua (again what I said about string.format came from the docs)
yes
you read the stuff and understand the stuff
I read the stuff and understand the stuff for like 5 minutes
is there any way to increase the maximum amouny of items to craft in one instance?
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
I literally made this
you can craft up to 1e14 items with it
and you can do it ingame
you shouldn't be using the machines if you have to craft that much
at that point its better to use the fabricator
im just lazy
do you need to craft 1e14 items at once?
but currently doing that where im fabricating enough to make e12 t2s cuz im out of void essense
do you need to craft 1e10 items at once?
I do
yea, you can tell the AI to craft ya 1e12 items
I can't guarantee that it won't throw you an error message tho
i wish you could boost the rate you get void essence more
juust powerplant, sorry bud
yeah that's not happening any time soon
although I think it's planned?
ik i already have that boost
I'll probably bump the limit on this at some point, now that we have faster machines
I made the workspace mainly for you XD
want me to remove these?
; I'm sorry if you don't like them
#worker_tier worker_buffer
#worker_category worker_buffer + 1
#worker_item worker_buffer + 2
#worker_cursor worker_buffer + 4```
I dunno, I haven't seen that yet
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)
so... it turns out the previous package I sent had some opened up debug messages
I hope this recommented them
not sure
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))}
wdym "doesn't count ore lumps as dust?" It does
it gives me an error
If I have lumps in my inventory, the AI thinks I don't have enough dust
if I put the lumps in the mixer and get the dust, only then does the AI see it as "enough dust"
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
Hmmm. That's odd, but there may well be a bug in there somewhere
because it only counts lumps 1 time, not 2 time
Well, this code doesn't have anything to do with counting lumps or dust
{subtract_queue(_tier, dust, previous_amount - count ("lump", _tier))}
count ("lump", _tier)
these should result in 2 dust, not 1, right?
That code is for producing lumps Edit: Oops, producing dust from lumps
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
But either way, the counting happens a long time ago (during the hell line)
oh fun
there is any way to loop this script? like after finish the crafting of 9999999 of the selected item, auto-start again?
you could make it so that it triggers whatever clicking F triggers when it finishes, probably a variable change or an executesync()
or you can set an autoclicker for F
hey d0s
do you like still want to touch factory AI or should I start deconstructing to try and get it updates? XD
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.
There's also updating the item groups
but mainly, I meant
do you want factory AI to be a solo venture or would you rather get a hand with it
I assumed I would be working on it solo, but I am not against PRs that improve things
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
https://github.com/Codrineye/PerfectTower-by-d0sboots/tree/main/factory
you can access this if you ever feel bored and want to see what I did to your factory AI XD
I did not update the source in the README.md yet tho
Ofc, I'd love to help
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?
do you have fast atomic functions enabled?
yeah that breaks turbo iirc
ohhhh
turn off fast atomic functions
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
less of a patch and more of an implementation of turbo :D
this ai is too strong
also does it consider items in inventory? or does it craft all from scratch?
yes it does consider items from inv
nice
also can i ask about the factory ai, does it craft things even if im not in the factory tab?
Technically yes (it does craft things that are already in the machines), but it can't put more things into the machines, so in practice the answer is no.
I want to be able to automate this ai, how can I do so
what do you mean by automate?
it's already automated XD
why do you need to automate the factory ai
To be able to constantly craft stuff with it, biggest reason is because I don't want press f every once in a while
well, do you have an example?
it's kinda hard to think of one like this
just order a bigger order
or don't commit that hard to factory, its not worth it
well hold on, every idea can be worth doing, just needs to be given a chance and explained more thuroughly
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
About the second part...
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
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 :)
that's smart XD
the game doesn't know the difference between impulse: key.f and impulse: script "key.f"?
no
why would it XD
it should
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
it does?
didn't stop me from activating adventure AI on loop with a script called key.r
wait, are you saying that you triggered an impulse: key.r with an execute script: key.r?
I have to go test this now
if impulse() returns the same string, it works XD
I triggered the logic for key.r with a script called key.r which executes the init
Yeah, it doesn't work
I'm all for jank :)
wait what?
the hell did I do XD
This is not what I said
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.
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.)
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
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
@south mist has earned the Ember role!
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?
you have to stay in factory
but it will remember that it was crafting something if you leave factory while it's crafting
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?
wdym by "an easy way"?
nvm found a fork of the factory calculator that has the boosters ๐
bleh misses the machine booster, laame
no one is really updating them
yoo congrats on V3
just noticed?
How do I start the ai after I import and enable all the codes ?
you go into factory and the UI should appear on the right side
Where ??
press f4
Nope nothing happening
wdym nothing happening
It the same screen and nothing appeared
do you see the AI OVERLAY text on the bottom right?
Umm could you send what it should look like cause either it not working for me or my eyes gone bad
Nope nothing like that happened
hmm...
can you send a screenshot after pressing f4?
Here
and the scripts tab in headquarters?
nice, it works
But how do I select things
@oblique gate has earned the Spark role!
(btw, you can use f12 to screenshot in steam apps)
you scroll through them using w/s
Is there a way to stop the script?
turn off ai overlay
THanks
you know what the problem is with these forum things in discord? where is the link? lol
It's pinned, usually.
Yes pin.
discord UI leaves a lot to be desired, yes.
can't see it from here
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
discord spending more time developing nitro cosmetics than having a reasonable ui (on both desktop and mobile). :)
ohh nice, Tree production boosters
not added to the AI yet though, I still need to update
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?
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
Is there an updated version where it includes the Tree Boosters?
@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
Thank god for infinity ores for the ones who have them then :p
You can release it with that warning ๐
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.
Sadness insues ๐ฆ
ooh good to know, although I don't have that much ore so I can't test that behaviour ๐ฆ
I can give you a save that has that much ore, so you can test that behaviour
sure that would be helpful
can you increase the cap on the amount of stuff you can make past 9999999?
I wouldn't recommend it, best to just use the fabricator at that point
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
why does the script just randomly stop even if i have the stuff to craft what im crafting
Do you have Chemical Lumps
?
Beat Statue of Cubos bosses.
bosses
ty for helping
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.
its very finicky and annoying honestly
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.
I do have a prototype version that could be used by factory AI, but it's a pain to try and integrate it.
The biggest problem is that, to integrate a custom overlay, the entire communication system inside of factory AI would need to be overhauled
Stats on what's currently happening won't be happening, since that would require massive changes to the internals of the factory. Basically, as it stands now it knows what it is trying to make, and all the things it needs to make to do that, and just keeps trying to make the intermediate stuff until it's done.
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.
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
(It was a reference: https://www.youtube.com/watch?v=bZe5J8SVCYQ)
2012 was 12 years ago, omg
how do i add the ai script to the game
copy the export code from the github linked at the top of the channel
and then put it in the import button in the bottom right of ai scripts
i think i'm a bit lost cause the wsad for changing things is not working
that's interesting, probably need a screenshot to see the context
of the script inside the factory ?
just of the game
ingame ?
yes
the context of what's going on ingame, just take and send a screenshot
you have global variables turned off from the look of things
toggle this off to see what pressing wasd does
yes, it's all global variables
you understand now why the screenshot provided context, right?
yup thx
no problem, enjoy your factory
this is not good i'm going to spend more time in the factory than progressing
How do i import the Script?
use the import code you see on the pinned github link
found it and managed to get it working
which button is it for the seeing of the scripts?
I'm not getting this layout
F4 to activate the AI overlay.
f4 to activate and f7 to deactivate
f4 activates and deactivates the overlay
f7 enables Facility AI's click recording functionality
oh ya my bad for the bad advice haha
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!
sadly not
while waiting for d0s to finish working on the new version of factory AI, here's a version that includes the tree boosters
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?
It will pick up where it left off, assuming you didn't close the AI overlay.
Awesome okay thank you I was so worried to screw it up if I left to turn on my power plant
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
you need TE2.2, the link is with the factory package or the pins
yeah
@carmine belfry has earned the Spark role!
Post a screenshot of the factory (like deserpo above) if it's still not working
it was mb cause i had ai overlay off
I wanna make sure this thing isnโt messing with me, does it really take like 128m+196m t1 dust for a t10 boiler?
Most likely so, but higher tier Dust counts as way more Dust for the script than T1, because of Ore Lumps.
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
You really only need a T5 Town Producer, and boost it in Trading Post.
Okay, I was gonna make one of each of the producers at t5 to get the grid filled out
@silent quail has earned the Ember role!
its broken because of your negligente with your machines
its unfair how advanced that brlt is compared to the rest
Hello. How can I change the max count of 9999999?
don't
I highly wouldn't recommend it
You don't without modifying the script.
ok. thx
Hello! I have a question, why does it keeps like this?
you're most likely missing tiers of dust required to get to t9
Okey okey, then im trying tomorrow with more dust, didnt know that was so expensive
if you're able to start the craft that means you just need 1 t9 ore
though you might want a higher tier belt first
as that increases the speed of the refine
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!
green
yeah once you have one of each ore it seems like you can craft just about anything with enough patience
like 99% of my time in factory now since unlocking AI seems to be waiting for the mixer to finish processing
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)
I don't think it has those? Although maybe the grup option would craft it (along with everything else in the group).
I see, thanks
dust, ore lumps, rubber, void stone and pumpkins are terminal items
The AI knows of the existence of dust, but you can't craft it by itself because of the complexity behind choosing how to get dust
What's a void stone?
Also Ores themselves.
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
Guys it worked perfectly after obtaining the ores, thx for the help!!
@astral sparrow has earned the Spark role!
any idea why this renamed my mine worker to factory<seemingly random numbers>?
it's worker storage lib, that's how it remembers the state of its UI after you close the AI
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
ok, guess I'll just rename my idle one to [factory] and it should leave my miner alone then?
should be fine, yea
got it, thanks
no worry
Or you could put the Factory Worker on dissolving, if you have Factory F2. (Although it's not recommended to take it until MT12.)
no, it doesn't target the worker with the dissolving task, it just shuts it off it it happens to get the dissolver
I know. The Worker that has the [factory] prefix should go on the dissolving duty for that reason.
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")
)
Really funny instance of two people arguing about how hard they agree
Does it like include auto buy material in shop to decrease dust/ ore required
No, it doesn't, as there is no in-game function to buy items from the shop.
How to speedup refining beside powerplant
I'm in MT8 atm and just start factory (I know I'm late)
Also why AI suddenly freeze on crafting belt T4
Do you have the Chemical Lumps
Exotic Skill?
I upgraded all building exotic upgrades
Spending hours on boss fight helps
Only solved by restock more from shop
this one cant craft "Manufacture" items right?
you mean boosters?
yes it can
The AI can craft any item
oh i didnt find the caterogy for manufacture
it's in prod
I'm not in the factory right now, but I think yesterday I couldn't find the tree booster
Yes, it is not in the script.
I feel lied to by Cod then ๐
it's not just officially on d0s's repo, he's working on it but hasn't released the version with tree booster yet, this version adds in tree boosters
๐คฆ
it's because of a deeper bug and i should feel bad
I mean, we are programmers, it's not normal to feel bad?
also, does the bug stem from the game bug that caused the terrible log to appear?
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
but it seems to craft trees fine, no?
That's why the tree booster can be made
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
oh, gotcha
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
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
on the upside, once it's fixed lumps should be craftable too
I did think it was a weird choice to make the queue just the ore ID, yea
ore ID, not dust ID
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
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
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
it's better if there are fewer special cases, I'd rather introduce fake internal items that can't be made
that's fair, this is a bodge after all
Crafting T9 belt and it suddenly stop working
wait, what's the difference between that and adding {special(crushable_ore)}?
aren't both adding fake internal uncraftable items?
that is basically what I was talking about
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
Is there a way to auto buy rubber?
just use an autoclicker script
D0S.Superclick should do it
That was my only tought.
Well then.
@marble mantle has earned the Spark role!
do you have factory floor 2?
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)
With the buyable upgrades, you can manually buy enough rubber quickly (~1 minute of effort) that it'll last you until later things unlock
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
you can, but it's not supported because it's a pain to work with :D
Ahh okay, then I will just stick with what I got, thank you
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.
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
"Double overflow" isn't really a thing - past 1.798e308 it just says โพ๏ธ.
That's just the precision limit of doubles.
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
There isn't a function to buy items from the shop either.
tbf once you get floor 2 of factory worker does get the option to collect things like rubber in large quantities
inf spoilers ||there's also an infinity stone perk that gives you, basically, infinite rubber||
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
fabricator.
no ur 0.0001% of the way
Inf is lua limit which is 2^1024
Factory limit is 1e18.
How much work would go into excluding producers from the "All" group?
(or more precisely, making a "Parts+Machines" group)
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.
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.
it cant make tree boosters?
It's not in the official version of the script, but the one I'm replying to should be able to craft them.
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.
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.
I have chemical lumps
But if I restart it will it make another t7 belt or use the one I have?
Factory Ai recognizes your inventory, so it uses the one you allready created
As long as is in your inventory
Or if machine is busy
Can someone help me. I have not used one of thses scripts before and I want to get a t5 white producer
well, are you experiencing any issues?
or, are you confused about what on earth is going on
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
wait, how the heck were you able to send a picture?
I guess forum posts aren't protected?
lol
damn XD
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
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
so, you're on laptop?
do you have an fn key?
to activate facility AI you'll want to press fn + f4
doesnt the script require some machines first?
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
did fn + f4 work?
no I am trying to figure it out becasue it keeps opening windows casting and its very annyoing lol
@stark ridge has earned the Spark role!
I can tell you if it worked, just need screenshots to see what you're seeing
nothing has changed from the last one
picture of your keyboard layout maybe?
so you tried both f4 alone and fn + f4?
aha, gotcha
Yea, I should have the same layout... pressing fn and then f4 should bring up the AI Overlay
When I do anything with f4 this pops up
so, the same thing whilst pressing and holding fn?
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
or maybe a keyboard config that makes F keys work as special button instead of the F?
you can also just change the hotkey in settings if you need
this might work best
ah, right, you change it in AI settings now, I always forget about it XD
I just got the clumps thing
ok, so you go back here and click on settings
you could always change it, its just now in the ai settings too
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
ive been able to use the ai for a long time on my phone, and that requires changing the keybind
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?
well, it depends on if the thing limiting you is your resource count
it kind of is. I can't damage them enough I have the ultimite attack 8
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
is there some recommned blueprints I have kinda just tossed stuff in
also is there a script to farm mods?
idk if I can give any recommendations, I'm god awful at blueprints
but, the blueprint pinned over at #mt-2-to-5 might help you, if you're mt 5
it's such an easy script, nobody has made one that's specifically for farming mods
- you just need a script that restarts the game for you after x amount of rounds have passed... really easy to make
- once you've got all the modules, that script becomes useless
ah okay thx
if you want, I can make one rq for you, if you want a module farmer script
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
easy to fix, at least```
bVFBboMwEPzLHnJCCJrmghoR5Q25FQ7GLO4qYCN7XVpFUb9e2QQpIlxW9tg7Mzt7Ayctjeyg+LyBkExGhzNUPssyVKjRkkyVYUNd1UijHQvN8fUt1kOs2brmuTTDKCw5o1PHlrSaKWe9lIbR9w5XlO8z8fG4iR+u+JsiJDALLOYmQTx9UY/xU/ek2xjTv5hpjW96rFiJAdNJfG97yD9W8H57zqWe/k7bs+x20cE+ypG7mAntBR2TVmESywFILToWlgPSPYe+jly+KocePbPgDzHUCUijW1pWWSfwCDsudskw+tE4WeN1G5q0GBAKKMuyhARGIa9CBQASaHyrkKHIszwB7/D8uLP1eK/v/w==
perfect thank you so much
no worry
why 500?
around a value that I remember using... idk man, I haven't entered tower testing in months
how much farther does this game go lol
until mt20
we only havbe mt15 right now
it's ok to lie to newcomers
XD
Could anyone tell me how to automate a skill script
There's a video in #ai-help
no factory refining ai?
wut?
you mean an AI that uses this for you?
ye
ai can't type numbers, there's a worker task though, or just do longer refinements i guess
oof
Worker can handle that pretty well, and if you need an high ammount just set a big number
I took that last part to heart :)
just set off month long refinery
I like the infinite ores
theres infinite ores? hope to get that eventually
Only really feasible in the post-game.
99.5% means you actually got them
You can only claim them once it reaches 100%.
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)
...I forgot about that.
By now I mean...
How in the world does this work
is it just me or is there no option to order ore lumps with this?
You're right, there isn't. I think it does craft them in a group, though.
I wanted to use it to quickly craft X lumps for the crafter unlocks while my crafting grid was full of excess stuff ๐
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")}
through a lot of pre-computed strings and probably sleepless nights on d0s's end
Hey all! ๐ Pretty new to this, but I've run into 2 problems hoping someone knows how to handle.
-
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.
-
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.
for 2, are you missing a tier of dust maybe?
or maybe don't have enough rubber / red resources
well i dont have all tiers dust for sure but so far its just upleveled dust for me as needed
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
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
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
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
I just made the github, its mostly yoshi and the others who make the bps
though I do have my own bps that you might use in later phases
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
Why is this not working?
Because you don't have Turbo Execute.
How can I have it? .-.
(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.)
The budget version is as simple as adding a budget cap of max to the package
how do i do this since its not working for me whenever i press F to craft
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.
do i also need to do that for TE2.2?
No... if you have TE2.2, you don't need that at all. For now, as it's getting patched out in v1.0.
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
Okay... budget and TE don't go together very well.
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
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.
time to crack open the package XD
where is the import code?
pin
On the GitHub.
i found it after the message, my fault
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?
You have to take it out before starting the craft, then put it back in if necessary.
take the machune out, run the script, put it back in, then once you have just tge last step left take it out again
then in the case of machines that require themselves to make some of the parts should i just time it carefully?
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.
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
Yeah, seems right, although I don't think I've seen people upgrade them all at once.
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
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
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.
ok sounds good. thanks ๐
And Crafter is better now, since it can actually handle Ore Lumps properly.
Anyone have a working Factory script please?
do you have the script imported?
or are you just looking for the scrip?
Because it's in the pinned message
...Why are you asking this in a thread with the working AI?
imported....
and yes, sorry, I'm already trying it... I didn't notice... my bad
but Thanks for answer :))
are you experienced any problems with the script, or is it all good?
Now its ok and script is working..... DOS. factory v3.3.0 :))
but v 3.2.3 is not working ๐
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
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.
the mining ai script doesn't seem to be working? was there a key you push after you open the mine to start it?
you should probably ask in that thread #1094061793292329041
but it should just work
oh, for some reason i only seen this and cordineyes towertesting
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
the only reason for a script to not work is either: you have f4 off, you are constantly running more than 100 scripts as soon as f4 turns on, you have a script that has a very long time consuming infinite loop, you aren't hitting the impulse, or the script itself is flawed in some way
its probably not the last one
impulse is wake up or open mine
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.
@dusky trout has earned the Ember role!
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.
That's deeply weird, the fact that it worked when you restarted (you can also just turn AI off an on again with F4) means it wasn't imported wrong or something. Please let us know if it gets into this state again, and how.
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.
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
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.
Definitely restarting AI clears everything
Another possibility is running out of resources
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.
Have Chemical Lumps?
I do not
That can definitely cause issues, although usually not one that looks like that, just stuck crafting
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
Well, it will either won't happen again, or we'll figure it out someday XD
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
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?
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
for motors you need the presser, refiner, shaper, and cutter
can you screenshot your machines the next time it fails to make the motors?
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?
what is going on, why are there so many craft scripts, what did d0s break
you at least have the presser though
is your inventory full?
please sort your inventory, why do you have 4 different t1 shapers and 2 different t1 pumps
i mean, sure. does that break the AI? ^_^
no, it just breaks my eyes
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.
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
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.
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
and none of them ended up doing anything
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.
same, multiple restarts didnt do anything.
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
I will say that I have not seen this happen on my new-for-v1 save
i havent had this either one v1 save
....I'm still amazed at what could possibly even be done with Ai bro-
It says its crafting the tier 8 belt yet its doing nothing
Am i doing something wrong
Are you missing a tier of items? Do you have Chemical Lumps
?
I do have chemical lumps
All my machines are still tier 4 if that makes any difference
You need all Dust from T1 to T8 to craft this.
It crafts all the way up to tier 6 belt then refuses to craft t7
Then you're likely missing T7 Dust.
Oh okay, thanks
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
damn bpt 2415? not bad
It calculates everything first and then makes it in parallel
is there an update to this script for 1.0? it behaves a bit weird (very slow sometimes)
It was updated, yeah.
I have noticed the low FPS sometimes (on the latest version), haven't tried to debug yet
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
You need to have at least 1 of all Dust tiers for Ore Lumps (and Chemical Lumps
as well).
(And I assume you have figured out how to turn it on yourself, because apparently some people struggle with it.)
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
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
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
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.
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
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
well it is simple enough, sure... you only want it to keep an ore buffer of t9 ore, nothing else?
this should do it for ya.
It's C0D.DustManager, yea... but eh
im sorry i appear to be a little uninformed but this is not importing and i cant find your dust manager on your repo
wait no i think i found it
I modified it for your case tho, so even if you imported that, ore_buffer would still act the same
but im still confused as to how to import the string you possted here
did you copy the entire code?
You might have to download the message and do a usuall ctrl+a, ctrl+c
will try that
yep that fixed it
sorry for the bother
at least i now know discord fails to select all at times
don't worry, it's all good
it is too long, so that it cuts off.
no, I checked it. If it was too long it'd say something like xKB more or something like that
then i guess you double clicked? It stops at +.
yeah
@serene parcel has earned the Spark role!
Triple click on the script to fully copy it.... works for me, at least
so its not working and is grinding up the t9 ore still
welp, I tried
im going to try and re-import it again
It says that after the first 50 kB.
if it dosent work this time i will just get the original and babysit the other ores
ah, I see where I went wrong
ima just use the base
thanks for trying though
do i use your version or dos's
which is newer
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
sounds like a usefull feature to let autocrafting work still
sure, you want the link to it or do you still have it?
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
i oww you a massive appologie
want the link?
i may be a little on the dumb side
ah, nice XD
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?
To expand: It randomly gives you stuff (assuming you assigned workers on it and then forgot about it)
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.
has there been a patch for saplings yet
They can be crafted, but they still cause extra refining of ore
dude this pmo stop it
please check your script i have workers that need to have specefic names to do sht
@low cedar
you should only have 1 instance with that name. the script is making multiple?
interesting. ok, lemme test it then
tyvm
I'm unable to reproduce it, sorry.
so what do you mean it needs a specific name to work?
well i use an ai
that cycle throu diff tasks
but to do that the worker needs to be named specefically
ah, I see, so it's interfering with your other AI?
yep
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
also, why would you ping d0s if it's not his fault?
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?
no?
i use the factory script only sometimes while the other ai is active constantly
so his script interferes with "mine"
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
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.
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.
D0S.Factory does not downtier dust for the following reasons:
- This script is built on TE2.2, and the extra calculations required to handle downtiering dust weren't worth it
- There's not all that much of an improvement in performance when downtiering dust. It's just not that good of an implementation.
- 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
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
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
and the only real way to get around it would be to add an artificial delay in there
yea, it'd be to actually wait for the inventory to match the queue, but that's a big ask
no even just a tiny delay whenever it loops
oh, slow the whole thing down?
yeah effectively
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
@low cedar
The script is actually so majestic
What a fine piece of art
Crazy work by you
i love the sript
Why canโt the script auto craft every machine?
It should be able to?
It doesnโt give me the option for the oven, assembly, refiner, cutter and boiler
Are you in the mach group? I mean, I expect you to be, since some of the machines are present.
I fixed it i put the script in again
And that fixed it
Maybe the machine werenโt unlocked when i imported the script
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)
Is it possible to tell the scripts to ignore the crafting grid, in the same way that workers ignore stuff in the crafting grid?
why?
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.
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?
whenever i try to paste in the import code, it doesnt seem to work, anyone know why/how to fix possibly?
are you copying the entire import code?
if you click on the button with a red circle, it should copy the entire import code to the clipboard (at least for windows), then you can ctrl+v to paste it.
thats what i did, and it just doesnt seem to work
@tawdry violet has earned the Spark role!
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
my servers are maxxed
yeah probably would havve to do the import manually
that sounds ass but w/e
did you try clicking on the export tab and then back to the import tab?
I get that problem a lot and that's what I've usually done to get past it
welp didnt work
ahh damn
worth a shot, thanks anyway
going to have to check the import code you have copied
so, import failed?
Anything in logs perchance?
%userprofile%\appdata\locallow\Fire Sword Studios\The Perfect Tower II
Current log: perfect.log
Previous log: perfect.1.log
any of the files have more than 2kb in them?
2 do
oh?
can you send the 2 files that do then?
here?
if you don't mind
wonderful, thank you
of course, thank you for being so helpful
yup, that explains why you can't import it. For some reason, trying to import something fails XD
fun
yipee
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
unexpected escape character
๐ค
you could try to verify the integrity of the game files
well, it'd help if I can repro... but I can not :/
all good, i appreciate the help regardless
ig ill try verifying the integrity and see how that goes
ok just did that
no change
:(
https://d0sboots.github.io/tower_json/
Can you put the import code in here please?
Should look like this, make sure the Pretty-print JSON is off
i just clicked the copy button and pasted it directly in
huh mine looks a little different
weird
mhm, mind pasting the import code here please?
what in the great googly moogly is going on XD
How did you manage to get 2 different chunks from the actual import XD
like seriously, these 2 blocks are different
like i said, no clue
anyways....
download this, open it up and import, that should let you import
even tho it's the exact same import from the github, stuff can be weird like that ig
ok ill try it in a sec
well it seems that my copy paste only grabs a chunk of it
for some reason

Ah, nono, download, don't copy from discord, it's too big and discord doesn't let you select it all
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
how in the heck?
Well now. Surprise, tpt2 identified something weird with your system ig XD
(Strangely enough, not the first time this is encountered.)
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
hmm, maybe it's actually tpt2 not liking your clipboard then XD
Have you been able to import anything else before?
yeah
nothing this big afaik but everything else ive tried to import worked flawlessly
At this point, the best solution is probably to just uninstall and reinstall the game :{
soz lad
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?
I highly doubt this is anything to do with TPT2. It seems their clipboard itself is fucked.
according to buddo, the output only gets messed up after being shoved in TPT2
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
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
so my original assumption was correct... why didn't I trust it more ;-;
yeah shoulod have thought of that
saw your logs, and since it's windows 11, I think in one of the updates, microsoft slopped ai all over the clipboard so it tried to "help out"
no worries, thanks for all the help
why did they need to change the clipboard
idk man i dont snort enough coke to understand them
I mean its just what I said initially
^
well hey, it's what I said initially too
#1094056086585213008 message
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.
Do you have enough resources to finish the craft?
did you have enough factory resources to make it by hand?
the script warns you for dust and rubber, but not factory resources
(this is frighteningly common when making t2 and t3 boosters)
After it froze, I could manually complete the craft
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)
what is it that you tried to craft?
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.
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)
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>",
""
)
)
)
)
)
Oh, maybe it wasn't able to craft it then
can we get factory resources (cubes) added to that as well? that's a common trip point when making t2/t3 boosters
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.
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
that's up to d0s.
C0D.Factory will have that, but that's not coming any time soon
Aha, All needs a lot of inventory space and it might not fit fully.
The worker name is used just for the UI, and has no real way to make it unstuck unless you also refresh the AI overlay.
But, the craft() function will fail if there's not enough space for the output to go
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.
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
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.
That would require having data on the cost of all the items, which it doesn't have rn and is a pain to collect
so "possible but labor-intensive and low priority"
anyway to combat the lag or delay when crafting at 1000 and up?
what lag
My mistake pyro helped with it all sorted
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
