[MOD] Station Production Limiting v0.05 (6th Apr 2017)

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Raevyan
Posts: 1463
Joined: Sat, 4. Oct 08, 17:35
x4

Post by Raevyan » Wed, 16. Aug 17, 19:58

Hi thanks for the awesome Mod :) I used it Last Time i played and it worked like a charm. I am currently playing again and subscribed to the steam Version.
If i unterstand the Mod correctly it will still Show producing but won't use ressources/produce wares at the end of the Cycle.
Unforunately my Plasma Flow Regulator modules of my TechnoCore Hi-E Station are still producing even though i put the Limit to 100%.

Ezarkal
Posts: 1610
Joined: Wed, 22. Apr 15, 02:27
x4

Post by Ezarkal » Wed, 16. Aug 17, 21:11

I also had a similar issue with an arm tech fab, which keep cycling in the production of certain types of turrets despite me having put a 100% limit on it.

I'm trying to produce only the kind of turrets used in station building (Hit/Ma, Plasma/Ma and V launchers), yet the 3 other types keep being cycled in.

I did not wait for a full production cycle of the 6 types of turrets, though. I'll do that next time and see if it works.
Humans are deuterostomes, which means that when they develop in the womb the first opening they develop is the anus.
This means that at one point you were nothing but an asshole.

Some people never develop beyond this stage.

Raevyan
Posts: 1463
Joined: Sat, 4. Oct 08, 17:35
x4

Post by Raevyan » Wed, 16. Aug 17, 23:02

If i understood it correctly, limiting product cycling stations will still cycle through all products, but shouldn't produce the ones that are set to 100%. In an earlier Post in that Thread it was mentioned that you will Need to create an own Version of that Station without the other products. Limiting to 100% will not skip the Cycle and Movie to the next One.

PS: correct me if i'm wrong

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Thu, 17. Aug 17, 12:56

rene6740 wrote:If i understood it correctly, limiting product cycling stations will still cycle through all products, but shouldn't produce the ones that are set to 100%. In an earlier Post in that Thread it was mentioned that you will Need to create an own Version of that Station without the other products. Limiting to 100% will not skip the Cycle and Movie to the next One.

PS: correct me if i'm wrong
You are essentially correct. It will actually produce the limited product and consume the resources to do so. However it will give the resources back and remove the produced product at the end of that production run. If you limit to 50% then it returns 50% of the resources and removes 50% of the product.

You do need 100% of the resources or the production run will not start at all.

You do NOT need your own version of the station, that's another approach to the problem. IMHO mine is a more vanilla approach and the mod can be disabled/removed without having any lasting effect on the game.

jth

Ezarkal
Posts: 1610
Joined: Wed, 22. Apr 15, 02:27
x4

Post by Ezarkal » Thu, 17. Aug 17, 15:17

Thanks for the info.
Humans are deuterostomes, which means that when they develop in the womb the first opening they develop is the anus.
This means that at one point you were nothing but an asshole.

Some people never develop beyond this stage.

Raevyan
Posts: 1463
Joined: Sat, 4. Oct 08, 17:35
x4

Post by Raevyan » Thu, 17. Aug 17, 18:44

jth wrote:
You are essentially correct. It will actually produce the limited product and consume the resources to do so. However it will give the resources back and remove the produced product at the end of that production run. If you limit to 50% then it returns 50% of the resources and removes 50% of the product.

You do need 100% of the resources or the production run will not start at all.

You do NOT need your own version of the station, that's another approach to the problem. IMHO mine is a more vanilla approach and the mod can be disabled/removed without having any lasting effect on the game.

jth
Do you have a clue why limiting to 100% might not work for me? I'm still producing Plasma Flow regulators although i set the Limit to 100%.

Stonehouse
Posts: 309
Joined: Sat, 7. Feb 04, 18:47
x4

Post by Stonehouse » Wed, 8. Nov 17, 20:45

