Jump to content

Scripting capabilities: read container contents and set industry recipie


Recommended Posts

Hi folks,

I was looking to set up some simple scripts this evening to streamline my refining process however the scripting api around containers and industry units seem quite limited. I thought I'd post here to see if I am missing something obvious.

 

1: it seems you cannot query the contents of a container, other than just getting the raw mass? I would like to check if I had a particular volume of item in a container ie: bauxite >= 50l. Is there a way to do this?

2: it also seems I am unable to set a recipe on an industry unit via scripting, is this correct?

 

What I am trying to achieve is to check how much of each raw ore I have in a container, and then set my refinery to refine the correct ore based on the container contents. Anyone got any ideas? I am comfortable with scripting, it just seems the api does not support it. Is this right?

Link to comment
Share on other sites

20 minutes ago, Ater Omen said:

2. It would be to powerfull, we could automate the crafting of everything with a simple setup

And? Why would that be undesirable? Versatile automation is cool, good and fun.

 

Also, that simple setup would never reach the throughput of a dedicated factory.

Link to comment
Share on other sites

2 hours ago, Ater Omen said:

It would kill the current game we have now, the 10 links limitation making us play satisfactory in DU. Is it good or bad? This is the eternal debate of "should you casualize your game?".

Using ingame scripting to do innovative automating is hardly 'casualizing'.

Link to comment
Share on other sites

I thought about doing something like that too but I am still working on my industry to create the screen for my programming board. Is there any website out there that lists all methods available to call on elements? Couldn't find any resource yet... And what is that 10 link limit?

 

Is there any way to query the current volume of a container? Would have to use separate container for every ore.

Link to comment
Share on other sites

I disagree. I am setting up quite a little factory atm. And what I can see, that simply the amount of machinery defines my throughput. But the more one has, the more complicated it becomes to handle the setup. So what I whish for would be to have a control desk, from where I can load complete snapshots of setups into my machines. Like today I need basic parts to craft more machines, the next day I want to build some ships. So a few configurations that can be uploaded would be so helpful ...   And this kind of mechanics does not affect my throughput. It is not gamebreaking.

Link to comment
Share on other sites

  • 4 weeks later...
On 9/5/2020 at 4:17 AM, Ater Omen said:

 It would be to powerful, we could automate the crafting of everything with a simple setup

Aye, I came to this harsh reality after spending days trying to work how best to do this.  I have ended up with an industry that creates almost all basic components that aren't sized [ SX ], [ S ], [ M ] etc...and then a separate area where players can set these parts in motion.

I think there will always be a manual part of the process unless scripting everything.

I just want a script to show the contents of 8 boxes and alert if they drop between a certain level... all these funky scripts and I can't even find that.  Any pointers in the right direction would be nice.

 

Cheers.

Link to comment
Share on other sites

Don't have access to the game right now, but can we link refineries and read the "amount in Output container"? Wanted to try that out all the last days and keep forgetting it...

 

Edit: damn not really... Could though set up a machine with maintain at just the cutoff point you want to check and read its state though.

 

Also for people asking for Lua resource, you can find it in-game or on

 

https://dual.sh/codex/

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...