How to change workforce growth rate?

The place to discuss scripting and game modifications for X4: Foundations.

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

Post Reply
Horux
Posts: 314
Joined: Tue, 1. Apr 08, 20:13
x4

How to change workforce growth rate?

Post by Horux » Thu, 14. Feb 19, 22:37

Hi,

I need some understanding of how the workforce growth rate works. I would like to increase the growth rate or in other words I would like to decrease the time until all workers in the station. But my changes does not seems ot have any effect.

This is the original xml code in the parameters.xml:

Code: Select all

  <workforce>
    <update interval="600" variation="60" />
    <growth interval="600" rate="10">
      <ratio min="0.2" max="0.95" />
      <factor min="0.1" max="1.0" />
    </growth>
  </workforce>
And this is how I try to change it.

Code: Select all

	<replace sel="/parameters/workforce">
		<update interval="600" variation="60" />
		<growth interval="30" rate="40">
			<ratio min="0.5" max="0.95" />
			<factor min="0.5" max="1.0" />
		</growth>
	</replace>

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Re: How to change workforce growth rate?

Post by UniTrader » Thu, 14. Feb 19, 23:47

you replace the entire workforce-node, not just its contents. so you are missing the encapsulating <workforce>.

it should look like this:

Code: Select all

	<replace sel="/parameters/workforce">
	<workforce>
		<update interval="600" variation="60" />
		<growth interval="30" rate="40">
			<ratio min="0.5" max="0.95" />
			<factor min="0.5" max="1.0" />
		</growth>
	</workforce>
	</replace>
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: How to change workforce growth rate?

Post by DeadAirRT » Thu, 14. Feb 19, 23:50

All you need to change are growth rate and growth factor from what I've seen. I use

Code: Select all

	<replace sel="//parameters/workforce/growth/@rate">100</replace>
	<replace sel="//parameters/workforce/growth/factor/@min">0.8</replace>
And every 10 minutes my factories go up 80-100. Also, I'm not 100% on this but if you are replacing the entire /workforce then your patch should have both the start and end of workforce. (as confirmed by uni)

Horux
Posts: 314
Joined: Tue, 1. Apr 08, 20:13
x4

Re: How to change workforce growth rate?

Post by Horux » Fri, 15. Feb 19, 01:05

Thanks to you both. I missed it because it has no extra parameter. :oops:

Rikimarius
Posts: 19
Joined: Sat, 8. Dec 18, 21:46
x4

Re: How to change workforce growth rate?

Post by Rikimarius » Sun, 14. Jun 20, 07:33

Can Anyone tell me how to do this what you are talking about? i cant even find the parameters.xml file. Also there isnt a single mod about workforce out there. i wonder why, there are a lot of topics about WF though.

Post Reply

Return to “X4: Foundations - Scripts and Modding”