wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Warcraft Editing Tools
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 01-13-2007, 01:07 AM   #1
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default Grim Extension Pack

I'm glad to release this pack of three extensions to Vexorian's JASSHelper.
These require Version 0.9.5 of JassHelper or newer.
  • PathMapper post processes the pathing map. With this you can make specific tiles (un)walkable, (un)buildable, (un)flyable and so on.
  • ObjectMerger adds external object editor data to your map. It can be used to include shared object editor data and to distribute systems that require specific object editor data (for example BonusMod).
  • FileImporter imports external files. It can be used to distribute systems that require specific files imported (for example Dummy.mdx) or to mass-import files whithout having to change the path manually for every file (imp file gets correctly updated).

The extension pack is included all distributions of the Jass NewGen Pack, a separate download is not available any more.

Installation

First you'll need Grimoire or WEHelper and of course JASSHelper.

Then just put the files included in this download into your Grimoire or WEHelper directory. You don't need to overwrite SFmpq.dll if it's already there.



Configuration

If you're using Grimoire:

In the [externaltools] section of mapcompiler.conf add these lines:

Code:
"FileImporter","FileImporter.exe"
"ObjectMerger","ObjectMerger.exe"
"PathMapper","PathMapper.exe"

If you'reusing WEHelper:

In the World Editor open the WEHelper menu.
Find JASSHelper in the plugins list, click it and click configure.
Add the 3 tools by typing in their names and the path to the executable.

Now you're ready to use the external tools.



Usage

In your scripts you can now use the following syntax for the extensions:

Collapse JASS:
//! external FileImporter { hard_drive_file_path target_path_in_map }
//! external ObjectMerger w3o_file_on_hard_drive { more_w3o_files_of_same_type }
//! external PathMapper tile_list | check_flag apply_flag [check_mode] [apply_mode]

FileImporter examples:

Collapse JASS:
//! external FileImporter images\icon1.blp CommandButtons\BTNIcon1.blp
//! external FileImporter D:\war3\images\icon2.blp CommandButtons\BTNIcon2.blp icon3.blp CommandButtons\BTNIcon3.blp

Relative paths to the folders defined in [lookupfolders] in mapcompiler.conf
and the folder, where the map is, are automatically resolved.
For better performance you can import more than one file per call, like seen in the second example.
The imported file list gets correctly updated, so after reloading the map you can see the files in the import manager.
It's mainly useful for distributing systems that require files.

ObjectMerger examples:

Collapse JASS:
//! external ObjectMerger my_items.w3t
//! external ObjectMerger my_abilities.w3a D:\war3\more_abilities.w3a even_more_abilities.w3a
//! external ObjectMerger objects\units.w3u

