Updated Mod: viewtopic.php?t=27106&highlight=
New Modding IDE and updated IDA Plugin (including IDA 7.0 version): viewtopic.php?t=27107&highlight=
Hey All,
It's been awhile. I currently don't have internet at home, and while I had college, I had to focus on that. As such I won't be able to help you with modding more than this post.
However, I will be at my college until around 8 PM Eastern Standard Time (North America), and I will be checking back here a few times today.
Now, on to the information
![Wink ;)](./images/smilies/icon_wink.gif)
You'll need to download my tools and mod sources if you want to make mods: http://www.mediafire.com/download/q41my ... dTools.zip
If you're just here for talking inanimate objects and the return of bounce in the form of rainbow magic, you can download the patch here: http://www.mediafire.com/download/hryik ... 3E_Mod.zip
It includes 2 sample adventures and the modified files. You will have to replace the files in your WA3E install. Also I was messing with other unused magic types, so uh, now the white magic plays the wakka sound xD
This patch includes modified versions of wg.exe and editor3d.exe from the WA3 Editor. I think that's okay because they are free to begin with. However, if I'm not allowed to post these, I'd like a moderator to send me a PM before 8 PM, so I can find a work around such a using Lunar IPS.
As for creating mods, read the following:
Your going to need IDA Pro 6.8 and my plugin. IDA Pro is a very expensive professional software. Unfortunately I don't know of any alternatives. I've included the source code to my IDA plugin so if you know of an alternative, you can port it over.
You will also need Resource Hacker. It's a free program, and should be the first result if you search it on Google.
You need to extract the Blitz Code out of the executable. It's in the RCDATA section.
Save it to a *.bbc file.
When your done modding you just need to reimport the modified *.bbc file.
And don't forget to make backups!
Also I've noticed if you take a *.bbc from an older game such as WSW and import it into the latest version of Blitz3D, the game loads so fast on my computer that the loading screen literally flashes for a split second and then it's at the main menu. I guess the Blitz team did some optimizations since then!
You can use IDA to find the memory addresses you need as it will disassemble the code for you. If you have the Hex-Rays Decompiler (which is also expensive), you can decompile to C++, making things much easier.
Once you've found the spot you want to inject code into, you want to replace the code there with a jump call to your code. You can add your code to the end of the program using my BlitzPatcher.
Just make sure that whatever code you replaced, you include into your code. (unless of course you want that code removed)
You can add a symbol with BlitzPatcher and then add a jump call to that for when your code is done. (If you don't jump back, the code will just continue from where you are currently and MAV or have other strange unexpected results)
To use my BlitzPatcher (which is required for modding), you will need the Java JDK and Eclipse, as well as knowledge in the Java programming language. Unfortunately I didn't have time to look into making a scripting language for the mods. So you have to deal with this.
All the mods are currently hard-coded into BlitzProject.java. You can add your mods in there too.
Some of the functions use file offsets and some use relative offsets (it's fileoffset - 4 with blitz), however I don't remember which is which.
You can look at my already made mods to figure it out.
Some of the mods, such as rainbow magic, were made prior to making a custom assembler, and were written as .bin files in a hex editor, with all the relocs hard-coded in java.
One of the mods I made, which you will have to compile yourself, is a WSW mod. It loads the worldmap, and story from a file. However, the load story function seems to partially override the load level function for whatever reason causing random MAVs when restarting levels. I haven't figured out how to fix this yet.
Anyway, along with this mod, I made a WorldMap editor and a Story editor in C#, which I've included.
I also made a beachball in RTW, which is basically a boulder that floats and is destroyed by cannon fire. It works well, however I believe I missed something when I made it because when you roll the ball, it will sometimes destroy wooden boxes, and other times will push them, or simply go through them, it's really strange.
Keep in mind that modding Wonderland is EXTREMELY COMPLICATED.
It takes me about 3 days to write a single mod. All nighters included.
I almost forgot, I included a modified version of the Blitz3D runtime that uses the _cdecl calling convention. If you can't get the wonderland alpha from the midnight collection cd to work on modern computers, import the *.bbc into those exe files and it will work. It's still 16 bit unless you do a quick edit of the bbc, so you will probably need to use the windowed exe file unless your computer supports full screen in 16 bit, which is rare now-a-days.
Either way, hopefully someone on these forums will be able to make mods as well as me. But if not, luckily you have rainbow magic and a new logic type ID: 472 (for inanimate objects with dialog) to play with
![Wink ;)](./images/smilies/icon_wink.gif)
PS: This can be used with ANY game made in Blitz3D or BlitzPlus, not just wonderland
![Very Happy :D](./images/smilies/icon_biggrin.gif)
PSS: If anyone makes a video of my sample adventures or their own using this and uploads before 8 PM, I'd really appreciate it
![Wink ;)](./images/smilies/icon_wink.gif)
Enjoy!
Thanks!
~ Matt
EDIT: Forgot to mention, apologies for the messy code. I was just experimenting and not really expecting things to work.