OpenXcom Forum
Modding => Help => Topic started by: Daev on February 13, 2023, 04:32:08 am
-
So i am trying to convert this mod to TFTD
https://openxcom.old.mod.io/vanilla-armor-repair-for-ufo
I have taken the code that works perfectly for UFO and swapped the values and strings for the TFTD equivalent and it does not work properly, with the item being recovered the actual corpsebattle item and not the corpsegeo item.
i tested using the BATTLE mod on both mods, and only the UFO version seemed to work.
Please let me know if I am missing somthing, or if it has to be setup differently for TFTD
armors:
- type: STR_PLASTIC_AQUA_ARMOR_UC
corpseBattle:
- STR_CORPSE_ARMOR
corpseGeo: STR_WRECKED_PLASTIC_ARMOR
- type: STR_ION_ARMOR_UC
corpseBattle:
- STR_CORPSE_ION
corpseGeo: STR_WRECKED_ION_ARMOR
- type: STR_MAGNETIC_ION_ARMOR_UC
corpseBattle:
- STR_CORPSE_ION
corpseGeo: STR_WRECKED_MAG_ARMOR
manufacture:
- name: STR_PLASTIC_AQUA_ARMOR_REPAIR
listOrder: 2705
category: STR_PERSONAL_ARMOR
requires:
- STR_PLASTIC_AQUA_ARMOR
space: 12
time: 500
cost: 12000
requiredItems:
STR_WRECKED_PLASTIC_ARMOR: 1
STR_AQUA_PLASTICS: 2
producedItems:
STR_PLASTIC_AQUA_ARMOR: 1
- name: STR_ION_ARMOR_REPAIR
listOrder: 2805
category: STR_PERSONAL_ARMOR
requires:
- STR_ION_ARMOR
space: 10
time: 600
cost: 27000
requiredItems:
STR_WRECKED_ION_ARMOR: 1
STR_AQUA_PLASTICS: 3
STR_ZRBITE: 2
producedItems:
STR_ION_ARMOR: 1
- name: STR_MAGNETIC_ION_ARMOR_REPAIR
listOrder: 2905
category: STR_PERSONAL_ARMOR
requires:
- STR_MAGNETIC_ION_ARMOR
space: 16
time: 750
cost: 38000
requiredItems:
STR_WRECKED_MAG_ARMOR: 1
STR_AQUA_PLASTICS: 3
STR_ZRBITE: 10
producedItems:
STR_MAGNETIC_ION_ARMOR: 1
items:
- type: STR_WRECKED_PLASTIC_ARMOR
listOrder: 10605
size: 0.8
costSell: 12000
recoveryPoints: 0
battleType: 11
recover: true
- type: STR_WRECKED_ION_ARMOR
listOrder: 10705
size: 0.8
costSell: 51500
recoveryPoints: 0
battleType: 11
recover: true
- type: STR_WRECKED_MAG_ARMOR
listOrder: 10805
size: 0.8
costSell: 60125
recoveryPoints: 0
battleType: 11
recover: true
- type: STR_CORPSE_ARMOR
battleType: 11
recover: true
- type: STR_CORPSE_ION
battleType: 11
recover: true
extraStrings:
- type: en-US
strings:
STR_WRECKED_PLASTIC_ARMOR: "Aqua Plastic Armor (Damaged)"
STR_WRECKED_ION_ARMOR: "Ion Armor (Damaged)"
STR_WRECKED_MAG_ARMOR: "Magnetic Ion Armor (Damaged)"
STR_PLASTIC_AQUA_ARMOR_REPAIR: "Aqua Plastic Armor (Repair)"
STR_ION_ARMOR_REPAIR: "Ion Armor (Repair)"
STR_MAGNETIC_ION_ARMOR_REPAIR: "Magnetic Ion Armor (Repair)"
-
This is what I did but I haven't had time to test it yet...
armors:
- type: STR_PLASTIC_AQUA_ARMOR_UC
corpseBattle:
- STR_CORPSE_ARMOR
corpseGeo: STR_WRECKED_PLASTIC_AQUA_ARMOR
- type: STR_ION_ARMOR_UC
corpseBattle:
- STR_CORPSE_ION
corpseGeo: STR_WRECKED_ION_ARMOR
- type: STR_MAGNETIC_ION_ARMOR_UC
corpseBattle:
- STR_CORPSE_ION
corpseGeo: STR_WRECKED_MAGNETIC_ION_ARMOR
items:
- type: STR_WRECKED_PLASTIC_AQUA_ARMOR
listOrder: 10605
size: 0.8
costSell: 6000
recoveryPoints: 0
battleType: 11
- type: STR_WRECKED_ION_ARMOR
listOrder: 10705
size: 0.8
costSell: 9000
recoveryPoints: 0
battleType: 11
- type: STR_WRECKED_MAGNETIC_ION_ARMOR
listOrder: 10805
size: 0.8
costSell: 12000
recoveryPoints: 0
battleType: 11
- type: STR_CORPSE_ARMOR #Plastic Aqua-Armor
battleType: 11
recover: true
- type: STR_CORPSE_ION #Ion Armor/Mag. Ion Armor
battleType: 11
recover: true
manufacture:
- name: STR_PLASTIC_AQUA_ARMOR_REPAIR
listOrder: 2705
category: STR_PERSONAL_ARMOR
requires:
- STR_PLASTIC_AQUA_ARMOR
space: 2
time: 100
cost: 2200
requiredItems:
STR_WRECKED_PLASTIC_AQUA_ARMOR: 1
STR_AQUA_PLASTICS: 1
producedItems:
STR_PLASTIC_AQUA_ARMOR: 1
- name: STR_ION_ARMOR_REPAIR
listOrder: 2805
category: STR_PERSONAL_ARMOR
requires:
- STR_ION_ARMOR
space: 6
time: 200
cost: 4200
requiredItems:
STR_WRECKED_ION_ARMOR: 1
STR_AQUA_PLASTICS: 1
STR_ZRBITE: 1
producedItems:
STR_ION_ARMOR: 1
- name: STR_MAGNETIC_ION_ARMOR_REPAIR
listOrder: 2905
category: STR_PERSONAL_ARMOR
requires:
- STR_MAGNETIC_ION_ARMOR
space: 6
time: 300
cost: 5800
requiredItems:
STR_WRECKED_MAGNETIC_ION_ARMOR: 1
STR_AQUA_PLASTICS: 1
STR_ZRBITE: 2
producedItems:
STR_MAGNETIC_ION_ARMOR: 1
extraStrings:
- type: fr
strings: &strFrance
STR_WRECKED_PLASTIC_AQUA_ARMOR: "Armure aqua-plastique (endommagée)"
STR_WRECKED_ION_ARMOR: "Armure à ion (endommagée)"
STR_WRECKED_MAGNETIC_ION_ARMOR: "Armure à ion magnétique (endommagée)"
STR_PLASTIC_AQUA_ARMOR_REPAIR: "Armure aqua-plastique (réparation)"
STR_ION_ARMOR_REPAIR: "Armure à ion (réparation)"
STR_MAGNETIC_ION_ARMOR_REPAIR: "Armure à ion magnétique (réparation)"
- type: en-US
strings: *strFrance
- type: en-GB
strings: *strFrance
Apart from one detail, it is very similar... :-[
-
Basically
- type: STR_CORPSE_ARMOR
battleType: 11
recover: false
instead of
- type: STR_CORPSE_ARMOR
battleType: 11
recover: true
for all battle corpses.
-
Basically
- type: STR_CORPSE_ARMOR
battleType: 11
recover: false
instead of
- type: STR_CORPSE_ARMOR
battleType: 11
recover: true
for all battle corpses.
I got it working, i was using the battle mode for testing, and i was getting false negatives. The battle mode drops the corpseitem, but when testing in an actual game, its working.
Thanks for the replies! Much appreciated