Modding Q&A

A Proto Unit is what I call a unit that has no use by itself but upgrades to a functional unit marked as a king.

I’m going to use some proto units for a Lend-Lease system. I like the idea of being able to exchange arms for profit or the support of an ally in need. If your low on equipment or deprived of resources, asking a fellow player for some of these units may be your only option.
The units have no maintenance cost so can be "moth balled" ready for action in a future conflict.

The proto unit needs to be tradable (no combat stats, available to all). It needs to upgrade through a path of king units running parallel with your development so you receive the unit appropriate for your level of technology.
 
Last edited:
With all of the recent additions to my mod about exchanging units with other players; it’s become more desirable than ever to have a method to dock my ships in a port without building a city. I want to be able to use this “mulberry harbour” thing on neutral, my own and another nation’s coast.

This is what I know for sure-

You can only teleport to land tiles
Telepad units are limited by their hit points
Telepad units can only receive not send
Ships can leave land tiles as long as they enter the water
(If you gave your ships the rebase button, you can use an airfield for the dock but that would let you rebase to inland cities)

If teleportation works the way I think it does, this may be a solution.

Make a land unit telepad (Dock)
Only ships should be able to use the telepad
Allow all of your ships to teleport exactly 1 tile distance
Place the telepad unit on the desired coastline
Move your ship to within 1 tile
Teleport into the dock
At this point it should function like a city’s normal ship-in-port system

EDIT: I just read what Bluemofia wrote on the subject and he said it wouldn't work. He said ships couldn't teleport to land tiles using a unit telepad. If that's the case then maybe the cargo might still be able to teleport.
 
Last edited:
Sea units may not teleport to open ground. They cannot teleport to a non-city land tile.
 
I love it when I can place a city on a narrowing enabling passage for my ships but I always wanted to be able to build a ship canal on an isthmus three tiles wide.

This is the best idea I have and I can’t imagine that there’s going to be a better one without editing the game code. I know that it’s player-only and I can’t guarantee that the AI won’t do something stupid.

Make a coastal improvement called Ship Canal that produces veteran air units allowing you to airdrop units. Give all ships an operational range of 2 tiles (city, tile, city so 3 tiles movement in practice).The unit can’t airdrop onto water tiles and it would be pointless to airdrop it on land. The only reasonable option would be to airdrop it onto a city (that would be so close that it would compete for tiles). The meagre operational range of the ships will discourage players from moving their ships inland for some kind of exploit when you unlock airfields and airports. A ship has to enter a coastal city to use a ship canal (or airport) and it requires the ship to have all of its moves.

I’d like to know if anyone thinks this is worth implementing.
 
That´s interesting thinking :thumbsup:, but may be a little complicated. A better solution (so fixing the game code) is to play with the Antal1987-4 patch (that also fixes the scientific golden age and some graphical glitches in the civilopedia, that Firaxis never did fix). Here are two screenshots of a current CCM2 testgame using the Yokohama-Channel (or may be better: building the Yokohama Canal) :):

yokohama-channel-1-jpg.474854


yokohama-channel-2-jpg.474855
 

Attachments

  • Yokohama Channel-1.jpg
    Yokohama Channel-1.jpg
    515.4 KB · Views: 23,129
  • Yokohama Channel-2.jpg
    Yokohama Channel-2.jpg
    529.8 KB · Views: 22,804
Thanks for the alternative.
So, the Antal1987-4 patch allows you to place a new city immediately next to an existing city?
Are there any consequences for using the patch?

It´s too early to give here a full résumé about the Antal1987-4 patch, but as you can see I´m now in the testgame at the border to era 4 and there were no incidents. One tester showed a save game where one of the citizens couldn´t be replaced in the city. screen. If this has to do with the Antal1987-4 patch is not proved. When playing with that patch, I think there should be the "houserule", that no combat settlers should be allowed, settling one tile next to an enemy city (especially with barracks inside that new city) .In my eyes this could be the reason, why Firaxis set a two tile distance between cities.

