Test build discussion

Nightinggale

Deity
Joined
Feb 2, 2009
Messages
5,281
After debugging the diplo screen with a non-informative text, I came to this conclusion:

The text set to the diplo event is of type AI_DIPLOCOMMENT_OFFER_DEAL (defined in Diplomacy info XML)

The AI attitude is ATTITUDE_CAUTIOUS.

Mixing those two pieces of information, the XML provides this setup:
PHP:
<DiplomacyText>
	<Text>AI_DIPLO_FR_OFFER_DEAL_1</Text>
	<Text>AI_DIPLO_FR_OFFER_DEAL_2</Text>
	<Text>AI_DIPLO_FR_OFFER_DEAL_3</Text>
	<Text>AI_DIPLO_FR_OFFER_DEAL_4</Text>
	<Text>AI_DIPLO_FR_OFFER_DEAL_5</Text>
	<Text>AI_DIPLO_FR_OFFER_DEAL_6</Text>
</DiplomacyText>
The text for this is in GameTextInfos_original.xml in vanilla.
PHP:
<TEXT>
	<Tag>AI_DIPLO_FR_OFFER_DEAL_1</Tag>
	<English>Greetings, [CT_NAME]! What do you think of this deal?</English>
</TEXT>
<TEXT>
	<Tag>AI_DIPLO_FR_OFFER_DEAL_2</Tag>
	<English>The peace-loving people of [OUR_CIV_SHORT] seek a fair trade with [CT_CIV_SHORT]. How about it?</English>
</TEXT>
<TEXT>
	<Tag>AI_DIPLO_FR_OFFER_DEAL_3</Tag>
	<English>How does this sound to you, [CT_NAME]?</English>
</TEXT>
<TEXT>
	<Tag>AI_DIPLO_FR_OFFER_DEAL_4</Tag>
	<English>What do you think of this deal, [CT_NAME]?</English>
</TEXT>
<TEXT>
	<Tag>AI_DIPLO_FR_OFFER_DEAL_5</Tag>
	<English>My friend, can [OUR_CIV_SHORT] tempt you with this offer?</English>
</TEXT>
<TEXT>
	<Tag>AI_DIPLO_FR_OFFER_DEAL_6</Tag>
	<English>Let's make a deal!</English>
</TEXT>
(non-English removed for readability)
I repeat the diplo event over and over and each time I get one of those strings. Nothing else.

This mean the "bug" is that nobody ever added a proper text to this event. If somebody can think of something useful for the AI to say, then we can add that and the problem will be gone.

Remember that there are 5 attitudes and it would be nice to get different response based on attitude.

They are ATTITUDE_FRIENDLY, ATTITUDE_PLEASED, ATTITUDE_CAUTIOUS, ATTITUDE_ANNOYED, ATTITUDE_FURIOUS. We can use the same string for more than one of those if we like.
 
Which problem was this one? Was this something you encountered? The missing Diplomacy text that Trade and Lib reported was because of a bug I introduced in python. It would prevent the Trade Deal items from being displayed. However, like you say if an AI doesn't have certain text events set up for them their message will be blank as well. There use to be several of these but they have slowly been filled in, but some may still linger. Also, most trade deals want happen unless your attitude is at least cautious, at least with the current setup in the dll I believe.

But yeah, this is a good idea to talk about the latest test release here. You could edit the first post to show which release we are currently testing.
 
The main issues is that in any situations where it doesn't find Diplo text unique to a Leaderhead (as likely no one will want to code custom text for every situation for every LH), it should pick from the default responses in vanilla text XML . I attached the Diplomacy texts from Civ4BtS in case some of these are missing for some reason from vanilla Civ4Col XML; there are a lot of options for deal language by attitude including below. :smoke:


