Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: mines require workers
New feature: mines require workers[message #346088] Tue, 05 July 2016 01:15 Go to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
Getting a mine to run is relatively easy. After you've obliterated anyone wearing red, you talk to the head miner, and then the spice money flows to your bank account. The main modifier comes from loyalty, which will be high enough as long as you continue to burn and maim and kill. While disease can affect that, it is somewhat rare (and if there is a full plague epidemic going on, you will likely have other problems than mine income).

I want it to be a bit harder to get full mine income, and to have the player be forced to invest a bit in a mine before they can reap the benefits. For that reason, I've added the need for mines to have workers.

http://i.imgur.com/i3spmUW.png

We can now define how many workers can be employed in a sector via SectorNames.xml:

...
<maxworkers>
Maximum number of workers that can be employed in this sector.
...
<SECTOR>
    <SectorGrid>H3</SectorGrid>
    <szUnexploredName>Grumm Mine</szUnexploredName>
    <szDetailedUnexploredName>Grumm Mine</szDetailedUnexploredName>
    <szExploredName>Grumm Mine</szExploredName>
    <szDetailedExploredName>Grumm Mine</szDetailedExploredName>
    <sWaterType>3</sWaterType>
    <usNaturalDirt>150</usNaturalDirt>
    <usCurfewValue>1</usCurfewValue>
    <usCivilianPopulation>200</usCivilianPopulation>
    <rainchance>50</rainchance>
    <sandstormchance>0</sandstormchance>
    <maxworkers>200</maxworkers>
</SECTOR>
...

JA2_Options.ini values:
;------------------------------------------------------------------------------------------------------------------------------
; If MINE_REQUIRES_WORKERS is TRUE, mine income also depends on the number or workers employed in a town. 
; The maximum number of workers for each sector can be set in SectorNames.xml. 
; For mine income, the total sum of all workers in a town are used, once a town employs it's maximum of workers, this modifier 
; is at a 100%. 
;------------------------------------------------------------------------------------------------------------------------------
MINE_REQUIRES_WORKERS = FALSE

; When we liberate a a sector for the first time, this is the rate of workers present. Values from 0.0 to 1.0.
WORKERRATE_PRESENT_INITIALLY = 0.25

; the cost of training a single worker
WORKER_TRAINING_COST = 30

; the amount of worker training points needed to train a worker, the amount a trainer generates can be seen on their portrait
WORKER_TRAINING_POINTS = 100

  • When we liberate a sector for the first time, we get a portion of the maximum workers in that sector.
  • The sum of all workers of a town, divided by the sum of all maximums of workers in a town, is a modifier for mine income.
  • We can train workers just like militia (this is an ongoing process, we don't train squads of them.
  • As seen in the picture above, you can see how many workers you have in the strategic map screen.
  • This feature is off by default.
  • Note that if you turn this feature on in an ongoing campaign that previously used an exe without this, you will have no workers there, so you have to train them all.
  • Via the ini values, you can train how hard it is to train workers, and how much it costs.
  • A merc's worker training points depend on experience, leadership, whether they have the teacher trait, aggressive/phlegmatic personality and fatigue.
I have quite a few ideas to expand this idea, but given my workload, it'll be a long time until then, ideas are still welcome though.

This feature is fully savegame compatible.

This feature has been added to the trunk in r8267 & GameDir r2328.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: New feature: mines require workers[message #346090 is a reply to message #346088] Tue, 05 July 2016 02:09 Go to previous messageGo to next message
RunAwayScientist is currently offline RunAwayScientist

 
Messages:84
Registered:September 2001

Hey Flug,

Does this mechanic have any effect when the Queen retakes a sector? I.E., current trained workers are killed/removed from the current amount and must be re-trained after taking the sector back.

Report message to a moderator

Corporal 1st Class
Re: New feature: mines require workers[message #346100 is a reply to message #346090] Tue, 05 July 2016 10:23 Go to previous messageGo to next message
silversurfer

 
Messages:2791
Registered:May 2009
I think it would make sense if some workers are killed/imprisoned when we lose a sector to Deidranna's troops.

For the training I think it would make sense that mercs with the Demolition trait get a bonus too. They are using explosives at the mine so they should benefit from learning from a pro.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: New feature: mines require workers[message #346104 is a reply to message #346100] Tue, 05 July 2016 13:53 Go to previous messageGo to next message
ratpaz is currently offline ratpaz

 
Messages:137
Registered:April 2015
Location: Italy
So let's say we have a 50% loyalty in a town and 50/100 workers we have a 25% income?
I agree with explosive skill, to make it less useless would be good if workers training rate use explosive instead of leadership, or maybe both.

Report message to a moderator

Sergeant
Re: New feature: mines require workers[message #346108 is a reply to message #346104] Tue, 05 July 2016 17:09 Go to previous messageGo to next message
silversurfer

 
Messages:2791
Registered:May 2009
ratpaz wrote on Tue, 05 July 2016 12:53
So let's say we have a 50% loyalty in a town and 50/100 workers we have a 25% income?

That would be a bit drastic. I'd rather have the income related to the number of workers instead of loyalty. Loyalty could define how many workers we can train.
So let's say we have 50% loyalty in town we can train 50/100 worker which would grant us 50% income.

We should lose workers if we lose loyalty. Loss of loyalty could result from sectors lost or "bad" decisions.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: New feature: mines require workers[message #346109 is a reply to message #346108] Tue, 05 July 2016 17:28 Go to previous messageGo to next message
Slax is currently offline Slax

 
Messages:1410
Registered:July 2006
Location: People riding polar bears...
Back to roots, huh?
Not bad.



1.13: Install JA2, unpack latest, play.
AIMNAS: Complete 1.13 installation, Download ZIP and unpack, play.

Report message to a moderator

Sergeant Major
Re: New feature: mines require workers[message #346110 is a reply to message #346109] Tue, 05 July 2016 19:51 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
@ratpaz: yes.

Eh. If the amount of workers depends on loyalty, we have to constantly retrain them whenever we lose a tiny bit of loyalty. That sounds tedious.

Additionally, both loyalty and worker amount are multiplicative modifiers. If you want, you can interpret that as the amount of workers being modified by loyalty before multiplying it with mine income - same thing, really.

The other suggestions sound reasonable - as of r8268, if the enemy takes a sector, worker amount in that sector is multiplied by WORKERRATE_PRESENT_INITIALLY (so with default values, 75% of workers present are cut). Those workers are killed/displaced/eaten/on vacation in magical pony land.

Demolition trait now adds a bonus to worker training, while claustrophobic disability adds a malus, because caves.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: New feature: mines require workers[message #346112 is a reply to message #346110] Wed, 06 July 2016 00:54 Go to previous message
RunAwayScientist is currently offline RunAwayScientist

 
Messages:84
Registered:September 2001

Your C code skills will live on in legends told to our children, Flug. http://i.imgur.com/vMZX2ne.png

Report message to a moderator

Corporal 1st Class
Previous Topic: Not a feature: classic air raids
Next Topic: New Feature: Improved ambush
Goto Forum:
  


Current Time: Sat Nov 30 03:34:33 GMT+2 2024

Total time taken to generate the page: 0.00911 seconds