There are some pretty severe limitations to CatalogFieldValueSet unfortunately. There hasn't been any documentation listing what those are yet, but for example things like changing Command Cards on the fly doesn't seem to be possible in most circumstances. I need to get around to updating the tutorial with that info.
If you are talking about adding a user-friendly wrapper to the function, best way to go about that is just making a Trigger Library. Many of the existing Blizzard trigger actions related to data actually use CatalogFieldValueGet/Set internally.
You can modify the height map of the terrain by creating Terrain Objects with your model, effectively allowing units to walk on stairs/bridges/etc. You'd still need to create pathing blockers for the walls and such, and multi-level terrain is not supported AFAIK (although you might be able to fake it with triggers).
@MrZ3r0: Go
Never mind, i fix it, but the bridge can't connect between 2 cliffs, it lie on the ground.
You have to change the object's height manually inside the map file (unless blizzard fixed it in a recent patch) as it says at the end of the guide.
@MrZ3r0: Go
same with me, mine doesn't place at all or show up actually.
If your ground height in the Terrain Editor is higher than 0 you won't see the Terrain Object (since it'll be under ground). Drop the ground down below that. Also your object will need a footprint to "destroy" the terrain above it - use THIS as a rough guide on doing that.
If the object doesn't appear at all in Editor, make sure you inherited from Terrain Object in the object, and try restarting GE as someone mentioned.
We've been working on it on and off since the beta came out. Initially sanktanglia started the project as a map editor before GE came out and it grew from there.
The data is still fundamentally separated into different XML nodes, but we do hope to offer better ways to navigate links between them.
For example we'll probably offer a visual graph that shows how any given data relates to other nodes. We will also let you search through all the files simultaneously instead of one at a time, and eventually hope to offer wizards to accomplish repetitive tasks.
As some of you know, Nicoli_s and I have been working on a 3rd party editor since before GE came out. We want the initial version of this editor to be a complement to GE and offer features GE does not. This is our progress so far:
Script Editor
Ability to edit Galaxy scripts directly. Easily import multiple scripts into a map. *
Autocomplete for Galaxy, including custom function names and galaxy calls. Intellisense-style hints for function definitions (coming soon). *
Real-time syntax checking and error detection(courtesy of Zoxc and his Legion compiler) *
Terrain Editor
Export/Import the Heightmap of a map into a image file. *
Export/Import the individual texture masks for each terrain texture. *
The combination of of the two features above can let map makers create terrain that is virtually impossible in GE. You will be able to take 2D images and turn them into awesome 3D maps with any image editor and a few clicks of a button.
3D preview of terrain after import *
Future support for custom cliffs, importing pathing map from an image, etc *
Data Editor
XML-based data editor. XML is intelligently merged from different data sources. *
Edit data as XML text and in a modern property grid simultaneously. *
Open and view multiple data objects at the same time. Easily navigate between them. *
After you complete that, simply add a footprint to the bridge of the shape thats the same as the model (I'll add a detailed explanation later, but there are already guides on footprints out there I think).
And yes, as far as anyone can tell 2-level terrain is impossible.
You should be able to create a destructible with a custom pathable footprint. Set the model to the destructible to be a bridge (or some other flat surface) and tilt it forward like a ramp.
I haven't seen any documentation of this very important trigger, so I figured I'd post some info. Much of this is taken from Renee's helpful tutorial at http:bbs.islga.org/read-htm-tid-38662.html .
These functions are available as GUI actions in the Catalog category. They allow you to change the "templates" of Units, Abilities and any other object that can be edited in the data editor via triggers.
Parameters:
int catalog
References one of the following constants which refer to the 51 GameData files in SC2:
Refers to the ID of the data object you are trying to modify. This ID can be viewed in the data editor by using View Raw Data and using the Name of the object in the left panel (or using the 'id' Token of the object).
string fieldpath
Refers to the data field that you are trying to modify. If the data field is a a simple value (not an array and not a structure), you can simply put the name here. For example for for Unit Speed, put "Speed". Again use View Raw Data for find the name of the field.
If the field is a complex structure (field with multiple internal values inside it), use the "." operator to access those fields. For example to access a Unit's Figet values, use "Fidget.TurnAngle", "Fidget.TurningRate", etc.
If the field is part of an array (for example AbilityArray of a unit), you can use indexes to access elements of the array. For example to access the first element of CUnit_AbilArray_Link (full name of the ability array), I would use "AbilArray[0].Link". Here's an example:
A Zealot has the following abilities:
Field Zealot (Zealot)
CUnit_AbilArray_Link {stop|attack|move|Warpable|Rally|Charge}
In order to change the Zealot's ability from Charge to Blink, I would call:
CatalogFieldValueSet (c_gameCatalogUnit, "Zealot", "AbilArray[5].Link, 1, "Blink");
There are some arrays that are indexed with IDs. For example the 'Build' ability's InfoArray is indexed by "BuildXX". You can check if an array is indexed if when modifying this array via Raw Data, you can see an ID-Value pair in the array viewer, like this:
In this case, each entry of the array is indexed by a constant 'e_abilCmdBuild'. However these constants are part of the editor and are not accessible via triggers. Additionally many Data Editor fields have custom GUIs (Command Card for example) that make it very difficult to figure out how to modify them. In these cases it is better to open up the XML file from GameData and read how it references these values. Here's an example:
Here we see the InfoArray is indexed by "Build1", "Build2", etc. Similarily the Resource array inside it is indexed by "Minerals" or "Vespene". Note that any tag that appears twice inside 1 XML node is effectively an array. Therefore to access the first element of the array, and get the unit, one would use "InfoArray[Build1].Unit". To get the cost of that unit, one would use "InfoArray[Build1].Resource[Minerals].
Example 1: Lets say we want to set the cost NuclearReactors build from a barracks to 100 gas, we would use:
CatalogFieldValueSet(c_gameCatalogAbil, "BarracksAddOns", "InfoArray[Build2].Resource[Vespene]", 1, "100");
Example 2: Lets say I want to move the position of the Stimpack button on the Marine 1 to the right. The command card of a Marine looks like:
To change the Column of Stim, I would use:
CatalogFieldValueSet (c_gameCatalogUnit, "Marine", "CardLayouts[0].LayoutButtons[5].Column",1,"1");
As you can see, you can use this to change almost anything editiable with GE in realtime. Dynamic tooltips? Trigger-based global upgrades? There are tons of possibilities. More testing has to be done on whether this would work for modifying things like Actors or Tilesets.
int player
As you've noticed, these functions all take in a player argument. It turns out that the game stores Catalog data on a per-player basis. That is each player has a unique copy of all data and it can be modified independently of other players. When a player trains an upgrade, it actually modifies the Catalog data to apply the changes listed in that upgrade. The functions above work in the same way.
Make a Requirement + Validator for each level for the unit to be = level of ability *2.
So level 2 of an ability would require unit lvl 4, lvl 3 would require 6, etc. Look up one of the hero tutorials to see how to make the requirement. They usually have a lvl 6 requirement for the "ultimate" ability.
0
Open the map with an MPQ viewer and edit the 'Objects' file. Delete all terrain objects there.
0
There are some pretty severe limitations to CatalogFieldValueSet unfortunately. There hasn't been any documentation listing what those are yet, but for example things like changing Command Cards on the fly doesn't seem to be possible in most circumstances. I need to get around to updating the tutorial with that info.
If you are talking about adding a user-friendly wrapper to the function, best way to go about that is just making a Trigger Library. Many of the existing Blizzard trigger actions related to data actually use CatalogFieldValueGet/Set internally.
0
@IskatuMesk: Go
You can modify the height map of the terrain by creating Terrain Objects with your model, effectively allowing units to walk on stairs/bridges/etc. You'd still need to create pathing blockers for the walls and such, and multi-level terrain is not supported AFAIK (although you might be able to fake it with triggers).
0
Now just need to implement some kind of compression for strings (Huffman would do, as per vjeux).
0
@MrZ3r0: Go Never mind, i fix it, but the bridge can't connect between 2 cliffs, it lie on the ground.
You have to change the object's height manually inside the map file (unless blizzard fixed it in a recent patch) as it says at the end of the guide.
@MrZ3r0: Go same with me, mine doesn't place at all or show up actually.
If your ground height in the Terrain Editor is higher than 0 you won't see the Terrain Object (since it'll be under ground). Drop the ground down below that. Also your object will need a footprint to "destroy" the terrain above it - use THIS as a rough guide on doing that.
If the object doesn't appear at all in Editor, make sure you inherited from Terrain Object in the object, and try restarting GE as someone mentioned.
0
@templar4522: Go
It's coded in .NET.
We've been working on it on and off since the beta came out. Initially sanktanglia started the project as a map editor before GE came out and it grew from there.
0
@Windexglow: Go
The data is still fundamentally separated into different XML nodes, but we do hope to offer better ways to navigate links between them.
For example we'll probably offer a visual graph that shows how any given data relates to other nodes. We will also let you search through all the files simultaneously instead of one at a time, and eventually hope to offer wizards to accomplish repetitive tasks.
0
Milky Way Editor
As some of you know, Nicoli_s and I have been working on a 3rd party editor since before GE came out. We want the initial version of this editor to be a complement to GE and offer features GE does not. This is our progress so far:
Script Editor
Terrain Editor
Data Editor
0
@Ardnived: Go
Bridge guide here
After you complete that, simply add a footprint to the bridge of the shape thats the same as the model (I'll add a detailed explanation later, but there are already guides on footprints out there I think).
And yes, as far as anyone can tell 2-level terrain is impossible.
0
I'm surprised how close some of the other entries are. DarkRevenantX should win this by a mile I think
0
You should be able to create a destructible with a custom pathable footprint. Set the model to the destructible to be a bridge (or some other flat surface) and tilt it forward like a ramp.
That should let you simulate a ramp I think.
0
It is also possible to change the editor's localization by going to the console (Window -> Console) and using the localization command.
0
I haven't seen any documentation of this very important trigger, so I figured I'd post some info. Much of this is taken from Renee's helpful tutorial at http:bbs.islga.org/read-htm-tid-38662.html .
Function definition:
These functions are available as GUI actions in the Catalog category. They allow you to change the "templates" of Units, Abilities and any other object that can be edited in the data editor via triggers.
Parameters:
int catalog
References one of the following constants which refer to the 51 GameData files in SC2:
string entry
Refers to the ID of the data object you are trying to modify. This ID can be viewed in the data editor by using View Raw Data and using the Name of the object in the left panel (or using the 'id' Token of the object).
string fieldpath
Refers to the data field that you are trying to modify. If the data field is a a simple value (not an array and not a structure), you can simply put the name here. For example for for Unit Speed, put "Speed". Again use View Raw Data for find the name of the field.
If the field is a complex structure (field with multiple internal values inside it), use the "." operator to access those fields. For example to access a Unit's Figet values, use "Fidget.TurnAngle", "Fidget.TurningRate", etc.
If the field is part of an array (for example AbilityArray of a unit), you can use indexes to access elements of the array. For example to access the first element of CUnit_AbilArray_Link (full name of the ability array), I would use "AbilArray[0].Link". Here's an example:
A Zealot has the following abilities: Field Zealot (Zealot) CUnit_AbilArray_Link {stop|attack|move|Warpable|Rally|Charge}
In order to change the Zealot's ability from Charge to Blink, I would call: CatalogFieldValueSet (c_gameCatalogUnit, "Zealot", "AbilArray[5].Link, 1, "Blink");
There are some arrays that are indexed with IDs. For example the 'Build' ability's InfoArray is indexed by "BuildXX". You can check if an array is indexed if when modifying this array via Raw Data, you can see an ID-Value pair in the array viewer, like this:
In this case, each entry of the array is indexed by a constant 'e_abilCmdBuild'. However these constants are part of the editor and are not accessible via triggers. Additionally many Data Editor fields have custom GUIs (Command Card for example) that make it very difficult to figure out how to modify them. In these cases it is better to open up the XML file from GameData and read how it references these values. Here's an example:
Here we see the InfoArray is indexed by "Build1", "Build2", etc. Similarily the Resource array inside it is indexed by "Minerals" or "Vespene". Note that any tag that appears twice inside 1 XML node is effectively an array. Therefore to access the first element of the array, and get the unit, one would use "InfoArray[Build1].Unit". To get the cost of that unit, one would use "InfoArray[Build1].Resource[Minerals].
Example 1: Lets say we want to set the cost NuclearReactors build from a barracks to 100 gas, we would use: CatalogFieldValueSet(c_gameCatalogAbil, "BarracksAddOns", "InfoArray[Build2].Resource[Vespene]", 1, "100");
Example 2: Lets say I want to move the position of the Stimpack button on the Marine 1 to the right. The command card of a Marine looks like:
To change the Column of Stim, I would use: CatalogFieldValueSet (c_gameCatalogUnit, "Marine", "CardLayouts[0].LayoutButtons[5].Column",1,"1");
As you can see, you can use this to change almost anything editiable with GE in realtime. Dynamic tooltips? Trigger-based global upgrades? There are tons of possibilities. More testing has to be done on whether this would work for modifying things like Actors or Tilesets.
int player
As you've noticed, these functions all take in a player argument. It turns out that the game stores Catalog data on a per-player basis. That is each player has a unique copy of all data and it can be modified independently of other players. When a player trains an upgrade, it actually modifies the Catalog data to apply the changes listed in that upgrade. The functions above work in the same way.
0
A sun clock.
I didn't actually change the color of the lights, as that should be tileset-dependent. Shows how to easily simulate the movement of a sun.
Edit: IV should be VI :D
0
Make a Requirement + Validator for each level for the unit to be = level of ability *2.
So level 2 of an ability would require unit lvl 4, lvl 3 would require 6, etc. Look up one of the hero tutorials to see how to make the requirement. They usually have a lvl 6 requirement for the "ultimate" ability.