Author Topic: an atrocious bug  (Read 3577 times)

0 Members and 2 Guests are viewing this topic.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
an atrocious bug
« on: July 28, 2019, 05:10:23 AM »
first contact with Santiago
first contact with Santiago

MY 2164.  Playing with stock binary and my SMACX AI Growth Mod version 1.33 under development.  Haven't done anything weird with chemical weapons or techs.  Never seen this gal in my life.  Smells like a straight up bug, unless someone framed me?  I'll look at the .SAV file later to see if that's plausible.  Right now I've got a Monsoon Jungle to colonize.

My saved game was from just before I met them.  I continued from the saved game and deliberately avoided meeting them.  Eventually I got tired of the game and looked at it using the Scenario Editor.  I used "Edit Faction Diplomacy" to inspect the settings for the Spartans.  They were set to Commlink, Vendetta, Fight To The Death, and Fix Current Status As Permanent.  Their only other contact was the Gaians, who hadn't met me at the time.  Could the Gaians have framed me, even though they hadn't met me?
« Last Edit: July 28, 2019, 07:55:22 AM by bvanevery »

Offline Rocky

Re: an atrocious bug
« Reply #1 on: July 29, 2019, 01:09:53 PM »
That is a weird bug, never saw one like that before.

Do you maybe have an autosave from earlier in the game? That way you could check if it was already present at the start or if it happened later.


Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: an atrocious bug
« Reply #2 on: July 29, 2019, 07:31:15 PM »
Too late, I've run all kinds of games since then.  A faction getting flippy with a claim of atrocity, is something I've run into in the past.  But I don't think I've ever had such clear confirmation that I wasn't in contact, and that there was so little likeihood of being framed.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: an atrocious bug
« Reply #3 on: August 09, 2020, 07:10:48 PM »
Saw this bug again today.  I was playing the Morganites, and the Spartans had it in for me.  Opening up the Scenario Editor, and selecting Edit Faction Diplomacy, I see these flags marked: "Fight to the death", "Fix current status as permanent".

An additional bug on top of the bug: when you inspect these values with the Scenario Editor UI, upon closing the window, the Scenario editor adds the flags "Commlink" and "Vendetta" to the Spartans and the Morganites.  Well maybe they thought it was a feature, enforcing such consistency in the face of a user edit.

Didn't have a save from the start of the game, but I did have an autosave from Mission Year 2020.  I didn't have any contact with anyone and neither did the Spartans.  Nevertheless, the flags were set against me.  This is with my SMACX AI Growth mod version 1.46 alpha, so I don't know if it'll open readily in plain SMAC.  Probably, but I haven't tried.

The Data Angels are in the game.  They do start with a probe unit, but lack of contact would seem to preclude that having been used.  They weren't physically adjacent so the probe team couldn't have walked to them.  Although a dimensional rift can move a unit, they did not share the same continent.  I've never seen a rift cross an ocean and don't think it's possible.  I do not think the Data Angels acquired a Transport, as there are none sailing around and there's no note in the unit listings about them having lost one.  Nor do I think it likely that a probe team would have boarded a Transport anyways.

Finally, I'm not aware of any early probe missions that would result in the recipient wanting to Fight To The Death.  Unless framing a faction that one is not in contact with, results in some kind of counting error.  But framing someone you haven't met yet, would seem to be cheating anyways.  I know I don't get the option to do that as a player.  I have to pick a faction I know about.

These flags are likely set from the beginning of the game.  I don't think it's a Spartan exclusive problem, as over the years, I think I've seen other factions have it in for me.

The factions and their turn order turn order: Morganites, Angels, Gaians, Spartans, Hive, Believers, Drones.  No aliens and no Cult of Planet, so none of this has been triggered by anyone getting a late start.  I started on the same large continent with the Hive and the Spartans.  It took awhile to meet the Hive.  They started north of me and there were substantial fungal barriers between us.  The Spartans were way far away to the northeast and I only met them due to a dimensional rift.

Offline scient

Re: an atrocious bug
« Reply #4 on: August 13, 2020, 08:09:27 PM »
So what's interesting about that 1st saved game, atrocity (minor/major) and integrity are all zero for diplomatic relationship with Spartans. If you did some negative action against them, even something minor like insulting them it should show up here. Integrity I think is a more general value, ex. paying or not paying a loan, breaking treaties in some way. All of these are used to calculate how hostile diplomatic relations are.

