Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

 

 

So, I was just glancing back at the few mods I've actually uploaded and came up with a new question... Is there a way to dynamically change a Message/Message Box? Like my teleporter mod uses a Message as a menu to let you choose a destination to teleport to from a list of 1-5, with 1-5 representing a location that has been assigned as a 'teleLoc' previously; can I dynamically change the options from being 1, 2, 3, 4, 5 to the location names? Like if I set 1 to be in Riverwood, is there a way to make the menu recognize that and show Riverwood, 2, 3, 4, 5 instead of staying just 1, 2, 3, 4, 5?

 

If it helps, here's a look at the script that is currently being used by my mod:

 

ScriptName DarkxenothTeleporterScript extends ObjectReference

ObjectReference Property pcStartLoc Auto
ObjectReference Property currLoc Auto
ObjectReference Property firstLoc Auto
ObjectReference Property secondLoc Auto
ObjectReference Property thirdLoc Auto
ObjectReference Property fourthLoc Auto
ObjectReference Property fifthLoc Auto
ObjectReference Property ConvLocT Auto
Message Property myMenu Auto
Message Property myMenu2 Auto
Message Property myMenu3 Auto

Event OnEquipped(Actor akActor)
	Input.TapKey(Input.GetMappedKey("Tween Menu"))
	currLoc.MoveTo(Game.GetPlayer())
	Menu()
EndEvent

Function TeleToLoc(Int locNum)
	Utility.Wait(0.5)
	Game.FadeOutGame(False, True, 2.0, 1.0)
	If (locNum == 0)
		Game.GetPlayer().MoveTo(firstLoc)
		Game.EnableFastTravel()
		Game.FastTravel(firstLoc)
	ElseIf (locNum == 1)
		Game.GetPlayer().MoveTo(secondLoc)
		Game.EnableFastTravel()
		Game.FastTravel(secondLoc)
	ElseIf (locNum == 2)
		Game.GetPlayer().MoveTo(thirdLoc)
		Game.EnableFastTravel()
		Game.FastTravel(thirdLoc)
	ElseIf (locNum == 3)
		Game.GetPlayer().MoveTo(fourthLoc)
		Game.EnableFastTravel()
		Game.FastTravel(fourthLoc)
	ElseIf (locNum == 4)
		Game.GetPlayer().MoveTo(fifthLoc)
		Game.EnableFastTravel()
		Game.FastTravel(fifthLoc)
	EndIf
EndFunction

Function TeleToPCStartLoc()
	Utility.Wait(0.5)
	Game.FadeOutGame(False, True, 2.0, 1.0)
	Game.GetPlayer().MoveTo(pcStartLoc)
	Game.EnableFastTravel()
	Game.FastTravel(pcStartLoc)
EndFunction

Function TeleToConvLoc()
	Utility.Wait(0.5)
	Game.FadeOutGame(False, True, 2.0, 1.0)
	Game.GetPlayer().MoveTo(ConvLocT)
	Game.EnableFastTravel()
	Game.FastTravel(ConvLocT)
EndFunction

Function Menu(Int aiButton = 0)
	Utility.Wait(0.5)
	aiButton = myMenu.Show()
	If (aiButton == 0)
		pcStartLoc.MoveTo(currLoc)
		Menu3()
	ElseIf (aiButton == 1)
		Menu2()
	ElseIf (aiButton == 2)
		TeleToPCStartLoc()
	ElseIf (aiButton == 3)
		pcStartLoc.MoveTo(currLoc)
		TeleToConvLoc()
	ElseIf (aiButton == 4)
		Return
	EndIf
EndFunction

Function Menu2(Int aiButton = 0)
	Utility.Wait(0.5)
	aiButton = myMenu2.Show()
	If (aiButton == 0)
		firstLoc.MoveTo(currLoc)
	ElseIf (aiButton == 1)
		secondLoc.MoveTo(currLoc)
	ElseIf (aiButton == 2)
		thirdLoc.MoveTo(currLoc)
	ElseIf (aiButton == 3)
		fourthLoc.MoveTo(currLoc)
	ElseIf (aiButton == 4)
		fifthLoc.MoveTo(currLoc)
	ElseIf (aiButton == 5)
		Return
	EndIf
EndFunction

