Jump to content

modify script to check for a specific item


Recommended Posts

Posted

Hi

 

Ok so I have a script running as part of a war mod (skyrim at war ) that creates hostility if you wear the opposite sides armor. Now what I want to do is wear my bikini stuff instead of the imperial or stormcloak gear (ikr not immersive). I could probably do this by modifying the armor check esp and adding the armor there but that would mean updating it each time I switch to steel, ebony etc. So as part of the CW quest you get a promotion note. I was thinking would this work...

by adding the

 

Player.GetItemCount(ImperialNote as form) > 0)

 

book property ImperialNote auto

if Player.IsEquipped(ArmorImperialLightCuirass as form) || Player.GetItemCount(ImperialNote as form) > 0) || Player.IsEquipped(ArmorImperialStuddedCuirass as form) || Player.IsEquipped(ArmorImperialCuirass as form) || Player.IsEquipped(ArmorGuardCuirassFalkreath as form) || Player.IsEquipped(ArmorGuardCuirassHjaalmarch as form) || Player.IsEquipped(ArmorGuardCuirassMarkarth as form) || Player.IsEquipped(ArmorGuardCuirassSolitude as form) || Player.IsEquipped(ArmorGuardCuirassWhiterun as form)
        Player.AddToFaction(CWImperialFactionNPC)
        self.RegisterForSingleUpdate(10 as Float)

 

thanks

Posted

No clue what you mean but if all you want to do is getting through that if condition there, youd add

 

|| player.isequipped(myBikiniArmorProperty)

 

at the end there, before the last bracket. Also get rid of that Form casting. Such gruesome stuff. The float casting isnt necessary either

 

Alternatively you can also change the properties pointing at one of the imperial cuirass to instead point at your bikini stuff - of course that would however disable the mods functionality for that armor

 

Posted

 

40 minutes ago, Scrab said:

|| player.isequipped(myBikiniArmorProperty)

 

thanks Scrab

 

I'll tinker with it, the floating stuff and form casting is part of that mods scripts, I decompiled it using champolion. That's how I got to look at it's innards.

Posted
15 minutes ago, pinkfluf said:

Edit: are you gonna look at scrappies anytime soon or is it on a todo list. Really want to use it but the friend faction either makes me non hostile to enemies or it makes my followers non hostile and me hostile. :(?

 

SMM is something of a smoll sibling of Yamete, a lot of that mod is inherited/copypasted from Yamete and Yamete currently goes through a major rewrite that introduces a lot of improvements that SMM should also benefit from

So long story short, I will update SMM after I had people test out Yametes V4+ to avoid that when I update SMM with Yametes new logic, I wont copypaste any major bugs n stuff 

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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