This is the whole Hull code, the relevant EffectsGroup is at the bottom.
Code: Select all
Hull
name = "SH_YOUNG_TREE_BODY"
description = "SH_YOUNG_TREE_BODY_DESC"
speed = 0
starlaneSpeed = 0
fuel = 0
stealth = 5
structure = 50
slots = Slot type = External position = (0.30, 0.15)
buildCost = 1
buildTime = 2
Unproducible
location = All
effectsgroups = [
[[EXCELLENT_VISION]]
EffectsGroup // remove self and recreate on first turn, so that trees start with age 0, and thus low initial health, instead of having thousands of structure at start of game
scope = Source
activation = Turn high = 2
effects = [
CreateShip "SM_YOUNG_TREE"
Destroy
]
EffectsGroup // grow larger / stronger with age
scope = Source
effects = [
SetMaxStructure Value + Source.Age*3
SetStructure Value + 7
]
EffectsGroup // spawn floaters to reproduce
scope = Source
activation = Random probability = 0.03
stackinggroup = "TREE_GROWTH"
effects = CreateShip "SM_FLOATER"
EffectsGroup
scope = And [
Object Source.FleetID
Fleet
]
effects = SetAggressive
EffectsGroup // mature into medium TREE
scope = And [
Source
Turn low = 5 high = 9999 // Source.Age or Age does not work
]
activation = Random probability = 1
//stackinggroup = "KRILL_1_ACTION_STACK"
effects = [
CreateShip "SM_MATURE_TREE"
Destroy
/*
GenerateSitRepMessage
message = "EFFECT_MONSTER_SPAWNING"
parameters = [
tag = "predefinedshipdesign" data = "SM_KRILL_2"
tag = "system" data = Source.SystemID
]
*/
]
]
icon = ""
graphic = "icons/monsters/tree.png"
Code: Select all
2014-08-31 19:39:04,481 ERROR Server : [...]/default/ship_hulls.txt:3414:24: Parse error. Expected Condition here:
Object Source.FleetID
Fleet
]
effects = SetAggressive
EffectsGroup // mature into medium TREE
^
scope = And [
Source
Age low = 5 high = 9999
]
activation = Random probability = 1