Function Menu3(Int aiButton = 0)
	Utility.Wait(0.5)
	aiButton = myMenu3.Show()
	If (aiButton == 0)
		TeleToLoc(0)
	ElseIf (aiButton == 1)
		TeleToLoc(1)
	ElseIf (aiButton == 2)
		TeleToLoc(2)
	ElseIf (aiButton == 3)
		TeleToLoc(3)
	ElseIf (aiButton == 4)
		TeleToLoc(4)
	ElseIf (aiButton == 5)
		Return
	EndIf
EndFunction

 

 

 

As I understand it, message box buttons cannot be dynamically changed via script.

 

However, you could create multiple buttons each with a different location name and use conditions to only allow five to show at any given time.

 

Well that sounds like a lot of hassle to go through for what I was thinking of doing... but hey, thanks for the reply and information.

Edited by Darkxenoth
Link to comment
Share on other sites

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

 

 

 

 

 

So, I was just glancing back at the few mods I've actually uploaded and came up with a new question... Is there a way to dynamically change a Message/Message Box? Like my teleporter mod uses a Message as a menu to let you choose a destination to teleport to from a list of 1-5, with 1-5 representing a location that has been assigned as a 'teleLoc' previously; can I dynamically change the options from being 1, 2, 3, 4, 5 to the location names? Like if I set 1 to be in Riverwood, is there a way to make the menu recognize that and show Riverwood, 2, 3, 4, 5 instead of staying just 1, 2, 3, 4, 5?

 

If it helps, here's a look at the script that is currently being used by my mod:

 

ScriptName DarkxenothTeleporterScript extends ObjectReference

ObjectReference Property pcStartLoc Auto
ObjectReference Property currLoc Auto
ObjectReference Property firstLoc Auto
ObjectReference Property secondLoc Auto
ObjectReference Property thirdLoc Auto
ObjectReference Property fourthLoc Auto
ObjectReference Property fifthLoc Auto
ObjectReference Property ConvLocT Auto
Message Property myMenu Auto
Message Property myMenu2 Auto
Message Property myMenu3 Auto

Event OnEquipped(Actor akActor)
	Input.TapKey(Input.GetMappedKey("Tween Menu"))
	currLoc.MoveTo(Game.GetPlayer())
	Menu()
EndEvent

Function TeleToLoc(Int locNum)
	Utility.Wait(0.5)
	Game.FadeOutGame(False, True, 2.0, 1.0)
	If (locNum == 0)
		Game.GetPlayer().MoveTo(firstLoc)
		Game.EnableFastTravel()
		Game.FastTravel(firstLoc)
	ElseIf (locNum == 1)
		Game.GetPlayer().MoveTo(secondLoc)
		Game.EnableFastTravel()
		Game.FastTravel(secondLoc)
	ElseIf (locNum == 2)
		Game.GetPlayer().MoveTo(thirdLoc)
		Game.EnableFastTravel()
		Game.FastTravel(thirdLoc)
	ElseIf (locNum == 3)
		Game.GetPlayer().MoveTo(fourthLoc)
		Game.EnableFastTravel()
		Game.FastTravel(fourthLoc)
	ElseIf (locNum == 4)
		Game.GetPlayer().MoveTo(fifthLoc)
		Game.EnableFastTravel()
		Game.FastTravel(fifthLoc)
	EndIf
EndFunction

Function TeleToPCStartLoc()
	Utility.Wait(0.5)
	Game.FadeOutGame(False, True, 2.0, 1.0)
	Game.GetPlayer().MoveTo(pcStartLoc)
	Game.EnableFastTravel()
	Game.FastTravel(pcStartLoc)
EndFunction

Function TeleToConvLoc()
	Utility.Wait(0.5)
	Game.FadeOutGame(False, True, 2.0, 1.0)
	Game.GetPlayer().MoveTo(ConvLocT)
	Game.EnableFastTravel()
	Game.FastTravel(ConvLocT)
EndFunction

Function Menu(Int aiButton = 0)
	Utility.Wait(0.5)
	aiButton = myMenu.Show()
	If (aiButton == 0)
		pcStartLoc.MoveTo(currLoc)
		Menu3()
	ElseIf (aiButton == 1)
		Menu2()
	ElseIf (aiButton == 2)
		TeleToPCStartLoc()
	ElseIf (aiButton == 3)
		pcStartLoc.MoveTo(currLoc)
		TeleToConvLoc()
	ElseIf (aiButton == 4)
		Return
	EndIf
