Print

I am so excited to share today's news with you: We’ve been able to patch the two most glaring bugs this game had since its release over 21 years ago.

Thanks to our community member ZeroPipeline the proprietary .pkg files (which contain the mission logic) have been disassembled into useable source code. Fixes to this code have been made by other members of our community and then put into a community patch mod. Read on for further details.

Independence War 2: Edge of Chaos has plagued numerous players with two major bugs since its release in 2001, probably resulting in quite a few broken joysticks and keyboards over all these years:

1. The "Wolf's Lair" Mission bug

This is mission 22 in Act 2 of the game. There is a high chance that the mission will never progress, because a freighter that is supposed to move isn't doing anything. Thus, the mission cannot be finished.

Back in 2010, Stephen Robertson (of Particle Systems) commented on this issue at the GOG forum:

It's an old problem which I don't think there's a reliable solution for apart from 'keep trying it until it works', I'm afraid.
Going back to the base, then restarting the mission might do it.

In our own forum, people have been angry about this bug almost 15 years ago:

I have the exact same problem.
Did you solved yours?

Yes, Cyro, we have. Maybe give this game another chance, even if it's been 10 years.

2. The "Dagda crash"

Every time you visited the Dagda system in Act 2 the game would crash after a while, making it unplayable.

This was reported at the GOG forums in 2011:

I'm in Act 2 tootling around and everytime I go to Dagda and the NPC 'The Kiwi' speaks to me the game crashes stating that Loader.exe has caused a problem.

People tried various methods to fix this bug, with varying success. Solutions ranged from disabling the sound to setting the game to Windows 98 compatibility mode.

Sometimes this worked, a lot of times it didn't, resulting in a lot of frustration.

Hey guys. It's NOT solved. I've tried all the tips given here, and nothing has worked. Zip, zilch, nada.

DDM_Reaper_20, I know it's been a long time, but now it should be fixed.

But how was it actually done?

It all started on the 8th of September 2022 when a discussion between Brandon0sh and ZeroPipeline emerged on the #mods-discussion channel of our Discord:

theres 110 original game pkg's, and then there's modded pkg's, but the one im pretty sure we really really want decompiled right away is iacttwo.pkg

decompiling the rest would be really cool for making huge mods to the game but starting with iacttwo.pkg will allow us to hopefully fix the Dagda bug

to which ZeroPipeline replied:

I am already using the SDK to compile test scripts so I can see what the output looks like. I have a pretty good idea of how it all works. just working to identify the different op codes

From this point onwards, it all just started to go crazy. Over the course of the next few weeks ZeroPipeline and the whole modding team worked together and actually managed to crack the .pkg files wide open. ZeroPipeline wrote a decompiler for the files, which can be accessed right here on Github.

This was admittedly the biggest step for fixing long outstanding bugs of the game and an absolutely crazy undertaking. Thanks to ZeroPipeline for doing this!

With the source code of the .pkg files now available to all of us, any member of our community can edit the mission scripts, make their own fixes and enhancements and put them back into the game. Thus, a new community patch project was born.

Credit for the mission fixes goes to multiple members of our community:

@ZeroPipeline wrote a real fix for the Wolf’s Lair mission bug (Act 2 Mission 22):

https://github.com/i-war2-community/i-war2-patch/pull/4/commits/8d2b2ca9576cfe6b23dea13e3c162975c6286f02

@Kalpa2 fixed the Dagda crash bug which has plagued the game for ages.

https://github.com/i-war2-community/i-war2-patch/pull/11

Since I’m just a humble casual gamer, I asked @Kalpa2 what was actually the cause for the Dagda crash bug:

The short of it is, in the part of Dagda script that handles recreating a new Maas interceptor patrol to hunt you down, there was an evaluation that was supposed to check if the previous patrol is dead or not by using a function that would return the number of subgroups in the group. However, since the patrol was created as a single group, with no subgroups but just sims in it, this always evaluated true, causing the script to delete the previous group and spawn a new one as fast as the script would run.

More specifically they tried to see whether Group.GroupCount (patrol) == 0, and this always evaluated true because the patrol group had zero subgroups. Obvious fix was to replace GroupCount with SimCount, which returns the number of sims in the group.

I should add: the loop structure was also such that it'd run as fast as possible, with no sanity checks or forced sleeps. Add to that a probable underlying engine problem that caused memleak/bad garbage collection that eventually (rather quickly) would cause the game to crash.

Last but not least, a massive credit also goes out to Steven of the Seven Sails for documenting the games‘ bugs on Github’s issue tracker and helping people stay motivated.

Where can I get the patch for my game?

All of the fixes made to the game (there are even more) have been put into a Community patch, which can be installed just like a regular mod.

Since Wolf’s Lair has been fixed, you won’t need the „Bypass Wolf’s Lair“ mod anymore. ❤️

You can get the mod from our download section or Github’s release page of the project.

If you want to help out by fixing other bugs that are already documented, visit Github’s issue tracker here.

New Mods

There are also a few new mods that have been released since our last news bulletin.

Thanks to all of our members for keeping this game alive for over 21 years!

Community efforts like these prove that Particle Systems created a timeless classic in 2001 that’s still fun to play in 2022.

A quick heads-up regarding the future of this project: You’ve all motivated me to finally start work on a modernized website, based on the WordPress system. The current site runs on an outdated techbase and is - quity frankly - a steaming pile of garbage. This game deserves a better online presence where you can actually upload your own mods. More news on this soon.

-schmatzler