The "Yokohama Canal" works pretty well. When transferring a ship from one ocean to the other, this ship passes the three-city-canal" without any stop.
 
I didn’t make the connection to use settlers offensively.
I’ll avoid using house-rules even at the cost of a key feature. If I know the option is available, I can’t resist the temptation to abuse it. My attitude to every game is to read through the rulebook for omissions and ambiguity.
If I can’t respect the rules I don’t see how I can expect anyone else to.

The patch may prove quite useful for the urban warfare mod described in my last PM.
The CODs being preplaced can have mostly none-constructible buildings. Cities founded after the start of the game can be considered forward bases with their limited potential.

The patch isn’t appropriate for my full history mod but can still be very useful.
Thanks Civinator
 
Hi,
Question1:
I was thinking of making a unit called 'slave'. (right now the game only has 'worker') and you get a slave with enslavement.

Does this change the game in any way? Has someone experience with this? I came across it in another mod...

Question2:
I have Crocodiles appear as a bonus resource on Marsh, Jungles and Floodplains - yet, I have never seen them appear in-game on floodplains. The entry in the editor is correct.
Also, I have Seals appear on the Coast and on Tundra - yet they never appear on Tundra.

What makes these sources not appear on their locations??
 
Hi,
Question1:
I was thinking of making a unit called 'slave'. (right now the game only has 'worker') and you get a slave with enslavement.

Does this change the game in any way? Has someone experience with this? I came across it in another mod...
I have no practical experience designing a scenario with this type of unit. However - based on closely following discussions by those who have - the unit to be enslaved has to be in a certain slot in the order units are listed. IIRC there is also a limit on how many different units can have enslavement flagged. Apologies that I can't remember the details.

Question2:
I have Crocodiles appear as a bonus resource on Marsh, Jungles and Floodplains - yet, I have never seen them appear in-game on floodplains. The entry in the editor is correct.
Also, I have Seals appear on the Coast and on Tundra - yet they never appear on Tundra.

What makes these sources not appear on their locations??
Sometimes if the resource has a low frequency of appearance if the map is too small, more importantly if the area that type of terrain covers is too small, there is not enough room for the resource to randomly appear.

To test this try making a map that is almost exclusively the terrain where you want it to appear. Don't change frequency of appearance, just change the map. I know from making maps that floodplain does not need to appear next to a river or body of water. I have placed it in the middle of a desert as an oasis. I have not placed floodplain immediately next to tundra. But even if there is a thin line of some other terrain between those two it should still be an effective test. If you do that and the resource still does not appear then the problem is somewhere else in the setup.
 
Hi,
Question1:
I was thinking of making a unit called 'slave'. (right now the game only has 'worker') and you get a slave with enslavement.

Does this change the game in any way? Has someone experience with this? I came across it in another mod...

Theov, you only have to use a separate "slave unit", if that unit should have other settings than the enslaved worker, per example a reduced worker strength, a reduced movement rate or something else Per example in earlier versions of CCM1 I gave slaves a MV rate of 1 while normal workers (and enslaved workers) had a MV rate of 2.
 
Hi Theov, I have plenty of experience with multiple slaves.

I have 12 variations of worker units and 2 slave units in TLC.
All of my infantry has the enslave feature. Units created before the industrial era generate Slaves and anything afterwards generates Forced Labourer.
You can have only 1 standard slave unit that defenceless units with a population value will transform into when attacked. The unit marked as the standard slave can be traded with other nations as long as it's bases in the sender’s capital.

