Difference between revisions of "Config/Config Object"
Line 424: | Line 424: | ||
;Undocumented feature | ;Undocumented feature | ||
− | Description below make it possible to manipulate the map (objects and units) and save it to disk. | + | Description below make it possible to manipulate the map (objects and units) with the user interface and save it to disk. |
;Activation | ;Activation |
Revision as of 08:22, 9 September 2023
Object Types
The xml element ObjectTypes defines all the geographical object types in a session.
<ObjectTypes>
<ObjectType>
<ObjectType>
...
<ObjectType>
</ObjectTypes>
The xml element ObjectType defines a geographical object type and contain a set of basic properties. Beside the basic properties the activated modules can add properties for the ObjectTypes. See documentation for each module.
A geographical object type is defined with the following properties:
Property |
Module |
Value |
---|---|---|
IDName |
The identification name for a object type. Value example = "Pine", "Birch", "House", "Water" | |
Description |
Object description. Value example= "Water post"/> | |
DestroyEffect |
Forest Fire |
What happens when the object are in fire. Value example= "Fuel station"/> |
FireSpeed |
Forest Fire |
The fire spread factor for this object. The ignite time is multiplied with this value. Value example= "1" For more information see the fire simulation documentation. |
FuelRefillSpeed |
Logistic Fuel |
The amount of fuel this object can to deliver every second to a unit that is refilling fuel from this object. Apply on object type "fuel". Value example = "15" Module : Fuel Logistic Should only be defined if the module FuelLogistic is active. |
Image |
The Image | |
UnitMovementSpeed |
Units movement delay factor. | |
ValueEmotional |
Emotional value. | |
ValueMaterial |
Material Value. | |
WaterRefillSpeed |
Logistic Water |
The amount of water this object can to deliver every second to a unit that is refilling water from this object. Module : Water Logistic Should only be defined if the module WaterLogistic is active. |
<ObjectType
IDName = "Normal"
Description = ""
DestroyEffect = ""
FireSpeed = "1"
FuelRefillSpeed = "5"
Image = "Object/Normal.gif"
UnitMovementSpeed = "1"
ValueEmotional = "1"
ValueMaterial = "1"
WaterRefillSpeed = "5" />
Objects
The xml element Objects contains all map objects that should exist in the simulation.
Object
Defines where a map object should exist.
Configuration example:
<source>
<Objects>
<Object> ... </Object>
<Object> ... </Object>
...
<Object> ... </Object>
<Object Type = "Pine" Pos = "12,12" />
<Object Type = "Pine" Pos = "12,11" />
<Object Type = "Pine" Pos = "11,2" />
<Object Type = "Birch" Pos = "38,23" />
<Object Type = "Birch" Pos = "23,40" />
<Object Type = "Birch" Pos = "2,32" />
<Object Type = "House" Pos = "40,40" />
<Object Type = "Water" Pos = "17,22" />
<Object Type = "Fuel" Pos = "11,12" />
<Object Type = "Water" Pos = "10,10" />
</Objects>
</source>
A object is defined with the following properties:
Property |
Value |
---|---|
Type |
The object type identification number. Value example = "House" |
Pos |
Pos on the map Value example = "2, 20" |
<Source>
<Object
Type = "Pine"
Pos = "12,12"
/>
</Source>
Object Image
The image representing this object on the map should have the file name IDName with '12.gif' as a
extension ( <IDName>12.gif).
Example : Pine12.gif
The image file should be stored in the map image catalog <C3FIRE-MAP-IMAGES> , located at <C3FIRE-WWW-ROOT>/pic/
Example : C:\c3fire\www\pic\Pine12.gif
The standard experiment setting defines four object types. They are Normal, Pine, Birch and House.
The module extended setting defines an additional object type, Water. The type must be represented
of an image, named and saved according to examples above.
Standard experiment setting
Module extended setting
Water :
The different
geographical objects
Display Objects
The xml element Objects contains all map objects that should be visible on the users map at start.
DisplayObject
Defines where a map object should exist on the map.
Configuration example
<source>
<DisplayObjects>
<DisplayObject> ... </DisplayObject>
<DisplayObject> ... </DisplayObject>
...
<DisplayObject> ... </DisplayObject>
<DisplayObject Type = "Pine" Pos = "5,10" />
<DisplayObject Type = "Pine" Pos = "38,22" />
<DisplayObject Type = "Birch" Pos = "37,23" />
<DisplayObject Type = "Birch" Pos = "1,2" />
<DisplayObject Type = "Birch" Pos = "23,34" />
<DisplayObject Type = "House" Pos = "1,38" />
<DisplayObject Type = "Water" Pos = "17,22" />
<DisplayObject Type = "Fuel" Pos = "11,12" />
<DisplayObject Type = "Water" Pos = "10,10" />
</DisplayObjects>
</source>
A DisplayObject is defined with the following properties:
Property |
Value |
---|---|
Type |
The object type identification number. Value example = "House" |
PosX |
Pos on the map Value example = "5, 10" |
<Source>
<DisplayObject
Type = "Pine"
Pos = "12,12"
/>
</Source>
DestroyEffect
<DestroyEffects>
<DestroyEffect
IDName = "FuelStation"
Description = "When the fuel station is in fire it will explode, All unit in the area 3x3 will be destroyed."
DestroyTime = "0.0"
FireRadie = "2"
FireType = "Fire"
ObjectRadie = "0"
ObjectType = ""
UnitRadie = "2"
UnitType = "Destroy"
WhenFireBurnedOut = "False"
WhenInFire = "True"
WhenInFireAndOutOfWater = "False" />
</DestroyEffects>
Edit Objects on Map
Examples
Change House to School
- If you have a map with houses and want to change some house to a school follow these steps.
- Make sure that the a school object is defined in the XML ObjectTypes Tag in the definition file, Example file name
...-ObjectsTypes.coni
<ObjectTypes> <ObjectType ... <ObjectType IDName = "School" AidRefillSpeed = "0" Description = "" DestroyEffect = "" FireSpeed = "1" Image = "Object/School.gif" PeopleTransportAlwaysSendNrOfPeople = "False" PeopleTransportEnterLeaveSpeed = "0" PeopleTransportUnload = "False" PowerRefillSpeed = "0" SandbagRefillSpeed = "0" UnitMovementSpeed = "1" ValueEmotional = "1" ValueMaterial = "1" /> ...
- Make sure that the a school object is defined in the user interface object palette definition.
- XML ObjectPalette Tag is defined in the Main UI file. Example file name
...-UIMain.coni
- Resize the object panel if needed.
<UserInterfaceLayout> <Layout Name = "Ground Chief" > ... <Object Name = "ObjectPalette" ... VisibleObjects = "Pine,Birch,House,School,Hospital,Tent,Water" /> ... <ManagerConfig ... <SessionControlLayout> ... <Object Name = "ObjectPalette" ... VisibleObjects = "Pine,Birch,House,School,Hospital,Tent,Water" /> ... <ReplayConfig ... <SimulationMapLayout> ... <Object Name = "ObjectPalette" ... VisibleObjects = "Pine,Birch,House,School,Hospital,Tent,Water" /> ...
- XML ObjectPalette Tag is defined in the Main UI file. Example file name
- Update simulation information where the school should be.
- The positions is defined in the XML Objects tag in the definition file.
- Example file name
...MapObjectsPos.coni
<Objects> ... <Object Type = "House" Pos = "2,17" /> ...
- Pos is the position on map "x,y" / "Column,Row"
- Change "House" to "School"
- Update map information where the school should be.
- The positions is defined in the XML DisplayObjects tag in the definition file.
- Use to be the the same file as where the XML Objects tag is.
- Example file name
...MapObjectsPos.coni
<DisplayObjects> ... <DisplayObject Type = "House" Pos = "2,17" /> ...
- Pos is the position on map "x,y" / "Column,Row"
- Change "House" to "School"
Map Editor
- Undocumented feature
Description below make it possible to manipulate the map (objects and units) with the user interface and save it to disk.
- Activation
- In Players UI configuration in file <config_name>-UIMain-Mac.coni set ObjectPalette config to
- In most configurations the players UI is defined in <Layout Name = "Ground Chief" >.
<Layout Name = "Ground Chief" > ... <Object Name = "ObjectPalette" BorderVisible = "True" Enabeled = "true" Should be true Pos = "1222,290" Size = "120,180" Visible = "true" Should be true VisibleObjects = "" /> Should be empty
- Start the session and let the session run
- Map maipulation
- While the session is running you can do this, (Save before session end).
- The mouse pointer needs to be on the map to make the key commands to work.
- Copy the saved object and unit positions to you configuration
- Use the object palette to insert and delete objects in the map.
- Alt-S : Save, saves the map to, ...\C3LearningLabs\C3Fire\Client\Files\Root\saved-map.txt
- Alt-R : Rotate the map clockwise
- Alt-L : Rotate the map counter clockwise
- Alt-H : Mirror horizontally
- Alt-V : Mirror vertically
- Alt-T : Mirror top right bottom left
- Alt-U : Mirror top left bottom right