Mapping for minimalists
The following text was written for Crimson Fields 0.4.2. For different releases the procedure may differ slightly.
Note: The map editing programs may not be included with pre-compiled packages. They are included with the source code.
The minimum setup for a map is this:
- a map, whatever you like best
- a few units for each side (technically, you don't even need this, but a map without units is pretty boring)
- one event per side, defining the victory conditions
The first two items are fairly straight-forward, but the last one deserves some more attention. Let's walk through the steps required.
Select Events..., New, Score. A score event, you guessed it, awards points to a player. The player who first reaches 100 points wins the map. Using Triggered by we can define when the event should be executed. For our minimum scenario we select "Unit Destruction" because we want the map to be over when a player has lost all his units. Hit OK.
Now you can configure the event. This window always looks the same, no matter what type of event you are editing. The ID is a technical thing and needed in a few special cases. Player is the player for whom the event will be executed, in this case the player who gets the points. Obviously we need to create (at least) one such event for Player 1 and one for Player 2. Select Player 1 for the first message. When executed, an event can optionally display a message to the receiving player which you can configure with Msg Title, and Set Event Message. If you have started a new map, you won't have any messages to choose from, yet. We'll come back to this part later. With Depends on you can chain several events together, but we don't need this for our scenario, so leave it alone for now. The last two buttons, Edit Trigger and Edit Event, are the really interesting ones. Both will open a new window which varies according to the event and trigger type you selected when creating the event.
Select Edit Trigger. For the Unit Destruction trigger type we can only select a unit and a player. This is a score event for Player 1, so we want to execute it when Player 2 lost all of his units. When clicking on Unit you can also select a specific unit, but we don't want that. All is fine. For Player you need to select Player 2, of course. Hit OK and the trigger is done.
Now click Edit Event. We want the map to be over when the event triggers, so enter 100 points in the Score field. With Lose Title and Lose Message you can configure a message to display to the loser of the map (or, if you had entered less than 100 points, simply to the player who does not get the points). Again, you don't have anything to choose from right now.
If you have created an event for each player, you are mostly done. If you select Project -> Validate however, you'll get a few errors and warnings. CoMET complains about missing map name, player names, player briefings, and the like. To fix these we need messages. You cannot create messages with CoMET, yet. Therefore, select Project -> Export to save the map to the text format used by cfed. (Note: Since version 0.4.4 you can create simple (as in no line breaks, plain ASCII) messages using CoMET via the Messages... menu item.)
Fire up your favourite text editor and load the exported file. Move to the end and create a messages section:
[messages(en)] My Map Name % Player 1 % Player 2 % We'll make this the briefing for Player 1. Hello P1, you must defeat your opponent! Good luck. % And this is the one for Player 2. Hello P2, have fun! % And the level info: The is my first map. Don't sue me! [/messages]
Save the file and run it through cfed:
cfed <mymap>.src --units /path/to/default.units --tiles /path/to/default.tiles -o <mymap>.lev
If the conversion was successful, cfed will have create the file <mymap>.lev in the current directory. Copy the file back into the .crimson/levels/ directory and load it into CoMET. Then select Project -> Settings where you can set up everything CoMET complained about. You can now select messages from the section you created.
If you run Project -> Validate afterwards it should report success.
Voilà, your first minimal map is done!
For more information on event types, triggers, and the format of the exported maps in general, please have a look at the cfed manpage.
If you still have questions, the mailing list is the best place to get the answers.
Up: MappingTutorial Previous: MappingBasics