(Question) BaseBuildings leave Husks
Posted: Fri Apr 08, 2011 5:49 pm
Greetings,
is it possible to make basebuildings, like the silo, to leave husks after they have been destroyed?
I already added a husk actor. added a husk sequence. and added the line
LeavesHusk:
HuskActor: SILO.Husk
to the silo actor.
i copied almost everything from the oilderrick husk (v19.husk - found it in - tech.yaml)
i not only copied. i adopted for example the sequence numbers etc.
i tried to set the hulk as
Inherits: ^CivBuilding
Inherits: ^Building
but it did not work
for now i got this exception log when trying to run.
System.InvalidOperationException: Trait prerequisites not satisfied (or prerequisite loop) Actor=silo.husk Unresolved=DeadBuildingStateInfo Missing=HealthInfo
i tried to give prerequisites to the hulk and i also tried to set -prerequesite: to the husk
i haven't tried anything to the health problem yet. suggestions would be great.
but i think it could be solved by deleting the -health: from the husk actor.
another question is: where do i add the sequence? the husk-sequence for the oilderrick is in sequences/map/yaml but do i have to add my own sequence there? does it matter at all?
ehm... i guess it got a bit complicated so i will add my "code" add now:
so this is out of the structures.yaml
SILO:
Inherits: ^Building
Valued:
Cost: 450
Tooltip:
Name: Tiberium Silo
Icon: siloicnh
Description: Stores processed Tiberium
Buildable:
Queue: Defense
BuildPaletteOrder: 20
Prerequisites: anypower
Owner: gdi,nod
CashTrickler: 21 (this is something i added for another mod. don't bother)
Building:
Power: -10
Footprint: xx
Dimensions: 2,1
Capturable: true
BaseNormal: no
Health:
HP: 100
RevealsShroud:
Range: 4
RenderBuildingOre:
StoresOre:
PipCount: 5
PipColor: Green
Capacity: 1000
-RenderBuilding:
-EmitInfantryOnSell:
LeavesHusk:
HuskActor: SILO.Husk
SILO.Husk:
Inherits: ^CivBuilding
-DeadBuildingState:
-Health:
RenderBuilding:
Palette: staticterrain
WithFire:
DeadBuildingState:
Zombie: true
Building:
Footprint: xx
Dimensions: 2,1
Tooltip:
Name: Destroyed Silo
Icon: siloicnh
this is my sequence/map.yaml
silo.husk:
idle:
Start: 10
fire-start: flmspt
Start: 0
Length: *
fire-loop: flmspt
Start: 50
Length: *
v19:
idle:
Start: 0
Length: 14
Tick: 120
damaged-idle:
Start: 14
Length: 14
Tick: 120
dead:
Start: 28
thanks in advance for any suggestion or solution!
is it possible to make basebuildings, like the silo, to leave husks after they have been destroyed?
I already added a husk actor. added a husk sequence. and added the line
LeavesHusk:
HuskActor: SILO.Husk
to the silo actor.
i copied almost everything from the oilderrick husk (v19.husk - found it in - tech.yaml)
i not only copied. i adopted for example the sequence numbers etc.
i tried to set the hulk as
Inherits: ^CivBuilding
Inherits: ^Building
but it did not work
for now i got this exception log when trying to run.
System.InvalidOperationException: Trait prerequisites not satisfied (or prerequisite loop) Actor=silo.husk Unresolved=DeadBuildingStateInfo Missing=HealthInfo
i tried to give prerequisites to the hulk and i also tried to set -prerequesite: to the husk
i haven't tried anything to the health problem yet. suggestions would be great.
but i think it could be solved by deleting the -health: from the husk actor.
another question is: where do i add the sequence? the husk-sequence for the oilderrick is in sequences/map/yaml but do i have to add my own sequence there? does it matter at all?
ehm... i guess it got a bit complicated so i will add my "code" add now:
so this is out of the structures.yaml
SILO:
Inherits: ^Building
Valued:
Cost: 450
Tooltip:
Name: Tiberium Silo
Icon: siloicnh
Description: Stores processed Tiberium
Buildable:
Queue: Defense
BuildPaletteOrder: 20
Prerequisites: anypower
Owner: gdi,nod
CashTrickler: 21 (this is something i added for another mod. don't bother)
Building:
Power: -10
Footprint: xx
Dimensions: 2,1
Capturable: true
BaseNormal: no
Health:
HP: 100
RevealsShroud:
Range: 4
RenderBuildingOre:
StoresOre:
PipCount: 5
PipColor: Green
Capacity: 1000
-RenderBuilding:
-EmitInfantryOnSell:
LeavesHusk:
HuskActor: SILO.Husk
SILO.Husk:
Inherits: ^CivBuilding
-DeadBuildingState:
-Health:
RenderBuilding:
Palette: staticterrain
WithFire:
DeadBuildingState:
Zombie: true
Building:
Footprint: xx
Dimensions: 2,1
Tooltip:
Name: Destroyed Silo
Icon: siloicnh
this is my sequence/map.yaml
silo.husk:
idle:
Start: 10
fire-start: flmspt
Start: 0
Length: *
fire-loop: flmspt
Start: 50
Length: *
v19:
idle:
Start: 0
Length: 14
Tick: 120
damaged-idle:
Start: 14
Length: 14
Tick: 120
dead:
Start: 28
thanks in advance for any suggestion or solution!