You need to set allowInv: true in your test armor.
For next time it would be helpful if you provided an alienRace list
alienRaces:
- id: STR_AQUATOID_TEST
members:
- STR_AQUATOID_COMMANDER
- STR_AQUATOID_NAVIGATOR
- STR_AQUATOID_MEDIC
- STR_AQUATOID_TECHNICIAN
- STR_AQUATOID_SQUAD_LEADER
- TEST_UNIT_UNIT
- STR_CALCINITE_TERRORIST
- STR_CALCINITE_TERRORIST
- id: STR_AQUATOID_TEST_UNDERWATER
members:
- STR_AQUATOID_COMMANDER
- STR_AQUATOID_NAVIGATOR
- STR_AQUATOID_MEDIC
- STR_AQUATOID_TECHNICIAN
- STR_AQUATOID_SQUAD_LEADER
- TEST_UNIT_UNIT
- STR_HALLUCINOID_TERRORIST
- STR_HALLUCINOID_TERRORIST
Also if you are interested you can take a look at the Penetante in ROSIGMA. They got explosive collars which they can activate at their own volition
Items (https://github.com/BeatAroundTheBuscher/ROSIGMA/blob/main/Ruleset/ENEMY/weapons_chaos.rul#L2331)
Script (https://github.com/BeatAroundTheBuscher/ROSIGMA/blob/main/Ruleset/scripts/scripts_bomberman.rul)
Armor (https://github.com/BeatAroundTheBuscher/ROSIGMA/blob/main/Ruleset/ENEMY/TRAITOR_GUARD/armors_traitor_guard.rul#L34)
Unit (https://github.com/BeatAroundTheBuscher/ROSIGMA/blob/main/Ruleset/40k.rul#L6268)
No idea if this kind of linking works with Discord but in theory you can watch a video here (https://cdn.discordapp.com/attachments/330653502693179394/850752607785844796/2021-06-05_17-06-11.mp4)
(Please excuse my late reply)
You need to set allowInv: true in your test armor.
Thank you that fixed it! (https://openxcom.org/forum/Themes/InsidiousV1-k/images/post/thumbup.gif)
Also if you are interested you can take a look at the Penetante in ROSIGMA. They got explosive collars which they can activate at their own volition
Items (https://github.com/BeatAroundTheBuscher/ROSIGMA/blob/main/Ruleset/ENEMY/weapons_chaos.rul#L2331)
Script (https://github.com/BeatAroundTheBuscher/ROSIGMA/blob/main/Ruleset/scripts/scripts_bomberman.rul)
Armor (https://github.com/BeatAroundTheBuscher/ROSIGMA/blob/main/Ruleset/ENEMY/TRAITOR_GUARD/armors_traitor_guard.rul#L34)
Unit (https://github.com/BeatAroundTheBuscher/ROSIGMA/blob/main/Ruleset/40k.rul#L6268)
I've been playing around with your script for triggering grenades via a melee strike.
It's a lot of fun thank you for sharing it.
For next time it would be helpful if you provided an alienRace list
alienRaces:
- id: STR_AQUATOID_TEST
members:
- STR_AQUATOID_COMMANDER
- STR_AQUATOID_NAVIGATOR
- STR_AQUATOID_MEDIC
- STR_AQUATOID_TECHNICIAN
- STR_AQUATOID_SQUAD_LEADER
- TEST_UNIT_UNIT
- STR_CALCINITE_TERRORIST
- STR_CALCINITE_TERRORIST
- id: STR_AQUATOID_TEST_UNDERWATER
members:
- STR_AQUATOID_COMMANDER
- STR_AQUATOID_NAVIGATOR
- STR_AQUATOID_MEDIC
- STR_AQUATOID_TECHNICIAN
- STR_AQUATOID_SQUAD_LEADER
- TEST_UNIT_UNIT
- STR_HALLUCINOID_TERRORIST
- STR_HALLUCINOID_TERRORIST
Sorry about that.
I'm just starting to try out working with alienDeployments: and hadn't read the Ruleset Reference (Nightly) (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)) as far as alienRaces: hence the item to spawn the unit for testing instead of a proper deployment.
No idea if this kind of linking works with Discord but in theory you can watch a video here (https://cdn.discordapp.com/attachments/330653502693179394/850752607785844796/2021-06-05_17-06-11.mp4)
The linking seems to have worked fine and the video was helpful.
Items:
- type: STR_EXPLOSIVE_COLLAR_DUMMY
specialUseEmptyHand: true
fixedWeapon: true
recover: false
meleeSound: 2140
meleeHitSound: { mod: 40k, index: 0 }
power: 200 # for the AI to pick this
meleeAnimation: { mod: 40k, index: 0 }
damageType: 7
accuracyMelee: 200
tuMelee: 1
clipSize: -1
battleType: 3
meleeMultiplier:
melee: 0.0
flatHundred: 1.0
flatRate: true
tags:
ITEM_IS_FOR_BOMBER: 1
- type: STR_EXPLOSIVE_COLLAR_CHAOS #frag #4006
bulletSprite: {mod: 40k, index: 22}
fireSound: {mod: 40k, index: 491}
bigSprite: {mod: 40k, index: 19}
floorSprite: {mod: 40k, index: 19}
handSprite: {mod: 40k, index: 336}
power: 100
blastRadius: 5
damageType: 3
battleType: 4 # grenade
recover: false
tuPrime: 999
fixedWeapon: true
isExplodingInHands: true
hiddenOnMinimap: true
defaultInventorySlot: STR_BELT
tags:
ITEM_IS_BOMB: 1
extended:
tags:
RuleItem:
ITEM_IS_FOR_BOMBER: int
ITEM_IS_BOMB: int
scripts:
hitUnit:
- offset: 43
code: |
var ptr RuleItem ruleItem;
var int temp;
var ptre BattleItem someItem;
var int numInventoryItems;
damaging_item.getRuleItem ruleItem;
ruleItem.getTag temp Tag.ITEM_IS_FOR_BOMBER;
if eq temp 1;
attacker.getInventoryItem.size numInventoryItems;
# debug_log "numInventoryItems" numInventoryItems;
loop var i numInventoryItems;
attacker.getInventoryItem someItem i;
someItem.getTag temp Tag.ITEM_IS_BOMB;
# attacker.setTag Tag.UNIT_TURNED_TRAITOR 1; # doesn't recolor fast enough
if eq temp 1;
attacker.setTimeUnits 0;
someItem.setFuseTimer 0;
someItem.setFuseEnabled 1;
return 0 part side;
end;
end;
end;
return power part side;
- type: STR_CHAOS_PENETANTE_ARMOR
visibilityAtDay: 30
visibilityAtDark: 20
spriteSheet: CHAOS_PENETANTE.PCK
spriteInv: CHAOS_PENETANTE_0M0
corpseBattle:
- STR_CHAOS_PENETANTE_CORPSE
frontArmor: 20 #armor stuffed to survive to reach the enemy for detonation
sideArmor: 10
rearArmor: 0
underArmor: 10
drawingRoutine: 0
damageModifier: #Penetante
- 1.0 #none
- 1.1 #AP
- 1.1 #FLAMES
- 1.1 #HE
- 1.1 #LASCANON
- 1.1 #PLASMA
- 1.0 #STUN
- 1.2 #MELEE
- 1.2 #ACID
- 0.0 #SMOKE
- 1.0 #IMPACT
- 1.1 #MELTA
loftempsSet: [ 3 ]
specialWeapon: STR_EXPLOSIVE_COLLAR_DUMMY
armor: STR_CHAOS_PENETANTE_ARMOR
standHeight: 20
kneelHeight: 14
moraleLossWhenKilled: 10
aggression: 6
value: 1
specab: 1 #explodes on death
energyRecovery: 40
moveSound: -1
deathSound: [41, 42, 43]
livingWeapon: true
builtInWeaponSets:
- - STR_KNIF
- STR_GRENADE
- STR_EXPLOSIVE_COLLAR_CHAOS
- - STR_STUB_GUN_CHAOS
- STR_STUB_GUN_AMMO
- STR_GRENADE
- STR_EXPLOSIVE_COLLAR_CHAOS
- - STR_STUB_GUN_CHAOS
- STR_STUB_GUN_AMMO
- STR_GRENADE
- STR_EXPLOSIVE_COLLAR_CHAOS