I'll do some more digging into the internal diplomacy playerData values for that saved game but my guess is those flags somehow got erroneously set. Both the "fight to the death" and perma flags are stored in diploAgenda that I haven't really done much analysis on.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: an atrocious bug
« Reply #5 on: August 13, 2020, 09:37:52 PM »
Yeah it would be interesting if you find the mysterious answer, as clearly, I did nothing and the fields are totally in error.

Offline scient

Re: an atrocious bug
« Reply #6 on: August 13, 2020, 10:59:37 PM »
Same thing with 2nd save game. I skimmed through both games internal diplomacy variables and couldn't find anything that stood out other than the agenda value.

Unfortunately, I haven't worked on this code much yet. There aren't a lot of references to diploAgenda but trying to backtrace something like this would be pretty time consuming. If you do catch an auto save that doesn't have the "Fight To The Death" prior to it getting set, I can definitely track it down no problem. Just a matter of setting a memory breakpoint and waiting for buggy code to write to it.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: an atrocious bug
« Reply #7 on: August 13, 2020, 11:49:02 PM »
I hypthesize it's set at the start of the game.  So I either have to explicitly save every single game I start, with a small chance of there ever being a problem, or I have to discover the problem within 20 turns.  I bet neither happens.

I've seen no pattern as to the frequency of the event, to try to induce it to happen more often.

Offline scient

Re: an atrocious bug
« Reply #8 on: August 13, 2020, 11:58:18 PM »
I wonder if I can throw together a debug mod that does extended auto-saving. The files themselves are pretty small. If it kept like last 100 or 200 turn saves, it should be easier to catch.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: an atrocious bug
« Reply #9 on: August 14, 2020, 05:50:20 AM »
For this problem, it is not necessary to save every turn of the game.  If it just saved every 10 turns and had a much longer memory about it, it would be enough.  Also it would be useful to have Turn 1 automatically saved before any move is made, and named in such a way that it is not readily deleted.

Offline scient

Re: an atrocious bug
« Reply #10 on: August 14, 2020, 07:26:11 PM »
I can definitely get something set up to auto-save every 10 turns (basically preventing the roll over). The turn 1 would probably take a bit more work but something I could look into in the future.

What binary are you using? If it already has anything applied to it, if you zip it up and attach it I can patch it to use OpenSMACX and/or just autosave functionality.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: an atrocious bug
« Reply #11 on: August 14, 2020, 09:39:39 PM »
I use a stock GOG binary, nothing applied.  Patching stock would be the most controlled approach.  I'm willing to use OpenSMACX if you think it's stable enough for the job.

Offline scient

Re: an atrocious bug
« Reply #12 on: August 14, 2020, 10:31:42 PM »
The current code base is stable. I've ironed out a couple bugs in my code that caused some problems in previous releases (mostly related to randomness). Planning on making a new release with these integrated this weekend once I wrap up some regression tests on a couple Path class functions.

I think to keep things simple and to narrow down the issue, better to just patch in the debug auto-save functionality to GOG binary. Just in case something I'm doing in the 400 or so redirected functions has fixed the issue. Will attach patched binary + dll to thread once I'm done doing tests on auto save code.


Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: an atrocious bug
« Reply #13 on: August 15, 2020, 01:10:18 AM »
Ok dok, I'll await.

Offline scient

Re: an atrocious bug
« Reply #14 on: August 15, 2020, 01:35:50 AM »
So it actually looks like the default code calls the auto-save function immediately on game start. I'll add in some handling that checks against alphax.txt starting year and if that matches current game year save a separate copy. That way it doesn't get cycled out as part of the last 5 individual turns. I'm going to then add in handling so it stores 50 of the 10 year increment saves versus 3 (max normal ending year - normal starting year -> (2600-2100)/10=50). I think that should create enough snapshots to hopefully catch this bug in action.  :)

Could you check to see if your GOG terranx.exe has the same sha1 hash as mine?
terranx.exe: 4b19c1fe3266b5ebc4305cd182ed6e864e3a1c4a

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Beware, you who seek first and final principles, for you are trampling the garden of an angry God, and He awaits you just beyond the last theorem.
~Sister Miriam Godwinson 'But for the Grace of God'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 5: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default), Aeva.english (default).
Style sheets: 0: .
Files included: 50 - 1568KB. (show)
Queries used: 41.

[Show Queries]