aliens

Author Topic: Remove Weight Encumbrance (edit: and Item Destruction/Removal)  (Read 3824 times)

Offline GeneTheBean

  • Squaddie
  • *
  • Posts: 6
    • View Profile
Remove Weight Encumbrance (edit: and Item Destruction/Removal)
« on: January 21, 2020, 01:47:12 am »
Just want a way to prevent soldiers from getting encumbered. If there's a mod for this already just point it out, thanks!

Could of course make soldiers super strong and/or use find-and-replace to set item weights to a low value like 0 or 1, which is trivial, but I think this would upset throwing mechanics.

I just want to stop micromanaging my soldiers and give everyone a standard inventory full of everything, for what amounts to a tiny buff in practice. Kind of common sense; I would expect such a mod to have existed back in XcomUtil or UFO extender.
« Last Edit: January 24, 2020, 11:59:35 pm by GeneTheBean »

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Remove Weight Encumbrance
« Reply #1 on: January 21, 2020, 02:24:46 am »
My suggestion would be to open the *.rul file that contains the armors: section and add the following to each X-Com wearable armor.

Code: [Select]
    weight: -200
Or whatever weight value suits you.

By making that number a very large negative you'll complete side step the game's weight mechanic as any soldier equipped with that armor has their weight reduced (Or increased) by that amount.

This should be much easier and faster than altering each individual carriable item's weight value and will leave the throwing mechanic's weight based distance intact.


Example:

Code: [Select]
  - type: STR_PERSONAL_ARMOR_UC
    spriteSheet: XCOM_1.PCK
    spriteInv: MAN_1
    spriteFaceGroup: 6
    spriteFaceColor: [96, 96, 96, 96, 160, 160, 163, 163] #M0 F0 M1 F1 M2 F2 M3 F3
    spriteHairGroup: 9
    spriteHairColor: [144, 144, 164, 164, 245, 245, 164, 164] #M0 F0 M1 F1 M2 F2 M3 F3
    corpseBattle:
      - STR_CORPSE_ARMOR
    storeItem: STR_PERSONAL_ARMOR
    weight: 5 # <---------- THIS IS THE LINE OF CODE TO CHANGE
    frontArmor: 50
    sideArmor: 40
    rearArmor: 30
    underArmor: 30
    damageModifier:
      - 1.0
      - 1.0
      - 0.8
      - 1.0
      - 1.0
      - 1.0
      - 0.9
      - 1.0
      - 1.1
      - 1.0
    loftempsSet: [ 3 ]

Changes to this:

Code: [Select]
  - type: STR_PERSONAL_ARMOR_UC
    spriteSheet: XCOM_1.PCK
    spriteInv: MAN_1
    spriteFaceGroup: 6
    spriteFaceColor: [96, 96, 96, 96, 160, 160, 163, 163] #M0 F0 M1 F1 M2 F2 M3 F3
    spriteHairGroup: 9
    spriteHairColor: [144, 144, 164, 164, 245, 245, 164, 164] #M0 F0 M1 F1 M2 F2 M3 F3
    corpseBattle:
      - STR_CORPSE_ARMOR
    storeItem: STR_PERSONAL_ARMOR
    weight: -200   # <---------- THIS IS THE LINE OF CODE TO CHANGE
    frontArmor: 50
    sideArmor: 40
    rearArmor: 30
    underArmor: 30
    damageModifier:
      - 1.0
      - 1.0
      - 0.8
      - 1.0
      - 1.0
      - 1.0
      - 0.9
      - 1.0
      - 1.1
      - 1.0
    loftempsSet: [ 3 ]
« Last Edit: January 21, 2020, 02:36:00 am by The Martian »

Offline GeneTheBean

  • Squaddie
  • *
  • Posts: 6
    • View Profile
Re: Remove Weight Encumbrance
« Reply #2 on: January 21, 2020, 04:26:20 am »
Awesome! This line doesn't exist by default so it wouldn't have been obvious to someone like me that this would work.

Offline GeneTheBean

  • Squaddie
  • *
  • Posts: 6
    • View Profile
Re: Remove Weight Encumbrance
« Reply #3 on: January 24, 2020, 11:58:51 pm »
Even better, this line can be added just once to soldiers.rul instead of to every armor type. If you have the open for showing stats in your inventory, the weight shows up as "0/strength" when the weight is negative.

But yeah new question - how to remove item destruction? I don't like that explosions "remove" bodies and corpses and items. I think it's bad for gameplay and doesn't make much sense in context. What happens to unconscious bodies can go either way, whether it's the OXC/original model or the OXCE+ model, I think both are acceptable. And terrain destruction is great of course  ;D

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Remove Weight Encumbrance (edit: and Item Destruction/Removal)
« Reply #4 on: January 25, 2020, 12:35:37 am »
overkill mechanic is for that, if you put it to very high number then nothing will be destroyed.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Remove Weight Encumbrance
« Reply #5 on: January 25, 2020, 01:26:20 pm »
I don't like that explosions "remove" bodies and corpses and items. I think it's bad for gameplay and doesn't make much sense in context.

Why doesn't it make sense in context? :o

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Remove Weight Encumbrance (edit: and Item Destruction/Removal)
« Reply #6 on: January 25, 2020, 02:20:36 pm »
This make sense, you need send nuke two times to destroy glass that unit hold :D

Offline GeneTheBean

  • Squaddie
  • *
  • Posts: 6
    • View Profile
Re: Remove Weight Encumbrance (edit: and Item Destruction/Removal)
« Reply #7 on: February 01, 2020, 11:09:48 pm »
Exactly Solarius Scorch  ;D :o Yankes knows what I'm talking about :P

However I don't see where the overkill mechanic goes. https://www.ufopaedia.org/index.php/Explosions#Object_Destruction This says every item has an armor value that needs to be matched(?)/exceeded to destroy the item, but I went to items.rul and didn't see such a field so I went to https://www.ufopaedia.org/index.php/OBDATA.DAT and hacked every item armor to 255 but it didn't work. I even discovered the game doesn't use that file at all because you can delete it and openXcom still runs (so why does openXcom make a copy of it in its own directories?) So I would think I'd need to make a reinstall with the new OBDATA but took a closer look at items.rul and indeed it has armor entries  :-\ but only for uncommon items  ??? so it assumes (where?) that armor:20 unless overwritten  ::)

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Remove Weight Encumbrance (edit: and Item Destruction/Removal)
« Reply #8 on: February 02, 2020, 02:08:27 am »
First of all overkill is OXCE property of armor. It have nothing with OG game and its data. In reality only thing that both game have in common is graphic.

Offline GeneTheBean

  • Squaddie
  • *
  • Posts: 6
    • View Profile
Re: Remove Weight Encumbrance (edit: and Item Destruction/Removal)
« Reply #9 on: February 02, 2020, 08:27:00 am »
OK but overkill seems to be for letting items/people/aliens get destroyed from explosions immediately, while alive, foregoing the "make a corpse" stage, which is the opposite of removing item destruction, so that's not helpful (except for solving the "muton's champagne glass" issue) and I don't see where overkill goes exactly in OXCE either. Also both OXCE and not have almost the same exact same rulesets with the armor of items handled the same way basically

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Remove Weight Encumbrance (edit: and Item Destruction/Removal)
« Reply #10 on: February 02, 2020, 03:06:17 pm »
If overkill is set to very big number no damage will touch inventory or corpse of that unit.

and I was referencing to OBDATA, OXC or OXCE do not use it and all config is in `.rul` files.

https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)