so even with this mod i need to build 4xmissile and 6x turret forge and limit all except one each to get a production flow without blocking by others? :(

edit: wait even that could block others if the forges are at the same station...so i need to build a station for each ....

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Thu, 9. Nov 17, 12:46

Stonehouse wrote:so even with this mod i need to build 4xmissile and 6x turret forge and limit all except one each to get a production flow without blocking by others? :(

edit: wait even that could block others if the forges are at the same station...so i need to build a station for each ....
It does take a while to get what you want out as each production module will cycle through all the type of wares it can produce. So a missile module will go through all missiles and a turret through all turret types. I would have liked to have just skipped the unwanted types but there is no API support to do so, so this is a work around.

If you want one type of missile and one type of turret and you have both forges on one station then potentially they can get in each others way. The one with the shorter production cycle time and smaller resource needs tends to win.

I think that if it doesn't have enough resources for a type of turret then it simply doesn't produce that type of turret and after 30 minutes tries the next type. You tend to get the smaller turrets with smallest resource needs.

If you can feed the beast with resources then one missile forge and one turret forge with this mod should do the job. As quickly and much easier than say four of each, think about why :-)

Having said that if you can keep a single station full of resources then you can just use one. If you have resource supply constraints then two may be better.

hope this gives you some insight

If you have enough resource producing stations to feed the beast but are having logistics problems then I suggest you look at my Station Push Wares mod

Regards

jth
PS when production gets going and the the storage fills then you will run into a few other interesting issues with forges :-)

Stonehouse
Posts: 309
Joined: Sat, 7. Feb 04, 18:47
x4

Post by Stonehouse » Thu, 9. Nov 17, 14:00

if i get it right, your mod just let em produce and remove it after, so the cycle must start to get affected by your mod...the problem i run into, the cycle can't start cause the storage of that type is already filled (what i meant with blocked)

so the station is stuck at astrobee cause of full dedicated storage

now i build 6 stations and each station is limited by our mod to just produce one kind of turret (and one type of missile) so the storage problem is solved

no way to check for enough storage before starting the cycle? (and if not skip it?)

edit: already a 30 min skip timer included? or does it just skip if not enough stuff to produce? or also skip if dedicated storage filled?

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Thu, 9. Nov 17, 20:09

Stonehouse wrote:if i get it right, your mod just let em produce and remove it after, so the cycle must start to get affected by your mod...the problem i run into, the cycle can't start cause the storage of that type is already filled (what i meant with blocked)

so the station is stuck at astrobee cause of full dedicated storage

now i build 6 stations and each station is limited by our mod to just produce one kind of turret (and one type of missile) so the storage problem is solved

no way to check for enough storage before starting the cycle? (and if not skip it?)

edit: already a 30 min skip timer included? or does it just skip if not enough stuff to produce? or also skip if dedicated storage filled?
Yes the cycle must start. The storage can be blocked with produced wares. I suggest that you sell or use some of those or just stick them in a cargo ship. Or build a warehouse in the system. If you also use my Station Push Wares mod then that will push the astrobees out of your turret forge into the warehouse and act as overflow storage.

Have you maximum expanded the forge storage too ? that helps a bit

I think that the standard cycle time is 30 mins for turrets, if you have enough wares to start it will produce, if not it won't.

If the storage is full (or full of the specific turret) when it finishes then I think the whole forge cycle stops

I have a nasty feeling that the max number of astrobees is limited by two things, available storage and the max setting for a ware on a station (depends on how much you have expanded the storage). So if you run six forges then you will still be limited to the same max number of astrobees.

Stonehouse
Posts: 309
Joined: Sat, 7. Feb 04, 18:47
x4

Post by Stonehouse » Thu, 9. Nov 17, 20:48

Uhm...bad news the mod doesn't work for me...

I limited all except one at the urv mass line at all 4 modules but still get other urvs than cargolifter...

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Fri, 10. Nov 17, 13:08

Stonehouse wrote:Uhm...bad news the mod doesn't work for me...

I limited all except one at the urv mass line at all 4 modules but still get other urvs than cargolifter...
Its got debugging, please turn it on at level 2 for the whole station and take a look at the log and see if you can spot what is going wrong. One of the videos shows how.

