GameVersion.cpp becomes a configure_file template, so the version strings are a
build input rather than something a CI step seds into the working tree mid-run.
That is what lets a crash report be matched to its exact build's PDB for offline
symbolization.
The two strings get distinct jobs. czVersionString is the machine-readable build
identity: the bare short commit SHA and nothing else. A `git describe` string
cannot serve here -- czVersionString is 16 bytes because it is stored in the
savegame header as SAVED_GAME_HEADER::zGameVersionNumber and strcmp'd on load,
and describe puts the SHA last, so truncation ate exactly the discriminating part
and could make two different commits compare equal. CI passes 9 hex; anything
that would not fit is now a configure error rather than a silent clip.
zBuildInformation is the display string, untruncated, and it is no longer printed
beside czVersionString: that drops the duplication in the version line ("JA2 1.13
V4-555-G6A941C0 2026-07-25 V4-555-G6A941C06") and stops showing a token that is
now machine-only. CI's copy leads with GAME_VERSION, because the version line is
now the only place a player reads which release they are running.
Finish what the sed step's TODO asked for: the workflow pins GAME_BUILD_INFORMATION
and GIT_SHA once, next to the gamedir SHAs it already pins, and hands them to CMake
with -D. Every parallel build job therefore stamps one agreed identity, and the
compile checkout needs no git history at all.
A build nobody identifies is a local build and says so -- czVersionString reads
"local" -- rather than deriving a SHA from HEAD. A derived SHA could not stay
true: nothing re-runs configure once HEAD moves, so an incremental build would
keep whatever it was configured with, and keeping it honest would mean
reconfiguring on every commit. It would also buy nothing, because only packaged
builds are archived with their PDBs; a local build's crash reports are symbolized
against the PDB sitting next to the exe.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Externalize the Divisor for usBackPackWeight
A new ini value BACKPACK_WEIGHT_FACTOR is introduced to replace the hard coded 50.
The value goes from 1 to 250 and its default value is 50 as before.
* Refactor usBPPenalty into its own function GetBackbackAPPenaltyFromBackpack
The same code is also used in GetAPsCrouch as well as GetAPsProne
The intent of the change is to make sure that backpacks including their content
do not add an additional AP cost of +1. Now it checks if
the backpack weight is > ubBackPackWeightFactorForAPPenalty (default value 50).
The min exists to make sure that the AP cost does not become higher than previously.
Previously the bool fBackpackCheck was used to add +1 if there is any backpack.
But this also includes an empty tactical sling (backpack with 0.2 kg) and
therefore makes the item much less interesting to use.
- food items are usualy not shown in game without using Food
- option ALWAYS_FOOD allows them to be shown even without
- default is false, no food items without Food
iniErrorReport is a log file, all other log files have .log extension, so make it
consistent with that
make Ja2_settings.ini's extension lowercase. OCD, sorry.
- two new options in ja2options.ini
ALTERNATIVE IMP CREATION
- adds new additional backgrounds, exclusive to this option
- which IMP backgrounds will be available at selection is determined by previously made choices for skills, character traits and disablities
- if a tag in background is contradicting to content of skill/character/disability, it won't be shown at selection
- what's considered contradicting is based on what's been found in code for conntent of skill/character/disability
- i.e. HeatIntolerant adds a penalty for desert and tropical sectors, so don't show backgrounds that add bonus for those sectortypes instead
- a new tag <alt_impcreation, has been added to backgrounds for this as well
- if that tag is found, it will be considered as additional IMP background exclusive to the option
REDUCED IMP CREATION
- same as above, but this time only the new additional backgrounds will be avaialable at selection
- same rules for possible restrictions to be shown
ALTERNATIVE IMP CREATION is required for REDUCED IMP CREATION to work
For ja2options.ini, a new category, "Backgrounds" was created.
This will contain the two new options and the general option to enable backgrounds
Accompanying changes in gamedir:
INIEditorJA2Options.xml
ja2options.ini
backgrounds.xml
* Move main executable files to their own directory
* Adapt the build to the new file structure
... and fix some weird #include's that were relying on the project root
being an include directory.