| 01-24-2006, 02:20 AM | #1 |
The Jass Tool is the prebuild tool using japi.dll. I'm pretty sure it should work now... // Original Post This is my first version of the Jass Hacking API that allows you to create new natives. Included is the source code only, so it is up to you to create a program to use it. I reccomend creating a dll using my code and then injecting it into the game or the editor. Here are some tutorials and resources for you coders interested in trying this: http://www.thecodeproject.com/dll/DL...n_tutorial.asp http://www.megasecurity.org/Programm...Injection.html http://www.planet-source-code.com/vb...tp%2FC83204982 Just search google and you can find plenty more. You will need to inject your code immediately after creating the process for this to work. I have included some sample code of adding natives in the .rar in addition to the two files that make up this library. There is more to come (at least a bit), but I figured I'd release what I have so far. Have fun, good luck, and enjoy. Edit: Hmm, actually, to make it easy... I'll release an entire project using this source code with the loader and all premade. It will have a plugin-like setup that will allow you to create new natives by simply building a dll that exports the native you want to add. // End of Original post |
| 01-24-2006, 04:46 AM | #2 |
I know it isn't exactly the same thing, but you might want to take some inspiration from MetaMod(a Half-Life 1 tool used to modify mods, thus the name) as far as the way the interface it exposes allow an arbitrary number of user dlls to be loaded =-) If you design it right, others could make both new natives(the whole point of your work) and non-native additions (for example, an auto-downloader that could fetch missing dlls from a central 'WC3 MetaMod' website and register them with the program if the user approves) |
| 01-24-2006, 03:09 PM | #3 |
interesting. Tha'ts the extent of my knowledge on this, i just know there's more possibilites on this. IF this is what i think it is then it could really benefit a lot of us who don't play melee but who like the competition part of it. Keep up the good work :) |
| 01-24-2006, 03:41 PM | #4 |
Maybe we might find a way to sync things throught this? |
| 01-24-2006, 05:21 PM | #5 |
Finally, someone put out the source code for something, and it's in a language I have had the chance to learn. Huzzah!. So anyway, now that we have these capabilities we really need to figure out HOW the game derives certain values, such as damage and such....otherwise this is just a load of code that won't be able to help anyone really. |
| 01-24-2006, 05:37 PM | #6 | |
Quote:
Except creating custom ladder systems and deliver messages from web into map. This will only work if one of the players has the mod. |
| 01-24-2006, 06:46 PM | #7 | |
Quote:
There might be ways around that problem, such as altering an almost-never-used native to make it do something special if a certain value is passed in, but that would be a fairly difficult addition to what xttocs has released. |
| 01-24-2006, 08:58 PM | #8 |
Ext, that is not difficult to add at all. Also, there numerous natives that are part of the game that aren't listed in common.j but are still already part of the game. Here are some of the natives that are already present but do nothing. Code:
Prototype - Native Name "(S)V" - "DebugS" "(SI)V" - "DebugFI" "(SI)V" - "DebugUnitID" "(IS)V" - "DisplayText" "(ISI)V" - "DisplayTextI" "(ISII)V" - "DisplayTextII" "(ISIII)V" - "DisplayTextIII" "(I)V" - "DebugBreak" |
| 01-24-2006, 09:27 PM | #9 |
i seem to get compile errors on [Warning] `naked' attribute directive ignored `push' undeclared (first use this function) void __declspec(naked) jInitializing_hook() { __asm { push ecx push edx call jInitializing pop edx pop ecx jmp jBindNative } } |
| 01-24-2006, 09:59 PM | #10 |
Me too, what do you use to build it? to both of ya ;) |
| 01-24-2006, 10:05 PM | #11 |
I got it to work you needed complie it as a libray im using Dev C++ IDE this is the native that i want to add. bool IsKeyPressed(char a){ if(kbhit()&& a == getch()) return true; return false; } basicly it checks if key has been pressed and then gets the key and see if it is equal to the value passed. hmm it only works on concle apps... |
| 01-24-2006, 10:55 PM | #12 | |
Quote:
As far as how to compile it, you need MSVC because GCC uses a different format for inline assembly. Currently, though, the code isn't very useful to anybody that doesn't know how to inject a DLL into a process because xttocs hasn't added in that part yet. You can freely (and legally) obtain VC 2005 Express Edition for several months (it's going to be downloadable for 1 year total, but once you download it you can freely use it forever), or if you can't stand the 2005 interface (like me), you can get VC Toolit 2003 for free (legally), but it only contains the command-line compilers and not the fancy interface (I use VS2002 w/ the 2003 compiler) Note that if you get either one of the free versions listed above, you'll also need to download the Platform SDK and set up your compiler to work with it. The retail versions of visual studio come with the platform SDK, but it's a large download so the free versions don't include it. |
| 01-24-2006, 11:02 PM | #13 |
We can make ladder systems |
| 01-24-2006, 11:08 PM | #14 | |
Quote:
|
| 01-24-2006, 11:31 PM | #15 |
I think he wanted it for single player... also its easy to sync a bool (0.5 sec thus...) |