Relative paths to the folders defined in [lookupfolders] in mapcompiler.conf
and the folder, where the map is, are automatically resolved.
You can merge as many files of the same type as you wish, like in the second example.
Allowed object types are w3u, w3t, w3b, w3d, w3a, w3h and w3q.
All files of one call must have the same type, you can't mix w3u and w3a for example.
This is used to distribute systems that require object editor data.
Use the export function of WE to create files that can be merged,
using an MPQ viewer to extract those files is bad because it won't resole TRIGSTR references.
You'll have to close and reopen your map to see the imported data in the object editor.
This one requires VB 6 runtime files (http://www.wc3campaigns.net/tools/weu/RuntimeFiles.exe)
The tool is also capable of id renaming as seen in the Widgetizer before.
An ability with the name Lightning Bolt::Albt for example will be imported with the id 'Albt'. Its name will be changed to just Lightning Bolt.

PathMapper examples:

Collapse JASS:
//! external PathMapper LdrtLgrsLgrd 2 |
//! external PathMapper Ldrt 40 !

The first example makes the map unwalkable where Lordaeron Dirt, Lordaeron Grass or Lordaeron Dark Grass is.
The second example sets the pathing to normal ground where tiles other than Lordaeron Dirt are.
You can look up the tile-ids in TerrainArt\Terrain.slk which can be extracted from War3Patch.mpq.
To be able to use this you will need the following flags table and a few examples:

Code:
0x01: unused
0x02: 1=no walk 0=walk ok
0x04: 1=no fly 0=fly ok
0x08: 1=no build 0=build ok
0x10: unused
0x20: 1=blight 0=normal
0x40: 1=no water 0=water
0x80: 1=unknown unpathable 0=normal

00 bridge doodad
08 shallow water
0A deep water
40 normal ground
48 water ramp, unbuildable grounds, unbuildable parts of doodads
CA cliff edges, solid parts of doodads
CE map boundaries

As you can see the parameter after the tilelist is the flag value and then there's a paramter to
change the check mode and/or the apply mode. Apply modes can be:
  • |: binary or
  • &: binary and
  • ^: binary xor

So in the first example only the no-walk-bit is set with a binary or and nothing else is changed.
If you don't specify an apply mode, the old values are completely replaced by the value you specify.
Like in the second example where it's set to normal ground. Check modes here can be:
  • !: not

In the second example ! is used to change the pathing for all tiles that are NOT in the list.
If you don't set this parameter the normal mode will apply the change for all tiles in the list.

Collapse JASS:
//! external PathMapper CE FD 1 &
//! external PathMapper A F5 0 &

It's also possible to update the path map independant of the tiles.
In the above examples the current pathing value of each point is compared to a mask (the first parameter).
The second parameter again is the new flag value that will be applied. In this case the following check modes are available:
  • 1: all bits that are set in the mask must be set for a point to be updated, other flags may be set too
  • 0: all bits that are set in the mask can be set, but don't have to, other flags must not be set for a point to be updated

The default check mode is that the pathing value of a point must exactly match the specified mask
in order to have the change applied. Change modes are like above and, or, xor, or set by default.
In example one map boundaries are made walkable by removing the no-walk-bit with a binary and.
In the second example areas that have either the no-walk or the no-fly bit set, are made walkable and flyable.



Examples

Collapse JASS:
//! external FileImporter images\icon1.blp CommandButtons\BTNIcon1.blp
//! external FileImporter D:\war3\images\icon2.blp CommandButtons\BTNIcon2.blp icon3.blp CommandButtons\BTNIcon3.blp

//! external ObjectMerger my_items.w3t
//! external ObjectMerger my_abilities.w3a D:\war3\more_abilities.w3a even_more_abilities.w3a
//! external ObjectMerger objects\units.w3u

//! external PathMapper LdrtLgrsLgrd 2 |
//! external PathMapper Ldrt 40 !

//! external PathMapper CE FD 1 &
//! external PathMapper A F5 0 &



Known Issues

You need to close and reopen your map in the editor for the import manager and object editor to update.
But you don't need to, it really doesn't matter if the imported data is displayed or not.

There might be missing TRIGSTR references in your object data, if the object files that the merger
imported had been extracted with an MPQ tool instead of the export function of WE.

__________________
Zoom (requires log in)

Last edited by PitzerMike : 03-25-2008 at 03:24 PM.
PitzerMike is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 01-13-2007, 01:10 AM   #2
Av3n
Roar!
 
Av3n's Avatar


Project Leader: TBR
Project Member: PoC
 
Join Date: May 2006
Posts: 1,853

Submissions (7)

Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)

Hero #4 extra-official winner2008 Spell olympics - Fire - BronzeHero Contest #3 - 3rd Place

Default

First 1 to know. I'll give it an shot. Oh and fix you vb code abit

-Av3n
__________________

Thanks to FatherTime for the sig
.:
Current ProjectsSubmissions
Power of CorruptionMy Terrain
The Black RoadMy Resources
Strikeforce
Twitter

Last edited by Av3n : 01-13-2007 at 01:12 AM.
Av3n is offline   Reply With Quote
Old 01-13-2007, 01:47 AM   #3
shadow1500
STARCRAFT II OMFG
 
shadow1500's Avatar
 
Join Date: Jul 2004
Posts: 1,004

Submissions (9)

shadow1500 is just really nice (306)shadow1500 is just really nice (306)shadow1500 is just really nice (306)

Send a message via ICQ to shadow1500 Send a message via AIM to shadow1500 Send a message via MSN to shadow1500
Default

When it merges the object data does it change rawcode in the script to reference the new generated rawcodes?
shadow1500 is offline   Reply With Quote
Old 01-13-2007, 02:00 AM   #4
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Nope, It shouldn't either. I think that what pitzermike wants instead is for you to use your own rawcodes since it is possible, for example Abm1 would be bonus mod attack +1, aka you can customize the rawcodes with a hex editor. I actually think that you can use things like 'bma1' or '_bma1'
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 01-13-2007, 08:48 AM   #5
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Vex is right, you should use your own raw-codes in the first place. That's why it also does the id-renaming.
Like when you have an object named Something::Abcd in the external file, it'll
be changed to the id 'Abcd' while being merged. Then you don't need to use a HexEditor. In the script you'd use 'Abcd' in the first place.

The merger will never generate new ids. If an object with the id already exists, it'll add the changes from the external file to the existing object.
__________________
Zoom (requires log in)

Last edited by PitzerMike : 01-13-2007 at 08:59 AM.
PitzerMike is offline   Reply With Quote
Old 11-20-2008, 03:58 PM   #6
XieLong
User
 
XieLong's Avatar
 
Join Date: Mar 2007
Posts: 81

XieLong has little to show at this moment (7)

Default

Also if this thread is quite old I hope it's ok if I ask my Grimex question here:

Is there a possibility to export only one specific file from the imports with an "//! external" call?
XieLong is offline   Reply With Quote
Old 11-20-2008, 04:51 PM   #7
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

It is not possible out of the box.
However, you should be able to set up MPQ2k as an external tool properly in the jasshelper.config file.
MPQ2k


