Common Errors and/or Crashes Section

Status
Not open for further replies.
Edit - the reason the granary is not being replaced is because it is not a 'real building' in the city. It's a free building given by the strategic grain reserve. The code doesn't cope with free buildings being replaced. I can fix this, but if I do it in the naive way (and doing it to avoid this will be quite hard) the consequence will be that it's gone for good in that city (so even if the modern granary got destroyed, the old style granary wouldn't magically re-appear just because you had a wonder that provides it for free). Only the city changing hands would cause re-evaluation of all the free stuff. This **MAY** be ok (it sorta makes sense in a real world model manner, since one imagines the old granary was bulldozed when the new one was built). However, its something I'd like feedback on. Making it work so that the free building gets replaced, yet still re-appears if the replacement gets destroyed is obviously also possible, but it's much harder to do.

For now I'm going to go ahead with my recommendation to make all the numbers multiplicative anyway, which reduces the significance of the granary stacking with modern granary, so we can defer changes for free building replacement (which way we decide to do it) until later.

Although more strict, I would suggest making the buildings a one shot deal. When you build a Wonder that grants a free building, it builds it in all of your current cities, and then it's done. Future cities built don't get it. Conquered cities built don't get it. If you sell it, upgrade, it's sabotaged, or in any other way you lose it, then you just have to build it again (or it's replacement). To me this seems a bit more realistic and at the same time, maybe it will take some overhead off the AI for having to monitor all the cities all the time.


Does this happen with all the different free buildings? The Egypt Myth one that provides free scribe building, the national Library Service that gives free libraries and so on.

There is a bunch of these that are designed to give you basic infrastructure in any new city you build by having gone to the expense of building the wonder or national wonder in the first place.

My thinking as well. And from what Koshling described, I would have to assume it applies to any and all free buildings granted from Wonders. So the fix is going to require some fixing by Koshling by how that works, not just changing of the particulars of Food Storing Buildings.
 
I updated the SVN again. Apprently my math was wrong for the Launch Arcology and Colony Arcology. I had to up them to 3% and 40% because the total % of all the other housing building right below it added up to 30%. Thus having them at 20% and 25% would be a loss.

This then moved the max you can have too ...

20% + 40% + 5% + 20% = 85% Which is higher than I had before (70%) but way lower that we had before that (110%).

85% is still too high. But I can't come up with any solution.
Just ideas.

1. reduce food-storing buildings (taking food storing function out from housing building line and other buildings but granary line)
2. make buildings store food as defined quantity (like 10:food:, 20:food:), not as percentage.
3. adding very high (enough to make players hesitate to build it) maintenance cost to food-storing buildings.

Personally, I don't understand why maintenance cost was not added to these buildings.
Storing requires maintenance!
 
85% is still too high. But I can't come up with any solution.
Just ideas.

1. reduce food-storing buildings (taking food storing function out from housing building line and other buildings but granary line)
2. make buildings store food as defined quantity (like 10:food:, 20:food:), not as percentage.
3. adding very high (enough to make players hesitate to build it) maintenance cost to food-storing buildings.

Personally, I don't understand why maintenance cost was not added to these buildings.
Storing requires maintenance!

Please do not make XML adjustments yet. The change to multiplicative behavior is done and under test. It will resolve most of these issues perfectly adequately for now.
 
Ok, I am up and dressed now so I can reply more fully!

Let me explain what I mean by addative vs multiplicative, since it hasn't really come across properly I don't think.

Take a simple (but obviously extreme, though pertinent) example - suppose there are two buildings that both reduce food required to grow by 50%. Suppose the base growth requirement is 100 food stored.

Addative: 50%+50% = 100% - food required to grow = 0. Growth every turn.

Multiplicative: First 50% reduces requirement to 50 (50% of 100). Second 50% reduces it to 25 (50% of what it was after the first 50% was applied).

In the second method it doesn't matter how many reductions you apply, you can never reach 0 (well, with integer rounding you can eventually but not in any practical sense). From a design perspective this means you can design buildings without worrying overly much about totals that may be available in extreme cases of other building combinations. Similarly for civics.

I plan to apply this for food-required-to-grow and for percentage-food-stored. It **MAY** be appropriate for some other quantities too, but IMO it is NOT appropriate for all percentage modifiers. The key distinguishing criteria would be modifiers where negative ones are common and the underlying modified value must not go to 0 (or go negative).

Things I would definately NOT apply it to:

1) Research bonuses - these are overwhlemingly positive, and if we allowed them to stack multiplicatively we'd have research exponentially sky-rocketing too easily. There are hardly any negatives out there anyway and they are easily counterbalanced, so it's not causing any problems

