Author Topic: Missing Planetfall message on accelerated start for Usurpers/Planet Cult  (Read 1532 times)

0 Members and 1 Guest are viewing this topic.

Offline scient

Title pretty much says it all. I noticed that if you have an accelerated start Usurpers and Planet Cult don't get an initial popup message on Planetfall.

The problem stems from both of them having custom popup message ids:
PLANETFALLF (script.txt) > Planet Cult
PLANETFALLX (alienIscript.txt) > Usurpers

Then the code that handles creating popup appends a "2" if accelerated start is detected (default PLANETFALL2 in script.txt/alienIscript.txt). Since PLANETFALLF2 and PLANETFALLX2 don't exist, nothing is displayed. Caretakers aren't affected because their Planetfall message re-uses the same script id (PLANETFALL) as the default in script.txt. It looks like the text for PLANETFALL2 inside alienIscript.txt was adjusted slightly.

I'm thinking of modifying the code to fix this so additional entries aren't necessary unless anyone has an objection or thinks Planet Cult warrants a separate flavor starting text for accelerated start. Pretty minor issue but still buggy behavior.

Also, I noticed that the faction noun is parsed in but never referenced.

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
I don't think I've ever played an accelerated start.

Offline scient

I mostly use it when testing. I don't think I've ever played a real game with it tho. Seeing how Caretakers already use PLANETFALL2, I think the language works for Usurpers as well. I think non-alien PLANETFALL2 language works well enough for Planet Cult too. My thought was to make a code change so that any accelerated start uses PLANETFALL2 script id.

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
When I manually playtest, I play from the beginning of the game.  That does bias a lot of playtests towards the beginnings of games.  It can take me a very long time to discover late game problems, as I certainly don't play all games to completion.  I tend to give up around 3 AM when I'm tired and bored and have learned enough about whatever problem I was investigating.

When I do automated playtests, I do this ritual with the Scenario Editor to get a 7 player AI game started.  I have to manually play the first turn of some faction to get it to work.  Then I have to switch sides and watch another faction instead of taking it over.  Then I put a coin and duct tape weight on the Enter key and let it ride.  It takes over my entire laptop for the duration.

If you have the capability, in your OpenSMACX, it would be a major debugging feature, to be able to start 7 AI games without such a rigamarole.  Or without having to physically hold down the Enter key.  It is so obnoxious that they didn't make this basically task switchable.


Offline scient

I'm usually playtesting a specific function so isn't as involved as playing a whole game. Generally, I'm forcing all possible input values and checking results along with doing memory compares/restores. I have run into some roadblocks using this method with full Map structure which is fairly large. Partly what has slowed down work on Path class since to ensure no mistakes I'm doing 1-1 assembly compare. I always do 1-1 compare but generally as final step after automated tests have ironed out kinks. That and I need to figure out how to programmatically create a C++ class function pointer similar to how I've created redirects for non-class functions. I end up just patching function call manually.

Yeah, that's something I've wanted as well. To be able to just let AI play a game automatically. The code that handles end of turn is likely inside large function Console::on_key_click. I'll have a quick look if this is something I can easily enable. I bet I could get it to bypass need for enter, the issue would be stopping it without having to inject a bunch of assembly.

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
I can only begin to imagine what those crazy 1990s developers were thinking.

Offline scient

So I've been able to patch binary to treat all factions as AI and run autonomously bypassing dialogs. Disabled all warnings and turned on faster movement. It's kind of cool watching AI play.

The only issue is like I thought. Not something you can really stop. However, with expanded auto-saves I think this can be temporary solution. You would just load auto-save into non-auto mode exe. I'll attach patched exe + settings once I play around with it a bit more.

Offline scient

Let me know what you think. This may not play the primary faction optimally (social eng, council) but I think it would be no different than hitting enter through everything. This is using latest version of OpenSMACX except with expanded auto-saves along with built in logging (logfile.txt) enabled.

You only need to copy over values for "More Preferences" and "Preferences" from "Alpha Centauri.ini". I only tested it with standard rules. There is probably additional things that need to be patched if say blind research is disabled.

To exit, you'll need to alt-f4 or kill process with task manager. It will run in the background/minimized until game ends then it gets stuck.

Running through game, I was able to trigger the interceptor crash that my unofficial patch fixes. I was able to use logfile.txt to confirm. Along with being able to load up auto-save prior to crash. This might be a good method to find additional crashes.

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
When using the Scenario Editor, holding down the Enter key doesn't actually make any selections for the AI.  You're just watching the game.  It's more like a "skip" function I guess.  We'll see how your approach behaves.  The approach of the Scenario Editor would be what's wanted.

