Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for reading ini-defined campaign variables. #592

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

nikolyn10
Copy link

@nikolyn10 nikolyn10 commented Dec 8, 2024

  • Parse battle.ini tags that bind game variables to client variables
  • Modify spawnmap.ini content with respect to variable bindings before mission launch
  • Parse Vinifera and Phobos dumps of game variables
  • Save/load variable status to/from campaign career file
  • Support for locked missions unlocked under certain variable conditions
  • Expand UI configuration options so the mod maker can define their own variable tracking

I'm still working on this but wanted to open the PR now that I've got a general plan of what I'm going to be doing and have laid out some of the foundation. I ended up designing something that goes beyond simply tracking global variables but I really wanted to make something more extensible and flexible than what DTA uses.

The basic concept here is to have the client parse additional tags that can be added to missions in the battle ini that dynamically define integer variables and use some formula to map them to some in-game local/global variables. We convert this mapping to some kind of ini content to add to the spawnmap.ini, which should open up all sorts of design possibilities for campaign missions as well as better support for vanilla Tiberian Sun missions. It also means we can get the client to do things with these variables, like keep missions locked until you complete prerequisite missions.

This feature requires that mission maps be copied to spawnmap.ini to function and has limited functionality without specific game logging functions provided by Vinifera or Phobos used to dump the states of in-game variables. I would greatly appreciate some guidance on how to handle addressing these limitations.

@nikolyn10
Copy link
Author

nikolyn10 commented Dec 16, 2024

Here are some basic test files I've been using with the TS client. All you need to do is drop these files in a TS client folder with the PR build. It currently includes entries for the GDI missions Secure the Crash Site, Destroy Vega's Base, Destroy the Chemical Missile Plant and the Nod missions Destroy Hassan's Temple, Eviction Notice, and Destroy GDI Research Facility. That's gdi3a, gdi6b, gdi9d and nod3a, nod4a, nod7a respectively. The zip includes a separate set of maps in a test subfolder but I haven't tweaked the maps in any way.

TS Test.zip

Copy link

Nightly build for this pull request:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant