[HARDCODED LIMITATION] Limit of 32 GameType settings

I am now able to start my mod and play a skirmish. However, when I try to “End Current Game” from the Game Menu, HWRM crashes with an Access Violation.

Any idea what could cause the game to crash at this stage? I did not modify any of the UI scripts. Thanks.


This happens when I lose the game as well. It probably also happens when winning a game.

I hate Access Violations with a passion. Only thing I can suggest is a list of your modified files or a DL link for one of us to take a look.


I’ve uploaded the mod here:


Could you take a look?

You were lying about not modifying any UI scripts >_>

My bet is that the game can’t terminate that overlay gracefully. (Which I imagine you already suspect). As for WHY…I’m not sure yet.


Good catch. However, I just disabled all the ATI stuff and it makes no difference.

1 Like

What about the gameOver related functions in hwclassicenhanced.lua? I don’t see anything like them in the stock deathmatch.lua. And there’s even a commented note in there about crashing to desktop.

	-- special case - if there are no enemies then never end
	if ((numEnemies == 0) and (numAlive > 0)) then
		gameOver = 0
	-- if gameOver flag is still set then the game is OVER
	if (gameOver == 1) then
		-- causes the game to drop to desktop due to HW2Path() function
		--if (AdvStats == 1) then
		--	WriteStats()

  function waitForEnd()
	if (Event_IsDone("endGame")) then
1 Like

You can find similar code in HWRM’s “data:leveldata/multiplayer/lib/main.lua”.

And the commented note does not refer to a crash, but simply to the game switching to the Desktop for a split second before returning back to the game.

1 Like

My usefulness is at an end I’m afraid. :frowning: Maybe @pouk @xercodo or @eatthepath will have some ideas.

1 Like

I’m not a coder, how could I help?

shrugs you were the first three active modders I could think of.

@mikali : nothing in your hwrm.log ?

@Dwarfinator Access Violations don’t dump anything to the log.

I know, but there could be another error written in the log prior to the crash and that could be a reason to the access violations

1 Like

Here’s the log:

Sat Apr 23 17:37:15 2016
Version 1.30, Build Number 21, Changelist Number 1089620
UTIL -- filepath failure, path doesn't exists 'E:\SteamLibrary\steamapps\common\Homeworld\HomeworldRM\DataHWClassicEnhanced\locale\English'
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'
Loaded Archive: 'UpdateHWBackgrounds.big'
UTIL -- filepath failure, path doesn't exists 'E:\SteamLibrary\steamapps\common\Homeworld\HomeworldRM\data\locale\English'
Loaded Archive: 'English.big'
Loaded Archive: 'UpdateEnglish.big'
Loaded Archive: 'DataMP.big'
Loaded Archive: 'Compatibility.big'
Uing ..profiles\ for profiles folder
GAME -- Using player profile Severian Silk
Changing from a 32 bit colour depth in winNT (6.1 build 7601), Service Pack 1
Display: (0, 0, 1600, 900) - (251, 126)
Display: (0, 0, 1600, 900) - (251, 126)
GL Info: 3.3 - 3.3.0 NVIDIA 353.06
GL Vendor: NVIDIA Corporation
GL Renderer: GeForce GTX 750 Ti/PCIe/SSE2
GL Part ID: 750
Loaded Archive: 'EnglishSpeech.big'
Loaded Archive: 'UpdateEnglishSpeech.big'
Loaded Archive: 'Music.big'
Loaded Archive: 'UpdateMusic.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 : E:\SteamLibrary\steamapps\common\Homeworld\HomeworldRM\data
No mapping for font 'Blender' - using 'default'
Resetting fp PC control word.
CmdLine: -overrideBigFile -luatrace -noMovies -hardwareCursor -w 1600 -h 900 -windowed -ssTGA -moddatapath DataHWClassicEnhanced -mpbeta -freeMouse
12 Races Discovered
Race Filtering: HWCLASSICENHANCED rules - @deathmatch
Starting Level: DATA:\LevelData\Multiplayer\DeathMatchHW2\2p_hostilities_end.level
Trying to retrieve strike group index 9, no such strike group.
HWC: Setting up per-gamerule build/research restrictions.
HWC: Setting up mothership battle.
GPE: WIN CONDITION set to kill player production ships.
build available
generic build available
build available
generic build available
Now playing (11/38): Ambient No.14 (12m 5s)
Display: (0, 0, 100, 100) - (9, 36)
Display: (0, 0, 100, 100) - (9, 36)

I’m not sure it’s a coding issue. It could be a HOD file or something else.

Nothing wrong in the log at least.

Strange that it happens only at the end. Perhaps calling the Great Guru @Bitvenom to the rescue if he has any clue ?

Simplest debugging method: Remove stuff until it works. Whatever the last thing you removed was the culprit.

Okay, I figured out the problem was due to a hardcoded limit of 32 “GameSetupOptions” in the game type scripts. Anything more than 32 and you get the Access Violation when the game is over. (And probably other issues while the game is running.)

This limit existed in HW2 as well, and I was aware of it, but I thought it had been eliminated in HWRM. I guess I was wrong.


I’m probably not going to continue the mod since I would have to remove features due to this limit anyway.

Not only GameSetupOptions.

A lot of content have a limitation of 32.

Speechicon, you have max 32, if you add the 33’ icon > Access Violation. [When you want to make campaign with more than 32 actors, and variants of this actor between the season, you have to use +200 icons.]

Here are the game rules I had planned.

1. resource mulitplier
2. unitcaps
3. starting resources
4. lock teams
5. start location
6. start with, e.g. mothership & carrier, carriersonly, etc.
7. resource injection...
8. ... every x minutes
9. resource lump sum...
10. ... after x minutes
11. bounties
12. research on/off
13. crates
14. hyperspace on/off
15. win condition, e.g. kill production, capture capship, etc.
16. select background music track
17. set game speed
18. Bentusi Roulette Option
19. Defined Roles on/off
20. Player 1 role
21. Player 2 role
22. Player 3 role
23. Player 4 role
24. Player 5 role
25. Player 6 role
26. Player 7 role
27. Player 8 role
28. Special Fleets on/off
29. Player 1 starting fleet
30. Player 2 starting fleet
31. Player 3 starting fleet
32. Player 4 starting fleet
33. Player 5 starting fleet
34. Player 6 starting fleet
35. Player 7 starting fleet
36. Player 8 starting fleet
37. cpuplayers
38. challenges
39. relics
40. norushtime
41. Advanced end of game Stats
42. Team Progress Meter
43. In-Game Clock/Timer

Most of these were already implemented in my Homeworld Classic Enhanced mod for HW2.


The addition of 2 extra players in HWRM is another thing that makes it hard to squeeze everything into 32 slots.

1 Like