[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

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

Post by jth » Sun, 6. Mar 16, 19:13

antoniut wrote:
jth wrote:
If you just want MK2 URV's then you might want to define your own version of the struct_econ_prod_drones_ol_macro and remove all of the mk1 drones and anything else that you don't want from the queue.
That was the idea, but man, at this moment I'm absolutly burnout from makin the station, I've spended several hundred hours putting modules n pieces in correct place. When I saw your mod I said: OMG this man is an angel, thanks! :D

Anyway, please don't worry about this problem! I will sell the MK1 and will make some extra money

Regards

EDIT 1 At this moment I just want to kickass some xenon and PMC... :twisted:
EDIT 2 http://imgur.com/9C4yjjX
Wow that is some station :)

I was thinking about designing my own station but I'm not sure that I am prepared to put that much time into it. But then again most of my mods do take a similar amount of time

I have built myself an OL URV forge and I think that I see at least one problem, its not recognising the Omicron method of making drones. Its got Argon and Albion but not omicron so its trying to recycle the wrong materials

Its going to take a while to work out precisely what is wrong but will have a go at fixing it as I suspect that you are not the only one affected just the only one to tell me and I do need to know so Thanks :)

jth

antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
xr

Post by antoniut » Sun, 6. Mar 16, 19:21

Thanks to you, I think chinese language is more easy than lua! :o

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

Post by jth » Tue, 8. Mar 16, 13:09

I have found out where one problem is and have come up with a work around

production_menu_st_prod.lua was always using the .default production method even with OL stations which causes food rations to be displayed as a primary resource instead of Bofu. Added a work around that should correctly display omicron, devries and xenon primary wares

There isn't a pure fix as there is no lua function that I can find that can report the correct production method for a ware that is not actively producing, so I am using string matching which should be OK provided that Egosoft stick to their naming conventions for production module macros.

I have sent you a private message with a dropbox link to some code. If you have 5 mins please give this version a go

I think that this issue may be purely cosmetic but if you have some food rations and bio optic wiring in station storage then please can you let me know asap.

I need to do some tests to see if it returns the wrong wares or not.

Thinking about how this mod actually works I think that it should be fine as it sets a limiting factor but that factor does not take effect until the production slot comes around. It then asks the running production (which will have the right wares) for info and applies the limiting factor to the wares at that point , so it should be fine.

If thats right then I may release the fix to the mod in a day or two. If it does return the wrong ware then I may have to code a fix to get the food rations out of the storage of an OL station

For some reason it is still not showing an omicron production method in the encyclopaedia for the URV's :( I will take another look at the code behind the encyclopaedia menus to try and see whats missing.

I hope that Chinese is more forgiving than lua scripting :)

jth

antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
xr

Post by antoniut » Tue, 8. Mar 16, 15:21

Is working like a charm now! All drones produced omicron method.

Thanks a lot for your efforts and quick response :D

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

Post by jth » Tue, 8. Mar 16, 15:51

jth wrote:For some reason it is still not showing an omicron production method in the encyclopaedia for the URV's :( I will take another look at the code behind the encyclopaedia menus to try and see whats missing.
Turns out it is there after all.

I totally missed the fact that the production method for Omicron Lyrae shows up as Argon rather than Omicron.

It was staring me in the face all the time. It even had a (New Entry) tag beside it Aaaaaaah :(

jth

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

Post by jth » Tue, 8. Mar 16, 16:32

antoniut wrote:Is working like a charm now! All drones produced omicron method.

Thanks a lot for your efforts and quick response :D
I am not 100% sure how my changes are causing your station to produce all drones the omicron way, it may be a happy coincidence or side effect.

I am now registering the omicron productionmethods correctly. When you look at a production module with the mod present it registers all possible productionmethods (wares) even if they have never been produced. That makes sure that the Production Limiting menu has the necessary information to fill in the primary wares and lets the slider work properly

My guess is that the vanilla code only registers a productionmethod when production has taken place for that ware which is why you had some omicron (Argon) drone productionmethods but were missing others.

But there may be a bit of chicken and egg (what comes first) in there :)

Glad to know its helped you, it certainly helped me to spot something that needed fixing.

Thanks for doing some testing for me and for reporting the problem.

jth

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

Post by jth » Tue, 8. Mar 16, 18:32

I have done a few more tests and my fears about the wrong ware being returned are unfounded. Its making the drones the right way and with the right resources and the Production Limiting is returning the right wares too even with version 0.03

What on earth is happening with the Argon production method not appearing in the vanilla game I really don't know. I just managed to have exactly the same problem with some Scoop Collector MK2 drones, it is correctly producing them but won't admit to knowing the omicron (Argon) method although its using it ... :(

I may wait until the production batch is finished and see if it then knows about the method it used to produce them

jth
EDIT waited and now thats its produced some it knows about them. I think that this one is beyond my pay grade :)

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

Post by jth » Thu, 10. Mar 16, 14:41

- [07.03.2016 - V0.04 Public Beta]

production_menu_st_prod.lua was always using the default production method even with OL stations which caused food to be displayed as a primary resource instead of Bofu. Although it displayed food while setting the Limiting factor it actually correctly returned Bofu so this was actually cosmetic. Added a work around that should correctly display omicron, devries and xenon production methods

jth

antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
xr

Post by antoniut » Thu, 10. Mar 16, 15:09

Great job! :)

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

Post by jth » Thu, 6. Apr 17, 18:56

- [06.04.2017 - V0.05 Public Beta]

production_menu_st_prod.lua, limit_menu_st.prod, config_menu_st_prod gui - Compensate for format of game version string changing in 4.10 RC3 and add extra paranoia when checking version to prevent crashing the GUI

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.

Post Reply

Return to “X Rebirth - Scripts and Modding”