Modding - Bad mod data is PROBLEM

Mods can crash the game at the moment by throwing Bad data mod window.

Problem is that warnings.log and all other logs contain 0 information about the reason of the crash.

It’s impossible to fix, debug or do anything with the mod that rarely crashes in later stage of the match with this error. Creating an everlasting issue where noone is or should be interested in making any kind of bigger mod as it will end up very likely unplayable as it just might crash.

It can happen both due to Tuning Pack and Scar scripts. It happens also with generated maps, but that’s not a big deal as will most likely crash only during the generating the map before the game.

In case of Tuning Pack crashing the game with Bad mod Data it should try to log at least the cause: Tuning Pack and what kind of changed attributes it tried to access. More the merrier.

In case of Scar script crashing it should log the stack trace or at bare minimum last executed scar functions that belong to the mod. So we can pinpoint exact place that we can investigate or report it back on the forums if the issue with the functions exposed for MOD API

Another concern is that these rare Bad data mod crashes might have not been caused by the mod. I am slowly starting to believing that crashes that are caused by game itself without any mod are thrown also as BAD DATA MOD.

It pretty much is from my point guaranteed to be issue with something that game does as game can crash for 1 out of 8 players and still throw BAD DATA MOD without providing anything in the log. If it was caused by mods I would expect it to crash for all players in the match as they are supposed to be executing the same code.

Due to that it would really be better for both developers and modders if warnings.log contained as much information about every crash as possible without creating security concern.

Save games are able to cause bad data mod really often. This is definitely issue with how game serializes the savegame state for mods. There is basically nothing mod authors can do other than removing any feature that causes crash or straight up ignoring the issue. Which is not really positive when lot of players enjoy singleplayer… (For example Improved Observer UI is crashing game on savegame, but there are also other examples…)

This problem also touches the another issues:

  • There is lack of documentation about attributes, most of them are also missing description for what they are even doing and why how they are supposed to be defined or what extension do and how to use them.
  • Lot of definitions in attributes seems to have defined extensions that are irrelevant and have no effect or their inheritance is broken as child overrides everything. Which doesn’t look good for maintainability…
  • Scar documentation contains large amount of functions, events, enums etc. that are outdated. Primarily events that never fire… Which relates to my report with the kill ling transport ship that does not firing single event for units it carried yet game destroyed them.

TLDR: BAD MOD DATA does not log a single line about the reason of the crash. That should at bare minimum be addressed to log enough information that both modders and developers can figure out what caused it.

2 Likes

Also worth noting is that based on what I have seen recently in relation to Outback Octagon tournament:

  • last week game crashed twice with this message, when players had other mods installed.
  • last week they also played on server that was not closest to 7 of them. but like that should definitely not have an effect on it right ?
  • this week it happened again, when one of the players had other mods installed.

Is it possible that there is also some issue with mods in general where they are interfering with other installed mods ?

anyway we really need better tools to deal with bad mod data to both help mods and help developers to identify the issue. Crashes are terrible experience.

Thank you @Woprok! We very much appreciate the detailed feedback and are always considering ways to make the experience and the tools more friendly. I’ll make sure the proper peeps see this.