• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

War3 MPQ edit

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Hi!

Before some moderator moves this outside the WE thread, i'd like to say that the MPQ edit i'm planning is oriented to the WE.

I want to modify the default GUI actions scripts to be different and "smarter". I also want to make new ones and be able to call them as Custom Scripts as if they where Wc3 defaults.

I would have a Backup of War3 and War3x mpq's to play, and another ones to map making (just switching file names)

The thing is: i'm editing the value of bj_PI in both Blizzard.j files (in both Mpq's) but the WE still gives me the value of PI as 3.14.

If WE isn't taking the triggers data from War3.mpq Blizzard.j, or War3x.mpq Blizzard.j, where is it taking it from?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Well... If have the "UI" folder with custom files, and they're read by the WE, so I guess i have local files enabled. Now, I also have the Scripts folder with Blizzard.j and common.j files, but the changes i make on them doesn't work.

The JASSHELPER Blizzard.j's files detects the changes i make on the Scripts/Blizzard.j file, and mimic it, but the changes made there doesn't take effect on the game itself, just on the jasshelper.

War3Patch has no Blizzard.j file >.<
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
If you want an edited version of the Blizzard.j ingame, import it to the map Scripts\Blizzard.j. Your modified mpq would help only you anyway. Every player would have to load it in order to use its data and would be stomped by BNet for having it altered.

Yes, War3Patch has a Scripts\Blizzard.j file.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
War3x has Blizzard.j file
War3Patch has no Blizzard.j file.

I can't import Blizzard.j because map crashes.
I'm not using this for playing, just for map creating. Once the map is saved the script works for anyone.

I don't want to modify a single map Blizzard.j file, I want to modify the Blizzard.j file WE uses to write the GUI scripts, to make functions like CreateNUnitsAtLoc not leak and work better.

EDIT: Enable local files doesn't work for Blizzard.j, just for UI text files (wich were being loaded and used even without Local Files enabled)
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
Which wc3 version do you have? I tested it yesterday and the import worked. Which mpq editor do you use to browse War3Patch? At least for the hashtable functions, that were introduced via patch, wrapper BJ functions came along.

No, just using this for compilation in editor won't work as the Blizzard.j is expected to be part of the original data, thus it is not transfered to the map after saving, thus other players won't get the scripts when downloading the map.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I use Warcraft 1.24e

I use MPQ Editor (it has that name, nothing else).

War3Patch.mpq has nothing, remember it's called War3x.mpq.

No, just using this for compilation in editor won't work as the Blizzard.j is expected to be part of the original data, thus it is not transfered to the map after saving, thus other players won't get the scripts when downloading the map.
Why? When you save you can see the map with an MPQ and check the text-file. I guess that file with the scripts is generated based on the game scripts, wich are generated (in this case) based on the GUI functions, wich are taken, i guess, from Blizzard.j and common.j. Once the script is in the file, I see no reason for others not being able to play the map... thou, now that you say it, I'm thinking about those that delete than file and are still able to play the game, so the data must be stored somewhere else in the map too.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
I use Warcraft 1.24e

Yeah, we have 1.26

I use MPQ Editor (it has that name, nothing else).

Ladik's MPQ Editor I suspect, which does not open the War3Patch.mpq legibly. Use Magos for example.

Why? When you save you can see the map with an MPQ and check the text-file. I guess that file with the scripts is generated based on the game scripts, wich are generated (in this case) based on the GUI functions, wich are taken, i guess, from Blizzard.j and common.j. Once the script is in the file, I see no reason for others not being able to play the map... thou, now that you say it, I'm thinking about those that delete than file and are still able to play the game, so the data must be stored somewhere else in the map too.

Well, wrongly guessed. The GUI functions convert as stated in the UI\TriggerData.txt, if it says Unit - Create Units Facing Angle -> CreateNUnitsAtLoc, it transforms to call CreateNUnitsAtLoc(...) and not to the contents of this function. Otherwise, it would have to unpack the same function over and over again, which is wasteful, destroys recursion etc. Even if it was smart enough to copy the function definition once and then call that one, potentially importing the whole Blizzard.j over again would boost the map size a bit and be redundant.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
The thing is UI/TriggerData.txt has no function definitions, just GUI assignments.

Look
Code:
RealPi=0,real,bj_PI,WESTRING_REAL_PI

There is no value of bj_PI involved anywhere else other than Blizzard.j files, and TriggerData does nothing about PI other than just adding it as a preset value for reals in GUI. TriggerData only references GUI actions/events/conditions with Blizzard.j and some common.j functions, constants and natives.

If Unit - Create Units Facing Angle can reference CreateNUnitsAtLoc, then why can't it reference to any other custom function written in the Blizzard.j file?

BTW: Magos allows viewing the MPQ files, but not modifying it afaik, and it still displays the changes I made to Blizzard.j file with the other mpq editor.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
You basically told the map it would be within the local blizzard.j to look up.
and why is that forbidden? If i add the custom func on the blizzard.j, why it doesn't work when i told the map to look for in in the local blizzard.j?
 
Status
Not open for further replies.
Top