Adding new units to the galactic war causes a crash when they fire. I'll have a galactic war version of Galactic Annihilation posted here shortly to provide a repro case. @jables @mkrater
Here we go: https://github.com/Stuart1998/Galactic-Annihilation/raw/master/REL/Client/GalacticWarTest.zip Just build a light missile tower with your com in a new galactic war game, order it to fire at the ground, and then figure out why the heck the game crashed please. Unless I fixed it. I'm unable to check right now because my computer is 127.3% borked currently. But I'm doubting that I did in any case. @jables @mkrater @Sorian @masterdigital And whoever else would help in fixing this.
I'm unable to start a modded GW game. The commander is blank and the start button is disabled, so I suspect the commander changes. From the log: Code: [15:37:47.172] ERROR [JS/game] coui://ui/main/game/galactic_war/cards/gwc_start_subcdr.js:55: Uncaught SyntaxError: Unexpected token , [15:37:47.172] ERROR [JS/game] coui://ui/main/game/galactic_war/gw_start/gw_dealer.js:143: Uncaught TypeError: Cannot set property 'id' of undefined
Replace the subcdr file with this: Code: // !LOCNS:galactic_war define([ 'module', 'shared/gw_common', 'shared/gw_factions', 'cards/gwc_start', ], function ( module, GW, GWFactions, GWCStart ) { var CARD = { id: /[^\/]+$/.exec(module.id).pop() }; return { visible: function (params) { return false; }, summarize: function (params) { return '!LOC(galactic_war:general_commander.message):General Commander'; }, icon: function (params) { return 'coui://ui/main/game/galactic_war/shared/img/red-commander.png'; }, describe: function (params) { return '!LOC(galactic_war:the_general_commander_loadout_contains_very_limited_mobile_forces_and_only_two_data_banks_however_the_loadout_comes_with_two_sub_commanders_that_accompany_you_into_each_battle.message):The General Commander loadout contains very limited mobile forces and only two data banks. However, the loadout comes with two Sub Commanders that accompany you into each battle.'; }, hint: function () { return { icon: 'coui://ui/main/game/galactic_war/gw_play/img/tech/gwc_commander_locked.png', description: '!LOC(galactic_war:seek_out_first_seeker_osiris_on_xianyao_there_you_will_find_the_loadout_your_friends_desire.message):Seek out First Seeker Osiris on Xianyao. There you will find the loadout your friends desire.' }; }, getContext: function (galaxy, inventory) { return { faction: inventory.getTag('global', 'playerFaction') || 0 }; }, deal: function (system, context, inventory) { var minions = _.shuffle(GWFactions[context.faction].minions.slice(0)); return { params: { minions: minions.slice(0, 2), allowOverflow: true }, chance: 0 }; }, buff: function (inventory, context) { if (inventory.lookupCard(CARD) === 0) { // Make sure we only do the start buff/dull once var buffCount = inventory.getTag('', 'buffCount', 0); if (!buffCount) { GWCStart.buff(inventory); inventory.maxCards(inventory.maxCards() - 1); inventory.addUnits([ '/pa/units/land/vehicle_factory/vehicle_factory.json', '/pa/units/land/tank_light_laser/tank_light_laser.json', '/pa/units/land/tank_attack/tank_attack.json' ]); _.forEach(context.minions, function(minion) { inventory.minions.push(minion); }); var minionSpecs = _.pluck(_.filter(_.pluck(context.minions, 'commander')), 'UnitSpec'); inventory.addUnits(minionSpecs); } ++buffCount; inventory.setTag('', 'buffCount', buffCount); } else { // Don't clog up a slot. inventory.maxCards(inventory.maxCards() + 1); GW.bank.addStartCard(CARD); } }, dull: function (inventory) { if (inventory.lookupCard(CARD) === 0) { var buffCount = inventory.getTag('', 'buffCount', 0); if (buffCount) { // Perform dulls here inventory.setTag('', 'buffCount', undefined); } } } }; });
That actually let the game start, but crashes the moment the commander pod lands. The commander image on the start war page was still blank, but I was still able to start; the prime suspect error messages point to commander issues. Client Code: [16:23:11.781] INFO [COUI] Argument conversion failed: Wrong type - expected Integer, got Null while converting argument 0 for handler holodeck.setCommanderId Server Code: [16:23:16.250] ERROR Error opening struct UnitSpec spec "/pa/units/commanders/raptor_centurion/raptor_centurion.json.player", file failed to load
Everything validates. It's possible it doesn't like commanders innheriting from files in the unitlist.json, but the standard server mod doesn't complain about that. Could you try deleting the commander directory and seeing if that fixes anything?
Renaming the commander directory provides commander images on the start screen, but still crashes on land.
Upon review, it looks like the crash you're receiving is because the mod is specifying an invalid commander.
According to the Dev, the behavior is by design. I don't think it has anything to do with that particular commander. But out of curiosity, are you using this commander in your mod? This is one of the personal commanders that's not for sale. The fix for this commander was to make sure it displayed correctly in-game.