Resource icon

Cities in Development (Obsolete)

Status
Not open for further replies.
Balance issues? Yes. Loyalty and crime are impossible to realistically deal with. Personally, I'll suggest crime being extremely low in the early game(having more crime than citizens doesn't make any sense, 1 food is way more penalizing than one gold). Besides that, crime in the city should increase with:

1. Social policies, additional increase could be caused by adopting opposing policy trees(liberty and tradition, rationalism and piety, etc.)
2. City connections and roads: roads should generally make it harder for you to deal with criminals.
3. Loyalty \ unrest\ ideological pressure should also have an effect on your crime. I'd suggest high loyalty would eliminate crime almost entirely.

Crime should be reduced by:

1. Ideological tenets - I'd recon that autocracy should be more efficient with crimes on.
2. Specialists - should reduce the precentage of fraud, sabotage etc.(though one may argue that they should increase it).
3. Certain buildings (such as jails and police stations) could decrease crime at the cost of happiness. Courthouses\ magistrate courts could have another function, reducing unhappiness from those buildings.
 
I think that crimes work good. If you play carefully keepeing in mind crime you should be fine with that. I like crime because with all those great gameplay mods it became easier to win. Literally I found myself ending games sooner then I had without mods. Crime add new negative feature that you should be aware of.
 
Are the Citadel Colonies supposed to be 20 tiles from nearest border/city on huge maps instead of from capital?
 
Balance issues? Yes. Loyalty and crime are impossible to realistically deal with. Personally, I'll suggest crime being extremely low in the early game(having more crime than citizens doesn't make any sense, 1 food is way more penalizing than one gold). Besides that, crime in the city should increase with:

1. Social policies, additional increase could be caused by adopting opposing policy trees(liberty and tradition, rationalism and piety, etc.)
2. City connections and roads: roads should generally make it harder for you to deal with criminals.
3. Loyalty \ unrest\ ideological pressure should also have an effect on your crime. I'd suggest high loyalty would eliminate crime almost entirely.

Crime should be reduced by:

1. Ideological tenets - I'd recon that autocracy should be more efficient with crimes on.
2. Specialists - should reduce the precentage of fraud, sabotage etc.(though one may argue that they should increase it).
3. Certain buildings (such as jails and police stations) could decrease crime at the cost of happiness. Courthouses\ magistrate courts could have another function, reducing unhappiness from those buildings.

Me thinks you exaggerate. Crimes is easy to manage if you bear in mind that the system is designed to make you stop, think, and react a bit more - if you have too much Crime overall, you'll need to sell any Buildings you don't need, or, as said, force Crime into an area that you're fine with losing yields from - this latter point is the core design for the system. You will suffer from Crime - conceptually, it is a more interesting consequence of urbanization than blanket maintenance, and mechanically, it is a larger check to snowballing than was maintenance, but it does still replace maintenance. You will, therefore, suffer from the effects of Crime, as you did from maintenance. The challenge, and to me the fun of it, is in determining where you can afford to suffer - Violence too costly? Build the Circus Maximus and other things and force Corruption up.

Think of Crime as not how many Citizens are committing Crimes, but how extensive/destructive the Crimes they're committing are. The more Buildings, the more institutions that might be effected by a Crime, and hence more Crime, regardless of how many citizens are partaking.

Loyalty seems mostly fine, except there is indeed a bug with Loyalty from losing a war which'll be fixed in the next update. The whole: 'push a claim and the CS is insta-disloyal' needs to addressed to.

1. A concept I leave to Sovereignty.
2. Whyso?
3. It does - low Loyalty increases Crime. But eliminating Crime? Boy. Loyalty isn't like Piety where you're not usually going to have the highest level, so it'd be all too common to eliminate Crime. And eliminating Crime, as much as it might be cathartic, is not my aim.

1. In what way? I never really think about ITs, so there's room for changes there.
2. Because your Miners and Farmers and stuff are otherwise so fraudulant :p Specialists as they are increase Crime by virtue of their powerful yields.
3. Because Crime makes people happy? A nice interaction between the two building types, but exchanges like this I want strictly for Sovereignty.

I think that crimes work good. If you play carefully keepeing in mind crime you should be fine with that. I like crime because with all those great gameplay mods it became easier to win. Literally I found myself ending games sooner then I had without mods. Crime add new negative feature that you should be aware of.

Precisely. Now I just have to get it to actually work as intended :p

