• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Modify Wc3 GUI script handle.

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Lol... i just noticed that moyackx is writing in this thread, and I was trying to contact him in blizzardmodding.

So.. moyackx, since you're already here, what do you think about team up to improve the WE GUI interface and default functions to be as good as it can be?
 
Level 18
Joined
Jan 12, 2011
Messages
1,513
Lol... i just noticed that moyackx is writing in this thread, and I was trying to contact him in blizzardmodding.

So.. moyackx, since you're already here, what do you think about team up to improve the WE GUI interface and default functions to be as good as it can be?

I doubt he needs help, but if you really want to do stuff the project is in blizzardmodding
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I'm getting really frustrated. I can't think about somethign else than modifying Blizzard.j and common.j files, but that doesn't work; the game still gets the data from the mpq. Importing the file crashes the map.

I'm starting to think that making/improving tutorials may be better than doing this with so little experience on "hacking" stuff.
 
Level 18
Joined
Jan 12, 2011
Messages
1,513
I'm getting really frustrated. I can't think about somethign else than modifying Blizzard.j and common.j files, but that doesn't work; the game still gets the data from the mpq. Importing the file crashes the map.

I'm starting to think that making/improving tutorials may be better than doing this with so little experience on "hacking" stuff.

just leave it to moyack lol he's able to do that stuff :)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I just saw that a few seconds ago Chaosy xD I'm testing with blizzard.j instead of Blizzard.j

EDIT: Yet, doesn't work. I'm testing by setting bj_PI = 10 and displaying bj_PI after 1 second of gametime.