Spoiler :
<TEXT>
<Tag>AI_DIPLO_TRY_THIS_DEAL_1</Tag>
<English>How does this deal sound?</English>
<French>Que pensez-vous de ce marché ?</French>
<German>Wie hört sich das für Euch an?</German>
<Italian>Che ne pensi?</Italian>
<Spanish>¿Qué os parece este trato?</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_TRY_THIS_DEAL_2</Tag>
<English>What do you think of this deal, [CT_NAME]?</English>
<French>Que pensez-vous de cette proposition, [CT_NAME] ?</French>
<German>Was haltet Ihr hiervon, [CT_NAME]?</German>
<Italian>Cosa pensi di questo affare, [CT_NAME]?</Italian>
<Spanish>¿Qué pensáis de este trato, [CT_NAME]?</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_TRY_THIS_DEAL_3</Tag>
<English>Do you find this offer tempting?</English>
<French>Trouvez-vous cette offre intéressante ?</French>
<German>Könnte Euch dieser Vorschlag reizen?</German>
<Italian>Trovi interessante questa offerta?</Italian>
<Spanish>¿Encontráis esta oferta tentadora?</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_TRY_THIS_DEAL_4</Tag>
<English>Here's my offer.</English>
<French>Voici mon offre.</French>
<German>Hier ist mein Angebot.</German>
<Italian>Ecco la mia offerta.</Italian>
<Spanish>Ésta es nuestra propuesta.</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_TRY_THIS_DEAL_5</Tag>
<English>I'm sure that you'll agree that this deal is fair...</English>
<French>Je pense que vous trouverez notre proposition équitable.</French>
<German>Ich bin sicher, auch Ihr werdet diesen Handel fair finden ...</German>
<Italian>Siamo certi che considererete le condizioni vantaggiose...</Italian>
<Spanish>No nos negaréis que el trato es justo...</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_TRY_THIS_DEAL_6</Tag>
<English>And that's my final offer. </English>
<French>C'est ma dernière offre.</French>
<German>Und das ist mein letztes Wort.</German>
<Italian>E questa è la mia ultima offerta.</Italian>
<Spanish>Y ésta es nuestra última oferta. </Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_FR_OFFER_DEAL_2</Tag>
<English>The peace-loving people of [OUR_CIV_SHORT] seek a fair trade with [CT_CIV_SHORT]. How about it?</English>
<French>Le peuple pacifique des [OUR_CIV_SHORT] veut faire un marché équitable avec les [CT_CIV_SHORT]. Qu'en pensez-vous ?</French>
<German>Das friedliebende Volk von [OUR_CIV_SHORT] möchte einen fairen Handel mit [CT_CIV_SHORT] schließen. Was sagt Ihr dazu?</German>
<Italian>La pacifica popolazione [OUR_CIV_SHORT:4] vuole commerciare equamente con [CT_CIV_SHORT:2]. Che ne pensi?</Italian>
<Spanish>El pacífico pueblo de [OUR_CIV_SHORT] quiere hacer un trato justo con [CT_CIV_SHORT]. ¿Qué os parece?</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_FR_OFFER_DEAL_3</Tag>
<English>How does this sound to you, [CT_NAME]?</English>
<French>Que pensez-vous de cette offre, [CT_NAME] ?</French>
<German>Wie hört sich das für Euch an, [CT_NAME]?</German>
<Italian>Ti suona bene, [CT_NAME]?</Italian>
<Spanish>¿Qué os parece esto, [CT_NAME]?</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_FR_OFFER_DEAL_4</Tag>
<English>What do you think of this deal, [CT_NAME]?</English>
<French>Que pensez-vous de ce marché, [CT_NAME] ?</French>
<German>Was haltet Ihr von diesem Vorschlag, [CT_NAME]?</German>
<Italian>Cosa pensi di questo affare, [CT_NAME]?</Italian>
<Spanish>¿Qué pensáis de este trato, [CT_NAME]?</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_FR_OFFER_DEAL_5</Tag>
<English>My friend, can [OUR_CIV_SHORT] tempt you with this offer?</English>
<French>L'offre des [OUR_CIV_SHORT] vous tente-t-elle ?</French>
<German>Kann [OUR_CIV_SHORT] Euch mit diesem Vorschlag eine Freude bereiten?</German>
<Italian>[OUR_CIV_SHORT:2] può tentarti con questa offerta?</Italian>
<Spanish>Camarada, ¿puede [OUR_CIV_SHORT] tentaros con esta propuesta?</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_FR_OFFER_DEAL_6</Tag>
<English>Let's make a deal!</English>
<French>Faisons un marché !</French>
<German>Lasst uns einen Handel schließen!</German>
<Italian>Facciamo un affare!</Italian>
<Spanish>Hagamos un trato.</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_FUR_OFFER_DEAL_1</Tag>
<English>[CT_NAME], I'm making you an offer you can't refuse.</English>
<French>[CT_NAME], je vous fais une offre que vous ne pouvez refuser.</French>
<German>Ich mache Euch ein Angebot, das Ihr nicht ablehnen könnt, [CT_NAME].</German>
<Italian>[CT_NAME], ti sto facendo un'offerta che non puoi rifiutare.</Italian>
<Spanish>[CT_NAME], os voy a hacer una oferta que no podréis rechazar.</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_FUR_OFFER_DEAL_2</Tag>
<English>Show some intelligence for a change, [CT_NAME]. Accept this deal.</English>
<French>Pour une fois, faites preuve d'intelligence, [CT_NAME]. Acceptez ce marché.</French>
<German>Beweist zur Abwechslung mal ein bisschen Verstand, [CT_NAME]! Akzeptiert diesen Handel!</German>
<Italian>Dammi un dimostrazione della tua intelligenza, [CT_NAME]. Accetta queste condizioni.</Italian>
<Spanish>Mostrad algo de inteligencia para variar, [CT_NAME]. Aceptad este trato.</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_FUR_OFFER_DEAL_3</Tag>
<English>The [OUR_EMPIRE] offers you this trade. I suggest you take it.</English>
<French>L'[OUR_EMPIRE] vous propose ceci. Je vous conseille d'accepter.</French>
<German>Das [OUR_EMPIRE:2] bietet Euch diesen Handel an. Ich würde vorschlagen, Ihr schlagt ein!</German>
<Italian>L'[OUR_EMPIRE] ti offre questa possibilità di commercio. Ti suggerisco di accettarla.</Italian>
<Spanish>El [OUR_EMPIRE] os ofrece este intercambio. Os sugiero que lo aceptéis.</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_FUR_OFFER_DEAL_4</Tag>
<English>Here's our offer. Take it or leave it.</English>
<French>Voici notre offre. C'est à prendre ou à laisser.</French>
<German>Unser Angebot steht. Schlagt ein oder lasst es bleiben!</German>
<Italian>Ecco la nostra offerta: prendere o lasciare.</Italian>
<Spanish>Ésta es nuestra oferta. Lo tomáis o lo dejáis.</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_FUR_OFFER_DEAL_5</Tag>
<English>[OUR_CIV_SHORT] offers your nasty little civilization the following deal.</English>
<French>Voici ce que les [OUR_CIV_SHORT] proposent à votre insignifiante civilisation.</French>
<German>[OUR_CIV_SHORT] bietet Eurer jämmerlichen kleinen Zivilisation folgenden Handel an.</German>
<Italian>[OUR_CIV_SHORT:1] offre il seguente accordo alla tua piccola e insignificante civiltà.</Italian>
<Spanish>[OUR_CIV_SHORT] ofrece el siguiente trato a vuestra desagradable e ínfima civilización.</Spanish>
</TEXT>
<TEXT>
<Tag>AI_DIPLO_FUR_OFFER_DEAL_6</Tag>
<English>Here's the deal. </English>
<French>Voici le marché.</French>
<German>Das ist unser Vorschlag.</German>
<Italian>Ecco l'affare.</Italian>
<Spanish>Éste es el trato. </Spanish>
</TEXT>

 

