Unofficial Patch for 3.19

I suggest to include this in a future version.
Since it has its own Dll, you cannot use both the unofficial Patch and this one together.
 
Just as its name implies, the Show Hidden Attitude Mod shows hidden game information--and not just the stuff you can look up in the XML files and see for each leader (assuming you haven't selected Random Personalities for the game) but also the random die roll applied to each player at the start of the game.

It does not belong in the UP.
 
Jdog, I found a rare but potentially serious issue. When improvements give unhappiness (I don't believe any improvements do in Base BTS, but the code is there), it's checked in CvCity::updateFeatureHappiness(). This check loops through all the cities plots, but doesn't actually check that the city owns them. Improvements owned by nearby competitor cities are checked too, if they are in the BFC. This can cause improvements in other players countries to harm your cities too. The fix is simple, in CvCity::updateFeatureHappiness() just check that the pLoopPlot->getOwner() matches the cities owner right after the NULL check. I tested it out and it seems to work.
 
So my AI neighbors that are building Forest Preserves are providing my bordering cities with happiness? Woot! Of course, I never let an AI neighbor that is taking my BFC tiles survive that long, but it's good to know.
 
So my AI neighbors that are building Forest Preserves are providing my bordering cities with happiness? Woot! Of course, I never let an AI neighbor that is taking my BFC tiles survive that long, but it's good to know.

Only if those tiles are in the cities BFC. This isn't much of a problem in BTS, but in mods where there is a third radius for cities.... :mischief:
 
This is a known mechanic from the first days of civilization IV. It works the same for health from forests, unhealth from jungles, flood plains and fallout and happiness from forest preserves.

You could argue that all of these effects should only affect the city who controls the tile. And you could also argue that the effects are there because the improvement/overlay is in the neighbourhood (BFC) of the city. It's not a principle for me as in my view, it's just what works better for game balance in the game. However, you'll have a hard time arguing that it's an error in the game design and should be fixed by the unofficial patch.

I can imagine that the normal game rule (tile improvements/overlay effects every city in which BFC the tile is located) doesn't work well for game balance in mods that change the size of the BFC. Changing the size of the BFC has all kinds of effects on game balance and effects city output vs city maintenance, health and happiness caps, city placement patterns and lots of other things I haven't thought about. It's such a fundamental change of the game rules that it would be weird if it wouldn't conflict with lots of standard game rules. Perfectly balancing the game after such a fundamental change will be hard. Limiting the effects of tile improvements or overlays to the city that controls the tile will probably make balancing such a mod easier, however I could also see it work with the tile affecting multiple cities. However, it might be hard to teach the AI to exploit such a rule as well as a human can.
 
This is a known mechanic from the first days of civilization IV. It works the same for health from forests, unhealth from jungles, flood plains and fallout and happiness from forest preserves.

You could argue that all of these effects should only affect the city who controls the tile. And you could also argue that the effects are there because the improvement/overlay is in the neighbourhood (BFC) of the city. It's not a principle for me as in my view, it's just what works better for game balance in the game. However, you'll have a hard time arguing that it's an error in the game design and should be fixed by the unofficial patch.

I can imagine that the normal game rule (tile improvements/overlay effects every city in which BFC the tile is located) doesn't work well for game balance in mods that change the size of the BFC. Changing the size of the BFC has all kinds of effects on game balance and effects city output vs city maintenance, health and happiness caps, city placement patterns and lots of other things I haven't thought about. It's such a fundamental change of the game rules that it would be weird if it wouldn't conflict with lots of standard game rules. Perfectly balancing the game after such a fundamental change will be hard. Limiting the effects of tile improvements or overlays to the city that controls the tile will probably make balancing such a mod easier, however I could also see it work with the tile affecting multiple cities. However, it might be hard to teach the AI to exploit such a rule as well as a human can.

Sure, but that doesn't mean that it still isn't an issue. And I didn't limit it to the city that controls it (I am not entirely sure that is possible, if two cities overlapped, which get it?), I limited it to the PLAYER. So multiple cities can be affected, but only from the same player. Jungles that you own won't affect a culturally backwards neighbor's city. I'm not sure how this is anything but an exploit.
 
I'm not sure if this has been fixed already. I'm not even sure if i posted this in the right place. I tried looking at the first post but couldn't notice it.
I have posted it here. It's about air bombing unowned tiles. You get a green "plot picker" but can't actually air bomb them. I'm pretty sure that's not intended.
 
Sure, but that doesn't mean that it still isn't an issue. And I didn't limit it to the city that controls it (I am not entirely sure that is possible, if two cities overlapped, which get it?), I limited it to the PLAYER. So multiple cities can be affected, but only from the same player. Jungles that you own won't affect a culturally backwards neighbor's city. I'm not sure how this is anything but an exploit.

Oh, ok. I just misunderstood.

I agree then.
 
From a realism angle, a tile should affect all cities that contain it in their BFC. Malaria doesn't respect national boundaries. ;)

From a game mechanics angle, I agree, but I think I err on RJ's side of being cautious with the UP. The unmodded game has worked this way forever. The only time it becomes an issues is in modded games.

Yes, you can exploit it by settling a jungle city, leaving the jungle, and coaxing rivals into settling cities leaving 2 tiles between them and your junk city. They will suffer :yuck: forever. And you should be able to do that. I think you'd be much better off cottaging that land anyway, but the option should be available.

In the case of the forest preserve, however, from a realism perspective it should not produce happiness to rivals if you have closed borders. With open borders, citizens of neighboring cities should be able to travel to it and be happy. That's obviously too much hard-coding to be good, but it points out how this issue isn't black and white. You could argue neighbors could be happy just knowing the forest is being preserved. :D
 
From a realism angle, a tile should affect all cities that contain it in their BFC. Malaria doesn't respect national boundaries. ;)

From a game mechanics angle, I agree, but I think I err on RJ's side of being cautious with the UP. The unmodded game has worked this way forever. The only time it becomes an issues is in modded games.

Yes, you can exploit it by settling a jungle city, leaving the jungle, and coaxing rivals into settling cities leaving 2 tiles between them and your junk city. They will suffer :yuck: forever. And you should be able to do that. I think you'd be much better off cottaging that land anyway, but the option should be available.

In the case of the forest preserve, however, from a realism perspective it should not produce happiness to rivals if you have closed borders. With open borders, citizens of neighboring cities should be able to travel to it and be happy. That's obviously too much hard-coding to be good, but it points out how this issue isn't black and white. You could argue neighbors could be happy just knowing the forest is being preserved. :D

Well actually, I didn't alter the FeatureHealth function at all. Only the Happiness one. They are separate functions in CvCity. So in this case, it does exactly what you want. :p
 
Yes, and for your mod that's how I would probably do it. I'm just saying that we should err on the side of caution when changing the unmodded game.
 
Malaria doesn't respect national boundaries. ;)

You could argue neighbors could be happy just knowing the forest is being preserved. :D
I agree with the first, the second is a bit of a strech. Realism-wise, :health: and :yuck: should always spread, (un)happiness only to same player, same team or over open boarders.
But that's still not a bug.

edit: I guess we all agree anyway.
 
Jdog, I found a rare but potentially serious issue. When improvements give unhappiness (I don't believe any improvements do in Base BTS, but the code is there), it's checked in CvCity::updateFeatureHappiness(). This check loops through all the cities plots, but doesn't actually check that the city owns them. Improvements owned by nearby competitor cities are checked too, if they are in the BFC. This can cause improvements in other players countries to harm your cities too. The fix is simple, in CvCity::updateFeatureHappiness() just check that the pLoopPlot->getOwner() matches the cities owner right after the NULL check. I tested it out and it seems to work.

Hmm interesting. Since this is the same mechanic as for forest preserves, it does have an interesting implication:

If there were a tile improvement that was only negative in effect (e.g. gamma radiation tower, acid fountain), and you had recently captured one of my cities but my borders still were largely overlapping your new BFC, those tiles would be useless to me as long as I didn't still have another city nearby. Then, I can fill them with gamma radiation towers until you regret ever capturing it from me! :scan:

And I didn't limit it to the city that controls it (I am not entirely sure that is possible, if two cities overlapped, which get it?)

Maybe I misunderstand but they both get it, unless that can/has been modded somehow, right? E.g. a forest gives healthiness to all cities with it in the BFC.
 
Hmm interesting. Since this is the same mechanic as for forest preserves, it does have an interesting implication:

If there were a tile improvement that was only negative in effect (e.g. gamma radiation tower, acid fountain), and you had recently captured one of my cities but my borders still were largely overlapping your new BFC, those tiles would be useless to me as long as I didn't still have another city nearby. Then, I can fill them with gamma radiation towers until you regret ever capturing it from me! :scan:

There are negative improvements in RoM (shaft mine causes unhappiness), which is how I caught this bug. I had an unhappy city despite having no shaft mines. My nearby neighbor had 4 though. :mad:

Maybe I misunderstand but they both get it, unless that can/has been modded somehow, right? E.g. a forest gives healthiness to all cities with it in the BFC.

Exactly.
 
For your example I would expect the Shaft Mine to affect only the city working the plot. You can test this in the SDK with isWorking() or getWorkingCity() or something like that. Each plot has a single "working" city. This doesn't mean the city is using the plot, only that it can use it. A plot must be owned by your culture and be worked by the city to assign a citizen to actually get the yields from it.

I could see the usefulness of adding an XML tag or two to CvImprovementInfo. Normally I'd use an enumeration to control which cities are affected, but perhaps two boolean tags would suffice: bAffectsForeignCities and bAffectsNeighboringCities. The first implies the second, but the second is useful for Forest Preserves that should affect all domestic cities in their range.

Obviously this is not for the UP.
 
Just as its name implies, the Show Hidden Attitude Mod shows hidden game information--and not just the stuff you can look up in the XML files and see for each leader (assuming you haven't selected Random Personalities for the game) but also the random die roll applied to each player at the start of the game.

It does not belong in the UP.

Would you accept it if I removed the dice roll? Complete accuracy for human-AI relations and +/-2 error in AI-AI relations is better than nothing.
 
Would you accept it if I removed the dice roll? Complete accuracy for human-AI relations and +/-2 error in AI-AI relations is better than nothing.

In this post I categorized all of the modifiers by what kind of data they required (5 types). I'm fine with exposing the first two (General and Leader Specific) as they are based on fixed game-rules and XML data. I disagree with exposing the other three (Score Ranking, Hidden, and Random).

Score Ranking: Can expose information about players you haven't met, though it should be fine once you've met all rivals.

Hidden: War success is totally hidden. You can keep track of your own war success with a lot of bookkeeping, but you cannot know the values for AIs that aren't fighting only you.

Random: This is rolled at the beginning of the game and cannot be figured out.

What I'd love to see is to create five preprocessor flags: _MOD_SHOWATTITUDE_XXX where XXX is some word describing the category of information (GENERAL, LEADER, HIDDEN, RANK, RANDOM). Then use #ifdefs to guard each individual modifier:

Code:
// Worse Rank
#ifdef _MOD_SHOWATTITUDE_LEADER
#ifdef _MOD_SHOWATTITUDE_RANK
    // add modifer text
#endif
#endif

This would allow BULL to disable all modifiers requiring those three categories of information flagged above while allowing you to create a build allowing all modifiers. This would be very easy to do and control. I can help if this description wasn't enough. The beauty is that other modders could show all modifiers without changing any code, and you wouldn't need to maintain multiple source versions.
 
Top Bottom