Difference between revisions of "UFO-Scripts/maps.ufo"

From UFO:AI
(Example: added hurtaliens to example)
(added 'maxaliens' to Parameters)
Line 63: Line 63:
  
 
==Parameters==
 
==Parameters==
 +
; maxaliens
 +
:The maximum number of aliens to spawn on the map. Note this is not necessarily the number of available spawnpoints. We can put a lot of spawnpoints in the map and limit the number of aliens by the '''maxaliens''' parameter, depending on the map size. Setting '''randomspawn''' will distribute them to the spawnpoints at random. This way we avoid spawning an army of aliens on a very small map, while still keeping diversity.
 
; hurtaliens [[V_BOOL]]
 
; hurtaliens [[V_BOOL]]
 
:If this is true, aliens will receive some damage when the map is loaded. (Used for crashed UFOs)
 
:If this is true, aliens will receive some damage when the map is loaded. (Used for crashed UFOs)

Revision as of 15:46, 23 April 2012

This page describes the map definition format. Every map should have one to get included in the campaign and is selectable from the skirmish and multiplayer menu.

Terrain types

  • desert
  • arctic
  • cold
  • water
  • mountain
  • tropical
  • grass

Also see Terrain types

Culture types

  • eastern
  • western
  • oriental
  • african

Also see Culture types

Population types

  • urban
  • suburban
  • village
  • rural
  • nopopulation

Also see Population types

General

If you create a terrain, culture or population block and leave it empty, this means, that all the values match.

Triggers

You can add special triggers for campaign related missions with:

  • onwin
  • onlose

Trigger commands

  • cp_add_researchable <tech-id>
"Add a tech as researchable"
  • cp_add_item <item-id>
"Add an item as collected"
  • cp_changehappiness <absolute-happiness-value>
"Function to raise or lower nation happiness."
  • cp_endgame
"This command will end the current campaign"

UFO types

  • craft_ufo_scout, craft_crash_scout,
  • craft_ufo_fighter, craft_crash_fighter,
  • craft_ufo_harvester, craft_crash_harvester,
  • craft_ufo_bomber, craft_crash_bomber
  • craft_ufo_corrupter, craft_crash_corrupter
  • craft_ufo_supply, craft_crash_supply


Aircraft types for dropships

This is for skirmish only - in general your map should support every dropship if you want to get it included into the game (or it should not use any dropship)

  • craft_drop_firebird
  • craft_drop_herakles
  • craft_drop_raptor

Parameters

maxaliens
The maximum number of aliens to spawn on the map. Note this is not necessarily the number of available spawnpoints. We can put a lot of spawnpoints in the map and limit the number of aliens by the maxaliens parameter, depending on the map size. Setting randomspawn will distribute them to the spawnpoints at random. This way we avoid spawning an army of aliens on a very small map, while still keeping diversity.
hurtaliens V_BOOL
If this is true, aliens will receive some damage when the map is loaded. (Used for crashed UFOs)

Example

mapdef oilpipes_small
{
	map			"+industrial"
	param		small
	description	"_Industrial theme."
	size		"small"
	teams		4
	multiplayer	false
	maxaliens	6
	hurtaliens	false

	aircraft 
	{
		craft_drop_firebird
		craft_drop_raptor
		craft_drop_herakles
	}

	ufos
	{
		craft_ufo_scout
		craft_ufo_fighter
	}

	terrains
	{
	}

	cultures
	{
	}

	populations
	{
		village
		suburban
		urban
	}
}