Speaking of His Holiness, was there any success in asking about true seperate of Great People generation?

In regards to provinces - are there any plans to add in a governor system - perhaps in a similar fashion to how you have described the privy council working in Sovereignty?

Sadly, it is not possible.

Not at this point. I don't want to add too much complexity to the provincial system.

but…isn't the Pope will fix those issues?

He did add Crime as a yield, and this has improved performance, but he isn't able to help with my current dilemma.

Math you say :D

I dunno how much of a maths problem it is, but it does my head in trying to figure it out so it sure seems like it :p

So, the end goal is that when you decrease/increase a particular Crime, the value of that change (let's say 5%) is imposed upon all other Crimes (so, reducing Fraud by 5% will increase all other Crimes by 5%). Sounds simple enough, but I can't figure how to effectuate that. The only way it might work - though I haven't tried it - is to cycle through each Crime, find the percentage value after modifiers are applied, and then cycle through them all again within that same cycle and... yeah, I dunno :p That would be intensive anyway. Stupid logic. I'll keep tinkering anyway, but anyone's thoughts would be appreciated! Look at the Components/Crimes/Lua/JFD_CID_Crimes_Functions.lua file if you want to visualize the problem - I always end up with the raw modifier (i.e. White Tower == 100% instead of what Treason amounted to).

Are the Citadel Colonies supposed to be 20 tiles from nearest border/city on huge maps instead of from capital?

No, but they can't be built within the radius of another city.
 
The fort colonies are a little wonky too, by the way. I've build some that are definitely far enough away from my capital (we're talking literally halfway across the map here on the other hemisphere) and sometimes they do turn into colonies, othertimes they don't and there seems to be no rhyme or reason as to why it works or doesn't. Some detection issue, maybe?

Edit: It hit me right after writing this: I never see the promotion that should indicate that constructing a fort on this spot turns it into a colony, in both cases.
 
I tried giving it a thought. If I understand what you're trying to do correctly, I think this is what you want to do?
WARNING: It is possible this will make no sense. :p

Code:
function JFD_CID_Crimes(playerID)
	local pPlayer = Players[playerID]
	for pCity in pPlayer:Cities() do

		-- Calculate Raw Crimeless Yields
		iTotalYield = 0
		tRawYields = {}
		for tCrime in GameInfo.JFD_Crimes() do

			local iYieldType = GameInfoType[tCrime.YieldType]
			local iBuilding = GameInfoType[tCrime.BuildingType]

			tRawYields[tCrime.ID] = (pCity:GetYieldRate(iYieldType) + pCity:GetNumBuilding(iBuilding))
			iTotalYield = iTotalYield + tRawYields[tCrime.ID]
		end

		-- Calculate Raw Unmodified Crime
		local iCrime = pCity:GetYieldRate(GameInfoType.YIELD_JFD_CRIME) -- Since you mention Crime is now a yield
		tRawCrime = {}
		for iCrimeID, iYield in ipairs(tRawYields) do
			tRawCrime[iCrimeID] = iYield/iTotalYield * iCrime
		end

		-- Get Modifiers for each Crime
		tModifiers = {}
		for tCrime in GameInfo.JFD_Crimes() do

			local iModifier = 0
			local sCrime = tCrime.Type

			for row in GameInfo.Trait_JFD_CrimeMods() do
				if player:HasTrait(GameInfoTypes[row.TraitType]) then
					if row.CrimeType == sCrime then
						iModifier = iModifier + row.CrimeMod
					end
				end
			end				
			-- and so forth

			-- You can't remove more than 100% crime!
			if iModifier < -100 then iModifier = -100 end
			tModifiers[tCrime.ID] = iModifier/100
		end

		-- Get the amount of crime to redistribute as a result of modification
		local iTotalRedistributedCrime = 0 -- This is the total amount we will have to redistribute
		local tRedistributedCrime = {}
		-- And get the amount of crimes post-modification BUT pre-redistribution as well
		local iTotalModifiedCrime = 0
		local tModifiedCrime = {}
		--
		for iCrimeID, _ in ipairs(tRawCrime) do
			tRedistributedCrime[iCrimeID] = tRawCrime[iCrimeID] * tModifiers[iCrimeID]
			iTotalRedistributedCrime = iTotalRedistributedCrime - tRedistributedCrime[iCrimeID] -- This is negative because -X yield from crime means +x must be redistributed

			tModifiedCrime[iCrimeID] = tRawCrime[iCrimeID] + tRedistributedCrime[iCrimeID]
			iTotalModifiedCrime = iTotalModifiedCrime + tModifiedCrime[iCrimeID]
		end

		-- Redistribute the crime according to the modified crime ratio
		-- This way, no treason is added when the White Tower has already been built, etc. More is added elsewhere insead
		-- Additionally, this means it will also correspond somewhat to yield proportions
		-- This is results in the final distribution of crime
		tFinalCrime = {}
		for iCrimeID, _ in ipairs(tModifiedCrime) do
			if iTotalModifiedCrime == 0 then -- what do we do if all crime has been eliminated?
				iRatio = 0
			else
				iRatio = tModifiedCrime[iCrimeID]/iTotalModifiedCrime
			end
			local iCrimeToRedistribute = iRatio * tRedistributedCrime
			tFinalCrime[iCrimeID] = tModifiedCrime[iCrimeID] + iCrimeToRedistribute
		end		
	end
end
 
I can see the (un)happiness in the city banner, but not in the city screen:
Spoiler :
V1YymPQ.jpg

V1YymPQ.jpg


And I can give City-States gifts, which do nothing:
Spoiler :
V1YymPQ.jpg


lua.log
database.log

I'm not so sure it's supposed to show in the city view. AFAICT, it doesn't in the CBP city view.

I tried giving it a thought. If I understand what you're trying to do correctly, I think this is what you want to do?
WARNING: It is possible this will make no sense. :p

Code:
function JFD_CID_Crimes(playerID)
	local pPlayer = Players[playerID]
	for pCity in pPlayer:Cities() do

		-- Calculate Raw Crimeless Yields
		iTotalYield = 0
		tRawYields = {}
		for tCrime in GameInfo.JFD_Crimes() do

			local iYieldType = GameInfoType[tCrime.YieldType]
			local iBuilding = GameInfoType[tCrime.BuildingType]

			tRawYields[tCrime.ID] = (pCity:GetYieldRate(iYieldType) + pCity:GetNumBuilding(iBuilding))
			iTotalYield = iTotalYield + tRawYields[tCrime.ID]
		end

		-- Calculate Raw Unmodified Crime
		local iCrime = pCity:GetYieldRate(GameInfoType.YIELD_JFD_CRIME) -- Since you mention Crime is now a yield
		tRawCrime = {}
		for iCrimeID, iYield in ipairs(tRawYields) do
			tRawCrime[iCrimeID] = iYield/iTotalYield * iCrime
		end

		-- Get Modifiers for each Crime
		tModifiers = {}
		for tCrime in GameInfo.JFD_Crimes() do

			local iModifier = 0
			local sCrime = tCrime.Type

			for row in GameInfo.Trait_JFD_CrimeMods() do
				if player:HasTrait(GameInfoTypes[row.TraitType]) then
					if row.CrimeType == sCrime then
						iModifier = iModifier + row.CrimeMod
					end
				end
			end				
			-- and so forth

			-- You can't remove more than 100% crime!
			if iModifier < -100 then iModifier = -100 end
			tModifiers[tCrime.ID] = iModifier/100
		end

		-- Get the amount of crime to redistribute as a result of modification
		local iTotalRedistributedCrime = 0 -- This is the total amount we will have to redistribute
		local tRedistributedCrime = {}
		-- And get the amount of crimes post-modification BUT pre-redistribution as well
		local iTotalModifiedCrime = 0
		local tModifiedCrime = {}
		--
		for iCrimeID, _ in ipairs(tRawCrime) do
			tRedistributedCrime[iCrimeID] = tRawCrime[iCrimeID] * tModifiers[iCrimeID]
			iTotalRedistributedCrime = iTotalRedistributedCrime - tRedistributedCrime[iCrimeID] -- This is negative because -X yield from crime means +x must be redistributed

			tModifiedCrime[iCrimeID] = tRawCrime[iCrimeID] + tRedistributedCrime[iCrimeID]
			iTotalModifiedCrime = iTotalModifiedCrime + tModifiedCrime[iCrimeID]
		end

		-- Redistribute the crime according to the modified crime ratio
		-- This way, no treason is added when the White Tower has already been built, etc. More is added elsewhere insead
		-- Additionally, this means it will also correspond somewhat to yield proportions
		-- This is results in the final distribution of crime
		tFinalCrime = {}
		for iCrimeID, _ in ipairs(tModifiedCrime) do
			if iTotalModifiedCrime == 0 then -- what do we do if all crime has been eliminated?
				iRatio = 0
			else
				iRatio = tModifiedCrime[iCrimeID]/iTotalModifiedCrime
			end
			local iCrimeToRedistribute = iRatio * tRedistributedCrime
			tFinalCrime[iCrimeID] = tModifiedCrime[iCrimeID] + iCrimeToRedistribute
		end		
	end
