weapons data stored in save game

Post bug reports and ask for game support here.
Post Reply
Aetius2
Posts: 108
Joined: Sat Dec 11, 2010 3:56 pm

weapons data stored in save game

Post by Aetius2 »

Hi Steve,

Can an adjusted weapons.txt file be tested into an ongoing campaign?
When a campaign is started a saved game is made, does it store the weapons data in this saved game?

example:
When i adjust the weapons.txt file (accuracy and penetration values) and put this adjusted file into the data folder and i play a saved game (ongoing campaign or operation) does game engine load weapons data from saved game or weapons.txt in data folder?

Thanks in advance

Aetius
User avatar
SteveMcClaire
Posts: 4305
Joined: Mon Nov 19, 2007 9:31 pm

Re: weapons data stored in save game

Post by SteveMcClaire »

Weapons data is not part of the save file. It is read from the weapons.txt file every time you start the game. This is generally the case for all the data files in data/base.

Indexes to weapons (index = the index of the line # where a weapon appears in weapon.txt) ARE saved in the save file. This is the case for most data files (soldiers, vehicles, teams, etc.) So if you are changing data/base text files out from under a save you need to make sure these indexes do not change. For example, if your K98 Karabine is index #5 in your weapons.txt and you re-order the weapons.txt so that K98 Karabine is now #6 (or any other number, or even deleted) your saved game file will no longer be pointing to the K98 Karabine.
Aetius2
Posts: 108
Joined: Sat Dec 11, 2010 3:56 pm

Re: weapons data stored in save game

Post by Aetius2 »

Thanks for your explanation.

What happens if 1 H2H player has a weapons.txt file with accuracy set higher and the 2nd player same weapons.txt file with lower accuracy?
User avatar
SteveMcClaire
Posts: 4305
Joined: Mon Nov 19, 2007 9:31 pm

Re: weapons data stored in save game

Post by SteveMcClaire »

Aetius2 wrote: Fri Sep 30, 2022 4:19 am Thanks for your explanation.

What happens if 1 H2H player has a weapons.txt file with accuracy set higher and the 2nd player same weapons.txt file with lower accuracy?
The values in the host's data files are the ones used to run the simulation. So having minor value differences like accuracy aren't a problem.

However if there are large differences between the host and client data files (like a weapon is not at the same index in the client weapons.txt as it is on the host) you will potentially have problems. At a minimum, the client will see the wrong weapon in UI. The same goes for vehicles, etc. This is why the game performs a version check between host and client when starting a multi-player game.

For mods started with the /D command line option, the text after /D is included in the version string to match during multiplayer handshaking, so the game does verify you're playing with the same /D mod name. If you need versioning in your mod you can include a version number in your /D folder name, like 'MyMod100', 'MyMod101', etc.
Aetius2
Posts: 108
Joined: Sat Dec 11, 2010 3:56 pm

Re: weapons data stored in save game

Post by Aetius2 »

Thanks for your explanation.
Post Reply

Return to “Tech Support”