Single Player bugs and crashes v37 plus (SVN) - After the 24th of December 2016

Unsure if it is reported yet, but with the changes to LE/Medic/education units i cannot add more than 1 experience level in their primary upgrade, regardless of if i am in "current" era of the unit. I did not start this game with the current SVN so i am unsure if it is just a bug from changing svn or not.
(quoted here as this is the bug place)
I have noticed something similar after updating the SVN. From what I've noticed, watchmen were tagged as ancient while enforcers were tagged as prehistoric (might be wrong).
flabbert, what LE units are you looking at? What tags do they have?

After starting a new game, I've noticed that the AI seem to have a huge production advantage. My usual tactic involved rushing LL meadowcroft rockshelter world-wonder. 8 turns into the game (epic speed), the AI has already completed it and 2 other wonders. Needless to say, this seem to be quite extreme as It's the only wonder I can ever grab on diety-nightmare.
The speed of construction seem extremely slow, taking 8 turns to build a single tracker (diety-nightmare, normal speed)

Noticed a similar symptom to SO pics with some animal (accidently didn't check which) and enforcers.
 
(quoted here as this is the bug place)
I have noticed something similar after updating the SVN. From what I've noticed, watchmen were tagged as ancient while enforcers were tagged as prehistoric (might be wrong).
flabbert, what LE units are you looking at? What tags do they have?

After starting a new game, I've noticed that the AI seem to have a huge production advantage. My usual tactic involved rushing LL meadowcroft rockshelter world-wonder. 8 turns into the game (epic speed), the AI has already completed it and 2 other wonders. Needless to say, this seem to be quite extreme as It's the only wonder I can ever grab on diety-nightmare.
The speed of construction seem extremely slow, taking 8 turns to build a single tracker (diety-nightmare, normal speed)

Noticed a similar symptom to SO pics with some animal (accidently didn't check which) and enforcers.

I reported production cost math being bit broken earlier.
Hes going to fix it.
From SVN thread said:
EDIT: Some calculations were awry for a couple of reasons. I've fixed them and am compiling new dlls for that. However, Whisperr is trying to commit and the internet has decided it's time to go very slow as she's trying to upload huge FPKs. If service doesn't flicker on her we should be able to get these in soon but otherwise I have a feeling we'll have to go to bed and see if it worked in the morning. THEN I can commit my fixes on my end.
 
I reported two other (minor) bugs too, when I reported bug in calculations.
Spoiler :

Some textures failed to load according to resmgr log:
RESMGR: Texture Wheat_farm_base.dds failed to load
RESMGR: Texture shrine_Water_GLOSS.dds failed to load
RESMGR: Texture shrine_Water_GLOSS.dds failed to load
RESMGR: Texture Art/Interface/MainScreen/CityScreen/slave_sanitation.dds failed to load
RESMGR: Texture Art/Interface/MainScreen/CityScreen/slave_crime_prevention.dds failed to load
RESMGR: ---- Unloading ----

That bug is here for long time though.

Might promotion doesn't have ingame text.
There is placeholder txt_key_....
Spoiler :

qiH0uWW.jpg

Don't know how to address the first one. Maybe @Toffer90 can help there.

Just corrected the 2nd and will commit that soon.
 
In case you forgot, it was about negative exp modifiers from combat class.
I'd found it last night. I have a feeling it'll work like a charm! Thanks again!
 
Rax reminds me of a bug I encountered.
I didn't test it properly, as I thought that it's likely due to the dll update. It might be an actual bug, though, and not simply on my end.
After the change to might promotions, the units who had it lost the promotion (kept the strength, though). On upgrade, they lost the additional strength the might used to give them.
In addition, I couldn't pick it anymore.
Game in progress during a strange change like this. Sorry for hickups. Can units still earn the Might promo normally and it's just this odd dude having trouble?
 
after FPK update, i see this: ,, more coming / / / / the inquisitor's icon is missing not the art . .
Leave those reports right where they are and when Whisperr wakes up later we'll sort out what happened there and how to fix it.
 
From what I've noticed, watchmen were tagged as ancient while enforcers were tagged as prehistoric (might be wrong).
flabbert, what LE units are you looking at? What tags do they have?
The unit gets the era unitcombat from the era it is trained in, not its own property. Maybe I should change it so that it's reading the era from it's primary tech prereq.
 
Hello
At the preliminary I would like to apologize for my English is not too good I use the translator.

There are a few bugs in the game that I wanted to share and I noticed within minutes of starting testing.

Since SVN version 9885 the pictures have disappeared that show up in the window as discovering the miracle of nature, or when you build a world/national miracle In addition, some units have a problem with textures on the map instead of the unit appears pink spot.

A total of more bugs at this point have not been noticed during testing.
 
It seems like global production cost modifier of 0.8x and prehistoric era iconstruct modifier of 0.7x aren't here.
Saddler cost tag <iCost>98</iCost> multiplied by these two modifiers 98*0.8*0.7 should give cost of 55 :hammers: on Normal/Noble combination, as this speed/difficulty are normalized.

Normal/Settler - 127.
Normal/Noble - 166. (almost as if Saddler cost was DIVIDED by global cost modifier and era cost modifier - 175).
Normal/Deity - 215.
Eternity/Settler - 1050.
Eternity/Noble - 1373.
Eternity/Deity - 1777.

Normal->Eternity proportion is correct with ~8.25x
Settler seems to have ~0.765x cost of Noble (iconstruct for Settler is 0.6x).
Deity seems to have ~1.30x cost of Noble (iconstruct for Deity is 1.5x)
This means numbers are consistent with each other.
Just effect of global production modifier and era construct modifier seems to be inverted.

Spoiler :
xSSOcpO.jpg
7EXajCe.jpg

Xg86yLM.jpg

QaOZ0Bk.jpg

wG0U0sK.jpg

N8z17eQ.jpg


----
There are 3 buildings with misapplied star icon - Virotherapy clinic, Civilized Jewelers and Dali Treater&Museum WW.
 
Last edited:
It seems like global production cost modifier of 0.8x and prehistoric era iconstruct modifier of 0.7x aren't here.
Saddler cost tag <iCost>98</iCost> multiplied by these two modifiers 98*0.8*0.7 should give cost of 55 :hammers: on Normal/Noble combination, as this speed/difficulty are normalized.

Normal/Settler - 127.
Normal/Noble - 166. (almost as if Saddler cost was DIVIDED by global cost modifier and era cost modifier - 175).
Normal/Deity - 215.
Eternity/Settler - 1050.
Eternity/Noble - 1373.
Eternity/Deity - 1777.
The math isn't quite as simple as you might expect. Not saying it's GOT to be perfect. I think you might be missing a variable and you're probably calculating it slightly incorrectly. The function, for buildings is this:
Code:
   int iProductionNeeded;

   iProductionNeeded = GC.getBuildingInfo(eBuilding).getProductionCost();

   iProductionNeeded *= GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getConstructPercent();
   iProductionNeeded /= 100;

   int iModifier = (GC.getHandicapInfo(getHandicapType()).getConstructPercent() - 100);
   iModifier += GC.getDefineINT("BUILDING_PRODUCTION_PERCENT") - 100;
   iModifier += (GC.getEraInfo(getCurrentEra()).getConstructPercent() - 100);
   iModifier += 100;

    if (iModifier < 0)
    {
        iModifier = (-1 * iModifier + 100);
        iProductionNeeded = iProductionNeeded * 100 / iModifier;
    }
    else if (iModifier > 0)
    {
        iProductionNeeded *= 100 + iModifier;
        iProductionNeeded /= 100;
    }

   if (!isHuman() && !isNPC())
   {
       if (isWorldWonderClass((BuildingClassTypes)(GC.getBuildingInfo(eBuilding).getBuildingClassType())))
       {
           iProductionNeeded *= GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAIWorldConstructPercent();
           iProductionNeeded /= 100;
       }
       else
       {
           iProductionNeeded *= GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAIConstructPercent();
           iProductionNeeded /= 100;
       }

       iProductionNeeded *= std::max(0, ((GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAIPerEraModifier() * getCurrentEra()) + 100));
       iProductionNeeded /= 100;
   }


   return std::max(1, iProductionNeeded);
Since I've gotta fix something else here along the way, @Toffer90 could you do me the honor of checking my work here if you have a moment?
 
The math isn't quite as simple as you might expect. Not saying it's GOT to be perfect. I think you might be missing a variable and you're probably calculating it slightly incorrectly. The function, for buildings is this:
Code:
   int iProductionNeeded;

   iProductionNeeded = GC.getBuildingInfo(eBuilding).getProductionCost();

   iProductionNeeded *= GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getConstructPercent();
   iProductionNeeded /= 100;

   int iModifier = (GC.getHandicapInfo(getHandicapType()).getConstructPercent() - 100);
   iModifier += GC.getDefineINT("BUILDING_PRODUCTION_PERCENT") - 100;
   iModifier += (GC.getEraInfo(getCurrentEra()).getConstructPercent() - 100);
   iModifier += 100;

    if (iModifier < 0)
    {
        iModifier = (-1 * iModifier + 100);
        iProductionNeeded = iProductionNeeded * 100 / iModifier;
    }
    else if (iModifier > 0)
    {
        iProductionNeeded *= 100 + iModifier;
        iProductionNeeded /= 100;
    }

   if (!isHuman() && !isNPC())
   {
       if (isWorldWonderClass((BuildingClassTypes)(GC.getBuildingInfo(eBuilding).getBuildingClassType())))
       {
           iProductionNeeded *= GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAIWorldConstructPercent();
           iProductionNeeded /= 100;
       }
       else
       {
           iProductionNeeded *= GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAIConstructPercent();
           iProductionNeeded /= 100;
       }

       iProductionNeeded *= std::max(0, ((GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAIPerEraModifier() * getCurrentEra()) + 100));
       iProductionNeeded /= 100;
   }


   return std::max(1, iProductionNeeded);
Since I've gotta fix something else here along the way, @Toffer90 could you do me the honor of checking my work here if you have a moment?
So it is intentional, that even with lowest settings and boost from global production modifier (less than 80%) with prehistoric era (70%) final cost is higher than defined in XML?
These numbers I listed along with speed/difficulty were from game.
In second line of my previous post I assumed, that global production and era info cost are applied before anything else.

Edit: I had global modifier overridden by Toffers interface overhaul :p
<DefineName>BUILDING_PRODUCTION_PERCENT</DefineName>
<iDefineIntVal>100</iDefineIntVal> (should be 80 as defined in mod)
So these numbers are higher than should be.

These numbers are from game with correct global production modifier.
Normal/Settler - 107.
Normal/Noble - 147.
Normal/Deity - 196.
Eternity/Settler - 888.
Eternity/Noble - 1212.
Eternity/Deity - 1616
https://imgur.com/a/B7sxQ.

I'm just surprised, that despite four production cost modifiers being <=100 (BuildingProduction 80%, Normal being 100%, Prehistoric being 70% and Settler being 60%) final cost of saddler (107) is higher than defined cost of it (92).
What about Team Projects "iCreatePercent = How fast projects are built. Normal is 100"
They should get similar treatment.
 
Last edited:
P.S. I respect the urge and enthusiasm of the modders to get v38 out of the door as soon as it is ready, but I think that a freeze period of at least 3 trouble-free days should be the absolute minimum. New bugs are sometimes introduced during modding, happens all the time, but it would be a shame after all the hard work you guys put in, to bring out a release version that was accidentally broken right after the last commit.
 
Last edited:
Game in progress during a strange change like this. Sorry for hickups. Can units still earn the Might promo normally and it's just this odd dude having trouble?
I assumed it was a bug due to updating the game, but reported in case other people noticed it. Wanted to start a new game to see if it happens before the release, but haven't got to that point so far.
The bug itself didn't affect my game much, so I don't mind it much.

The unit gets the era unitcombat from the era it is trained in, not its own property. Maybe I should change it so that it's reading the era from it's primary tech prereq.
I think it's contrary to what we were talking about? The idea is that if we upgrade the unit, we get a new promotion tier we can take. In addition, it doesn't solve the problem of creating old units- they will be tagged as "new" units, allowing them to take full advantage of promotions.
The change mentioned should be welcome.


I'll attempt to help debugging, so some are questions about the design as I'm not sure if what is written and what is intended is in line
int iModifier = (GC.getHandicapInfo(getHandicapType()).getConstructPercent() - 100);
iModifier += GC.getDefineINT("BUILDING_PRODUCTION_PERCENT") - 100;
iModifier += (GC.getEraInfo(getCurrentEra()).getConstructPercent() - 100);
iModifier += 100;
Handicap, define and era will return an integer, indicating the production %.
Meaning, if I had a +10% production from handicap, it'll return 90, and imodifier on the first line will hold -10%.
I'm not sure I see the intention with this kind of indirect math, so I'll be happy for a bit more information (assuming toffer won't come to save the day by the time you answer).


else if (iModifier > 0)
{ iProductionNeeded *= 100 + iModifier;
iProductionNeeded /= 100; }
This seems incredibly strange.
Assuming we have unmodified construction, at the end of the previous quote we expect imodifier to stand on 100. (each one of the gets returns 100, indicating it causes no change).
We now add 100+modifier, effectively doubling the production needed.
I'd expect either the "100 +" from this quote, or alternatively the last line in the previous quote, not to be there.

iProductionNeeded *= std::max(0, ((GC.getHandicapInfo(GC.getGameINLINE().getHandicapType()).getAIPerEraModifier() * getCurrentEra()) + 100));
This line seems inconsistent with the previous ones, I'd expect it to be max(0,((....Era()))-100))
Is it intentional?
 
We know the issue about the units. Missed packing one or two of the FPKs here. The Inquisitor button is another matter but we can easily fix that on the next commit. I'm adjusting the era bit for promos somewhat.

I agree though that we should probably put off release for a few days just to make sure all wrinkles are ironed out.
 
This seems incredibly strange.
Assuming we have unmodified construction, at the end of the previous quote we expect imodifier to stand on 100. (each one of the gets returns 100, indicating it causes no change).
We now add 100+modifier, effectively doubling the production needed.
I'd expect either the "100 +" from this quote, or alternatively the last line in the previous quote, not to be there.
I think you may be right that the fly in the ointment still is adding an extra 100 here. This was brought in as a solution from elsewhere and may have applied there but doesn't here.

This line seems inconsistent with the previous ones, I'd expect it to be max(0,((....Era()))-100))
Is it intentional?
Yes. It's an original bit of the process that I left as an aftereffect modifier.
Handicap, define and era will return an integer, indicating the production %.
Meaning, if I had a +10% production from handicap, it'll return 90, and imodifier on the first line will hold -10%.
I'm not sure I see the intention with this kind of indirect math, so I'll be happy for a bit more information (assuming toffer won't come to save the day by the time you answer).
These tags are meant to hold a default of 100.
 
Also, units have become a lot more expensive compared to buildings. 152 hammers for a wanderer, 381 hammers for a tracker, while stone tools workshop is only 100 and LL monte verde is 200. Is this WAD or bug?
(nightmare/large map/snail speed/svn 9887)
 
Back
Top Bottom