You guys made good work, so far we have some good editors, "galaxy extended" languages and many many other tools. But i feel like something is missing. While developing maps in wc3, we have all hacks together in original WE. Anyone ever tried to create Grimoire-like toolkit for SC2 (dll injection, maybe clever winapi usage), or maybe this actually exists (and i missed it)? It will be extremely useful for in-editor modifications. Just imagine data editor wizards for creating units, items... or galaxy++ / andromeda inside trigger editor (just like vJass). Another idea, there is no way to diff maps between versions. Simple unpack/pack map in editor next to git or mercurial... awesome :D
Maybe there are editors in development; I do not know.
However, one needs to keep in mind, that Blizzard keeps monitoring the SC2 MPQ files for modifications to detect hacks and similar stuff.
Due to the nature of a modified editor, it would be possible, even likely, that Blizzard detects it as a hack and bans your account for using such an editor.
This is just speculation, though.
However, if there is a desperate need for an improved editor, the community will eventually find a way to create one.
Maybe its no problem at all.
If you want to create such an editor, go ahead :). I cannot help you, though.
I want, but i don't exactly know how to do it (for now, maybe later ;P just love learning it), and probably i would have no time for a year (last year of high school... you know).
You said modification detections. Maybe game files, but i think they just don't care about editor's memory during runtime. Maybe game, but editor? I don't believe it :P There always is any way to integrate into existing process. You can manipulate winapi handles or insert some data here and there. New trigger editor may be only an overlay (or new window, who cares), which just insert written code into map during save (and maybe compile/optimize it before). There is always a way ;)
There already is something like grimoire for sc2. Its calles Phyngal and you can get it here: http://phyngal.xgm.ru/
The hack also disables login to battlenet for the editor so I dont think that blizzard has a chance to detect it.
Last time I tried it it worked fine and it is quite easy to integrate an advanced parser into it as long as it can be run with one command. But I think it is difficult to integrate a new script editor into the original editor like TESH did for wc3.
Wow wow, assembler source :D I have no real experience with it. I know it is possible to run this code from C/C++ (or just make compatible dlls in it). So far i see it is outdated. :( "oh shi~ unsupported editor build"
Just seen grimoire source... mix of cpp, asm, lua, some pascal... wtf! I feel dumb :P Anyway, it is possible, and actually it is not THAT big application :P Phyngal is even smaller, and i think it is good entry point. So bad i don't really understand fasm...
Anyone know how to update address.asm (form phyngal) for latest editor?
I used flat assembler. I'm aiming to compile it as *.o and just link into some C++ source for clarity (i prefer GCC/MinGW). For now I'm learning assembler and I'm doing pretty well :) Old SC2Editor.exe will be great ;)
I left the theory part behind me, so it is time for practice now :P
doing small progress.
Here is my current VerAddr table. If anybody can help me find missing adresses, it will be great ;)
Small howto: google for older SC2Editor.exe, check for adresses in adress.asm from phyngal, find maching instructions in new version, get current address (and maybe signature for later scanning).
I will update it every time i find something.
nevermind, midiway get a good job done here, pray to him :P
It is almost impossible to google for an old version of SC2Editor.exe, so just get it here plz (v0.19.0.15976)
I haven't done too much modding with the Galaxy editor as I did in wc3, so I dont know what kind of tool makes sense to integrate directly in the editor for scripting, I mean, maybe doing another TESH wouldn't be reliable.
What kind of editor you want to embed? Will it need to read the actual trigger data in memory? I think that Galaxy editor is much more complex than WE in how the triggers in the Trigger Editor can be organized, there can be many levels of categorys and many types of itens it the trigger tree, finding this data in memory is just too much work, anything requiring some kind of integration in the actual UI of the editor will be very hard to accomplish
My idea would be to make an application that runs apart from the editor, that would detect when the editor is running and inject whatever is necessary.
-It would feature an separated trigger editor. Triggers created here have no relation with triggers created in the editor, they would be just contained in an XML of the map, like an import.
-API for allowing to have parsers like Andromeda
-It would integrate with Galaxy editor by knowing what map is currently opened, and automatically showing those triggers that are contained in the XML import
-Would need to monitor events that occur in Galaxy editor like: saving the map to also save the triggers to the XML; user closes/opens another map so we refresh the triggers tree, and so on ...
I have already disassembled Galaxy to get the list of maps currently opened, and could detect many events related to opening/closing/switching the active map. This events plus those that we can grab from phyngal, is about all we need to create this idea of application
I know that, i want to do the same what grimoire does in WE. I will export all data from map's mpq after save, run some other process on it (something like jassHelper, but for galaxy, i.e. galaxy++ parser). Another thing will be detecting, when user opens trigger editor (to inject TESH-like editor), add some windows menus etc. I wont really modify memory, only a few instructions ;) I have no time at the moment, but after hours i'm working on simple dll injector (and it actually almost works :P).
Thanks for suggestions, but i wont create "jassHelper" or "TESH", but "Grimoire" :P Maybe later ;) Anyway, this is how it will work.
Check out my sc2Gemini project on github. It is in very early stage of development, but I'm working on it ;)
Next step is link it with lua or node.js, but i probably put on lua, because it doesn't need external exe. I will release working build as soon as it will do something useful :P
DONE, took me some time but I completely updated the address.asm table
I successfully compiled Phyngal and got it to run and recognize the actual sc2editor version, but the editor just keep crashing and I couldn't yet be able to really debug where is the problem because Blizzard putted some kind of global exception handler so I can not catch where the error is occurring
But I think that will eventually get Phyngal to work, so what is your plan if Phyngal just works and you got to make just the same tool again?
Good work :) thanks mate. I'm sure it will be very useful :)
I'm planning to rewrite it completely, but i need some critical addresses anyway. I think it crashes, because phyngal overwrites memory, not just injecting some code. I have better idea how to do that. I want to add some jumps here and there, after that jump i will execute the patched instruction, do what i am jumping for and just return from hack. The same as i done with dll injection, but here i just path EIP register so i actually did not overwritten any other memory ;) this is good approach when i need something to be done immediately. Of course anything will be called from lua :)
there will be a big editor path in 1.4, i just hope opcode signatures wont change x)
You should really check this out :) try saving map from hacked editor and see, where and what it writes before packing :P
working alpha build of Gemini: gemini_build0.1.7z
and of course source full source code on github
there will be a bunch of messageboxes with CreateFileW in the title during startup. Just click ok until editor opens.
Tell me if you're antivirus tell you something bad about this exe, and if, treat it as false positive. My program uses some hacks like dll injection and Import Address Table (IAT) pathing. This is dangerous stuff for helpless application :P but i have good intentions doing that. If you don't trust me, check source and maybe even compile it for your own :) full code::blocks project and lualib included.
yep, you are a human :P and i am going to update it. Actually you can create pull request too :P I'm coding it on windows, because it uses WinApi and StarCraft II didn't work under wine :( This post is from fedora :P
Save injection almost works, but "MapScript.galaxy" is handled by editor while interrupted, so i can't write to it. Anything other just works. I need a workaround. Tried to close and reopen handle after replace, but it is passed by variable, so i can't just do that. New handle has new id. I probably need to override file deletion for handle check. Anyway, tomorrow or maybe even later. School just begins. Too bad. Good night Europeans x)