end

Thank you :D I'll see if it makes sense :p

I honestly don't know at this point which mod adds specifically the Forum Romanum and Summer Palace, but I know CID is supposed to change their GP yields to great magistrates when Sukritact's Events and Decisions is installed. However, those, together with the Big Ben (which I actually fixed after shifting some mod ordering around earlier, go figure), seem to have their default (?) great diplomat yields, despite E&D definitely being loaded by the time CID loads, since the Big Ben does get changed from merchant to magistrate.

Ah, I thought you meant my own Forum Magnum and Summer Palace, which, like CSD, I add. I haven't yet added compatibility with CSD, so they'll still be yielding GDiplomats until I can figure that one.
 
Me thinks you exaggerate. Crimes is easy to manage if you bear in mind that the system is designed to make you stop, think, and react a bit more - if you have too much Crime overall, you'll need to sell any Buildings you don't need, or, as said, force Crime into an area that you're fine with losing yields from - this latter point is the core design for the system. You will suffer from Crime - conceptually, it is a more interesting consequence of urbanization than blanket maintenance, and mechanically, it is a larger check to snowballing than was maintenance, but it does still replace maintenance. You will, therefore, suffer from the effects of Crime, as you did from maintenance. The challenge, and to me the fun of it, is in determining where you can afford to suffer - Violence too costly? Build the Circus Maximus and other things and force Corruption up.

Think of Crime as not how many Citizens are committing Crimes, but how extensive/destructive the Crimes they're committing are. The more Buildings, the more institutions that might be effected by a Crime, and hence more Crime, regardless of how many citizens are partaking.

Loyalty seems mostly fine, except there is indeed a bug with Loyalty from losing a war which'll be fixed in the next update. The whole: 'push a claim and the CS is insta-disloyal' needs to addressed to.

1. A concept I leave to Sovereignty.
2. Whyso?
3. It does - low Loyalty increases Crime. But eliminating Crime? Boy. Loyalty isn't like Piety where you're not usually going to have the highest level, so it'd be all too common to eliminate Crime. And eliminating Crime, as much as it might be cathartic, is not my aim.

1. In what way? I never really think about ITs, so there's room for changes there.
2. Because your Miners and Farmers and stuff are otherwise so fraudulant :p Specialists as they are increase Crime by virtue of their powerful yields.
3. Because Crime makes people happy? A nice interaction between the two building types, but exchanges like this I want strictly for Sovereignty.



Precisely. Now I just have to get it to actually work as intended :p



Sadly, it is not possible.

Not at this point. I don't want to add too much complexity to the provincial system.



He did add Crime as a yield, and this has improved performance, but he isn't able to help with my current dilemma.



I dunno how much of a maths problem it is, but it does my head in trying to figure it out so it sure seems like it :p

