[eMOD/WIP] Population Mod v 0.40 - Making population in cities matter (for LH 0.80)

By on April 23, 2013 6:01:58 PM from Elemental Forums Elemental Forums

OliverFA_306

Join Date 04/2008
+14


Hi all, I am releasing an early version of the Population Mod I've been working on. I believe it is in a playable state, but might still need some balance adjustments. You are more than welcome to comment about it and suggest improvements or modifications.

It can be downloaded from Skydrive in that link (Wincustomize link will take some time)

http://sdrv.ms/ZNjeWa

MOD DESCRIPTION

Motivation:

This mod started because I felt that, despite being a great game, Fallen Enchantress does a poor job simulating population. I wanted to make Population more meaningful while making the game deeper.

Objective:

The objective is to expand the population game mechanics. The objective is not to change rules just for the sake of changing. Modifications in this mod are supposed to bring a new dimension to the game and make it deeper while keeping its essence.

Highlight of the Most Relevant Features:

  • Population is more important for a city output than its level. Level still is significant, but does not mean everything.
  • Each building requires some citizens who will run it. All building’s requirement will add to become the city’s required population.
  • Cities without the required population will have a penalty to their resource output.
  • Cities with more population than required will generate a small extra of gold/research/production depending on their specialization.
  • The amount of research/gold/production generated directly by the city depends on population rather than being a fixed number. Each citizen produces a small amount which is bigger the higher the city level.
  • Unrest reduces city’s growth. To compensate, low level cities generate an extra unrest reduction.
  • Tax is modded to come in increments of 5% and be more flexible.

Installation instructions:

First, backup your DATA\ENGLISH folder and then copy the files there, overwriting the existing ones. To recover the original game, restore your backed up files.

How Required Population Works:

Each building in the city, each grain and each material needs people to work on it, according to the following table:

Building

Population   Requirement Units

Population   Required (each unit requires 15 citizens)

City Hub

1 Pop. Req.   Units

15 citizens

Grain

0.2 Pop. Req. Units

3 citizens

Materials

1 Pop. Req.   Units

15 citizens

Essence

0 Pop. Req. Units

0 citizens

1st Tier city building

1 Pop. Req.   Unit

15 citizens

2nd Tier city building

1.33 Pop. Req. Units

20 citizens

3rd Tier city building

1.66 Pop.   Req. Units

25 citizens

4th Tier city building

2 Pop Req. Units

30 citizens

If the building effects affect the whole nation

1 extra Pop.   Req. Unit

15 extra   citizens

If the building is unique

1 extra Pop. Req. Unit

15 extra citizens

1st Tier resource harvesting building (horses, shards…)

1 Pop. Req.   Units

15 citizens

2nd Tier resource harvest building

1.5 Pop. Req. Units

22.5 citizens

3rd Tier resource harvest building

2 Pop. Req.   Units

30 citizens

Spell of Making Towers

5 Pop. Req. Units each

75 citizens

Outpost

1 Pop. Req.   Unit

15 citizens

Each Outpost Upgrade

0.2 Pop. Req. Units

3 citizens

City level up building (Including Conclave, Fortress and Town)

1 Pop. Req.   Units

15 citizens

By adding all those requirements we obtain the number of required citizens. This number is then compared with the actual city population. If there are less citizens than required there is underpopulation. Underpopulation reduces city output by the percentage of missing citizens. As an example, if the city requires 50 citizens but the population is only 40, then underpopulation is 20 and city output will only be 80% of normal.

If the city population exceeds the number of required citizens, each citizen generates extra gold, research or population depending on city specialization.

Why there is such thing as a “Population Requirement” unit instead of calculating directly citizens:

This makes easier to change this number if I see that 15 citizens per normal building are too many / too few.

Construction Points:

There is also a concept called Construction Points. Basically it represents free and unassigned citizens. Buildings require Construction Points to prevent AI (and newbie human players) from digging itself into underpopulation. Food producing buildings however don’t require Construction Points. So, if your city is underpopulated you can only construct food producing buildings.

City Research / Gold / Production output affected by population:

Instead of generating a flat output depending on the city level, each citizen generates the following output:

City   Level

Next   Level at

Research   per Citizen

Gold   per Citizen

Production   per citizen

Level 1 / Level 2

100

Flat 1 Research

Flat 1.25 Gildar

0 Production

Level 3

200

Conclave: 0.013125
Fortress: 0.01125
  Town: 0.01125

Conclave: 0.0125
  Fortress: 0.0125
  Town: 0.015

Conclave: 0.0125
  Fortress: 0.0175
  Town: 0.0125

Level 4

400

Conclave: 0.01625
Fortress: 0.0125
  Town: 0.0125

Conclave: 0.015
  Fortress: 0.015
  Town: 0.02

Conclave: 0.015
  Fortress: 0.025
  Town: 0.015

Level 5

800

Conclave: 0.019375
Fortress: 0.01375
  Town: 0.01375

Conclave: 0.0175
  Fortress: 0.0175
  Town: 0.025

Conclave: 0.0175
  Fortress: 0.0325
  Town: 0.0175

Level 6

Never

Conclave: 0.0225
Fortress: 0.015
  Town: 0.015

Conclave: 0.02
  Fortress: 0.02
  Town: 0.03

Conclave: 0.02
  Fortress: 0.04
  Town: 0.02

Why there are 6 levels of cities?

