lucius111 Posted June 24, 2012 Share Posted June 24, 2012 I'm throwing around the idea of a mod that replaces the guards in towns with another set, similar to how the civil war quests will change it depending on how who what town. How complicated would a script be, wherein the player completes a quest, say to kill something, puts down 50k gold, and the guards in the town selected at the start of the quest are replaced? Would anyone be willing to help me with this? Link to comment Share on other sites More sharing options...
gasti89 Posted June 24, 2012 Share Posted June 24, 2012 If you want all the guards belonging to the same ActorBase change the outfit, use this: SetOutfit. Theonly problem is that the outfit will be changed the next time the guards are loaded. If you only want some particular NPCs to change armor, you can use a combo of EquipItem and UnequipItem or UnEquipItemSlot. Everything would be trigger by a quest stage. Link to comment Share on other sites More sharing options...
lucius111 Posted June 24, 2012 Author Share Posted June 24, 2012 If you want all the guards belonging to the same ActorBase change the outfit, use this: SetOutfit. Theonly problem is that the outfit will be changed the next time the guards are loaded. If you only want some particular NPCs to change armor, you can use a combo of EquipItem and UnequipItem or UnEquipItemSlot. Everything would be trigger by a quest stage. Would I be able to trigger an NPC swap or a race change to a unique race? Guards only. I'm not that good with scripting, barely any experience. XD Link to comment Share on other sites More sharing options...
steve40 Posted June 25, 2012 Share Posted June 25, 2012 (edited) If you want all the guards belonging to the same ActorBase change the outfit, use this: SetOutfit. Theonly problem is that the outfit will be changed the next time the guards are loaded. If you only want some particular NPCs to change armor, you can use a combo of EquipItem and UnequipItem or UnEquipItemSlot. Everything would be trigger by a quest stage. Just having a quick look at the quest scripts, you should be able to switch outfits instantly, otherwise changing back from being a werewold wouldn't be possible: C03RampageQuest.psc: ; put Aela back to normal ; Debug.Trace("C03 Rampage: Setting race " + NordRace + " on " + Aela.GetActorReference()) Aela.GetActorReference().SetRace(NordRace) AelaLycanStash.RemoveAllItems(Aela.GetActorReference()) Aela.GetActorReference().SetOutfit(AelaOutfit) Edit: A snippet from CWMission04Script.psc: function PrisonerGearUp(Actor Prisoner) ;CALLED by CWMission04PrisonerGearUp PACKAGE's On End result script ; CWScript.Log("CWMission04Script", "PrisonerGearUp( " + Prisoner + ")") ; debug.MessageBox(Prisoner + " is gearing up") Prisoner.SetFactionRank(CWMission04PrisonerFreedFaction, 1) if Prisoner.IsInFaction(CWs.CWImperialFaction) Prisoner.SetOutfit(CWMission04OutfitImperial) Prisoner.AddItem(CWs.CWSoldierImperialGear) Else Prisoner.SetOutfit(CWMission04OutfitSons) Prisoner.AddItem(CWs.CWSoldierSonsGear) EndIf followState = 1 prisoner.EvaluatePackage() EndFunction Edit: another script, "defaultAliaschangeOutfit.psc" will make the alias change outfit when he leaves or enteres a location. Edited June 25, 2012 by steve40 Link to comment Share on other sites More sharing options...
gasti89 Posted June 25, 2012 Share Posted June 25, 2012 The "next time is loaded" part is took from the CKwiki. I haven't messed with outfit scripts yet so i took it as true :P Link to comment Share on other sites More sharing options...
steve40 Posted June 26, 2012 Share Posted June 26, 2012 Yeah, I'm finding that the wiki is riddled with errors, and there are a lot of myths going around about what works and what doesn't. Some of the stuff is obsolete as bugs get fixed. I've also had to update some of their script examples as they had errors, poor logic or were not very streamlined. Link to comment Share on other sites More sharing options...
Recommended Posts