Modding Q&A

What other areas do negative modifiers have weird effects on the game? Would setting -1 to unit health make it act weird for the AI?
 
What other areas do negative modifiers have weird effects on the game? Would setting -1 to unit health make it act weird for the AI?

To diminiush unit experience in Civ 3 to create "weaker" units of the same type (p.e. brigades instead of divisions) is used in Civ 3 modding since the earliest days of Civ 3 Vanilla (Rocoteh) and I´m not aware of any negative consequences of such settings.
 
What other areas do negative modifiers have weird effects on the game? Would setting -1 to unit health make it act weird for the AI?
Negative health works fine - I have tried with -2 on a naval unit to make a regular have only 1 healthpoint. This unit cannot be drafted, but I don't know what would happen if you apply that to a unit that can be drafted - the unit could possibly be dead (healthpoints = 0) upon creation?

If you try to give city specialists negative shield production, it will work until the city's total shieldproduction comes below 1. Then it crashes the game to desktop (division by zero is apparently incomprehensible for the game engine when it comes to shield production).
 
I'm looking for ideas for a unit between the 4.2.1 Medieval Infantry and the 8.4.1 Machine gunner I have in my mod.
Does anyone know a good in-between unit which would be available late middle ages (Physics/Military Tradition) and is like 5.3.1?
I have a 5.4.1 unit (Granadier) available with Democracy.
Any other ideas?
 
I'm looking for ideas for a unit between the 4.2.1 Medieval Infantry and the 8.4.1 Machine gunner I have in my mod.
Does anyone know a good in-between unit which would be available late middle ages (Physics/Military Tradition) and is like 5.3.1?
I have a 5.4.1 unit (Granadier) available with Democracy.
Any other ideas?


When reading your post my first thought was "a grenadier" - but this unit still is in your mod.:) What´s about an early rocket team? The level before the machine gunner could be a gatling gun.
 
Negative health works fine - I have tried with -2 on a naval unit to make a regular have only 1 healthpoint. This unit cannot be drafted, but I don't know what would happen if you apply that to a unit that can be drafted - the unit could possibly be dead (healthpoints = 0) upon creation?

It's been a while since I did the original test, but I think it has a floor of 1 hp.

That is, the minimum amount of HP you can have is 1, and any other negative modifiers are ignored. I'll try testing it again later today to reconfirm.
 
Confirmed, if you have excessive amounts of negative HP bonus, you will just have a unit with 1 HP.

Spoiler Test details: :
Created a unit with -10 HP bonus.
Manually spawned in a regular of the unit, so it would be expected to have -7 HP. It appears at 1 HP.
Manually spawned in a elite of the unit, so it would be expected to have -5 HP. It appears at 1 HP.
Built a unit from a city with a barracks, so should be expected to have -6 HP. It appeared at 1 HP.


Anyhow, I have a question of my own:
Has anyone gotten a Kamikazi unit to self destruct after bombing a target, but is able to be shot down by anti-air? It seems like Firaxis decided to use the Kamikazi as a land unit ( :confused: ) in the WWII Pacific Scenario, and my tests as setting it as an air unit with bombing and the Cruise missile ability seem to make it behave like any other cruise missile.

From the tests I've done, it can't be shot down by anti-air or fighters on air superiority via this method (tested by raising the interception rate to 100% and giving anti-air an anti-air rating of 100).

I ask this because, for the Kardashev Mod I'm working on, I'm thinking about using individual missiles to bombard units, however I want the units to be able to shoot down said missiles so that missile defense can be used as an extra dimension in building army compositions. You can mix in a few anti-missile point defense destroyers to screen for missile bombardment, while using the capital ships to attack and bombard ships directly.
 
I tried to have the same thing for my game but I couldn’t get it to work.

Whether it’s land, air or sea the cruise missile code goes through the exact same process. Nothing I’ve done so far has hinted at being able to shoot down/intercept none-nuclear missiles.

They put very little effort into writing the missiles and it’s made them pretty rigid.
 
What does 'Communal' corruption and waste exactly mean?
I understand that it means the corruption level spread out evenly over the empire - but not the same for every city.
The capital still has 0 corruption, while further away it gets no worse than 50%.
So how is it spread? I couldn't find this in here.
 
What does 'Communal' corruption and waste exactly mean?
I understand that it means the corruption level spread out evenly over the empire - but not the same for every city.
The capital still has 0 corruption, while further away it gets no worse than 50%.
So how is it spread? I couldn't find this in here.

Communal means that all cities are treated as the same distance away from the capitol, with the exception of the capital itself (always zero), and cities which you build the Forbidden Palace or any other wonder/small wonder with the reduce corruption flag. The distance is determined by map size, not total empire size, and is further modified by the total number of cities (Optimal cities).

For more information:
https://forums.civfanatics.com/threads/everything-about-corruption-c3c-edition.76619/
 
Thanks. I assume that when the unit's healthpoints increase through promotions, the exsessive negative healthpoints are ignored when calculating the "new" value..
While I didn't explicitly test this, I think it re-calculates the HP with every promotion, as promotions don't have to be a linear +1 HP increase 2/3/4/5 for Conscript/Regular/Veteran/Elite. It can be (and has been done) separated by a varied margin, such as 1/2/4/8 HP. That way if the -10 HP bonus will be re-calculated at every interval, so it will be a consistent 1/1/1/1 after combat.

For that matter, I also haven't tested what happens if being "promoted" will result in less HP, such as going 5/4/3/2 instead.

