Jump to content

Recommended Posts

  • Replies 86
  • Created
  • Last Reply

Top Posters In This Topic

Posted (edited)

My workaround will require author to make some changes to all OMODs armor will use (add different keyword to each of them). So if he is ready to duplicate all vanilla mods armor is using then I will be able to help.

 

Edit: Actually, forget about it. It will be to much headache and has more problems than I expected.

Edited by shavkacagarikia
Posted (edited)

As for the suit being zipped up or not based on day night cycle, I believe the only time a world time related event as opposed to a countdown is used is in survival mode which prevents you from sleeping during the daytime if I remember correctly. (Still havnt played survival myself yet).

 

So I will hunt for any scripts when I get home.

Edited by stonefisher
Posted

Well I have modified the ESP to have all armours and armour addons in there various states and am going through testing trying to make them swap as wanted without converting them into omods of some kind.

 

I am also ignoring the vanilla armour mods for the mean time.

 

 

Lets try it shavkacagarikia's way first.

 

Though using keywords on the OMOD's is going to lead to the same problem as we had when making the weapopn filter for my mod. No REF ID's on items in inventory. Which means dropping the equiped item at the appointed triggered event and then equipping the new item.

 

I was wondering which would be faster:

Dropping the item scanning it for what mods are attached with keywords, generating the new item of clothing adding items and equipping it.

Or

scanning clothes when first equipped and then making the counterpart in a container out of sight and just swapping between the two at the right time.

 

The first option may be slower as its running a longer script each time while the second option has to grab clothes from a container which maybe in a different cell.

Posted (edited)

The easiest way, as I understand the request, is to have two NIF / armor types for each object: glasses on forehead, glasses over eyes and unzipped suit and zipped suit. Instead of dealing with keywords and grabbing ObjectReferences (doing so is a royal pain) something like this should work:

 

ScriptName CoolOutFitScript extends Quest

Armor Property CoolSuitZipped Auto
Armor Property CoolGogglesEyes Auto

Armor Property CoolSuitUnzipped Auto
Armor Property CoolGogglesForehead Auto

Actor Property PlayerRef Auto

GlobalVariable Property TimeOfDayGlobalProperty Auto

Event OnInit()
	if (PlayerRef != Game.GetPlayer())
		PlayerRef = Game.GetPlayer()
	endif
	Self.RegisterForRemoveEvent(PlayerRef, "OnItemEquipped")
endEvent

Event OnUpdate(int timerid)

	int timeOfDay = TimeOfDayGlobalProperty.GetValue()

	if (PlayerRef.IsEquipped(CoolSuitZipped) == true || PlayerRef.IsEquipped(CoolGogglesEyes) == true || PlayerRef.IsEquipped(CoolSuitUnzipped) == true || PlayerRef.IsEquipped(CoolGogglesForehead) == true)
		if (timeOfDay >= 18 || timeOfDay <= 6)
			if (PlayerRef.IsEquipped(CoolSuitUnzipped) == true)
				PlayerRef.RemoveItem(CoolSuitZipped, -1, true)			
				PlayerRef.AddItem(CoolSuitZipped, 1, true)
				PlayerRef.EquipItem(CoolSuitZipped)
				PlayerRef.RemoveItem(CoolSuitUnzipped, -1, true)
			endif
		else
			if (PlayerRef.IsEquipped(CoolSuitZipped) == true)
				PlayerRef.RemoveItem(CoolSuitUnzipped, -1, true)			
				PlayerRef.AddItem(CoolSuitUnzipped, 1, true)
				PlayerRef.EquipItem(CoolSuitUnzipped)
				PlayerRef.RemoveItem(CoolSuitZipped, -1, true)
			endif		
		endif
	
		if (PlayerRef.IsWeaponDrawn() == true)
			if (PlayerRef.IsEquipped(CoolGogglesForehead) == true)
				PlayerRef.RemoveItem(CoolGogglesEyes, -1, true)			
				PlayerRef.AddItem(CoolGogglesEyes, 1, true)
				PlayerRef.EquipItem(CoolGogglesEyes)
				PlayerRef.RemoveItem(CoolGogglesForehead, -1, true)
			endif
		else
			if (PlayerRef.IsEquipped(CoolGogglesEyes) == true)
				PlayerRef.RemoveItem(CoolGogglesForehead, -1, true)			
				PlayerRef.AddItem(CoolGogglesForehead, 1, true)
				PlayerRef.EquipItem(CoolGogglesForehead)
				PlayerRef.RemoveItem(CoolGogglesEyes, -1, true)
			endif				
		endif
	
		Self.StartTimer(1.0, 0)		
	endif
endEvent

Event Actor.OnItemEquipped(Form akBaseObject, ObjectReference akReference) 
	if (akBaseObject == CoolSuitZipped || akBaseObject == CoolGogglesEyes || akBaseObject == CoolSuitUnzipped || akBaseObject == CoolGogglesForehead)
		Self.StartTimer(1.0, 0)
	endif
endEvent
Edited by Reneer
Posted

@reneer well thats one way,

 

but that script dousnt maintain OMOD's like balistic weave and so on. The problem aint the switching as such, it's making sure the omods remain attached to the armour.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...