aliens

Author Topic: Reparing armour  (Read 4802 times)

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Reparing armour
« on: November 25, 2015, 07:34:51 pm »
Well, as I'm not a modder (and really don't intend to become one...) this might sound a little bit like begging someone to do it for me, but it's not meant to be like that.

One thing I never truly understood, is this fact about »used« armour: Once a soldier is killed, while wearing an armour, the armour is simply gone. You can't reuse it, repair it or salvage components. It's simply gone. Pretty much everything else can be collected, used or at least be sold. But why not armour of any type?

In reality, nobody would throw such an expensive piece of equipment away, unless it's beyond repair or repairing is to expensive. So I thought, how about making them repairable: A killed soldier will create a left behind defective armour of the worn type of a corpse. It's collected after finishing the battle. One can then use it, as kind of a specially required item for production in the newly created »Repair <armour-type>«. It'd need one defective armour, less money than producing a entirely new one, also smaller amounts of alloys, Elerium and time. But the product would be a brand new armour of the formerly defective type, produced with lesser expenses. Same way one could »upgrade« an energy suit into a flying suit.

What do you think? And: Would that be possible, with the current code base?

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Reparing armour
« Reply #1 on: November 25, 2015, 07:47:40 pm »
Well, as I'm not a modder (and really don't intend to become one...) this might sound a little bit like begging someone to do it for me, but it's not meant to be like that.

Yeah it is exactly that, begging, you good-for-nothing :D

But seriously, FMP has armor repair mechanic since ages, I think a few other major mods do as well. Piece of cake to code down, actually.

I recommend becoming a modder and not waiting eternally for a stroke of luck/slave/benefactor ;)

« Last Edit: November 25, 2015, 07:51:10 pm by Dioxine »

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: Reparing armour
« Reply #2 on: November 25, 2015, 07:54:55 pm »
Let me put it that way: I have quite a lot of things I'm already wasting my time with. If I also begin with modding, it's just another distraction on top of all the other sweet ways of wasting valuable time. ;-) But you say, it's already implemented. It seems more and more, that I would have to try those rather big mod collections, even when I'd prefer combining single mods into my own, personal mod-combination. =)

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Reparing armour
« Reply #3 on: November 25, 2015, 08:01:12 pm »
You don't have to download a big mod to do it, it is available in an almost standalone version as well in the "grav armor" mod by clownagent (along with a jumpsuit and personal armor version with flight).

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: Reparing armour
« Reply #4 on: November 25, 2015, 08:04:34 pm »
I was thinking more along the line of making normal armours repairable as well. If I understand the mentioned mod correctly, it uses the »Armor repair« mod, which I didn't find. Is this one missing on the mod page?

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Reparing armour
« Reply #5 on: November 25, 2015, 08:25:12 pm »
I think grav armor integrated the armor repair mod and added new armors. So by downloading it you get both.

Here's a cut down version of the mod that includes only the barebones armor repairs.

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: Reparing armour
« Reply #6 on: November 25, 2015, 08:38:33 pm »
Seems to be working rather well. Only one piece is wrong: When a soldier in flying suit is killed, it returns only an energy suit. I just tried to make heads or tails of the rul-file, but I don't see the mistake.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Reparing armour
« Reply #7 on: November 25, 2015, 09:18:20 pm »
Right, good point. In vanilla, power suits and flying suits produce the same corpse, which is labelled as a power suit corpse. Try to add this to the ruleset:

Code: [Select]
armors:
  - type: STR_FLYING_SUIT_UC
    corpseBattle:
      - STR_CORPSE_FLYING_SUIT

That should make the flying suit generate a flying suit corpse, which you can repair into a flying suit.

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: Reparing armour
« Reply #8 on: November 25, 2015, 09:26:53 pm »
OK, that's indeed awesome. Thanks a lot.