The logs take a bit of decoding but the info should be in there. I added the logging so that I could check that the mod was working.

Some things happen at the start of the cycle like handing the un-needed wares back and other things happen at the end like correcting the produced ware stock levels

You might also want to think whether any of the other mods that you are using could be affecting things.

Stonehouse
Posts: 309
Joined: Sat, 7. Feb 04, 18:47
x4

Post by Stonehouse » Fri, 10. Nov 17, 13:58

Does it work with cwir?

my other mods doesn't touch the files :D

Edit:
Ok after a time looking into:

The script regain the resources and schedule the correction:

[Scripts] 152148.99 *** Context:md.St_Prod.St_Prod_RoundRobin<inst:107f1f6>: Schedule stock correction of 30/30 drp_scoopcollector_mk1 in 1784.033s

the cycle finished:

[Scripts] 153933.04 *** Context:md.St_Prod.St_Prod_Recycle<inst:183f9f0>: Corrected stock level 30/30 drp_scoopcollector_mk1 for YDeVries GURV Mass Line M01 UCargoX - Isla Muerta.

but it didn't work, before 30 Scoops after the cycle 60 scoops

the resources are still there so that work
(still have 4772 biogel with 2 cycles passed)

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Fri, 10. Nov 17, 19:44

Thanks for doing some digging. Looks like its trying

Any error messages around the same time as the second message where it says its correcting the stock ?

Is it managing to correct the stock on another one of your stations ?

Stonehouse
Posts: 309
Joined: Sat, 7. Feb 04, 18:47
x4

Post by Stonehouse » Fri, 10. Nov 17, 20:24

No error related to your script at all...just one line i can't work with which sometimes appear:

[Scripts] 153941.98 *** Context:md.MainMenu.SectionHandler<inst:205bced>: Next section: gMain_object

but looks like just something starting inside your script

the script...should run at 27 urv modules (urv mass lines)
so 27x12 productions with 11/12 at -100%
and 6x turret and missile forge with 5/6 turrets and 3/4 missiles at -100%
all are OL stations and some of em don't have enough resources to run

and as far as i noticed it removed the products of none of em
(like i wrote every station just produces one of a cycle to not get blocked but there are also the other products of that cycle)

Found 71 Stations in 0ms. Prods braked 345. Cycle 10s

cause of the cycles the script is polling 39 items
some extracts of the polling:
...rem_cycletime: 1539.931s prevrem_cycletime: 1549.962
...Skipping drp_constructions. Remaining 1033.36s - not limited.
...rem_cycletime: 0.000s prevrem_cycletime: 0.000s
some extracts of the sweep entrys:
- producing
- unknown
- waitingforresources

so i have no idea :D

Edit: Tested with a OL Solar,
first i restricted 4 prod modules to -100 (the other moduls also show -100, maybe because u build em like 4 build modules with 8 prod modules?)

the debug logged everythink the right way, 4 bofu regain and 2,2k e-cells removed...but the e-cells wasn't removed, so i got e-cells without using bofu :D

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Sat, 11. Nov 17, 15:03

I have to admit that I did all my testing in DeVries as that is where my stations are and didn't limit quite as many stations as you. My stations are Albion or DeVries

I did have an OL station at one point but I recycled it :-)

Do Albion or DeVries stations limit correctly ?

Did you got the mod by subscribing via Steam ?

There is a clear all production limiting from station setting, if you do that first and then limit one line only does it make any difference ?

Can you get a single production module OL station to misbehave ? preferably a simple one like a solar one

That would give me something to reproduce the symptoms on

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Mon, 13. Nov 17, 14:48

Just thought that the plot URV forge is not OL, will that limit correctly ?

Getting the feeling that this one may be an installation\patching mod to mod issue

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Sat, 3. Feb 18, 17:17

does it work for 4.3?

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Post by Requiemfang » Sat, 3. Feb 18, 18:26

yes, i'm using it currently :wink:

Post Reply

Return to “X Rebirth - Scripts and Modding”