For the lolz, I'm not copying anything into my .ini file.  After all, I wouldn't want to.  I already play with everything on "fast battle resolution" etc.  The one curveball I'll be throwing, is I do have "Confirm Odds Before Attacking".  That's how I cheat to know if I'm going to capture a mindworm before I actually have to fight it.  If I'm not going to capture, I often back out of the fight.  This setting has never mattered when watching Scenario Editor games.
« Last Edit: August 20, 2020, 08:50:45 AM by bvanevery »

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
Ok, no success.  I tried to start a game using the Cybernetic Consciousness in the 1st player slot, and 6 random factions in the other slots.  When I hit "Ok" I hear the start of Aki's audio quote about "Those who join us..." and it just abruptly cuts off at that point.  The Choose Your Factions menu just stays there.  I can click Ok as many times as I want, and I'll just keep getting that audio over and over again, cut off.

Did your .ini really require specific audio settings?

Good news is I tried again with all RANDOM factions.  I was randomly handed the Spartans to watch.  They are doing their thing!  CTRL-ALT-TAB works to switch it to the background as I type this.  Well I guess I'm going to find out if the Spartans can handle themselves or not.

The speed of the replay seems slower than a stock Scenario Editor game.  Is it a debug build?

Let's compare our .ini settings.  Mine:
Code: [Select]
Preferences=10101011111000100101111110001011
More Preferences=101110001111010111101000
Yours:
Code: [Select]
More Preferences=1110100111000101101000
Preferences=10111011111000011101110110110110
Odd to me that you have the line order reversed.

I'm finding it too tedious to go through and manually pull out the different 1s and 0s.  We have a lot of differences.

In the time I was writing about that, the Mission Year has advanced to 2205.  Spartans lost War Outpost, a land base, to the Pirates.  I consider that an interesting result.  MY 2208, there seems to have been an election, as a Planetary Council flashed by.  It looked small, so I think the Caretakers and the Usurpers must be in the game.  I clicked on Commlink to see if I could get any kind of readout about Contacts, and oh oh, I think the game has frozen.  I hit "Wait for the program to respond" and hope for the best for a bit.  Well I think I killed it.  Giving up on that game.

This time I've chosen the Cyborgs, Spartans, Pirates, Drones, Hive, Cult, and Believers for a grudge match.  I've never really noticed the "Play Random Faction" button before, so I'm going to try pushing that!  Neato, it gives arrows pointing at all the factions.  I hit "Ok" and I get a noiseless bar asking me to ENTER YOUR NAME.  I type "frog" and hit OK.  I've been put in charge of the Believers.

Um, and there's no AI doing anything.  Maybe I clicked the wrong game icon.  Yeah that's right, forgot I can't use my usual shortcuts.  Starting over properly.  Cutely, the same faction list has been preserved.  I PLAY RANDOM FACTION and hit OK.  That just dumps me back to the same menu with PLAY SELECTED FACTION selected.

I choose the Believers explicitly and hit OK.  Miriam says "The Righteous need not..." and the audio cuts off.  I try it for all the factions and it's the same result.

I hack around the problem by dropping the Cult, replacing it with RANDOM, and selecting that.  I hit OK.  I show up as the University and start kicking butt!

Now this is interesting.  The action stopped on completion of the Virtual World, giving me a Datalinks screen.  This is probably due to differences in our Preferences.  I don't watch Secret Project videos.  I clicked on the BACK button, and the action continued, rather than allowing me to navigate the Datalinks.  The show goes on.

They finish the Universal Translator and again the screen pauses.  This time I try clicking on the background map.  That doesn't trigger any UI action.  I try clicking on another listed Secret Project, like the Hunter-Seeker Algorithm.  I can actually peruse that.  Clicking on a highlighted Preq in the description takes me to Pre-Sentient Algorithms.  I can navigate all of the tech tree boxes.  Basic Concepts, Basic Unit Types, etc. are all navigable.  BACK button aside, I'd say the Datalinks are fully operational upon pause.

While in this paused state, I try hitting the various Fn keys.  No result.  Finally I click EXIT and the action resumes.

I try clicking the Fn keys while the game is in progress, but that doesn't do anything.

In MY 2203 I try clicking on the Menu box.  The game promptly spin-waits itself to death.

