How to allow city-states to build military in early game, right from the start?

dartmor

Chieftain
Joined
Oct 23, 2010
Messages
55
Location
Russia
City-states are not able to build any military units at the start of the game. Is there a way to change it, allowing them? I looked through lua api, but didn't found any clue.
This is the main question.

I will just throw few more for bonus.

1. Is there a way to prevent captured city to generate extra unhappiness, depending on player's culture level? ( for example 100 culture allows 1 city not to generate extra unhappiness, 200 culture - 2 cities and etc. )

2. Is there a way to limit number of units per era?

3. Is it possible to allow city-states to build more military units and pref as high priority?

I tried to find a way to make those changes through XML, but i don't think it's possible.
 
City-states are not able to build any military units at the start of the game. Is there a way to change it, allowing them? I looked through lua api, but didn't found any clue.
This is the main question.

You could give them a couple free technologies (dummy or otherwise) that unlock units. I'm not sure if City States have a hard-coded limitation on building military units... will have to give that a check sometime.

I tried to find a way to make those changes through XML, but i don't think it's possible.

All your ideas are possible, but please keep in mind that anything that deals with game logic algorithms (especially AI) cannot be modified via Lua (let alone XML), and must be modified in the .DLL. In general, modding with XML means that you are limited to existing features - i.e. if it does not already exist in the game, chances are it is not going to work.

New game mechanics may or may not be doable via Lua, but in many cases your solutions will be convoluted/obtuse/roundabout enough that it'd be faster to modify the source code (the .DLL is written in C++).
 
I've tried your idea and gave them techs. Because they don't have free techs, i didn't used <Update>, but i did simply that:
<GameData>
<Civilization_FreeTechs>
<Row>
<CivilizationType>MINOR_CAPE_TOWN</CivilizationType>
<TechType>TECH_AGRICULTURE</TechType>
</Row>
<Row>
<CivilizationType>MINOR_CAPE_TOWN</CivilizationType>
<TechType>TECH_ARCHERY</TechType>
</Row>
<Row>
<CivilizationType>MINOR_CAPE_TOWN</CivilizationType>
<TechType>TECH_ANIMAL_HUSBANDRY</TechType>
</Row>
<Row>
<CivilizationType>MINOR_CAPE_TOWN</CivilizationType>
<TechType>TECH_MINING</TechType>
</Row>
<Row>
<CivilizationType>MINOR_CAPE_TOWN</CivilizationType>
<TechType>TECH_BRONZE_WORKING</TechType>
</Row>
<Row>
<CivilizationType>MINOR_CAPE_TOWN</CivilizationType>
<TechType>TECH_TRAPPING</TechType>
</Row>
<Row>
<CivilizationType>MINOR_CAPE_TOWN</CivilizationType>
<TechType>TECH_THE_WHEEL</TechType>
</Row>
<Row>
<CivilizationType>MINOR_CAPE_TOWN</CivilizationType>
<TechType>TECH_HORSEBACK_RIDING</TechType>
</Row>
</Civilization_FreeTechs>
</GameData>

And it's for every minor civ. But it didn't worked. I've observed city-states. They don't build any units until 30 turn ( in low levels of difficulty ) and until 20 turns ( in highest level of difficul
 
Bright idea. Maybe there is a way to limit war with others AI Civs, when it comes to city-states? For example, you want to conquer city-state A and another AI civ too ( i guess i will just need to manage Flavor in XML file for capturing/protecting City-States ). Without declaring real war you can fight not the city-state itself ( because i don't see any solution how to make city-states militare strong early game ), but with that AI civ. But when someone captures city-state, there is no longer war between player and this AI civ ( or war is ended without consequences ). Something like cold war with local conflicts.

This way it will be possible to manage settling/warfare early game by setting number of city-states. And because of others AI major civs, war will be good. Short. And close to your capital.

By the way, if another civ try to capture city-state you're protecting, you can gift military units to that city-state , right?
Maybe there is simple way just to make possible the same for AI civs? When AI civ see you're attacking city state they're protecting ( or they wish to conquer it too ), they will start gift units to that city-state, for example.
 
I've tried your idea and gave them techs. Because they don't have free techs, i didn't used <Update>, but i did simply that:


And it's for every minor civ. But it didn't worked. I've observed city-states. They don't build any units until 30 turn ( in low levels of difficulty ) and until 20 turns ( in highest level of difficul
Your basic problem is that there is no such thing as MINOR_CAPE_TOWN anywhere in the game. Nor are the specific minor civilizations listed within the table <Civilizations> so they cannot be individually referenced in any table that has a column called <CivilizationType>. All the city-states are rolled into a designation of CIVILIZATION_MINOR within the <Civilizations> table. You would have to reference all City-States at once within table <Civilization_FreeTechs> with:

<CivilizationType>CIVILIZATION_MINOR</CivilizationType>

in order for it to have a chance at working. I am not sure if even this method will give the effect you are looking for, though.

Cape Town is defined as MINOR_CIV_CAPE_TOWN in the table <MinorCivilizations>
 
So if i just replace MINOR_CAPE_TOWN with CIVILIZATION_MINOR it will work for every city-state? I mean might work
Is that it? Or should i also add <Civilizations> before <Civilization_FreeTechs>?
<GameData>
<Civilization_FreeTechs>
<CivilizationType>CIVILIZATION_MINOR</CivilizationType>
<TechType>TECH_TRAPPING</TechType>
</Civilization_FreeTechs>
</GameData>

Though even if it works i guess it won't help because they don't build even a simple worker/warrior until 30turns
 
So if i just replace MINOR_CAPE_TOWN with CIVILIZATION_MINOR it will work for every city-state? I mean might work
Is that it? Or should i also add <Civilizations> before <Civilization_FreeTechs>?


Though even if it works i guess it won't help because they don't build even a simple worker/warrior until 30turns
do it as you have shown. But as mentioned it might not make any difference. City States are treated differently than Major Players in a lot of ways, and this might be one of them.
 
Back
Top Bottom