HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

DLL / EXE editing.

07-12-2002, 07:18 AM#1
Guest
Sadly time has come to ask a quesiton once more...now that my slk editing is under way and that the modeling for our mod is under way the only things left are DLL and EXE editing....according to some people EXE is needed to be edited to change things such as: the race names, intro screens(wheen campaigns are being chosen) and things of such nature..but how do i edit the EXE?...do i decompile it?..if anyone has done this please give me tips

secondly: DLL editing..in order to add some skills needed for our mod we will haveto edit some dll...not only do i have no idea what dll this is but the same question as stated in the previous statement comes up...how do i edite it?..decompile and tiips..

thanks guys if you can help that would be awesome
07-12-2002, 09:21 AM#2
zepir
Well, if you don't know how to process... :-S let me tell you it means that it's gonna be really hard for you.
First you need a hexadecimal editor (like hexworkshop), then you'll edit the Game.DLL file. If it's possible, you'll find the race names in plain text somewhere lost in the code. You shouldn't need to "decompile" the code (anyway, I don't think you could decompile something that works). When you will chane the names you found, make sure you don't put a longer string than the one used and that there is a null char ending your string. If it sounds like Chinese to you I sincerly think you should give up with that right now and start learning stuff about hex-editing (what are ANSI chars, how bytes are stored on the computer and such... like the char '0' is different from the char null 0). If you think you understand hex-editing, then you don't need to know much about exe and dlls. They both contain binary code (need high-skills to edit the code part, need to know ASM, debugers,...) and strings. The code part uses references to the strings (ie.: addresses) so if you put more char in a string, the address of the following ones will change and all will be messed up. If you put a shorter string it's ok.
Example:
in game.dll, at the address 0x06C5ADB, you got:
hex value:
00 55 6E 64 65 61 64 00 00 4E 69 67 68 74 45 6C 66 00
text value:
.Undead..NightElf.

the first 00 is the end of the previous sring. You can replace Undead with "Blah!":
00 42 6C 61 68 21 00 00 00 4E 69 67 68 74 45 6C 66 00
But if you put "Blah blah!" it'll not work cause the end of the string will be the same as the NightElf one and the string used will be "Blahblah !ghtElf".

Hope it make sense.
07-12-2002, 05:06 PM#3
DJBnJack
And you can decompile the Game.dll file, using a Win32 Disassembler, but it doesn't decompile to c++ (or anything else readable) but to ASM ;)

Now ASM is quite fun to do, but it takes quite a while to get into.
(I once tried it for a few months... but then decided it was not the effort)

Best to go with Zepir's methond and just experiment a bit ;)

Greetz,
DJBnJack

Ps. I am not responsible for any loss of data because of my suggestion: "and just experiment a bit".
07-12-2002, 08:10 PM#4
Guest
Ok i'll hex the names...but i think i might get stuck decompiling it n e ways(i ahve a c++ decompiler...gona try soon to see if it will bust the program or not)... I have a feeling i am going to HAVETO decompile the game.dll files since i'm gona ened to make additions..but the only problem is that decompiler tends to give variables the ODDEST of names...aww well gona experiment and report back
07-12-2002, 08:31 PM#5
Guest
nope my decompiler didn't pull it I forgot it works by reading of a logfile of the compilation..*sigh* aww well guess I'm stuck to being limited to 4 races...although i'm gona keep trying to find a method
07-13-2002, 04:00 AM#6
OrcishSpacesuit
I already have a method, though not as elegant:

Option A: for just editing a map
Make a new unit that is created at game start. Make new units that it can build. Make whatever unit is built determine race.

Option B: for making this change global
edit the mpq so that the Town Hall, Great Hall.. etc all have the ability to create a new unit just like the above one.

I am making a mod with 7 unique races, with new abilities, tech trees and more, only requiring a DL of the .w3m. Option A works great.
07-13-2002, 11:01 AM#7
zepir
Sounds like a lot of work there! :)
Your methode sounds good to me. The only thing that sucks is that you can't select your race in the menus. But there may be a way to change the menus without hex editing... ? (not sure though, using the "glues"). Anyway, it's not hard to create a menu when you start the game it asks you what race you want.
Good luck with your races! ;)
07-14-2002, 02:38 AM#8
Guest
hex editing is the only way to edit the dlls and exes? i though that you could add extensions/ modules etc.. in c++ to a dll. since it seems that hex would be the easiest, wuts a good program to do hex editing? , ive got no knowlegde of hex editing, but a basic understanding of the system, but i started on some tutorials.
07-14-2002, 08:56 AM#9
zepir
I suggest Hex Workshop:
http://www.bpsoft.com

Hex-editing is not always the only way. you can also use loaders and patch the prog in memory, change the config files used by the program or use other tricks.
07-24-2002, 12:37 AM#10
Guest
hmm loaders?....i wonder maybee i could make an exe that would run war3.exe with a map attached (like worldedit does) ....hmmm wouldn't solve the multiplayer aspect but would solve the single player aspect..then maybee i can in some way make it so that the exit button inside the game launches my exe instead of war3...:-P


as for the dll editing..i decompiled it in asembler and then deleted the fil..it's hopeless to go like that...sadly i cannot think of a way to edit the skills *snaps fingers*