PS: I've also updated the ObjectMerger so that it works with channel based abilities. Simply copy the files from the attached zip over the old ones in NewGen\grimext\
Attached Files
File Type: zip GrimexHotfix.zip (449.2 KB, 239 views)
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 08-01-2009, 06:21 AM   #8
masda70
User
 
Join Date: Nov 2003
Posts: 233

Submissions (1)

masda70 has a spectacular aura about (128)

Default

Bug in grim?: Using the "Import Object Data" function can create objects containing a double quote character ( " ), which might break maps if you run widgetizer on them afterwards. Apparently " is a string delimiter in the SLK format so this causes the ability to be broken and cause fatal errors when it is loaded ingame. The game doesn't crash if the object is never loaded.

In my case I had an ability whose id was A!!" .

EDIT: Removing the ability in question causes WorldEditor to crash so the Widgetizer is not necessary to trigger the problem! I am proceeding to change the ability id in the w3a file itself.

EDIT2: It worked! It appears that maps affected by this issue might need a special 'fix'.

Last edited by masda70 : 08-01-2009 at 07:19 AM.
masda70 is offline   Reply With Quote
Old 08-26-2009, 09:54 AM   #9
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

How can I, for example, do this:
  1. Import icons:
    • BTNSpells_Hawk_Aspect.blp
    • DISBTNSpells_Hawk_Aspect.blp
  2. Create Spell Hawk Aspect
  3. Create Unit Cleric

???

I did
Collapse JASS:
//! external FileImporter "PATH\BTNSpells_Hawk_Aspect.blp" "ReplaceableTextures\CommandButtons\BTNSpells_Hawk_Aspect.blp"
//! external FileImporter "PATH\DISBTNSpells_Hawk_Aspect.blp" "ReplaceableTextures\CommandButtons\DISBTNSpells_Hawk_Aspect.blp"

so far.
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 12-20-2009, 02:31 PM   #10
Barade
User
 
Barade's Avatar
 
Join Date: May 2006
Posts: 163

Barade is on a distinguished road (14)

Default

Read this as my reply content (couldn't find this thread when I wrote it).
At the moment I still can not use TileSetter with custom tileset ids and I still don't know how the "costs" for one tileset are calculated or defined.
__________________
Barade is offline   Reply With Quote
Old 09-11-2011, 09:31 PM   #11
SerraAvenger
User
 
Join Date: Oct 2008
Posts: 42

SerraAvenger has little to show at this moment (5)

Default

Is there some functionality to get the current value of a field?

something along the lines of:
Collapse JASS:
makechange(current,"istr",getvalue(current,"istr") .. ",I000")

Last edited by SerraAvenger : 09-11-2011 at 09:58 PM.
SerraAvenger is offline   Reply With Quote
Old 09-12-2011, 04:47 AM   #12
PurgeandFire111
User
 
PurgeandFire111's Avatar
 
Join Date: Dec 2006
Posts: 253

PurgeandFire111 will become famous soon enough (58)PurgeandFire111 will become famous soon enough (58)

Default

I haven't found a function that does that yet. (although, there may be one I just don't know about) If you need it, you can try using GMSI instead:
http://www.wc3c.net/showthread.php?t=106485
PurgeandFire111 is offline   Reply With Quote
Old 09-12-2011, 11:05 PM   #13
SerraAvenger
User
 
Join Date: Oct 2008
Posts: 42

SerraAvenger has little to show at this moment (5)

Default

Hm. Not desperatly enough. However there was this thread (by the AMHS guy - yes, this one: ) with a short reply from PitzerMike. I have to admit I didn't understand it 100%, but it said this:
Quote:
None of the grimex tools allows to scan the script for units.
Noted, but:

Quote:
Getting and resetting the unit editor properties is possible with the ObjectMerger.

So I'm assuming the functionality exists - somewhere. Where did you learn about the grimex API?
SerraAvenger is offline   Reply With Quote
Old 10-07-2011, 04:36 AM   #14
PurgeandFire111
User
 
PurgeandFire111's Avatar
 
Join Date: Dec 2006
Posts: 253

PurgeandFire111 will become famous soon enough (58)PurgeandFire111 will become famous soon enough (58)

Default

Quote:
So I'm assuming the functionality exists - somewhere. Where did you learn about the grimex API?

I only learned it from the samples + normal lua + the manual. However, they don't completely cover all of the functions as far as I know (it would be awesome if mike made a list). So for now, you would probably want to look elsewhere to get object data. :\ (or ask pitzermike directly)
PurgeandFire111 is offline   Reply With Quote
Old 10-16-2011, 02:36 PM   #15
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Hello SerraAvenger, I have just checked the source code.
There is currently no function exposed to lua that allows you to get the current value of a field.
However I guess the tool could be extended to provide that.

If anyone is interested, the source coude is available here: http://tools.assembla.com/svn/war3to.../ObjectMerger/
The functions exposed to lua are those that are passed to the lua_register function in main.cpp
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 05:44 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2017, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services