The way they give you more HP if you took damage seems to be keeping track of the amount of damage, and taking that into account with the new amount of HP, so a 1/3 Regular promoted to Veteran becomes 2/4, and then 3/5 for Elite (rather than maintaining the same ratio). If decreasing HP does the same thing, a 2/5 Conscript will become 1/4 Regular, and die when promoted to a 0/3 Veteran.

I'll test both scenarios when I get home tonight and let you know, unless if someone gets to it before me.

Spoiler -10 HP bonus promotion test :

1. Militaristic Civ
2. Test unit: -10 HP bonus, 100 attack conscript, 10 move, attacking a
3. Promotion Dummy units: 1 def, -10 HP
4. Spawn Test Units at various experiences, and attack Promotion Dummy units and see what happens after promotions.


Spoiler Promotion decreasing HP test :

1. Militaristic Civ
2. Conscript/Regular/Veteran/Elite HP values set at 5/4/3/2
3. Test unit: 0 HP bonus, blitz, 10 movement, 100 attack
4. Promotion dummy unit 1: 100 defense
5. Promotion dummy unit 2: 1 defense, -10 HP bonus
6. Spawn several Conscript Test Units, fight promotion dummy unit 1 to generate various states of injury
7. Use injured Test Units to fight promotion Dummy Unit 2 until promoted
 
Will the “half upgrade cost” and “double defence for all cities” bonuses still work if it’s just a normal improvement?

Martial Law is currently a small wonder but I need to be able to remove it at will. If it’s a normal improvement you can just sell it. If it’s a small wonder you have to use the “replaces all improvements with this flag checked” option and have a Normalcy small wonder to remove it.
 
Will the “half upgrade cost” and “double defence for all cities” bonuses still work if it’s just a normal improvement?

Martial Law is currently a small wonder but I need to be able to remove it at will. If it’s a normal improvement you can just sell it. If it’s a small wonder you have to use the “replaces all improvements with this flag checked” option and have a Normalcy small wonder to remove it.
No, those are restricted to Wonders/Small Wonders in the regular editor. I don't know about other editors, and I don't know if those will function in those either.

Secondly, those are global effects for your nation, not restricted to a specific city. Though to be honest that is something you will have to test with one of those custom editors if it is even possible to add those to improvements to absolutely confirm.


In addition, Small Wonders with "Replace all Improvements with this flag checked" will not replace other SWs or GWs. Only Improvements can be replaced, and GWs and SWs can't be replaced in turn. Meaning if you build the SW first, and then the improvement, you can have both at once. Or slightly convoluted, build the improvement first, then the SW (say you have a requirement), then the improvement again you will have both at once.

For reference:
https://forums.civfanatics.com/threads/playground-mod.128101/page-67#post-4951510
 
-10 HP bonus promotion test
1. Militaristic Civ
2. Test unit: -10 HP bonus, 100 attack conscript, 10 move, attacking a
3. Promotion Dummy units: 1 def, -10 HP
4. Spawn Test Units at various experiences, and attack Promotion Dummy units and see what happens after promotions.
Confirmed. Units have HP recalculated at every promotion.
Results:
Test Unit wins battles, gets promoted, and retains 1 HP.

Promotion decreasing HP test
1. Militaristic Civ
2. Conscript/Regular/Veteran/Elite HP values set at 5/4/3/2
3. Test unit: 0 HP bonus, blitz, 10 movement, 100 attack
4. Promotion dummy unit 1: 100 defense
5. Promotion dummy unit 2: 1 defense, -10 HP bonus
6. Spawn several Conscript Test Units, fight promotion dummy unit 1 to generate various states of injury
7. Use injured Test Units to fight promotion Dummy Unit 2 until promoted
Confirmed that it remembers damage, not HP left. Also promotion cannot kill your unit so there is a floor of 0 HP here.

Results:
1st Conscript Test Unit fought Promotion Dummy Unit 1 and had 1 HP left at the end of the battle. Was promoted to a 0/4 Regular unit.
Fought several battles with the Conscript Test Unit 2, and promoted several times to a 0/2 Elite unit.
Fought Promotion dummy unit 1, and died in combat after a few rounds and was able to kill a few Promotion Dummy 2s and 1s, so unit is not actually invincible.

1st Conscript Test Unit fought Promotion Dummy Unit 2 and was promoted to a 2/2 Elite unit. Fought a Promotion Dummy Unit 1, and died in battle after 2 lost attacks.


Thanks for the information.
The custom editors won’t affect that bit of the code.
Can you think of a way to remove a small wonder without destroying the city or something drastic?
Perpetual martial law doesn’t sound that appealing.
For small wonders, no. Obsolescence is the only way I can think of to eliminate their effects, but once the SW is built, there's no getting rid of it without getting rid of the city itself.
 
If the palace is required to build it, would it be removed if you moved your capital?
I'm not entirely clear on this. I don't think they lose the effects if their prerequisites don't match anymore, with the exception of resources and governments. Try doing a test and let us know the results.
 
The SW remains when you move your capital.
Another copy of the SW can be built in the new capital.

This could be useful to way manipulate the game in other mods. You’d have to move your capital (possibly restricted by resources or an improvement) through a series of cities to build the small wonders in all of the allowed locations.
It’s just an initial thought but these quirks can be useful.

EDIT: I just tried to build multiple Military Academy’s using that method and only the capital moved.

Why is it only when I’m just testing I get the best maps.
upload_2017-8-9_4-48-10.png
 
Last edited:
Back
Top Bottom