It's a start!  To be useful for AI performance diagnosis, I need to be able to pause and inspect game info.  That's the usual reason I run AI vs. AI games.  Need to know if I've made things smarter, dumber, or the same.
« Last Edit: August 20, 2020, 09:48:57 AM by bvanevery »

Offline scient

Re: Missing Planetfall message on accelerated start for Usurpers/Planet Cult
« Reply #10 on: August 20, 2020, 04:56:30 PM »
Actually, it looks like those settings in attached ini file weren't correct (it was late when I posted it). I basically have fast movement and battle enabled while disabling anything that could potentially stop the game. Everything under "warning" is unchecked. All settings may not even be needed since patches likely bypass most of it. I've attached screenshots of what I was using to test.

More Preferences=1001100000111000111101000
Preferences=10100011111001110101110100001010

Also, line order doesn't matter in ini file.

Speed might be slowed down due to extended auto-saves. Not sure. I didn't really notice too much of a difference in my VM. Late game kind of slowed down for AI turns but I've seen this is regular games as well. I saw the primary faction do some dumb moves in a couple games I played. Likely issues with ZOC. The dll has all optimizations turned off, so compiled assembly is a bit verbose. Trying to compare to original assembly with optimizations turned on is a pain. I'll create a new dll later with compiler optimizations back on. My guess this is causing a sizable hit to performance.

I can also confirm clicking anywhere inside screen will freeze/crash the game. That's mainly how I've "stopped" progress.

I can confirm trying to start a game with non-random faction doesn't work. I'll look into fixing that. I was mainly doing fully random games or quick start to test. I thought I tested a "normal" game with specific faction but likely patched something that broke it afterward.

Yeah, Datalinks shouldn't be displayed. Probably difference in prefs. I mainly just tried to kill UI elements as they opened as if "okay" or enter was hit. So I can see once inside them most of interface would still work.

I also have movies disabled because it messes with alt-tab after one plays. I just have movies folder renamed to "movies_" to prevent them from playing.

I'll see if I can eventually inject some kind of "pause" shortcut into the keyboard listening function (Console::on_key_click). For now, you could let a game play out then inspect the 50 or so 10 year auto-saves to check AI performance. There shouldn't be anything special in auto-saves that would prevent them from loading in unpatched exe.

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: Missing Planetfall message on accelerated start for Usurpers/Planet Cult
« Reply #11 on: August 20, 2020, 07:08:53 PM »
"Batch" inspection of a completed game at different time slices, is an interesting hack.  Will try that.

Looking at the differences in our Prefs, I make the following provisional conclusions:

Automation Prefs don't matter.

I also have "Voiceovers stop when popup closed" as unchecked.  This is not the game default.  I just like getting a full earful of whatever anyone has to say, while I'm doing other tasks.  I wonder if this affects the voiceover cutout phenomenon I noticed in the opening menu.

I also have "Secret Project Movies" unchecked.  I lost interest in those quite awhile ago.  Every once in a blue moon I might revisit them for refreshment.  I did hear about graphic stability problems because of the videos.  I don't know if they were affecting me on Windows 10, or whether they'd continue to affect me today.  I have used a GOG binary that locks ALT-TAB.  I just use CTRL-ALT-TAB instead.

I don't think any of the other Audio/Visual Prefs matter.

I have mostly the same Adv. Prefs, with the exception of "Confirm odds before attacking".  It doesn't matter.

For plain Prefs, I have "Pause at end of every turn".  Doesn't seem to matter, but I note the difference.

Offline scient

Re: Missing Planetfall message on accelerated start for Usurpers/Planet Cult
« Reply #12 on: August 20, 2020, 10:47:19 PM »
Yeah, a lot of settings may no longer matter because of patches bypassing dialogs. Thanks for the validation!

So to get specific faction working when creating a new game will take a bit more work. To close out dialogs, one of patches is applied to core pop-up class method (BasePop::exec). This is used in a bunch of places in game as well as the new game screen. I'll just have to patch some of the places this particular class method gets called rather than the method itself. I'll play around with it some more later this afternoon.

 

* 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

Mankind has been blind for thousands of years?for all of its history. We have come to a place whose wonders are a hundred-fold more amazing than anything on Earth. Around us is clear evidence of the will of a higher power. I bring the Vision to the blind eyes of men. I bring the Word to the deaf ears of men. I will make them see it. I will make them hear it.
~Prophet Cha Dawn 'Planet Rising'

* 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: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 37.

[Show Queries]