2) Maintenance - same reasoning as research in that costs would baloon. On the other hand there ARE lots of negatives, but in this case going to 0 doesn't matter (and we just cap it to prevent it beging negative)

I hope this clarifies things.
 
Ok, I am up and dressed now so I can reply more fully!

Let me explain what I mean by addative vs multiplicative, since it hasn't really come across properly I don't think.

Take a simple (but obviously extreme, though pertinent) example - suppose there are two buildings that both reduce food required to grow by 50%. Suppose the base growth requirement is 100 food stored.

Addative: 50%+50% = 100% - food required to grow = 0. Growth every turn.

Multiplicative: First 50% reduces requirement to 50 (50% of 100). Second 50% reduces it to 25 (50% of what it was after the first 50% was applied).

In the second method it doesn't matter how many reductions you apply, you can never reach 0 (well, with integer rounding you can eventually but not in any practical sense). From a design perspective this means you can design buildings without worrying overly much about totals that may be available in extreme cases of other building combinations. Similarly for civics.

I plan to apply this for food-required-to-grow and for percentage-food-stored. It **MAY** be appropriate for some other quantities too, but IMO it is NOT appropriate for all percentage modifiers. The key distinguishing criteria would be modifiers where negative ones are common and the underlying modified value must not go to 0 (or go negative).

Things I would definately NOT apply it to:

1) Research bonuses - these are overwhlemingly positive, and if we allowed them to stack multiplicatively we'd have research exponentially sky-rocketing too easily. There are hardly any negatives out there anyway and they are easily counterbalanced, so it's not causing any problems

2) Maintenance - same reasoning as research in that costs would baloon. On the other hand there ARE lots of negatives, but in this case going to 0 doesn't matter (and we just cap it to prevent it beging negative)

I hope this clarifies things.

Wait so what's the difference between "Extra Food Stored" and "Less Food to Grow"? Seems like "Less Food to Grow" is already doing what your saying. Which is a separate property you can give a building.
 
Wait so what's the difference between "Extra Food Stored" and "Less Food to Grow"? Seems like "Less Food to Grow" is already doing what your saying. Which is a separate property you can give a building.

They are quite separate. One governs how much food must be reached to trigger growth, the other how much of that is left AFTER growth. Both will be changing to use multiplicative valuation (though I'll likely only get the food-stored-after-growth modifiers pushed to SVN today)

Edit - To be clear - BOTH use the addative method currently, and BOTH (quite independently) screw up badly as that approaches 100%
 
Next turn CTD:

Fix to the crash pushed to SVN.

Also pushed the change to food stored to be multiplicative instead of addative (which seems to have good results with all the old XML values - no real need to change anything, at least not as an urgent knee-jerk reaction). My personal opinion is that most of the XML changes to change food storge that have been made in the last 24 hours or so should be reversed.

NOTE - I have NOT had as much time to test these changes as I wanted (and I'm timed out for today), so there is a use-at-own-risk health warning on this push until I get back to it. However, I felt the fix to the crash outweighed possible imperfections in the food storage chnages which is why I went ahead with it.

I have NOT yet pushed the change to make food-required-for-growth multipliers also behave multiplicatively, but I plan to do so when I get time.

Note - these changes will tend to slow growth, especially of large cities, somewhat (compared to how it was before)
 
Ok, I am up and dressed now so I can reply more fully!

Let me explain what I mean by addative vs multiplicative, since it hasn't really come across properly I don't think.

Take a simple (but obviously extreme, though pertinent) example - suppose there are two buildings that both reduce food required to grow by 50%. Suppose the base growth requirement is 100 food stored.

Addative: 50%+50% = 100% - food required to grow = 0. Growth every turn.

Multiplicative: First 50% reduces requirement to 50 (50% of 100). Second 50% reduces it to 25 (50% of what it was after the first 50% was applied).

In the second method it doesn't matter how many reductions you apply, you can never reach 0 (well, with integer rounding you can eventually but not in any practical sense). From a design perspective this means you can design buildings without worrying overly much about totals that may be available in extreme cases of other building combinations. Similarly for civics.

Makes sense. If this becomes a permanent change, it will probably need to be written in the Sevopedia somewhere. Maybe in the Food Storage buildings.

A solution is still needed for the handling of Free buildings via Wonder though. Granary should not exist when Modern Granary is built; and so on for the other freebies.

Things I would definately NOT apply it to:

1) Research bonuses - these are overwhlemingly positive, and if we allowed them to stack multiplicatively we'd have research exponentially sky-rocketing too easily. There are hardly any negatives out there anyway and they are easily counterbalanced, so it's not causing any problems

2) Maintenance - same reasoning as research in that costs would baloon. On the other hand there ARE lots of negatives, but in this case going to 0 doesn't matter (and we just cap it to prevent it beging negative)

