Jump to content

companion ingestible equip script


orangedemi

Recommended Posts

so in attempt to force equip an armour on a companion i tryed to alter a script luthienanarion made me

 

scn equipcompanionscriptname

ref playerteammate

begin scripteffectstart

  set playerteammate to OpenTeammateContainer

  actor.additem armoritem 1 1
  actor.additem helmetitem 1 1
  actor.equipitem armoritem 1 1
  actor.equipitem helmetitem 1 1

end

 

it doesnt look right to me, would this even work?

Link to comment
Share on other sites

armoritem and helmet item are placeholders, but openteammatecontainer isnt.

i want this to work on all teammates

 

i was planing to have a stim the targets rather than casts on self and equips the armor on the target

Link to comment
Share on other sites

yeah, basically i want it to be used on the companion. thus forcing them to were the suit and helm. (or at least add it to thier inventory)

it might be easier to make a single or multi-use stim weapon. but weapon coding is beyond me (infact most geck code is beyond me atm >.>)

 

its for my werewolf suit mod.

Edited by orangedemi
Link to comment
Share on other sites

Well, it's going to be difficult until you have a better feel for the Geck. I'll bow out but I'll leave these two script examples here. They are rough starting points and are not meant as final implementations.

 

This is a script attached to a miscellaneous item. When this item is placed on an NPC, it gives them Arcade Gannon's family power armor and helmet and makes them wear it. Adding it to any other container will probably cause a crash:

 

ScriptName FunnyHatTokenScript

ref funnyHatWearer

Begin GameMode
Set funnyHatWearer to GetContainer
funnyHatWearer.AddItem ArmorGannonTeslaHelmet 1 1
funnyHatWearer.EquipItem ArmorGannonTeslaHelmet 1 1
RemoveMe
End

 

This is an effect script that I placed on a normal ammo type (definitely don't do that, create a new ammo type inistead). When an NPC is hit by the ammo again they get Arcade Gannon's family power armor and helmet and are made to wear it.

 

ScriptName GrandPrizeWinnerEffectScript

Begin ScriptEffectStart
AddItem ArmorGannonTesla 1 1
AddItem ArmorGannonTeslaHelmet 1 1
EquipItem ArmorGannonTesla 1 1
EquipItem ArmorGannonTeslaHelmet 1 1
End

Link to comment
Share on other sites

The only way I know of to make an ingestible have an effect on companions would be to use NVSE and do a ref-walk checking all NPCs in the cell for the GetPlayerTeammate condition.

 

scn companioningestiblescript

ref currentactor
ref companionactor

begin scripteffectstart

  set currentactor to getfirstref 42 1 0
  
  label 10
  if(currentactor)
     if(currentactor.getplayerteammate)
        set companionactor to currentactor
        currentactor.additem helmetitem 1 1
        currentactor.additem armoritem 1 1
        currentactor.equipitem helmetitem 1 1
        currentactor.equipitem armoritem 1 1
        return
     endif
     set currentactor to getnextref
  endif
  set companionactor to 0

end

begin scripteffectfinish

  if(companionactor)
     companionactor.unequipitem helmetitem 0 1
     companionactor.unequipitem armoritem 0 1
     companionactor.removeitem helmetitem 1 1
     companionactor.removeitem armoritem 1 1
  endif

end

 

In this script, you can set a duration for the ingestible effect and it will remove the items after the duration. If you want the effect to be permanent, just remove the ScriptEffectFinish block.

 

The best non-NVSE method would be an ammo effect script like viennacalling mentioned.

Edited by luthienanarion
Link to comment
Share on other sites

luth you are a saint,

seriously i should have just pmed you >.>

 

but this does bring up a interesting predicament, do i make it compatible with vanilla fallout or force users to use nvse.

altho the ammo technique seems the simplest to and has more control on who you infect. but would need is an 'injection gun" infection ammos for all the werewolf 'variations' , a cure all ammo, an ammo type list for the gun, and recipe lists for the ammo.

 

then the ingestible would be the longest code and require nvse, plus would only infect your followers, but only would need stims for the variants and crafting recipes...

 

i guess it boils down to wether playing an animation just after equip requires nvse or not

Edited by orangedemi
Link to comment
Share on other sites

so i attempted the impact script option, im not sure what i have to add to this code but it doesnt work.

 

scn infectammoblack

Begin ScriptEffectStart
AddItem wereb2 1 1
AddItem wereh2 1 1
EquipItem wereb2 1 1
EquipItem wereh2 1 1

End

 

im not sure if the weapon needs to do any damage or not in order for it to activate. or if i have to create an ammo effect.

i realize veinnacalling said it wasnt plug and play, i thought he meant only the scn and item ref ids needed to be changed..

 

should i add 'ref actor' and actor.additemxxxxx ?

Edited by orangedemi
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...