Attachments

  • CIV4DiplomacyText.zip
    106.1 KB · Views: 293
Which problem was this one? Was this something you encountered? The missing Diplomacy text that Trade and Lib reported was because of a bug I introduced in python. It would prevent the Trade Deal items from being displayed.
Did you add that fix to git?

However, like you say if an AI doesn't have certain text events set up for them their message will be blank as well.
The problem with the strings is that.... they just don't sound right considering what is offered.

We have a piece of code, which is being called in XML and we know they offer peace and nothing else. With the option to write whatever custom strings we want, which will only show up in this case, why do we use generic strings, which are more fitting for trading yields. If we know what the AI wants to trade and we know the attitude when we write the strings, why not make strings fitting for that specific case?

Another thing. Somehow I feel like with each new version, the gameplay gets a bit worse. I think the focus has been to add as many features as possible without considering balance. When we have merged the branches, we should move on to deal with game balance. Perhaps part of the problem is that yield production is too powerful early on. Even without inventions and improvements, I ended up with a farmer providing 8 food and a lumberjack providing 12 lumber. That's one lumberjack to supply 4 cities, at least until hammer production is improved.

As for bugs, I noticed that the yield screen doesn't work as I would expect. The copy to all certainly doesn't. I tried to set import/export and feeder on with a threshold of 50. Some, but not all cities ended up with exporting 100 and no import.
 
I was loading old save games to try to reproduce the "None Profession" issue when I got this window.
This is not only to confirm that I get the window, but also to check if that may be important info for you.

Then, next turn I got another such window only changing line 209 for line 212 in the last entry and next turn I got this:

Assert Failed

File: CvGameTextMgr.cpp
Line: 9673
Expression: iBaseModifier == kCity.getBaseYieldRateModifier(eYieldType)
Message: Yield Modifier in setProductionHelp does not agree with actual value


And not. I wasn't able to reproduce the "None Profession" issue either.:dunno:
 

Attachments

  • issues window.jpg
    issues window.jpg
    324 KB · Views: 338
I was loading old save games to try to reproduce the "None Profession" issue when I got this window.
This is not only to confirm that I get the window, but also to check if that may be important info for you.

Then, next turn I got another such window only changin line 309 for line 312 in the last entry and next turn I got this:

Assert Failed

File: CvGameTextMgr.cpp
Line: 9673
Expression: iBaseModifier == kCity.getBaseYieldRateModifier(eYieldType)
Message: Yield Modifier in setProductionHelp does not agree with actual value


And not. I wasn't able to reproduce the "None Profession" issue either.:dunno:
 
I wanted to correct the lines and I duplicated the entry.
Correct lines are 309 and 312.
 
More reports

1) I'm encountering this bug I think when I enter the city of Luxemburg

Assert Failed

File: CvGameTextMgr.cpp
Line: 9673
Expression: iBaseModifier == kCity.getBaseYieldRateModifier(eYieldType)
Message: Yield Modifier in setProductionHelp does not agree with actual value.


2) The fact that Jesters and Inn Keepers are the two specialists to produce law is a bit funny.

3) I had to change civic by a Pope's decree and its maintentance is not working.

4) I had the bug report window and I got tired of pressing ok. It may be a big issue.

5) I got a crash to desktop when achieving currency trading perk. I know it because then when I loaded the sav I could continue normally after that event.
 

Attachments

  • luxemburg bug.jpg
    luxemburg bug.jpg
    362.9 KB · Views: 331
  • upkeep not working.jpg
    upkeep not working.jpg
    216.5 KB · Views: 331
  • clicking for a while.jpg
    clicking for a while.jpg
    314.2 KB · Views: 323
Expression: iBaseModifier == kCity.getBaseYieldRateModifier(eYieldType)
Message: Yield Modifier in setProductionHelp does not agree with actual value
That's a display bug, which is affected by CivEffects. Not only is it a minor issue, it might have been fixed by CivEffects. I will ignore it until the branches are merged and see if that fixes the issue.

I wanted to correct the lines and I duplicated the entry.
Correct lines are 309 and 312.
Those two lines are
Code:
screen.hideList(List)
screen.showList(List)
It doesn't tell what went wrong, which makes it a bit tricky to figure out. However this is a likely cause for incorrect displays as it somehow fails to figure out which python objects to display and which to hide.


Btw I just looked at the law yield icon. The problem appears that nobody added the button art to GameFont, hence it display a placeholder icon. I don't think we should fix it now as it requires editing graphics files. Instead those files should be edited in one go before the next release. After all the mission icons are also wrong as several civs share the same icon.

I wonder if we should add mission icons based on different colors and then the DLL will pick the one with the player color rather than having a list, which can go out of sync :think:
It would be ideal to have a "magic" color, which can be replaced with player color, but I don't think that is possible.

EDIT
A quick check reveals that there are 46 player colors and there are 75 icons reserved for missions in GameFont. Making one for each player color appears to be possible. It would be even greater if I figure out a way to automatically generate the icons based on a template cross. That way it will be easy to generate more. Also other mods like col2071 might want a different template.

EDIT2
This appears to be the answer to adding crosses with player colors:
http://www.imagemagick.org/discourse-server/viewtopic.php?t=18196

Using this approach, all it takes is a template cross in png using well known colors, ImageMagick and a perl script to generate a png for each player color. Changing the template will make it possible to make non-cross icons as well. The perl script should work based on XML data, allowing us to add more colors and the script will be able to handle that as well.

Well maybe not perl. It depends on how easy it is to call ImageMagick from a perl script. Maybe a perl script to generate the lines for ImageMagick and then save those in a batch file.
 
Another thing. Somehow I feel like with each new version, the gameplay gets a bit worse. I think the focus has been to add as many features as possible without considering balance.

Yes, this has been the design strategy all along. We get the features in, then we balance them all out. When many features are effected by each other, that would be one of the better ways to do it. That's what this testing is all about, balancing the current game features.

As for bugs, I noticed that the yield screen doesn't work as I would expect. The copy to all certainly doesn't. I tried to set import/export and feeder on with a threshold of 50. Some, but not all cities ended up with exporting 100 and no import.

It doesn't "copy to all", there isn't a command for that. You can either set the selected Yield to be Imported here from everywhere, or Exported from here to everywhere else. Of course options like that can be added with ease. So, for your Lumber Jack producing 12 Lumber you can select Export From Here, and have all your other cities receiving those lumber with out having to go to each one.

And yeah, you asked me to push the changes made to fix that bug and so I did, or at least I think I did.
 
2) The fact that Jesters and Inn Keepers are the two specialists to produce law is a bit funny.

Yes, this part hasn't been adjusted yet.

) 3 I had to change civic by a Pope's decree and its maintentance is not working.

Looking at the screen shot it appears to be working? Ritualistic cost 9 Religion, and Theocracy cost 15, that's 24. It shows you are only producing 15, so your gonna have issues. What was your concern with this exactly?
 
After having spend way too much time writing a script to generate mission cross icons, I finally finished it. I added one for each player color using the colors from vanilla XML as it looks like we haven't changed those. However the result looked a bit dull and the white color was in fact a bit grayish. I decided to alter the RGB colors and give each +11%. Now they look a whole lot better :)

IMPORTANT: if we add more player colors to XML, they should be added to the end of the XML file. It is easy to add more icons to the end of the list, but moving the existing icons is a lot of work.

Now when XML is done loading, any civ, which didn't read an ID for a mission icon (that would be all of them right now) will get one based on the player color. This mean you can see who owns the mission just by looking at the graphics. See attached screenshot with 3 missions.

I added the script to this post since I'm not sure where else to place it. It requires ImageMagick and it works by using template_cross.png as a template. It then looks for the two "magic" colors in that image and generate a series of numbered tga files. Add the files to GameFont in that order.

Changing the template will naturally change all crosses. Useful in case crosses doesn't make sense for the mod in question. If CIV4ColorVals.xml or CIV4PlayerColorInfos.xml (or both) are placed next to the script, it will use those instead of the vanilla settings. For ease of use I added the vanilla data to the script itself, which it will rely on when it fails to find the xml files.
 

Attachments

  • mission colors.JPG
    mission colors.JPG
    227.8 KB · Views: 332
  • crossgen.rar
    2.6 KB · Views: 326
I personally think lumber is ok, as it is not 'that' useful, as you need to convert it to hammers, and in more complex builds, add in the extra yields as well.

So you want to produce a lot of lumber, so that you don't have to put too many people on lumber production as you have to do so many other jobs as well.

I don't find yield production that much of an issue, the fact is there is not much to do with yields in the beginning, except swap it for other yields you don't have.

Once you get to the spice route, then you start being able to make proper money out of yields.

I think if we reintroduce the concept of 'demanded yield consumption = X' Then the amount of yields you are producing, will balance out well, woth it being a struggle to both make money, and keep up with the consumption demands of an ever growing empire.

I disagree that the gameplay is getting worse with each release (I think if you make a statement like that, you really need to quantify and qualify it) I find it gets more interesting. Adding in new features, has always been the limited part of the equation (Only a few hands) and we have been trying to get to that point of 'feature lock' where we have all the conceptual toys that we feel the game lacks (maintenance, economics, civics, techs, etc.) Once all those are in, they can be balanced out properly against each other (Hopefully purely in xml).

Bug testing is slightly different, as it is better to catch all the bugs in turn with each new feature, rather than swimming in a sea of them. That is what this build is really for, stress testing to see what falls apart, so we can get on to dropping in the next needed features, so that we have the complete picture as sopon as possible ready to balance and reimagine across the desired modmods.

EDIT:
What happens if the mod has more than one kind of 'mission' in that if we add in the religion mod concept (that fullerene had done some work on I think once upon a time?) then we may have different shapes, cross and crescent for example.
 
I disagree that the gameplay is getting worse with each release (I think if you make a statement like that, you really need to quantify and qualify it) I find it gets more interesting.
Ok, maybe I went a little overboard, but somehow it just doesn't feel as much fun as when I started playing 1.x. I'm not entirely sure why :think:
It sure is a whole lot faster and noteworthy less buggy now and that can only be a good thing. I have encountered a number of games with rather good gameplay, but are rendered more or less unplayable due to bugs. That's really annoying and we are nowhere near that state.

Bug testing is slightly different, as it is better to catch all the bugs in turn with each new feature, rather than swimming in a sea of them. That is what this build is really for, stress testing to see what falls apart, so we can get on to dropping in the next needed features, so that we have the complete picture as sopon as possible ready to balance and reimagine across the desired modmods.
Yeah, bugfixing is the most important task when looking from a modmod point of view. Game balance issues will not affect a modmod as game balance will be different. I worked on col2071 yesterday and more or less got it working again based on the CivEffect branch. The thing is, the XML layout appears to be done. Sure there are a few DLL issues left, but nothing, which should stop XML modding.
 
EDIT:
What happens if the mod has more than one kind of 'mission' in that if we add in the religion mod concept (that fullerene had done some work on I think once upon a time?) then we may have different shapes, cross and crescent for example.
Currently we only support one kind as all missions does the same. If it's just the graphics, which is the issue, then it is possible to add an ID in the civ info XML.

The issue used to be figuring out which ID to add. However I added a debug interface for that purpose. In debug and assert builds (including the test build), enter Domestic Advisor (F6). The second from the right is a debug GameFont button. Clicking that one will reveal all the info you need in order to set up everything, which is GameFont related, including looking up the ID for the icon you intend to use for... something specific. Do note that there are multiple pages and you can move left/right. The first loops the IDs while the rest loops the XML info. Depending on what you want to look up, one approach is better than the other.

The far right button is an incomplete debug feature. Right now it can force reloading the special building XML and redraw. It will do that every xth update (the city screen updates 4 times each second). This will allow changing XML data for building placement and get live updates on the screen.

The two debug buttons will disappear automatically if the DLL is compiled in Release mode.
 
File: CvGameTextMgr.cpp
Line: 9673
Expression: iBaseModifier == kCity.getBaseYieldRateModifier(eYieldType)
Message: Yield Modifier in setProductionHelp does not agree with actual value.
I found the cause of this one. In line 9597, 20% is added as well as adding +20% to the text for the screen. However it looks like the city itself will not actually provide this bonus and it is only provided to the GUI. This assert spotted a potentially serious bug.

However I will not do anything about it. The bonus is provided by a tech and the broken code is completely rewritten in CivEffects. Most likely that rewrite has fixed the problem.

However this issue made me think about the issue, or rather that type of issue. I wonder if it would be more clever to write a function like this to return the modifier and optionally not generate the string. If we do it like that, we can call this function to display the text like right now. However it can also be called in a non-text mode and then be used to calculate the production modifier, which is then cached. That way we only have one function to calculate the modifier and what you see on the screen is what you get. It will no longer be possible to write a bonus onscreen, which you will not actually gain.

This isn't something I will start coding right away (at least I don't think so right now) as it likely isn't a 5 minute task to finish. Also it is heavily affected by CivEffects. However it's worth remembering as it is a design, which is less likely to cause bugs in the future. The easiest way to avoid "out of sync" type bugs like this is to only have a single function to provide the calculation in question.

Part of the reason why I'm not jumping on this task right away is that it somewhat clashes with my approach with caching CivEffects. It has sacrificed the knowledge of where the bonus comes from in favour of speed. Now I wonder if that is such a good idea. I'm not going to redo the design, but I wonder if I can make some clever approach to a hybrid design where help windows can work this way without changing too much regarding to CivEffects and the rather efficient cache :think:
 
Looking at the screen shot it appears to be working? Ritualistic cost 9 Religion, and Theocracy cost 15, that's 24. It shows you are only producing 15, so your gonna have issues. What was your concern with this exactly?

To upkeep all civics I should be producing 12 fealty and 24 religion, but if you look at the top left corner you see I'm only producing 4 and 15.

As I came from localism, this upkeep was right, but having been forced to change to Theocray, I am not paying extra for this Holy See Decree, I'm upkeeping it with the same resources as before. AND I am spared without any issues or consequences.

I think my nation should have revolted and returned to Monarchy or whatever but it hasn't.:smoke:
 
Top Bottom