So, the end goal is that when you decrease/increase a particular Crime, the value of that change (let's say 5%) is imposed upon all other Crimes (so, reducing Fraud by 5% will increase all other Crimes by 5%). Sounds simple enough, but I can't figure how to effectuate that. The only way it might work - though I haven't tried it - is to cycle through each Crime, find the percentage value after modifiers are applied, and then cycle through them all again within that same cycle and... yeah, I dunno :p That would be intensive anyway. Stupid logic. I'll keep tinkering anyway, but anyone's thoughts would be appreciated! Look at the Components/Crimes/Lua/JFD_CID_Crimes_Functions.lua file if you want to visualize the problem - I always end up with the raw modifier (i.e. White Tower == 100% instead of what Treason amounted to).



No, but they can't be built within the radius of another city.

Huh?
My problem with crime is that it isn't a yield by itself - its entire effect sums up at being another modifier to other yields. Maintenance is there in order to balance gold(and tbh, it fails at doing that the later in game you get) and therefore its negative can be countered by generating gold, but there is no way to counter crime generation.

2. Lel the amount of strife brought by roads in Judea and Samaria(ty Rabin) is insane. They allow for further violation of the international law, and they are also a place of entertainment for Palestinian teenagers who seek a place where they could practice rock throwing.
3. FYI: it takes about 150 turns for my piety to get to a level lower than virtuous. On the other hand, my cities become unloyal after 15 turns of my benevolent guidance.
1. Well, I'd imagine ITs such as the third alternative or police state should reduce crime, and each ideology should make a certain type of crime ineffective\ less effective: Violence for autocracy, Sabotage for socialism order and fraud for Freedom.

Plus, high crime rather than unhappiness making barbarians spawn is also an interesting concept...
 
Huh?
My problem with crime is that it isn't a yield by itself - its entire effect sums up at being another modifier to other yields. Maintenance is there in order to balance gold(and tbh, it fails at doing that the later in game you get) and therefore its negative can be countered by generating gold, but there is no way to counter crime generation.

2. Lel the amount of strife brought by roads in Judea and Samaria(ty Rabin) is insane. They allow for further violation of the international law, and they are also a place of entertainment for Palestinian teenagers who seek a place where they could practice rock throwing.
3. FYI: it takes about 150 turns for my piety to get to a level lower than virtuous. On the other hand, my cities become unloyal after 15 turns of my benevolent guidance.
1. Well, I'd imagine ITs such as the third alternative or police state should reduce crime, and each ideology should make a certain type of crime ineffective\ less effective: Violence for autocracy, Sabotage for socialism order and fraud for Freedom.

Plus, high crime rather than unhappiness making barbarians spawn is also an interesting concept...

Crime is there in order to balance your highest yield, and that negative can be countered by reducing the specific Crime concerning. Otherwise, what's left is there to check the accumulated benefits introduced by other systems. Crime is an inevitability because that is conceptually more sensible and because mechanically the more systems that are introduced, the greater the inflation of your yields. If you don't like the fundamental nature of the system, that's why it's possible to disable it (well, you know what I mean :p), however, you can't criticise it from that position, because it is incompatible with the position from which it was designed. I can work on offering more areas by which to reduce specific Crimes, or even Crime in general (though at this point I'd leave it to Sovereignty), but the fundamental system that I want will remain unchanged - you will suffer from Crimes, one way or another.

2. Seems a bit selective. I'll reserve road interaction and the like for Disease.
3. Surely you exaggerate, as Loyalty is relatively static.
1. No such thing as Sabotage, but TA and PS could certainly influence Crimes.

That's a damn shame, any alternatives that you are considering - especially considering the addition of Great Doctors in Health?

None that come to mind.
 
After "+1% of unbroken rule" Loyality with at least conquered cities became much easier to manage.
 
why are heath, crime and some other parts disabled in the user settings?
 
Assuming you want to prevent "yield inflation"\ stop players from snowballing via crimes, than they should be much more dependent on one's social\ technological progress. Yes, you said you'd like to leave that for sovereignty, but I'd imagine reforms could effect such interactions, while the concept itself could be present in the CiD mod.
 
Spoiler :
magic-8-ball-all-signs-point-to-yes.png


Although TBH I'm having some trouble with Crimes being a yield and the 'free' variant of buildings, which in the previous version meant Crime-free, but this is no longer possible. Dunno how to reconcile this yet, in terms of mod compatibility especially.
 
Just wanted to chime in and say that I really like the way that Loyalty is balanced at it's present state, in my current game (Mannerheim, on small continents plus) by the Enlightenment and Industrial eras it really felt like I had to make a conscious effort to keep my colonies loyal - which is imo how it should be.

I do feel that some social policies should offer some bonus to colonial loyalty - or perhaps a reduction to the negative effect of distance from the capital. Perhaps this is unneeded though as the Exploration tree is pretty strong with ExCE/CiD.
It appears that this is the intended effect of the EIC, which is a good decision.

I noticed that the tooltips (in the CityScreen with EUI at least) for national wonders don't seem to display their negative impact on specific crimes - the reduction does display when mousing over the Crime value in a city though - so I guess it's no major loss.

By the way, do you have any plans for any of your future or existing civs to interact with any of CiD's systems in unique ways (ie. UAs relating to Healths/Crimes etc.)?

Fantastic work as always - looking forward to any additional updates when they may arrive.
 
Status
Not open for further replies.
Back
Top Bottom