Author Topic: Worst mod ever? You decide!  (Read 6860 times)

Offline RoflCopter4

  • Newbie
  • *
  • Posts: 2
Worst mod ever? You decide!
« on: August 30, 2017, 06:27:24 pm »
For no particularly good reason I decided to try to edit some of the unit stats today, and before trying to do so I did a very cursory glance at this forum to check whether it was even possible. I noticed the thread about the assault transports and that he found the stats in a C# dll and figured that I'd give it a go. If I'd had any brains at all I'd have read the forum for a few more seconds and would have found the other thread in which Magitek explains exactly how one ought to go about modifying units. Since I did not, I had to find out how myself.

I first spent an inordinate amount of time trying to work with the decompiled source code from a few different decompilers. The code they produce is generally remarkably clear and easy to understand, and theoretically easy to change, the problem is that it is just not possible to re-compile the decompiled code afterwards. You get literally hundreds of different errors and it's a huge broken mess. However, this did at least allow me to get a decent understanding of how everything works and how the data is stored and used. I doubt I would have gotten anywhere without this step.

Finally it became obvious that the only way to do anything would be to work with the dll in IDA, and thus edit the hex data by hand. After a lot of sleuthing around I finally found the section I was looking for and figured out how it worked and related to the source code. The fact that I was working with the binary in this way made it basically impossible to add data, that would ruin everything, but it was possible to change existing data. Upon discovering this, I suddenly realized that I actually had no plans whatsoever for what I wanted to change or why. I mostly wanted to know whether I could do it, and how. The only thing I could think to do was to deliberately make the worst modification I possibly could, just for funsies. Now for the sales pitch:

Are you tired of extremely well balanced and tested unit stats? Sick of engaging, fast paced and difficult gameplay? Do you just want to be able to win, just once, with ease, without technically resorting to cheats? Then I've got the mod for you! I took the Exodian Blade ship and improved it somewhat, namely:

  • It was too slow. The thing the egghead engineers clearly forgot to consider when they declared that it could not be made to go any faster is that adding racing strips makes anything go faster. After applying them, the speed increased from 36 to a much nicer 127. I originally wanted it to be higher, but as I discovered the devs used a little trick of optimization in which a single byte is used to store the value of the speed rather than a normal 4 byte word, saving 3 whole bytes!. Since this integer is signed for some reason, this leaves 127 the highest possible value before the numbers roll over to the negative and count back up. Naively setting it to FF (normally 255) caused the speed to be -1 in game and left the thing immobilized.
  • There is no longer anything preventing it from being affected by external things that increase speed, meaning it can be even faster. Amusingly there were not one, but two variables that were used to make sure nothing increased its speed, with the second one being called "SpeedIsAbsolutelyPositivelyNotSupposedToBeChangedOutsideInitializeType". Presumably there was some kind of annoying bug that this fixed. Both variables are disabled now.
  • Both the range and the width of the main beam weapon have been doubled, meaning it hits more things more accurately from much farther away.
  • The damage output of the main weapon has been increased from a uselessly low 2 million to 2.5 million. Any higher and the numbers went a bit funny.
  • I figured that it was desperately in need of increased destructive capacity, so I wanted to give it 5 beams instead of one. If I could edit the source code this would be a simple copy paste job. A single variable determines how many extra weapons a ship has (ie a ship with 5x weapons has 4 extra). However, as I was not able to do so, and could most certainly not change the length of the binary file under any circumstances, I had to replace a section that set a particular variable with one that set this extra weapon variable. In retrospect I should have replaced the now useless "don't change speed" variables, but I didn't. The one I did replace had something to do with AI priority. Oh well.

I think that's all the changes I made. It is embarrassing to admit that this process took me more than 5 hours. It took a while to really understand what was happening in the code in general and then to locate that code in the assembly code. It doesn't help that I really don't know much about what I'm doing. I'm sure there is a better way to change things in IDA than to edit the hex dump, but I only knew how to do that, so that added more time too.

Let me make this totally clear. This mod is useless. This unit is utterly ridiculous. It waltzes into a system and SLAUGHTERS EVERYTHING within the span of a couple of seconds. It can kill a wormhole guard post on epic mode in less than a second, since I did not bother to disallow it from concentrating all 5 beams on 1 target. It can singlehandedly wipe out overwhelming armies. It can destroy a dire lair and kill the spawned dire guardians before they even actually appear on screen. You can send it into an AI homeworld unescorted and there will be nothing but rubble before you even blink. It is highly amusing (to me) for about 10-15 minutes, after which it just gets boring since it obviously takes all the challenge and fun out of the game. I like to leave installed just for those situations when I know I've screwed up and have no chance of winning. When this happens I usually just decide to cheat and spawn in a bunch of monster units to blow a #@$% up and get a little catharsis before starting over. It's perfect for that. Just don't forget to never actually use the Exodian Blade scenario with the intent of playing it properly with this installed.

You can install it in a couple of ways, if you actually want to. You could use JSGME, the generic mod manager, an absolutely fantastic tool that I use for dozens of different games all the time. It automatically backs up any files it replaces with a mod, and keeps track of mod conflicts and such. When you disable mods it automatically restores the original files. It is deliberately dumb though, it only really copies files from the mod directory to the root directory where JSGME.exe is located, so you need to make sure that you set up the mod properly. In this case it would be [GAME ROOT]\MODS\UselessMod\AIWar_Data\Managed\Assembly-CSharp.dll. I've included this already set up in the download. Since I went to the trouble of setting this up, I do recommend using it, but if you really don't want to then since this """mod""" only includes one single file, it is fairly easy to just back up your Assembly-CSharp.dll somewhere (just rename it to Assembly-CSharp.dll.BAK or something) and copy the modded one in its place. When you're sick of the mod just restore the original. Both methods basically do the same thing in the end.

The final fact of the matter here is that I really couldn't think of anything to properly mod because this game is already so well balanced that there really isn't much that needs modding. This exercise was fun for me and fiddling with grossly overpowered units can be amusing for a brief period, but there's really nowhere to go from here.

Here is the download link.

https://www.mediafire.com/file/sx08ab90lyfc9p8/WorstMod.7z

You'll also need 7-zip if for some reason you don't already have it installed.

http://www.7-zip.org/download.html
« Last Edit: August 30, 2017, 06:35:19 pm by RoflCopter4 »

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Worst mod ever? You decide!
« Reply #1 on: August 30, 2017, 09:30:26 pm »
If you enjoy modding something like AIWC then you are going to love the modding features that AIW2 comes with!

 

SMF spam blocked by CleanTalk