HWRM New Race modding

Hello all,

I’m working on a workshop mod for HWRM that brings HW Cataclysm Somtaaw ships to HWRM multiplayer (specifically adding the Somtaaw race as race #10 in race.lua) However, I’ve got a nasty little bug that I’ve been trying to pinpoint for hours; the game crashes with an Access violation (but no FATAL EXIT or any indicators in the HwRM.log file). It seems to happen when CPU players attack (not defend, but advance to attack) the Somtaaw fleet. (More specifically, right when the “attack command” is given by the AI. However it doesn’t seem to be consistent, but only happens when the AI is “about to attack”.)

Workshop mod: Playable Somtaaw 0.2b

Note that there are some errors in the log file for this version, but I’m positive they aren’t related to the crashes. I’ve fixed these in an unpublished version.

Any thoughts?? I assume that it has to do with the AI attack scripts, but without a log I can’t be sure.

Here is the log file I have for this mission. 1v1 (Player Somtaaw vs CPU Expert Dynamic Vaygr), just loaded the level, issued no commands, and crashed after a few minutes (presumably the CPU player attacking, I wasn’t watching.)

Wed Apr 08 11:20:06 2015 Version 1.24, Build Number 16, Changelist Number 1022034 Loaded Archive: 'Homeworld2.big' Loaded Archive: 'UpdateHomeworld2.big' Loaded Archive: 'HW1Ships.big' Loaded Archive: 'UpdateHW1Ships.big' Loaded Archive: 'HW2Ships.big' Loaded Archive: 'UpdateHW2Ships.big' Loaded Archive: 'HWBackgrounds.big' Failed to Load Archive '..\..\DATAUPDATES\UpdateHWBackgrounds.big' UTIL -- filepath failure, path doesn't exists 'C:\Program Files (x86)\Steam\SteamApps\common\Homeworld\HomeworldRM\data\locale\English' Loaded Archive: 'English.big' Loaded Archive: 'UpdateEnglish.big' Loaded Archive: 'Compatibility.big' Failed to Load Archive 'C:\PROGRAM FILES (X86)\STEAM\STEAMAPPS\COMMON\HOMEWORLD\HOMEWORLDRM\DATA\compatibility.big' Loaded Archive: 'C:\PROGRAM FILES (X86)\STEAM\STEAMAPPS\COMMON\HOMEWORLD\HOMEWORLDRM\DATA\HW2Campaign.big' Loaded DLC Campaign Archive: 'C:\PROGRAM FILES (X86)\STEAM\STEAMAPPS\COMMON\HOMEWORLD\HOMEWORLDRM\DATA\HW2Campaign.big' Loaded Archive: 'UpdateHW2Campaign.big' Loaded Archive: 'C:\PROGRAM FILES (X86)\STEAM\STEAMAPPS\COMMON\HOMEWORLD\HOMEWORLDRM\DATA\EnglishHW2Campaign.big' Loaded DLC Campaign Localized Data Archive: 'C:\PROGRAM FILES (X86)\STEAM\STEAMAPPS\COMMON\HOMEWORLD\HOMEWORLDRM\DATA\EnglishHW2Campaign.big' Failed to Load Archive '..\..\DATAUPDATES\UpdateEnglishHW2Campaign.big' Loaded Archive: 'C:\PROGRAM FILES (X86)\STEAM\STEAMAPPS\COMMON\HOMEWORLD\HOMEWORLDRM\DATA\EnglishSpeechHW2Campaign.big' Loaded DLC Campaign Speech Archive: 'C:\PROGRAM FILES (X86)\STEAM\STEAMAPPS\COMMON\HOMEWORLD\HOMEWORLDRM\DATA\EnglishSpeechHW2Campaign.big' Loaded Archive: 'UpdateEnglishSpeechHW2Campaign.big' Loaded Archive: 'C:\PROGRAM FILES (X86)\STEAM\STEAMAPPS\COMMON\HOMEWORLD\HOMEWORLDRM\DATA\MusicHW2Campaign.big' Loaded DLC Campaign Music Archive: 'C:\PROGRAM FILES (X86)\STEAM\STEAMAPPS\COMMON\HOMEWORLD\HOMEWORLDRM\DATA\MusicHW2Campaign.big' Failed to Load Archive '..\..\DATAUPDATES\UpdateMusicHW2Campaign.big' Uing ..profiles\ for profiles folder GAME -- Using player profile yelow13 Changing from a 32 bit colour depth in winNT (6.2 build 9200), Display: (0, 0, 1366, 768) - (0, 0) Display: (0, 0, 1366, 768) - (0, 0) Switching to a 1366x768 32bit mode Display: (0, 0, 1366, 768) - (0, 0) GL Info: 3.3 - 3.3.0 - Build 10.18.10.3308 GL Vendor: Intel GL Renderer: Intel(R) HD Graphics 4000 GL Part ID: 4000 Loaded Archive: 'EnglishSpeech.big' Loaded Archive: 'Music.big' SOUND -- created destination [ fdaudio ], handle [ 4 ] with [ 48 ] channels created SOUND -- created destination [ fda streamer ], handle [ 5 ] with [ 8 ] channels created SOUND -- created destination [ dxa streamer ], handle [ 0 ] with [ 8 ] channels created SOUND -- created destination [ dxaudio ], handle [ 1 ] with [ 48 ] channels created Build name: Built by : builduser Data path : C:\Program Files (x86)\Steam\SteamApps\common\Homeworld\HomeworldRM\data No mapping for font 'Blender' - using 'default' Unabled to find data:animatics/GBXlogo.webm Resetting fp PC control word. CmdLine: -dlccampaign HW2Campaign.big -campaign ascension -moviepath DataHW2Campaign -mod compatibility.big -luatrace -overrideBigFIle Starting Level: data:LevelData\Multiplayer\DeathMatchHW1\8P_SCATTERED.LEVEL LOCALIZER -- Requested string range doesn't exists '9652' LOCALIZER -- Requested string range doesn't exists '9652' LOCALIZER -- Requested string range doesn't exists '9652' LOCALIZER -- Requested string range doesn't exists '9652' LOCALIZER -- Requested string range doesn't exists '9652' LOCALIZER -- Requested string range doesn't exists '9652' LOCALIZER -- Requested string range doesn't exists '9652' Display: (0, 0, 0, 0) - (-32000, -32000) Display: (0, 0, 0, 0) - (-32000, -32000) Restoring video mode Display: (0, 0, 0, 0) - (-32000, -32000) Cannot overwrite function Create_Hgn_Carrier Cannot overwrite function Update_Hgn_Carrier Restricting player: 0, race: 10 Restricting player: 1, race: 2 Restricting player: 2, race: 1 Restricting player: 3, race: 1 Restricting player: 4, race: 1 Restricting player: 5, race: 1 Restricting player: 6, race: 1 Restricting player: 7, race: 1 build available generic build available build available generic build available Killing player 2 () at time 0.000000 Killing player 3 () at time 0.000000 Killing player 4 () at time 0.000000 Killing player 5 () at time 0.000000 Killing player 6 () at time 0.000000 Killing player 7 () at time 0.000000 carrier open build available generic build available build available generic build available Display: (0, 0, 1366, 768) - (0, 0) Display: (0, 0, 1366, 768) - (0, 0) Switching to a 1366x768 32bit mode Display: (0, 0, 1366, 768) - (0, 0) Display: (0, 0, 0, 0) - (-32000, -32000) Display: (0, 0, 0, 0) - (-32000, -32000) Restoring video mode Display: (0, 0, 0, 0) - (-32000, -32000) Display: (0, 0, 1350, 729) - (8, 31) Display: (0, 0, 1350, 729) - (8, 31)

It seems to only crash on CPU HW2 faction players (Vaygr/Hiigaran), but I can’t be sure.

EDIT: Doesn’t seem to be the case. After starting a 1v1 with all 4 races but issuing no commands, game consistenly crashes with Access violation / no log after a few mins.

It could be a Gametype issue. Check “leveldata\multiplayer\lib” files and and search for any instances of “race”. A lot of stuff is hardcoded here unfortunately.

Would it be possible to add some print commands to the AI files to see possibly where the last commands are coming from before the game crashes?

Oh and you don’t have any broken docking paths do you? I think those will also cause access violations.

You can dig through the minidump file; it occasionally has useful information for you to see.
I think there’s an -aitrace command that does spew the AI debugging information, although I have never used it.
A lot of the way the GBX AI is coded is to assume that if a race isn’t Hiig, Vaygr, or Kushan, than it is Taiidan. You may want to carefully examine the AI research and build files. Running the game with the -luatrace command should indicate errors with the code.

Thanks all for the info, turns out it was a strikegroups issue. AI assigns them before attacking, and the game crashed everytime a strikegroup was created (AI or human player). Man that was a tough one to pin down!

1 Like