Jump to content

Total victory conditions


donaldseadog
 Share

Recommended Posts

6 hours ago, TonyE said:

The code checks both minimum and total victory conditions and records the time each level is met for each side.

Those 3 changes sound good to me.

Regards the recording can I access that via exportDLL? Or can I catch it as it tests positive, is it an 'event'? I've been meaning to chase that up for my AAR-Report.dll. 

Don (ed)

 

Link to comment
Share on other sites

15 hours ago, donaldseadog said:

Those 3 changes sound good to me.

Regards the recording can I access that via exportDLL? Or can I catch it as it tests positive, is it an 'event'? I've been meaning to chase that up for my AAR-Report.dll. 

Don (ed)

 

Update:

My tests are working as expected though they are nowhere near comprehensive.

 

Next:

  1. Refactoring the data structures used to track the VC completion.  Right now it is a combination of a three dimensional array (time each victory level was reached for each side against each other side), one dimensional array (sides that only have total victory conditions), and a couple of individual variables (first side to hit min_vic, time of first min_vic and first side to hit tot_vic and time of the first tot_vic).
  2. Modifying the saved game structure to store what needs to persist across sessions.  This will also include a converter for existing saves.  The new logic cannot be properly seeded from an existing saved game so the best approach will be to abandon existing saved games but we'll load them and populate what we can on victory achievement.
  3. Possibly modifying the scenario file structure as a result of changing the VictoryConditions structure.  The VictoryConditions structure change would likely be adding a GameTime field that is populated when that particular VC is met and a target side that indicates the 'enemy' side for the VC.  Currently VCs are strictly Red v Blue and Blue v Red so when I'm mucking in structures I like to expand that.
  4. Exposing the data to ExportDLLs which at a minimum means updating the interface version.  The current victory status should come through in new globals and if the VictoryConditions structure changes, updates to match them.  I just checked and the globals are not exposed to the ExportDLL interface yet so that may be a piece of this too.  
Link to comment
Share on other sites

Progress.  Added tracking of individual Victory Condition time achieved and exposed to ExportDLL as part of the Globals structure in ScenLoad.  Most of the Globals structure is still opaque to the ExportDLLs, will build out the THCGlobals typedef over time.

 

HCVCAchieved.png

Link to comment
Share on other sites

I ran a couple of statistics for the Harpoon code changes, the lazGUI and shared ExportDLL code changes aren't included in the counts.  The victory condition work added 810 lines of code and removed 367 lines of code.  Those changes affected 32 source code files.

HCVC2021.009.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...