EDIT: Managed to create a new Custom Script function with valid default text, but it's unilinear; i can't write several lines of code (unless there's a way to indicate a line jump with characters in the TXT editor). I would have to create hundreds of Custom Functions, each one corresponding to a line of the code, and add them all to default trigger that are created whenever a new map is created with the World Editor. Of course, I wont. Manipulating the Blizzard.j file adding "valid" text is ok, JASSHelper reads it, and knows there are no mistakes, but the custom functions declared there can't be used in the map; it makes the map crash a if it were any other wrong script.
 
Last edited:
Level 21
Joined
Mar 27, 2012
Messages
3,232
I just saw that a few seconds ago Chaosy xD I'm testing with blizzard.j instead of Blizzard.j

EDIT: Yet, doesn't work. I'm testing by setting bj_PI = 10 and displaying bj_PI after 1 second of gametime.

EDIT: Managed to create a new Custom Script function with valid default text, but it's unilinear; i can't write several lines of code (unless there's a way to indicate a line jump with characters in the TXT editor). I would have to create hundreds of Custom Functions, each one corresponding to a line of the code, and add them all to default trigger that are created whenever a new map is created with the World Editor. Of course, I wont. Manipulating the Blizzard.j file adding "valid" text is ok, JASSHelper reads it, and knows there are no mistakes, but the custom functions declared there can't be used in the map; it makes the map crash a if it were any other wrong script.

Try a HEX editor. In those you can see every sign as a number and thus, can replicate them.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
cant say that I have done alot. but I manged to get LocalPlayer working on my PC as well.
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Player_variable = (Get Local Player)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Player_variable Equal to Player 1 (Red)
        • Then - Actions
          • Special Effect - Create a special effect at (Center of (Playable map area)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions

and I fixed a small flaw, you no longer need to create the hashtable. its now done automaticly.
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Save Handle OfFootman 0001 <gen> as 1 of 1 in hash
      • Unit - Kill (Load 1 of 1 in hash)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Ok. I downloaded It and detected is uses "0d" and "0a" as line jumps in .txt files, but how can I add them as a a character in a continuous line?

The thing is: I have to write a whole script function as a "Default" data for a GUI function (Like Enable Damage Detection) in a single line in the .txt, but in a single line, so, when the WE opens it, it creates the line jumps where they're indicated :/

Oh, and line jumps uses 2 characters (dots) i can't copy/paste, since they just make the line jump in the txt file. It would be awesome to add something like /n or <p></p> or something :/
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Ok. I downloaded It and detected is uses "0d" and "0a" as line jumps in .txt files, but how can I add them as a a character in a continuous line?

The thing is: I have to write a whole script function as a "Default" data for a GUI function (Like Enable Damage Detection) in a single line in the .txt, but in a single line, so, when the WE opens it, it creates the line jumps where they're indicated :/

Oh, and line jumps uses 2 characters (dots) i can't copy/paste, since they just make the line jump in the txt file. It would be awesome to add something like /n or <p></p> or something :/

I'm not sure how to do that. I've never really used the HEX editor for anything except looking at the files.
There's also a possibility that notepad++ or something can understand them(and perhaps use).
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I've looked around and found that plain text is hardcoded. You can add stuff there to be read by php or html or other languages, but when you turn any other text form into .txt file, it's just "as it is" it doesn't interpret anything. It's like a pure wc3 string
 
Level 5
Joined
May 6, 2013
Messages
125
You know... if we could edit the base files of warcraft 3 we could delete the 8mb limit on the maps

Code:
Game.dll+6577CB - E8 503F0900           - call Game.dll+6EB720 ->->Storm.Ordinal265 = LONG __stdcall SFileGetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Game.dll+6577D0 - 83 7C 24 10 00        - cmp dword ptr [esp+10],00
Game.dll+6577D5 - 0F87 B8000000         - ja Game.dll+657893
Game.dll+6577DB - 85 C0                 - test eax,eax
Game.dll+6577DD - 0F84 B0000000         - je Game.dll+657893
Game.dll+6577E3 - 3D 00008000           - cmp eax,00800000
Game.dll+6577E8 - 0F87 A5000000         - ja Game.dll+657893

its hardcoded into the Game.dll, so it would be THIS file you would have to change. However, i never actually tested if the limit is checked while JOINING the game or only while HOSTING (and i'm currently not able to run multiple instances at once, so i can not test it either), but if it wasn't, i'm sure someone would have made a hack allowing to host >8mb maps by now.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Code:
Game.dll+6577CB - E8 503F0900           - call Game.dll+6EB720 ->->Storm.Ordinal265 = LONG __stdcall SFileGetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Game.dll+6577D0 - 83 7C 24 10 00        - cmp dword ptr [esp+10],00
Game.dll+6577D5 - 0F87 B8000000         - ja Game.dll+657893
Game.dll+6577DB - 85 C0                 - test eax,eax
Game.dll+6577DD - 0F84 B0000000         - je Game.dll+657893
Game.dll+6577E3 - 3D 00008000           - cmp eax,00800000
Game.dll+6577E8 - 0F87 A5000000         - ja Game.dll+657893

its hardcoded into the Game.dll, so it would be THIS file you would have to change. However, i never actually tested if the limit is checked while JOINING the game or only while HOSTING (and i'm currently not able to run multiple instances at once, so i can not test it either), but if it wasn't, i'm sure someone would have made a hack allowing to host >8mb maps by now.

There has been some talk about it already being possible, but I'm not sure if they meant using locals or actually increasing the limit.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I think it's not possible to do what I'm planning to do the way i'm planning to do.

The best is be what's already being done: Jass injection. When map is saved, it's opened, and the map text/scripts are edited to add the custom scripts where they have to.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I did but understood almost none of it. It has seeeeveral stuff I don't even nearly notice in the default Blizzard TriggerData.txt file as a guide to add new stuff.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
right, I continued to work with adding missing functions. But since I lack knowledge on which functions that are missing, I decided to ask here.

which functions should be added?

so currently I added the following:
GetLocalPlayer()
CreateTrigger()
eventid global variable
GetTriggerEventId()
ConvertPlayerEvent(integer)
eventid condition comparision
FirstOfGroup(group)
fixed a small hashtable flaw as mentionen in a earlier post.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I'll tell you what i'm trying now:

I'm trying to make a New version of War3 mpq's that can be used for us (mappers) that already includes default systems and stuff and modified/removed BJ's to make them work efficiently.

Now, thou I modify war3.mpq and war3x.mpq, WE still isn't using any of those to do what i want to. I'm just changing bj_PI value and displaying it on map initialization. It's still 3.14 touh i change it value on both Blizzard.j files in the Mpq's.

This would be just for mapping; to play with others you need the default Wc3 mpq's, but swapping names is easy.
 
Status
Not open for further replies.
Top