Simplex is a sister mod of Complex. It has inherited the essence of Path To Victory along with many other top-quality mods through a long history of R&D. This mod promises to push the Homeworld 2 engine to its limit and will simply blow your mind with incredible fun!

Post tutorial Report RSS Homeworld 2 Error Codes

When the game crashes, usually the reason for the crash is explained in Hw2.log, but there're some cases that there's simply no reason for the crash. This tutorial aims to record different reasons for crashes that apparently have no reason!

Posted by on - Basic Client Side Coding

Some HW2 crashes just won't give any reason in Hw2.log, for example:

1. If LoadModel(NewShipType, 1) is put behind StartShipHardPointConfig() function in any ship script, the game will crash without any reason.

2. If LoadSharedModel() function is used for a subsystem script, make sure the target subsystem exists, otherwise the game will crash without any reason.

3. The outer boound of a map could be the reason for crash wihout any reason, increase it until it doesn't crash anymore. This problem could occur only when there's something really big in the map, for example, a planet.

4. The lod levels in ship script should match with the ones in the HOD file, otherwise when you zoom in on the ship, the game will crash without any reason.

5. From my experience, if the HOD file is somehow messed up, the game will crash without any reason.

6. The shader types and algorithm in every HOD model should match those in the shader folder. If there's any mismatch, the game will crash without giving any reason.

Here're some frequently recorded error codes in the ErrorLog.txt:

00000000 -- general issues, like loading a later game without outer bounds, or when a game has turned too messy and the memory is screwed up somehow. In the latter case, there's no clear solution except making the game less messy.

0000000c -- related to big objects colliding when moving or rotating. Trying to avoid collisions by removing these big objects or making them unmoveable solves the problem. If there's a singularity or black hole that pulls all ships towards the center of the map, this collision error will definitly occur at some point in the game.

00000010 -- related to automatic ship creating by lua code, possibly due to conflict with the AI building queues. A solution I found is to create a SobGroup_CreateShip_InstantSpawnDock() function that spawns the ships elsewhere and then docks them instantly before launching, giving the fake impression that they are actually built not spawned. This code can also be produced when using a ship HOD in the background folder (don't ask me why I tried that).

00000020 -- this error code appears when the save menu says there's some invalid file name and crashes, but it could also have something to do with the hangar management system. In some occassions, accessing the launch menu just after a ship exited hyperspace will crash the game and give this error code, especially when there're supposed to be some instant dockers in the dock (e.g., repairing patchers are programmed to instantly dock when the host enters hyperspace). If the launching menu is accessed 10 seconds after hyperspace is finished, there won't be such a problem.

00000030 -- I suspect this is related to launching conflict. The SobGroup_CreateShip_InstantSpawnDock() function I introduced above solved the 00000010 problem, but this new problem occurred, although much less frequently.

00000168 -- map object not found in the given type. This can happen when a dust cloud object is added with the addCloud function.

00781000 -- related to visual effect overloading. When too many Hiigaran pulsar beams, smoke animations or damage effects are being played at the same time, the game will crash with this error code. Reducing or removing those effects will solve the problem.

More to add... By you!


Thanks, usefull info

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Homeworld 2
Send Message
Release date
Mod watch
Related Games
Homeworld 2
Homeworld 2 Real Time Strategy
Related Groups
Homeworld 2 Modders Group
Homeworld 2 Modders Group Fans & Clans with 137 members