EndFunction

Function Menu2(Int aiButton = 0)
	Utility.Wait(0.5)
	aiButton = myMenu2.Show()
	If (aiButton == 0)
		firstLoc.MoveTo(currLoc)
	ElseIf (aiButton == 1)
		secondLoc.MoveTo(currLoc)
	ElseIf (aiButton == 2)
		thirdLoc.MoveTo(currLoc)
	ElseIf (aiButton == 3)
		fourthLoc.MoveTo(currLoc)
	ElseIf (aiButton == 4)
		fifthLoc.MoveTo(currLoc)
	ElseIf (aiButton == 5)
		Return
	EndIf
EndFunction

Function Menu3(Int aiButton = 0)
	Utility.Wait(0.5)
	aiButton = myMenu3.Show()
	If (aiButton == 0)
		TeleToLoc(0)
	ElseIf (aiButton == 1)
		TeleToLoc(1)
	ElseIf (aiButton == 2)
		TeleToLoc(2)
	ElseIf (aiButton == 3)
		TeleToLoc(3)
	ElseIf (aiButton == 4)
		TeleToLoc(4)
	ElseIf (aiButton == 5)
		Return
	EndIf
EndFunction

As I understand it, message box buttons cannot be dynamically changed via script.

 

However, you could create multiple buttons each with a different location name and use conditions to only allow five to show at any given time.

Well that sounds like a lot of hassle to go through for what I was thinking of doing... but hey, thanks for the reply and information.

You could make the buttons say Location 1, etc. and then include a key in the message text that says Location 1: <aliasname>, then just store the location in the appropriate alias. Look up text replacement on the CK wiki.

Link to comment
Share on other sites

How are arrow recovery chances determined? Can I create a type of arrow that never breaks/always breaks?

It's a combination of a perk and a game setting. You ought to be able to make both. There was a modder who commented here a while ago that they were having issues making a 100% recoverable arrow and we never figured out the problem, so we don't know if it's reproducible.

Link to comment
Share on other sites

 

It's a combination of a perk and a game setting. You ought to be able to make both. There was a modder who commented here a while ago that they were having issues making a 100% recoverable arrow and we never figured out the problem, so we don't know if it's reproducible.

 

Thanks anyway! I came across this mod which seems to suggest that the non-retrievable arrows still present on models can be logged by the game and different arrows have different breaking chances. http://www.nexusmods.com/skyrim/mods/51149/?

 

Maybe the arrows despawn when hit and respawn into fresh arrows in this mod?

Link to comment
Share on other sites

 

 

 

 

 

So, I was just glancing back at the few mods I've actually uploaded and came up with a new question... Is there a way to dynamically change a Message/Message Box? Like my teleporter mod uses a Message as a menu to let you choose a destination to teleport to from a list of 1-5, with 1-5 representing a location that has been assigned as a 'teleLoc' previously; can I dynamically change the options from being 1, 2, 3, 4, 5 to the location names? Like if I set 1 to be in Riverwood, is there a way to make the menu recognize that and show Riverwood, 2, 3, 4, 5 instead of staying just 1, 2, 3, 4, 5?

 

If it helps, here's a look at the script that is currently being used by my mod:

 

ScriptName DarkxenothTeleporterScript extends ObjectReference

ObjectReference Property pcStartLoc Auto
ObjectReference Property currLoc Auto
ObjectReference Property firstLoc Auto
ObjectReference Property secondLoc Auto
ObjectReference Property thirdLoc Auto
ObjectReference Property fourthLoc Auto
ObjectReference Property fifthLoc Auto
ObjectReference Property ConvLocT Auto
Message Property myMenu Auto
Message Property myMenu2 Auto
Message Property myMenu3 Auto

Event OnEquipped(Actor akActor)
	Input.TapKey(Input.GetMappedKey("Tween Menu"))
	currLoc.MoveTo(Game.GetPlayer())
	Menu()
EndEvent