I wanted to raise level 1 to level 2 threshold from 50 to 100 citizens, but the AI was not handling it well, so there is an additional level 2 which only purpose is to have the correct AI tag so the AI does construct food improvements.

Unrest affects growth

Each 1% of unrest reduces growth by 2%. Notice that at 50% unrest your city does not growth, and beyond 51% the city does lose population. This represents citizens abandoning your nation as they believe they will have better opportunities somewhere else. To help the AI during the early game, lower level towns produce unrest reduction.

What’s left to do?

  • Values need to be confirmed or corrected to provide an enjoyable gameplay.
  • Introduce food upkeep for army units
  • Who knows?
Locked Post 4 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
May 30, 2013 10:50:01 AM from Elemental Forums Elemental Forums

I figured out how to reimplement the specialists from E:WoM if you are interested.  It turns out it was easier than I thought.  This allows you to redo your calculations using the available specialists per city.  Here is the code you have to change/add.

 

Code: xml
  1. <!-- *************************** -->
  2. <!-- ** Available Specialists ** -->
  3. <!-- *************************** -->
  4. <ResourceType InternalName="AvailableSpecialists01">
  5. <DisplayName>Citizens</DisplayName>
  6. <Description>The number of citizens available to work for your kingdom or empire.</Description>
  7. <Type>AvailableSpecialists</Type>
  8. <IconColor>0,0,0</IconColor>
  9. <!--<Icon>Gfx//Icons//dude_icon.png</Icon>-->
  10. <Icon>Gfx//Icons//Icon_Population.png</Icon>
  11. <HideInHiergamenon>1</HideInHiergamenon>
  12. <ModelColor>0,0,0</ModelColor>
  13. <Worth>0</Worth>
  14. <Global>0</Global>
  15. <Stored>0</Stored>
  16. <Rarity>0.0</Rarity>
  17. <Shared>0</Shared>
  18. <TradedByCaravans>0</TradedByCaravans>
  19. <ShownInGlobalDisplay>0</ShownInGlobalDisplay>
  20. <Medallions InternalName="Population_Res_Medallions">
  21. <All>Res_Ores_Plains.png</All>
  22. </Medallions>
  23. </ResourceType>

Global value needs to be changed to 0.

Code: xml
  1. <ResourceType InternalName="AvailableSpecialistsPerPopulation">
  2. <DisplayName>AvailableSpecialists Per Population</DisplayName>
  3. <Description>Amount of available specialists each unit of population produces.</Description>
  4. <Type>AvailableSpecialistsPerPopulation</Type>
  5. <IconColor>0,0,0</IconColor>
  6. <!--<Icon>Gfx//Icons//dude_icon.png</Icon>-->
  7. <Icon>Gfx//Icons//Icon_Population.png</Icon>
  8. <HideInHiergamenon>1</HideInHiergamenon>
  9. <ModelColor>0,0,0</ModelColor>
  10. <Worth>0</Worth>
  11. <Global>0</Global>
  12. <Stored>0</Stored>
  13. <Rarity>0.0</Rarity>
  14. <Shared>0</Shared>
  15. <TradedByCaravans>0</TradedByCaravans>
  16. <ShownInGlobalDisplay>0</ShownInGlobalDisplay>
  17. <Medallions InternalName="Population_Res_Medallions">
  18. <All>Res_Ores_Plains.png</All>
  19. </Medallions>
  20. </ResourceType>
Need to add these lines of code.
Code: xml
  1. <CityResourceEffectDef InternalName="PopulationEffectOnAvailableSpecialists">
  2. <InputResource>Population</InputResource>
  3. <OutputResource>AvailableSpecialists</OutputResource>
  4. <ResourceForMultiplierOnInput>AvailableSpecialistsPerPopulation</ResourceForMultiplierOnInput>
  5. <EffectType>Harvest</EffectType>
  6. </CityResourceEffectDef>
Need to add these lines of code.
Code: xml
  1. <PlayerAbilityType InternalName="A_Additive_AvailableSpecialistsPerPopulation">
  2. <DisplayName>Available Specialists Per Population</DisplayName>
  3. <Description>Amount of available specialists each unit of population produces.</Description>
  4. <Icon>Icon_Level.png</Icon>
  5. <DefaultValue>1.0</DefaultValue>
  6. </PlayerAbilityType>
Need to add these lines of code.
 
Hope this helps in your efforts.
Reason for Karma (Optional)
Successfully updated karma reason!
May 30, 2013 10:50:56 AM from Elemental Forums Elemental Forums

Oh and to make it so that units consume food just have them use an available specialist as a production resource.

Code: xml
  1. <ProductionRequirement>
  2. <Type>Resource</Type>
  3. <Attribute>AvailableSpecialists</Attribute>
  4. <Value>1.0</Value>
  5. </ProductionRequirement>

That should work.

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2013 3:22:17 AM from Elemental Forums Elemental Forums


Halmal, Thanks so so so so much! I can't really express how grateful I am for your help. Right now I am a bit busy, but I will most certainly come back to work in this mod in one or two weeks, and will use your code. Thanks again!

At least I learned some things while trying to implement the food upkeep without specialists, and those things can also be useful in the future.

Sir, you are a

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2013 10:08:04 AM from Elemental Forums Elemental Forums

Not a problem, glad I could help.

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108432  walnut2   Server Load Time: 00:00:00.0000125   Page Render Time: