Single Player bugs and crashes v38 plus (SVN) - After the 20th of February 2018

If he is now happy with Raxxo's fix then this subject is now dead. And I will not bother with it anymore.

He said, that he likes my change earlier.
Case was already closed, when Thunderbrd posted :p
 
Manufactured resources with no displayed values.

In the file Manufactured_CIV4BonusInfos, found in the Terrain Folder, listed below are the only Tag modifiers found. And only a few of the resources use any of the 4 tags found below. Some have 1 or 2 and a few have 3.

<iAITradeModifier>10</iAITradeModifier>
<iAIObjective>10</iAIObjective>
<iHealth>1</iHealth>
<iHappiness>1</Happines>

I presume that <iYields> tag could also be used to give value to resources found in this file.

This file looks incomplete and I think is the cause for many of the Manufactured resources to have no value listed when in Diplomacy and asking for or receiving Trade offers and considerations.

And here is why when I asked "What do you want for ammunition" the response was a blank/empty response. Which when accepted by me gave me Ammunitions for free And added to my Treasury Gold/turn for that turn.

Code:
<!-- Ammunition -->
  <BonusInfo>
   <Type>BONUS_AMMO</Type>
   <Description>TXT_KEY_BONUS_AMMO</Description>
   <Civilopedia>TXT_KEY_BONUS_AMMO_PEDIA</Civilopedia>
   <BonusClassType>BONUSCLASS_MANUFACTURED</BonusClassType>
   <ArtDefineTag>ART_DEF_BONUS_AMMO</ArtDefineTag>
   <TechReveal>TECH_EXPLOSIVES</TechReveal>
   <TechCityTrade>TECH_EXPLOSIVES</TechCityTrade>
   <iAITradeModifier>10</iAITradeModifier>
   <iPlacementOrder>-1</iPlacementOrder>
  </BonusInfo>

It has the iAITradeModifier which is set at 10%, if I read the modifier as giving a per cent.

So I received a 10% boost from asking "what do you want for Ammo", then accepting the AI's response of "blank response". While things like Squash, since it was brought up, I received a response that the AI wanted x gold, and it was a low amount. Of which I accepted and enriched my empire too.

It is my contention that this file was never fleshed out like the CIV4BonusInfos file was. Thus the lack of a displayed value for most Manufactured bonuses, not only during a transaction but also when viewing the List of all resources that your or the AI empire has to offer as trade.
 
Manufactured resources with no displayed values.

In the file Manufactured_CIV4BonusInfos, found in the Terrain Folder, listed below are the only Tag modifiers found. And only a few of the resources use any of the 4 tags found below. Some have 1 or 2 and a few have 3.

<iAITradeModifier>10</iAITradeModifier>
<iAIObjective>10</iAIObjective>
<iHealth>1</iHealth>
<iHappiness>1</Happines>

I presume that <iYields> tag could also be used to give value to resources found in this file.

This file looks incomplete and I think is the cause for many of the Manufactured resources to have no value listed when in Diplomacy and asking for or receiving Trade offers and considerations.

And here is why when I asked "What do you want for ammunition" the response was a blank/empty response. Which when accepted by me gave me Ammunitions for free And added to my Treasury Gold/turn for that turn.

Code:
<!-- Ammunition -->
  <BonusInfo>
   <Type>BONUS_AMMO</Type>
   <Description>TXT_KEY_BONUS_AMMO</Description>
   <Civilopedia>TXT_KEY_BONUS_AMMO_PEDIA</Civilopedia>
   <BonusClassType>BONUSCLASS_MANUFACTURED</BonusClassType>
   <ArtDefineTag>ART_DEF_BONUS_AMMO</ArtDefineTag>
   <TechReveal>TECH_EXPLOSIVES</TechReveal>
   <TechCityTrade>TECH_EXPLOSIVES</TechCityTrade>
   <iAITradeModifier>10</iAITradeModifier>
   <iPlacementOrder>-1</iPlacementOrder>
  </BonusInfo>

It has the iAITradeModifier which is set at 10%, if I read the modifier as giving a per cent.

So I received a 10% boost from asking "what do you want for Ammo", then accepting the AI's response of "blank response". While things like Squash, since it was brought up, I received a response that the AI wanted x gold, and it was a low amount. Of which I accepted and enriched my empire too.

It is my contention that this file was never fleshed out like the CIV4BonusInfos file was. Thus the lack of a displayed value for most Manufactured bonuses, not only during a transaction but also when viewing the List of all resources that your or the AI empire has to offer as trade.
iAITradeModifier is used 20 times, at its highest is set at 10.
Tag at 0 (same as no tag at all) is internally treated as neutral tag - doesn't adjust anything.
iValue *= std::max(0, (GC.getBonusInfo(eBonus).getAITradeModifier() + 100))/100;
It is one of things, where 0 is neutral value not 100, that is value of 0 doesn't change current value.
+10%: Aluminum/Steel Ingots, Ammunition, Biofuel, Chemicals, Oil Products, Fertilizers, Heavy Water, Nanobots, Nanotubes, Replicators, Microchips, Smart Medicine, Synthetic/Vulcanized Rubber
+7%: Gems
+5%: Ultrafuel
+3%: Dye, Glassware, Pottery

iAIObjective is used 9 times.
Looks like it shouldn't be used for manufactured/trade resources, @Thunderbrd unless it treats city as plot containing resource too.
This is tag used by AI during war.
<iAIObjective> of 0 is used in Trade resource and it shouldn't be like that unlike <iAITradeModifier>

10: Chemicals, Fertilizers, Nanobots, Nanotubes, Replicators, Smart Medicine, Microchips,
8: Heavy Water
5: Ultrafuel

As you can see they were used on modern/future resources more than on earlier resources.
 
Last edited:
I presume that <iYields> tag could also be used to give value to resources found in this file.
Yes but not without the consequence of actually having access to the resource actually provide a +1 of that yield to all cities. We found this a little problematic with balance with a ton of resources using it.
It is my contention that this file was never fleshed out like the CIV4BonusInfos file was. Thus the lack of a displayed value for most Manufactured bonuses, not only during a transaction but also when viewing the List of all resources that your or the AI empire has to offer as trade.
You are probably correct although I'm not sure this was not intentional but if it was intentional, it should've been reworked later as the manufactured resources began to pick up more value in the game. That said, I'm also not sure that there's currently an XML solution possible until I look at the code.

The iAITradeModifier tag is probably pretty useless if it doesn't find any base value to start with. If it operates according to the usual naming conventional standards (I'm not looking at the code here since I'm at work) then it probably adds x% adjustment to the total base trade value, which would be based on what the game can find the resource would provide access to, like units and buildings, and it's yield, happiness, and/or health benefit. I suspect that iAIObjective could be possible to add some base value with BUT it may not do that at all and instead play into being a map resource that makes the resource selectable for the mission event that comes up sometimes saying you want this resource you don't have but some neighboring nation does. Might even create an error to use it.

So I suspect, really, that there is nothing to establish a base AI value weight for a resource without making a unit or building require it or to have it provide a natural yield, happiness or unhappiness benefit. It could therefore be beneficial to add consideration for the building tags that give gold or other benefits for having access to that resource (which is a processing heavy solution - or memory allocating, take your pick) OR establish a relatively memory inexpensive AI weight base tag for bonuses. OR give a base amount by the category or something. IF there is a natural BASE amount of value then the value modifier tag would be useful but it doesn't look like that would be the case based on the code snippet that Rax posted because if there was even a small amount of value (non 0) to start with, a 0 would at least keep that small base value and there would be SOME gold value assigned to it in the trade negotiation, however small.

So we need to figure out how we want to establish some baseline of value, then the modifier may have some use. Could there be a global somewhere that got reset to 0 that was intended to provide a baseline of value for all bonuses?
 
1. My ships regularly (but not every time) get bulk (4-10 that I've noticed) XP from killing a bird.

2a. HNs don't generate any Great General points. For criminals maybe fair enough, but strike teams are a core part of a civ's military and strategy. Cat units likewise.

2b. When HNs (well specifically I've noticed it with Bandit Footpads and Riders) attack (other) barbs, you can't get the odds from alt-mouseover.
 
1. My ships regularly (but not every time) get bulk (4-10 that I've noticed) XP from killing a bird.
Because birds are very good at withdrawing so were very hard to actually kill.

2a. HNs don't generate any Great General points. For criminals maybe fair enough, but strike teams are a core part of a civ's military and strategy. Cat units likewise.
Perhaps somehow the hidden nationality factor is playing a role somewhere unexpectedly. It's something to look into.

2b. When HNs (well specifically I've noticed it with Bandit Footpads and Riders) attack (other) barbs, you can't get the odds from alt-mouseover.
They shouldn't be able to attack barbarians since they are supposed to be friends with them (well, Ruffian units are anyhow, so Bandits.) If they are able to do battle with them at all then there is a bug.
 
Because birds are very good at withdrawing so were very hard to actually kill.
That must be it, but something's not right, since I can't remember a bird withdrawing from a ship, whereas they have from my much more specialized hunters/rangers on land.

They shouldn't be able to attack barbarians since they are supposed to be friends with them (well, Ruffian units are anyhow, so Bandits.) If they are able to do battle with them at all then there is a bug.
Yes I lost two Bandit Riders to barbs when I wasn't given any odds beforehand.

Perhaps somehow the hidden nationality factor is playing a role somewhere unexpectedly. It's something to look into.
On reflection they have been stealth attacking (attacking without negating invisibility), so maybe that's why they weren't registering.
 
Last edited:
That must be it, but something's not right, since I can't remember a bird withdrawing from a ship, whereas they have from my much more specialized hunters/rangers on land.
I admit I've made similar observations and have wondered about that. It may well be something to look into.

Yes I lost two Bandit Riders to barbs when I wasn't given any odds beforehand.
hmm... Ruffians shouldn't be able to fight barbs at all. I'll have to do some testing on that.
On reflection they have been stealth attacking (attacking without negating invisibility), so maybe that's why they weren't registering.
A possibility also. Obviously something isn't firing quite right somewhere there.
 
SVN 10285

If beacon built on Great Reef Barrier has been destroyed by volcano eruption it cannot be rebuilt by Prehistoric Workboat (the same that built it earlier).
 
1. I saw that @Toffer90 made a fix to the "Lost At Sea" event. Was that to make it so that the ship on the storm/reef tile is lost instead of some random other one? If not, I'm fairly sure that is still happening.

2. "Add tale to cultural heritage" gives me 24:culture: 48:science: when I have a Library. However many cities before they had libraries (and in my capital which still doesn't) I get 48:culture: 40:science:

3. I had a turn happen on February 30th. All the excuses I was making for days in the turn dates are gone now. Can you please remove them. Did you know that the religion screen shows the day the religion was founded, but not the year?! City foundation in the domestic advisor is the same.
 
1. I saw that @Toffer90 made a fix to the "Lost At Sea" event. Was that to make it so that the ship on the storm/reef tile is lost instead of some random other one? If not, I'm fairly sure that is still happening.
Its related to that problem, but I don't know if the change I made fixes it. It's just a small shot in the blind that can't hurt, but might fix the problem or might not do anything one way or another.
 
3. I had a turn happen on February 30th. All the excuses I was making for days in the turn dates are gone now. Can you please remove them.
:lol:

All months have 30 days.
Days in turn dates are only here to fit calendar to tech count in era.

It would be possible to not display month name if step is longer than 24 months, and day if step is longer than 60 days for example.
 
:lol:

All months have 30 days.
Days in turn dates are only here to fit calendar to tech count in era.

It would be possible to not display month name if step is longer than 24 months, and day if step is longer than 60 days for example.
Until it becomes necessary to keep track of time in something greater in resolution than simply 'years', it is good to keep things to at least a yearlong increment for as long as possible. The only reason that months (and days) are even possible is because once you started getting into turn lengths that take less than a year, it's necessary to have them. But until then, (which classically is about modern era in Vanilla) we shouldn't need to break any rounds up into increments less than a year should we? The game engine makes some basic assumptions that you won't be doing that at first.

This came up recently in a Let's play I was watching and is being found to be a nuissance that months are being displayed before it is necessary. I'm not sure I understand the argument that somehow this is needed before we start having turn times less than a year.
 
Until it becomes necessary to keep track of time in something greater in resolution than simply 'years', it is good to keep things to at least a yearlong increment for as long as possible. The only reason that months (and days) are even possible is because once you started getting into turn lengths that take less than a year, it's necessary to have them. But until then, (which classically is about modern era in Vanilla) we shouldn't need to break any rounds up into increments less than a year should we? The game engine makes some basic assumptions that you won't be doing that at first.

This came up recently in a Let's play I was watching and is being found to be a nuissance that months are being displayed before it is necessary. I'm not sure I understand the argument that somehow this is needed before we start having turn times less than a year.
As I said before it would be very hard to reduce use of month and day step usages.
I would need like up to 10 steps for each era to minimize use of month/day increments depending on game speeds, and then still last turn before date target would be day length step to round it.

Of course you could multiply turns by 1.3x and then have all eras last same amount of turns, then step would be simply real world duration of era / multiple of hundred turns depending on game speed, but research speed would be 2x faster in shortest eras compared to ones with most techs.

Eras last certain amount on turns depending on amount of all techs in it and before it, and on minimum amount of techs from beginning, that you need to reach end of certain era.
 
Last edited:
We should imo just remove dates all together.
Each option ticked or unticked have an effect on the correctness of the dates displayed through a game, difficulty choice affect it perhaps the most (especially in conjugation with tech diffusion).

Any and all reference to dates in the game should imo be confined to pedia entries only.
 
Each option ticked or unticked have an effect on the correctness of the dates displayed through a game, difficulty choice affect it perhaps the most (especially in conjugation with tech diffusion).

I'm hopeful one day it will be possible to make technologies (or columns) the concrete markers that move the calendar forward. Example: your most advanced tech is Steam Power which is at x=62, that means the calendar will display the year 1750 or something.
 
I'm hopeful one day it will be possible to make technologies (or columns) the concrete markers that move the calendar forward. Example: your most advanced tech is Steam Power which is at x=62, that means the calendar will display the year 1750 or something.
Why would we want that, what's the point.
Yeah yeah, I know the answer, it adds flavour or some BS like that, like decorating a house with flowers or something.
I think it destroys the immersion by making it impossible to sculpt out an alternate history on a random planet that is somehow inhabited by human beings.
It makes the game more rigid by conforming it to history.
The current date system is imo better than what you proposed; just my ten cents.
 
The current calendar system is designed that way though, the calendar that so many (if I recall correctly: lsd612, Joseph, you and raxo) have so painstakingly tweaked so that it more or less conforms to the eras a player is in.
 
Top Bottom