I hope this clarifies things.

I agree. It's a different concept. Food you're dealing with storage of a physical item; research and maintenance is currency. So by that token, likely any % gold or commerce modifiers won't change either. Nor Culture.

How difficult would it be to create a Maximum Population value for Buildings? We have a setting for Minimum Pop required, but what about Max? So once a city gets to a certain size or larger, the Building stops working.

An example would be something like a Town Well. It works great for a small town, but once that town becomes a big city, that puny well isn't going to do much.
 
I'm getting a repeatable crash whenever I attack something with a great commander standing nearby. If I delete the great commander I can attack with no problem.
SVN 516.
 
I'm getting a repeatable crash whenever I attack something with a great commander standing nearby. If I delete the great commander I can attack with no problem.
SVN 516.

That's the fix I just pushed, like 10 mins ago. Just update the DLL
 

Yep

Edit - To be clear - BOTH use the addative method currently, and BOTH (quite independently) screw up badly as that approaches 100%

For both, I vote for the multiplicative method!

There is a known issue with V16 whereby the AI incorrectly evaluates Anarchism and never switches out of it, thus locking itself down to 3 cities. This is easily rectified with a one line change in the XML.

Thanks! I just switched to the SVN version now. Besides, having a look how I enjoy multiplicative food stored after growth. ;)
 
Hello guys! First I want to thank you for this great mod, it's amazing! Now, I'm playing version 16 and I got a CTD in the turn 669 (aprox), I was trying to attach the savegame ( I saved it in max compatibility) but I don't know how :confused:! Can anyone please tell me what should I do or tell me where to look? Thanks.
P.S.: Sorry for any mistakes or misspell, english isn't my mother language.
 
Hello guys! First I want to thank you for this great mod, it's amazing! Now, I'm playing version 16 and I got a CTD in the turn 669 (aprox), I was trying to attach the savegame ( I saved it in max compatibility) but I don't know how :confused:! Can anyone please tell me what should I do or tell me where to look? Thanks.
P.S.: Sorry for any mistakes or misspell, english isn't my mother language.

Use the attach feature of the 'Reply to Thread' here. It's the thing that looks like a paperclip
 
Oh! :lol: Thanks Koshling! Well this is my savegame like I said I got a CTD when I finish my turn, I am in turn 669 approximately. I tried reloading it several times, and tried loading a couple of earlier savegames but it doesn't seem to work.
 

Attachments

Oh! :lol: Thanks Koshling! Well this is my savegame like I said I got a CTD when I finish my turn, I am in turn 669 approximately. I tried reloading it several times, and tried loading a couple of earlier savegames but it doesn't seem to work.

Are you running V16 or latest SVN?
 
Hello guys! First I want to thank you for this great mod, it's amazing! Now, I'm playing version 16 and I got a CTD in the turn 669 (approx), I was trying to attach the savegame ( I saved it in max compatibility) but I don't know how :confused:! Can anyone please tell me what should I do or tell me where to look? Thanks.
P.S.: Sorry for any mistakes or misspell, English isn't my mother language.

btw Welcome to CFC, and for trying this Great mod:)
 
They are quite separate. One governs how much food must be reached to trigger growth, the other how much of that is left AFTER growth. Both will be changing to use multiplicative valuation (though I'll likely only get the food-stored-after-growth modifiers pushed to SVN today)

Edit - To be clear - BOTH use the addative method currently, and BOTH (quite independently) screw up badly as that approaches 100%

Sorry if I am still confused, but math was never my strong point. Lets say you have a 100 food points. With nothing you have +0. Then you add a Granary (30%) and it goes up to +30 food right? If you add and Ice House (10%) won't that be 10% of 30 which is 3% making only 3 food? Thus why would you ever want add more food storage buildings i you could get 30 bonus food wit just a granary but only 3 bonus food with a granary plus an Ice House?

Or am I completely wrong and it works another way? :crazyeye:

1) Research bonuses - these are overwhlemingly positive, and if we allowed them to stack multiplicatively we'd have research exponentially sky-rocketing too easily. There are hardly any negatives out there anyway and they are easily counterbalanced, so it's not causing any problems

I would say that science is hard enough to keep up with. With lots more techs and ever increasing costs for techs having more science than say a RoM/AND game is a must or you will never get anywhere on the tech tree. In short more techs mean you need more ways to get science and so far in my games with the buildings and civics they are not bad to keep you going.
 
Status
Not open for further replies.
Back
Top Bottom