• 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.

Gameplay Constants

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
So I have a map and I have been modifying simple fields in the gameplay constants such as health gained per strength point.

When I save the map, the fields are still there, but have no effect when I "test map" the game. If I exit the map (of course after saving) then re-open the map, the fields are reset to the defaults.

Any idea what's going on guys? Has my map corrupted? And yes of course, I have enabled custom gameplay constants, otherwise I could not edit the fields in the first place.
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,099
Those should be in the war3mapSkin.txt actually. But maybe it does not matter. Anyway, you would have to merge the files. Remove the import, save the map with the edited stuff, open the map with a mpq editor, extract the file and merge the contents with the other file. Then reimport it into the map.

Or I could probably write you a custom MiscMetaData.slk, which contains the fields you are shown in the editor, to add the fields lacking.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
The second option sounds ideal because if I modify anything in the gameplay constants, I'll need to delete my text file and edit it outside of WC3 then reimport. I could be tweaking values in here a lot because of balancing, etc. So how does a miscmetadata.slk file work? Do I copy the contents of my text file into it and it acts as an extension to the constants rather than replacing it entirely?

Can't seem to google any information about it regarding Warcraft 3 related uses.

Edit: If it's any trouble I'll just use the first method.
 
Level 26
Joined
Aug 18, 2009
Messages
4,099
The meta slks are not imported into your map, they are read by the editor to show the various data fields for units or gameplay constants for example. You can then change them in the editor and thereby tell to transfer the modifications to the map file when saving.

So I copied the latest Units\MiscMetaData.slk and implemented the fields named in the linked thread. You can/should however set some options like of what data type the field, its displayed label or where to save. Since that information is obviously missing for the font fields, I had to make some evaluations.

I encountered two problems: I could not get the editor to load the default values for the font heights. This does not really matter as the editor only saves modifications and you can see the default/reasonable sizes in your linked thread. Second, unlike other real/unreal parameters, for font heights, you would want to have a resolution of at least 3 decimal places. If I set those fields to real/unreal, it allows only 2. This is why I have declared the fields as single line strings. If you give correct number values, it will be okay, since the editor is somewhat slacky and prints no delimiter likes quotes, so the representation is the same.

Unwrap the attached file in your Warcraft III\Units\ directory and restart the editor afterwards.
 

Attachments

  • MiscMetaData.rar
    4.6 KB · Views: 61
Status
Not open for further replies.
Top