Opened 12 years ago

Closed 12 years ago

Last modified 7 years ago

#1166 closed enhancement (fixed)

[PATCH] Add <RubbleActor> tag in <VisualActor> Element for Building Templates

Reported by: michael Owned by: ben
Priority: Nice to Have Milestone: Alpha 12
Component: Core engine Keywords: patch simple
Cc: Patch:

Description (last modified by michael)

It would be nice to have a <RubbleActor> tag added for the <VisualActor> element in building entity templates, like so:

  <VisualActor>
    <FoundationActor>structures/fndn_2x2.xml</FoundationActor>
    <Actor>props/special/palisade_rocks_outpost.xml</Actor>
    <RubbleActor>structures/rubble_2x2.xml</RubbleActor>
  </VisualActor>

The specified Rubble actor would appear on the ground when a building dies and collapses. It would then "decay" sink or fade at some specified rate. Perhaps with another new element, like:

  <RubbleDecay>
    <DelayTime>30.0</DelayTime>
    <SinkRate>0.5</SinkRate>
    <SinkAccel>0.5</SinkAccel>
  </RubbleDecay>

The above is similar to the <Decay> element, but specifically for the <RubbleActor>.

Like animal or human corpses, these "Rubble" actors can be built over. They have no obstruction or footprint.


This ticket has been split off from ticket #131.

Ticket #819 (Destruction dust) is related, but will possibly need a different solution.

Attachments (2)

screen14.jpg (402.5 KB ) - added by michael 12 years ago.
The art dept. will make rubble objects like these.
1166.patch (18.5 KB ) - added by quonter 12 years ago.
Added rubble entity, now uses foundation actors

Download all attachments as: .zip

Change History (21)

comment:1 by michael, 12 years ago

Description: modified (diff)

comment:2 by michael, 12 years ago

Description: modified (diff)

comment:3 by michael, 12 years ago

Description: modified (diff)
Keywords: Rubble Building Death added

comment:4 by michael, 12 years ago

Description: modified (diff)

comment:5 by michael, 12 years ago

Description: modified (diff)

by michael, 12 years ago

Attachment: screen14.jpg added

The art dept. will make rubble objects like these.

comment:6 by Philip Taylor, 12 years ago

Keywords: simple added

Sounds basically fine. I think it would be best for each type of rubble to be a new entity (with a standard <VisualActor> and <Decay> component), and to add something like <Health><DeathRemnant>other/rubble_2x2</...> and make simulation/components/Health.js spawn an instance of that entity when the unit dies (as well as spawning the corpse entity as normal). (Rubble should be handled through a different method to corpses because they're very different problems - corpses need to copy most of the appearance of the original entity (so they copy its whole template and activate its Decay component), whereas rubble doesn't need that and can be simpler.)

by quonter, 12 years ago

Attachment: 1166.patch added

Added rubble entity, now uses foundation actors

comment:7 by quonter, 12 years ago

-Added rubble template using foundation actors
-Added <DeathRemnant> field to <Health>
-On death if <DeathRemnant> is set it spawns it

We need actors for rubble, now it uses foundation actors, so it looks quite strange.

Last edited 12 years ago by quonter (previous) (diff)

comment:8 by quonter, 12 years ago

Keywords: review added
Summary: Add <RubbleActor> tag in <VisualActor> Element for Building Templates[PATCH] Add <RubbleActor> tag in <VisualActor> Element for Building Templates

comment:9 by Kieran P, 12 years ago

Keywords: patch added; Rubble Building Death removed
Milestone: BacklogAlpha 12

comment:10 by Kieran P, 12 years ago

Priority: Should HaveNice to Have

in reply to:  7 comment:11 by historic_bruno, 12 years ago

Replying to quonter:

-Added rubble template using foundation actors
-Added <DeathRemnant> field to <Health>
-On death if <DeathRemnant> is set it spawns it

We need actors for rubble, now it uses foundation actors, so it looks quite strange.

Thanks for the patch. It looks basically good to me, I'll test it soon. It should probably be left for Alpha 12 though, so the art team has time to create decent rubble actors. Or as a temporary work around we could use decals that don't sink, if we have the necessary variety of decals available.

comment:12 by historic_bruno, 12 years ago

Keywords: review removed

I've tested the patch and it works well. All I've had to is refactor a few things, like using SpawnEntityOnDeath instead of the ambiguous DeathRemnant. I'll be committing it in a few moments.

comment:13 by ben, 12 years ago

Owner: set to ben
Resolution: fixed
Status: newclosed

In 12717:

Implements SpawnEntityOnDeath property for entities (i.e. rubble). Fixes #1166.
Adds some placeholder rubble entities. They currently reuse foundation actors until proper rubble models are created.

comment:14 by ben, 12 years ago

In 12718:

Adds rubble entities to most structures. This and r12717 based on patch by quonter. Refs #1166

comment:15 by elexis, 7 years ago

In 19854:

Revert the use foundations as rubble placeholders for corrals from rP12717, as that just confuses players.
Use stone instead of wooden rubble for all corrals, as the models all contain stone.

Differential Revision: https://code.wildfiregames.com/D643
Refs #1166
Patch By: temple

comment:16 by elexis, 7 years ago

In 19855:

Revert the use of foundation placeholders for (mauryan) docks from rP12717 as it only leads to confusion.
Use regular stone rubble instead for the time being.
Don't use the hellenic dock actors in the rubble of non-hellenic docks.

Split From: ​https://code.wildfiregames.com/D643
Refs #1166
Patch By: temple

comment:17 by elexis, 7 years ago

In 19857:

Revert the use of foundations as rubble placeholders for some random buildings from rP12717 as it just confuses players.
Do not use the legit rubble_3x3 actor from rP12719 as it isn't as appealing as rubble_stone_3x3.
Rename it to make it more obvious that the template stands out.

Split from: https://code.wildfiregames.com/D643
Refs #1166
Patch By: temple

comment:18 by elexis, 7 years ago

In 19858:

Revert the use of foundations as rubble placeholders for palisade walls from rP12717 as it just confuses players.
Use the 2x2 stone rubble for now (which is definitely too big but doesn't confuse anyone).
Use it for spikes and the celtic hut too, which had no rubble prior.

Differential Revision: https://code.wildfiregames.com/D691
Split from: D643
Refs #1166
Patch By: temple

comment:19 by elexis, 7 years ago

In 19859:

Remove placeholder rubble templates from rP12717 which just contain a foundation and thus would (as readers of previous commit messages might have guessed already) just confuse players if they were used.

Differential Revision: https://code.wildfiregames.com/D693
Split from D643
Refs #1166
Patch By: temple

Note: See TracTickets for help on using tickets.