Function TeleToLoc(Int locNum)
	Utility.Wait(0.5)
	Game.FadeOutGame(False, True, 2.0, 1.0)
	If (locNum == 0)
		Game.GetPlayer().MoveTo(firstLoc)
		Game.EnableFastTravel()
		Game.FastTravel(firstLoc)
	ElseIf (locNum == 1)
		Game.GetPlayer().MoveTo(secondLoc)
		Game.EnableFastTravel()
		Game.FastTravel(secondLoc)
	ElseIf (locNum == 2)
		Game.GetPlayer().MoveTo(thirdLoc)
		Game.EnableFastTravel()
		Game.FastTravel(thirdLoc)
	ElseIf (locNum == 3)
		Game.GetPlayer().MoveTo(fourthLoc)
		Game.EnableFastTravel()
		Game.FastTravel(fourthLoc)
	ElseIf (locNum == 4)
		Game.GetPlayer().MoveTo(fifthLoc)
		Game.EnableFastTravel()
		Game.FastTravel(fifthLoc)
	EndIf
EndFunction

Function TeleToPCStartLoc()
	Utility.Wait(0.5)
	Game.FadeOutGame(False, True, 2.0, 1.0)
	Game.GetPlayer().MoveTo(pcStartLoc)
	Game.EnableFastTravel()
	Game.FastTravel(pcStartLoc)
EndFunction

Function TeleToConvLoc()
	Utility.Wait(0.5)
	Game.FadeOutGame(False, True, 2.0, 1.0)
	Game.GetPlayer().MoveTo(ConvLocT)
	Game.EnableFastTravel()
	Game.FastTravel(ConvLocT)
EndFunction

Function Menu(Int aiButton = 0)
	Utility.Wait(0.5)
	aiButton = myMenu.Show()
	If (aiButton == 0)
		pcStartLoc.MoveTo(currLoc)
		Menu3()
	ElseIf (aiButton == 1)
		Menu2()
	ElseIf (aiButton == 2)
		TeleToPCStartLoc()
	ElseIf (aiButton == 3)
		pcStartLoc.MoveTo(currLoc)
		TeleToConvLoc()
	ElseIf (aiButton == 4)
		Return
	EndIf
EndFunction

Function Menu2(Int aiButton = 0)
	Utility.Wait(0.5)
	aiButton = myMenu2.Show()
	If (aiButton == 0)
		firstLoc.MoveTo(currLoc)
	ElseIf (aiButton == 1)
		secondLoc.MoveTo(currLoc)
	ElseIf (aiButton == 2)
		thirdLoc.MoveTo(currLoc)
	ElseIf (aiButton == 3)
		fourthLoc.MoveTo(currLoc)
	ElseIf (aiButton == 4)
		fifthLoc.MoveTo(currLoc)
	ElseIf (aiButton == 5)
		Return
	EndIf
EndFunction

Function Menu3(Int aiButton = 0)
	Utility.Wait(0.5)
	aiButton = myMenu3.Show()
	If (aiButton == 0)
		TeleToLoc(0)
	ElseIf (aiButton == 1)
		TeleToLoc(1)
	ElseIf (aiButton == 2)
		TeleToLoc(2)
	ElseIf (aiButton == 3)
		TeleToLoc(3)
	ElseIf (aiButton == 4)
		TeleToLoc(4)
	ElseIf (aiButton == 5)
		Return
	EndIf
EndFunction

As I understand it, message box buttons cannot be dynamically changed via script.

 

However, you could create multiple buttons each with a different location name and use conditions to only allow five to show at any given time.

Well that sounds like a lot of hassle to go through for what I was thinking of doing... but hey, thanks for the reply and information.

You could make the buttons say Location 1, etc. and then include a key in the message text that says Location 1: <aliasname>, then just store the location in the appropriate alias. Look up text replacement on the CK wiki.

 

 

Wait... so I could just assign an alias to each option and change the alias when a new location has been assigned, thus changing what is displayed for the option? If you give it an <aliasname>, you can change that alias dynamically?

Edited by Darkxenoth
Link to comment
Share on other sites

Yeah, if you use text replacement then the name of whatever is currently in the alias will be substituted into the text.

I read into that a little bit... To use Text Replacement with aliases, doesn't there have to be a quest referencing the item or message or whatever that has the alias?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...