"PeaceTurns" variable possibly resetting on load/reload/restart — Awakened Urges Galactic Challenge Related

ame Version: 2.31 

Issue:  PeaceTurns variable (which is the prerequisite for Galactic Challenge Awakened Urges) apparently resetting on reload/relaunch

*dusts off old account*

Been a while since I posted here as I took some time off from 4x gaming, but with GC4 on Steam and in a pretty feature rich state I recently decided to re-take the plunge for a while.

While doing some investigating on why it was so hard to unlock the Galactic Challenge Awakened Urges (and by extension the Breeding Season achievement), I ran into something strange.  After I successfully managed to finally unlock the Challenge (more on this below), I made a save for future reference and then went on to do some more testing to try to isolate what was causing it not to appear in my other playthroughs.

I thought I had found the culprit and made a few more saves and started some fresh games to test out my theories.  I was about to report my findings in the Feedback Forum when I decided to reload some of my old saves as part of last minute checking.  To my surprise, Awakened Urges was no longer available on my Challenge list, despite it being there before:

Before loading exact same save:

After loading exact same save:

I then decided to load up several other saves I had made during my second and third rounds of testing and discovered that not only did none of them successfully have Awakened Urges unlocked, my near-term setups (saves made a few turns away from unlock) also were no longer good.

After eliminating several avenues, I have come to the conclusion that the culprit likely is the variable PeaceTurns as I strongly suspect that is being reset on any save game reload or restart of the game. 

For those who don't know, to qualify for Awakened Urges, the player needs to be "at peace" for fifty turns.  This is tracked by PeaceTurns, which is defined in PrerequisiteDefs.xsd:

      <xs:element name="PeaceTurns" type="xs:int" minOccurs="0" default="0"/>

 as seen at the end of the following code block:

  <GameEvent>
    <InternalName>Quest_GA_BreedingSeason</InternalName>
    <DisplayName>Quest_GA_BreedingSeason_Name</DisplayName>
    <Description>Quest_GA_BreedingSeason_Dec</Description>
    <BackgroundImage>event_colony_3.png</BackgroundImage>
    <Type>CrisisEvent</Type>
    <ShowImmediately>true</ShowImmediately>
    <Weight>0</Weight>
    <Choice>
      <InternalName>Quest_GA_BreedingSeason_choice_0</InternalName>
      <Description>Quest_GA_BreedingSeason_Liberty_Bonus_Name</Description>
      <BonusDescription>Quest_GA_BreedingSeason_Liberty_Bonus_Dec</BonusDescription>
      <Trigger>
        <OnEvent>OnEventChoice</OnEvent>
        <Target>
          <TargetType>Faction</TargetType>
        </Target>
        <PerformAction>
          <Action>BeginTrackingQuest</Action>
          <StringParam>Display_Quest_GA_BreedingSeason0</StringParam>
        </PerformAction>
      </Trigger>
      <Trigger>
        <OnEvent>OnEventChoice</OnEvent>
        <Target>
          <TargetType>Faction</TargetType>
        </Target>
        <PerformAction>
          <Action>SpawnEncountersAroundShipyards</Action>
          <StringParam>FACTION_SPACEMONSTERS</StringParam>
          <StringParam>SpaceMonsterMediumEncounter</StringParam>
        </PerformAction>
      </Trigger>
      <Trigger>
        <OnEvent>OnEventChoice</OnEvent>
        <Target>
          <TargetType>Faction</TargetType>
          <TriggerGroupTargetType>SpecificFaction</TriggerGroupTargetType>
          <StringParam>FACTION_SPACEMONSTERS</StringParam>
        </Target>
        <PerformAction>
          <Action>SetFlag</Action>
          <StringParam>Flag_ShipLeashDisabled</StringParam>
        </PerformAction>
      </Trigger>
      <Trigger>
        <OnEvent>OnEventChoice</OnEvent>
        <Target>
          <TargetType>Faction</TargetType>
        </Target>
        <PerformAction>
          <Action>SetFlag</Action>
          <StringParam>Quest_GA_BreedingSeason0</StringParam>
        </PerformAction>
      </Trigger>
    </Choice>
    <Prerequ>
      <PeaceTurns>50</PeaceTurns>
    </Prerequ>
  </GameEvent>

