Jump to content

LUA Industrial Unit Ideas


SimplePiMan

Recommended Posts

I have been playing around with various LUA scripts and I think something that is lacking is access to more information on industrial and storage units.  Below are a list of additional data I think would be really helpful to have for these

Industrial Unit:

1) what is the current recipe being crafted

2) if ingredients are missing, what ingredients

3) ability to change the recipe

 

Storage Unit:

1) JSON of contents, to include item name, quantity (both count and mass) and perhaps image64 code for the icon to be able to be used in SVGs.

 

I suggest this because I had an idea of creating a factory HUD which would show you the current status of what is crafting and give detailed information on any unit that has failed/jammed.

Link to comment
Share on other sites

Would be nice, but there are work around...

 

1.current recipe can’t be requested, but name of element can be I believe, so when you change recipe change machines name

 

2.  Can’t tell which ingredients are missing, but I believe you can tell that it is missing ingredients. Therefore when it does that, as long as you only have one ingredient per  input container you can count the number of ingredients in each container by dividing the mass by the weight of one ingredient. Then it’s just a matter of recording how many ingredients a process needs to determine what is missing

 

3. Ability to change recipe... ok, you got me there. But if you have a bunch of machines with one (or more) set for each recipe you need, you can then have your code turn these machines on and off as they are required. So you would need a lot more machines, but you could then have code soma console would let you put in a order, and it would turn on the correct machines to run it. You could even do a quick stocktake to ensure enough materials were available to fill full thenorder. 

Link to comment
Share on other sites

3 hours ago, CoyoteNZ said:

Would be nice, but there are work around...

 

1.current recipe can’t be requested, but name of element can be I believe, so when you change recipe change machines name

 

2.  Can’t tell which ingredients are missing, but I believe you can tell that it is missing ingredients. Therefore when it does that, as long as you only have one ingredient per  input container you can count the number of ingredients in each container by dividing the mass by the weight of one ingredient. Then it’s just a matter of recording how many ingredients a process needs to determine what is missing

 

3. Ability to change recipe... ok, you got me there. But if you have a bunch of machines with one (or more) set for each recipe you need, you can then have your code turn these machines on and off as they are required. So you would need a lot more machines, but you could then have code soma console would let you put in a order, and it would turn on the correct machines to run it. You could even do a quick stocktake to ensure enough materials were available to fill full thenorder. 

This are all really good points, and I agree with them completely as it applies to mid to late stage factory builds.  Specifically one where like you said the industrial units assigned to producing a single item in a line of production (example a line making rocket fuel).

However where this more detailed information can come in handy is for those who have smaller factories where they have to reuse units to make different things.  For example, you could create a LUA script that takes a single refiner unit, looks all the contents of its input box(es) and cycle through all of them to refine them without user interaction.

Link to comment
Share on other sites

6 hours ago, SimplePiMan said:

However where this more detailed information can come in handy is for those who have smaller factories where they have to reuse units to make different things.  For example, you could create a LUA script that takes a single refiner unit, looks all the contents of its input box(es) and cycle through all of them to refine them without user interaction.

And I totally agree with you. I want to make a blueprint for a service station for non factory makers which will make atmospheric fuel, rocket fuel, the four types of space fuel, warp cells and every type of scrap available. To do it under the current system would require a huge number of refineries, with most of them sitting idle most of the time. It would make it a ridiculous size and thus a ridiculous cost. I could cut down to one refinery, one recycler with better options, rather than twenty of each if I really wanted it to offer every type of scrap.

 

So yes these work arounds would work on a factory like mine with probably 200+ machines, but would make no sense if I just wanted that tiny little service station which wouldn’t be tiny :(

Link to comment
Share on other sites

Its about "efficiency" really. Why build a monstrous factory with a device for every part to make, when an industry device has the capability to make many parts.

 

Allowing a LUA to change the active recipes alone, would be a HUGE change for the game and industry aspect. Even if they didnt do anything more with container content array data or the like. Just the act of a "set unit id ### to recipe id ###" would be insanely helpful.

Link to comment
Share on other sites

Maybe they want factories to be big, hard and complex, otherwise everybody would have one and there wouldn’t be a good game aspect for those who want to go big. Then again if you are placing Lua in your factory you are going big early on, but as more and more scripts come available on the ‘net I guess it will become more common. For example a lot of people who can’t program are now having a Lua auto pilot etc

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...