Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Discuss: How to repair rubble? (And remove it, too.)
#1
Okay, I'm about to start implementing Advanced Rubble, a system where, through code like this:

Code:
[GAINTC]
Rubble.Destroyed = GARUBL ; What BuildingType to turn into when destroyed

[GARUBL]
Rubble.Intact = GAINTC ; What BuildingType to turn into when repaired

you can make a given BuildingType turn into a different BuildingType on destruction, and turn that one back into the first one (technically any other) on repair.

As elaborated on the tracker, the background of this is that you can't really "destroy" trenches. Trenches are essentially very long, shaped, holes in the ground. You can either turn them into even larger holes with a nice bomb, or make them collapse, but ultimately, half a trench will remain, and it will be much easier to dig a trench were there was one before than on fresh ground.

As such, we need a system kinda-sorta like the GLA hole, different from the game's usual rubble logic. Where something of the building remains that can be turned back into it.

Now that you all get what the system is supposed to do, the interesting question is....how exactly do you turn rubble back into building?
From the top of my head, already alluded to in the issue, I can come up with these options:
  • Simply build a new trench on the rubble. That would greatly reduce the tactical use of this, imo, as the most an existing trench corpse would do would be maybe refunding half the cost. It would still block the build queue, you'd still need the purchase price up front, and so on. The only real advantage would probably be that you could re-build trenches where you can't build anymore.
  • Have specialized "constructor" units. Kind of like engineers, but with the purpose to re-erect (or re-dig) destroyed structures. Alternatively, one could just alter the Engineer logic so that, when you enter Advanced Rubble with an Engineer, it gets upgraded back to the normal building. The latter would be pretty intuitive, imo, since Engineers already do repair work when entering friendly buildings. In fact, that very fact could make it very easy to implement.
  • Do some action on the rubble. Like "sell" or "repair", have an action "rebuild" you could do on rubble, and then it slowly drains your money and rebuilds the building where it was before. This one would likely be the most hardest to implement, because we'd need to find a way to place additional GUI elements and event handlers.
  • Lastly, I could just make it so, if rubble is occupied, it gets rebuilt. That would make sense in case of trenches, as, in reality, if a trench collapsed, the sergeant is gonna do exactly that - send the grunts into the rubble and re-dig the trench.
    However, it is questionable how valid this approach is on other buildings. While there is a certain logic in "send G.I.s into the Tech Center to help rebuild it", it's not exactly intuitive to have to occupy a building that wasn't occupiable beforehand, in order to repair it. (At least imo.)

So. Opinions? Personally, I favor the hacking-the-Engineer-logic option. Engineers already repair stuff instantly in the game, it logically makes sense Engineers would be the ones reconstructing buildings in general (even if not trenches in particular), all sides have Engineers by default, so mods wouldn't need extra units just to cope with Advanced Rubble, and, implementation-wise, slightly modifying an existing logic probably easier than adding a whole new one.

What do you guys (girls?) say?

Secondly, there's obviously the question of how to remove rubble. Obviously it is imperative you can't make money from selling it - the player just lost that building, it would screw up the balance if he could still make money from it. I originally planned to make rubble unsellable as a whole (similar to existing rubble), though, on principle, I guess forcefully setting Cost and Soylent to 0 and using the selling logic to remove rubble would be an option - if it is possible to reset those on a per-object basis.

However, do we want that at all?
The owner of an Advanced Rubble building enjoys great benefits from said rubble..he can recreate buildings where they stood, quicker than erecting a new one would be.
Wouldn't it only be fair that, in turn, he is unable to remove the rubble?

Then again, that would lead to obvious building frustration later on, and with rubble completely indestructible, once a player has a Rubble-foothold in the enemy's base, the guy is practically screwed.
Personally, I guess an option that takes a certain effort or a long time to remove it is best. "Cleaning up", essentially. Harvesters grinding the rubble, Engineers deconstructing it, something like that.
And maybe making it damageable, so that opponents can just kill it with fire.

Again, opinions? (Ab)using Engineers again sounds best to me, with the option to remove it by force (i.e. C4, tanks...).
Forum Rules

(01.06.2011, 05:43:25)kenosis Wrote: Oh damn don't be disgraced again!

(25.06.2011, 20:42:59)Nighthawk Wrote: The proverbial bearded omni-bug may be dead, but the containment campaign is still being waged in the desert.
Reply
#2
I like the Engineer option. Engineers are already kind of "builder-type" units (you get a "free" one if you sell your construction yard), and, as you said, they already do repair work, so the hacked Engineer logic option to me makes the most sense. And as for removing it, the hacked Engineer logic option also makes sense to me, because I think that Engineers should also be able to do demolition work.
"The present is theirs. The future, for which I really worked, is mine."
- Nikola Tesla

"My - y - my - your - my vision has permutated. My - y - my - your - my plans have followed a path unpredicted by the union of Nod and GDI. Your - my - our - our directives must be reassessed." - Kane/CABAL

[Image: 9853.png]
Reply
#3
once it's "destroyed" set rubble to neutral ownership, so units from any team can capture the "trench", as in real life. extended engineer logic seems good too.
[Image: MRMIdAS2k.jpg]
MRMIdAS: No longer allowed to criticise Westwood on PPM
Reply
#4
For rebuilding trenches, probably best to use the Engineer logic. My only concern here is what if the guy wants to repair a 200$ trench, why does he have to spend 500$ on an engineer to repair it (unless you are hacking the logic to NOT consume the engineer upon use).

For destroying trenches, well... this IS still a BuildingType, correct? That means all BuildingType flags apply. I'd say let the modder himself specify if he wants the trench to be sellable, destroyable, etc. Probably best to allow rubble to be destroyed, because as you said if the guy makes trench rubble in an enemy base he doesn't have much room and he doesn't have much he can do about it. And you can have it sellable; you can let the modder set cost and while it doesnt make perfect logical sense for this case a modder could see it fit to set a cost value on the rubble (and soylent? that doesn't apply to buildings, only units being sent into a grinder/cloning vats).
Reply
#5
* Renegade shrugs...it's listed on ModEnc, and it's defined on TechnoTypeClass.

And this is supposed to be rubble, not reverse upgrading. Not setting restrictions on what the rubble building is/can do sort of defeats the purpose.
I'm strongly considering deactivating the rubble-building, too, to be honest. This is really not supposed to be more than a barebones shell. A placeholder. Junk.
Forum Rules

(01.06.2011, 05:43:25)kenosis Wrote: Oh damn don't be disgraced again!

(25.06.2011, 20:42:59)Nighthawk Wrote: The proverbial bearded omni-bug may be dead, but the containment campaign is still being waged in the desert.
Reply




Users browsing this thread: 1 Guest(s)