Page 1 of 1
Map Scripting Questions
Posted: Tue May 26, 2015 6:41 pm
by noobmapmaker
Recently I've been reading yaml files of special maps to understand how 'special' maps are built, and how I can use the code in my map. This helps me to get a grasp on the proces in general, but I still have many questions. I'll post two and encourage others to post theirs as well. If others know the answer then step in and help us forward!
For those starting with map scripting: read the
Github post on mapscripting.
A usefull
look-up for traits can also be found on github.
My question is:
Instead of MCV's, I'd like every player to start with barracks. A player is defeated when all his units/buildings are dead. How to script this?
Another question:
How can I force Free For All and Random Spots on a map?
Posted: Tue May 26, 2015 8:09 pm
by noobmapmaker
Another question, there has to be an easier way... I'm trying to fix some things and see what happens when I play the map in skirmish. But if I want to test a change I have to go through a couple steps that become annoying
What I do to test a change:
1) build map in the editor, save it in documents
2) rename the MAP.oramap to MAP.rar
3) unzip into a folder MAP
4) edit stuff in the yaml file and save
5) zip the .bin and .yaml
6) rename the file to MAP.oramap
7) load OpenRa to test
There must be an easier way to test minor changes..
Re: Map Scripting Questions
Posted: Tue May 26, 2015 9:12 pm
by noobmapmaker
noobmapmaker wrote: ↑
Instead of MCV's, I'd like every player to start with barracks. A player is defeated when all his units/buildings are dead. How to script this?
Got this one by myself:
comments in red
In options:
ConfigurableStartingUnits: False
ShortGame: False
game lasts to the very last unit
In rules:
World:
-SpawnMPUnits:
mpspawn = nothing? no MCV
-MPStartLocations: .
(???)
Actors:
Actor7: barr
Location: 57,87
Owner: Multi3
changed the owner from neutral to Multi#
Posted: Tue May 26, 2015 10:07 pm
by Sleipnir
The new map editor (included with the latest playtest) includes the option to save maps directly in their unpacked form, so you'll be able to drop a few items from your checklist above. The game itself has always been able to load them directly in this form.
Posted: Wed May 27, 2015 12:19 pm
by noobmapmaker
Is it in the playtest or in the new release? I did notice some changes, but not sure which you are referring to.
Ah, I dont have to zip the file again and change the name to .oramap! Will try this. Thanks
Posted: Wed May 27, 2015 1:36 pm
by Sleipnir
In the new playtest that was released last weekend. Access it from the "Extras" menu inside OpenRA. It entirely separate to the OpenRA.Editor.exe that is still included (for now - it will be removed in a future release).