To keep things fresh all of the pre-industrial slaves upgrade to “colonial” combat units marked as a king unit (so colonial units can't be issued naturally).
As Civinator said; it would only be beneficial if you want separate values for movement, stats or their upgrade path.
 
I want to add a local tax feature but I don’t know if the +1 commerce flag is doubled by adding another building or if it can only apply once.

Tax office (currency) reduces corruption, required to alter local tax
Land Tax (currency) + 1 commerce per tile, 2 unhappiness, - 3 culture
Income Tax (economics) +50% tax, 2 unhappiness, - 3 culture
Tax Hike (corporation) +50% tax, + 1 commerce per tile, 3 unhappiness, - 5 culture​

Does anyone know if I can have both the Land Tax and Tax Hike improvements?
Is there a limit on how many buildings that actually increase production, tax and corruption, or do you continue to benefit from adding more?
 
I want to add a local tax feature but I don’t know if the +1 commerce flag is doubled by adding another building or if it can only apply once.
Does anyone know if I can have both the Land Tax and Tax Hike improvements?
Is there a limit on how many buildings that actually increase production, tax and corruption, or do you continue to benefit from adding more?
Both the "+50%" tax and "+1 trade per trade-producing tile" are cumulative. So yes you can have both improvements. Theoretically, you could also keep stacking buildings with these flags up to the hard-coded 256 building limit. As far as the negative culture, I seem to recall there were some entries where if you enter negative modifiers it would mess up the game. I think culture was one of those, but I could be misremembering.
 
Thanks Laurana Kanan

With this set-up, I can now draw in as much money as the people will tolerate.

For a while I was trying to rework wealth into something more realistic. I wanted to manipulate wealth in to investment (several turns), tax (unhappiness) or citizen liquidation (kills citizen) but none of them worked.

The tax office set-up is hardly elegant but enables even more micromanagement necessary for times of crisis.
 
Both the "+50%" tax and "+1 trade per trade-producing tile" are cumulative. So yes you can have both improvements. Theoretically, you could also keep stacking buildings with these flags up to the hard-coded 256 building limit. As far as the negative culture, I seem to recall there were some entries where if you enter negative modifiers it would mess up the game. I think culture was one of those, but I could be misremembering.
Negative culture doesn't really screw up the game, however it does behave oddly.

Let's say you have a newly minted city, and you build the "Land Tax" building, and it gives the -3 culture. Because you are not generating any culture, you don't have a -3 culture per turn, just a 0 culture per turn. Now you build a temple, and it generates 2 culture per turn. Rather than the expected 0 culture per turn, you are now generating 2 culture per turn. Then build a Library that generates 3 culture per turn, you get 5 culture per turn.

The other way around however, if you start with the new city, build the temple, you get 2 culture per turn. Add Land Tax, now you are back down to 0 per turn. Build a Library after that, you are at 3 culture per turn.

Similarly, if you build the temple and a library, so at 5 culture per turn, and then build the land tax, you are down to 2 per turn.

Same 3 improvements, but depending on the order which you build them will give you either 5, 3, or 2 culture per turn at the end of the day.

The strange part is, the labels.txt file contains lines that reference borders shrinking due to declining culture, so you would expect negative total culture effects to be a thing, but it isn't. When you take a city and generate a chunk of culture (say, 10), then build enough negative culture buildings to supposedly give you a negative culture growth, it won't take away the culture you have already generated.

So what it seems like, is that the game simply sums any new culture buildings you build to the current culture generation rate, and if it is less than 0, set it at zero, rather than recalculate it from scratch every time you build a new city.

Basically in pseudo code:
IF: Building is built(
City.culture_rate = City.culture_rate + Building.culture
IF: City.culture_rate < 0 (
City.culture_rate = 0
)​
)​
 
tomayto, tomahto :mischief:
Well... I interpret "Screw up the game" level of badness as "Crash to Desktop" like those immobile units with the ability load.

This can be implemented as a feature possibly, or worked around. We all know Civinator has done enough wonders with Civ's quirks.
 
The local taxes are temporary measures. They have 1 shield cost and are expected to be repealed (sold in city screen) at any time. It’s unlikely that the order will be an issue because of the short time the tax will be imposed. A player wouldn’t find it easy to manipulate it to their advantage and from what you’ve said; the least desirable outcome is that the culture isn’t affected negatively.

This sounds like an “all clear” to me, thanks guys.
 
Back
Top Bottom