(ETA: Apologies for the ugly formatting above, as I've forgotten how to make code blocks appear in a nice format on this board)

On several different rounds of testing I have *ONLY* been able to unlock Awakened Urges after playing 50 rounds (well, technically 51 as it shows up the turn after 50 turns of peace) consecutively with absolutely no reloading whatsoever.

Interestingly enough, I did enable the console to see if I could print the value of the variable to try to confirm my theory.  And while I couldn't figure out how to do that, I did note that in my saves where Awakened Urges had previously been available for unlock, but no longer was, I had the pacifist counter set correctly (Counter_Pacificism 1), which I presume is tied to this somehow as that counter isn't set before the 50 turns timer goes off.

Now I've already run into some false positives, so I could still be wrong here.  But after poking at this for about two straight days and no less than four separate Turn 1 to Turn 50+ playthroughs where I would more or less beeline to Cultural Influence to unlock Galactic Challenges while doing various different things to try to figure out what was going on, as I said above the ONLY time I can have Awakened Urges available to be chosen is if I play 50 turns straight.  While at peace, of course. 

I have some different savefiles over a few different games (all with no mods) that can be provided, though if I'm correct all they might do is show I /should/ be allowed to unlock the Awakened Urges Challenge if I was already allowed to do it.

Let me know if any savefiles are needed for this and I'll be happy to provide them when I can. As well as providing any other feedback about various game states I tested.

===

As a side note, as far as I can tell, the only other portion of the game where "PeaceTurns" is currently called is in the Leader Event "Call For War" [Event_CallForWar in LeaderEventDefs.xml] where a Warforged Governor possibly offers a mission/quest (also set to 50 turns of peace).  If I'm right about this variable resetting on reloads, then that mission/quest will have a similar difficulty in unlocking.

4,767 views 3 replies
Reply #1 Top

Hello! Thank you so much for this detailed breakdown and investigation, the information provided in this report will be immensely helpful to the team, Just to be on the safe side could you share a save of the related game?

Reply #2 Top

Quoting RammaStardock, reply 1

Hello! Thank you so much for this detailed breakdown and investigation, the information provided in this report will be immensely helpful to the team, Just to be on the safe side could you share a save of the related game?

Of course. :)

Here are three separate saves over a some different games of testing:

FlagChecking_T-1Turn53.GC4Sav

Turn51 of peace - 6 months away.GC4Sav

Awakened One Month Before Turn 50.GC4Sav

(Google Drive links set to download, might take a while to actually start the download process)

IIRC, these are technically three separate game sets, even though they all have the same starting civ.  All of them are before Galactic Challenges have been unlocked and at last one would technically requite two turns as I believe the game first checks to see if 50 turns of peace have passed and then unlocks the Challenge at the start of Turn 51.

(in some of them I have attacked and been attacked by Pirates, but I believe that does not invalidate the challenge setup)

If there's any other files I can provide or other game states, let me know and I'll see if I can provide them or at least set up the conditions to make a save with those conditions.

Reply #3 Top

Should anyone find this thread via Google, looking to see if this does indeed unlock the Galactic Civilizations 4 achievement Breeding Season, I can confirm it does:

And the popped cheevo:

For now at least, to get Awakened Urges to show up, play for 50 rounds straight, while at peace, without reloading, and making sure you have Galactic Challenges unlocked by the 50th turn or later of peace (tech Cultural Influence needed)

To get the achievement Breeding Season, accept the Awakened Urges Challenge and then play for another 100 turns, and it'll pop once you close that Situation Report I posted above.   

Once you've accepted the challenge, you can still reload/restart as that doesn't invalidate the Challenge nor stop the achievement from popping.  You can also be at war once the Challenge has started as that doesn't stop it in the middle.

Curiously enough, the Awakened Urges Challenge disappeared from my Challenge screen shortly into my run (didn't see the exact time) and that was before I did any load/reloading.  However, it did appear on my Challenge list once I completed it.  Strange, but seems to have worked out in the end.  Got the prestige I was supposed to as well as my Steam Achievement.