Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

Question - When working with Global variables, they're stored as float right? Does that mean you have to do a conversion if you try to change their value using the value of an int property (or when retrieving their value into an int property) within a script? Here's a couple fragments of what I'm working with atm:

On my "Utilicon" item

GlobalVariable Property DarkxChestGoldValue auto
Int Property DarkxGoldReturnValue = 0 auto
...
Function CheckVal()
Utility.Wait(0.5)
DarkxGoldReturnValue = DarkxChestGoldValue.GetValue()
Utility.Wait(0.2)
Debug.MessageBox("The contents of Storage are worth: " + DarkxGoldReturnValue + " gold.")
EndFunction
...

On my chest

...
Int Property myGoldValue = 0 Auto
GlobalVariable Property DarkxChestGoldValue Auto
...
Event OnClose(ObjectReference akActionRef)
	Utility.Wait(1.0)
	If myItemCount > 0
		DarkxChestGoldValue.SetValue(myGoldValue)
	EndIf
EndEvent
...
Link to comment
Share on other sites

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

 

Question - When working with Global variables, they're stored as float right? Does that mean you have to do a conversion if you try to change their value using the value of an int property (or when retrieving their value into an int property) within a script? Here's a couple fragments of what I'm working with atm:

On my "Utilicon" item

GlobalVariable Property DarkxChestGoldValue auto
Int Property DarkxGoldReturnValue = 0 auto
...
Function CheckVal()
Utility.Wait(0.5)
DarkxGoldReturnValue = DarkxChestGoldValue.GetValue()
Utility.Wait(0.2)
Debug.MessageBox("The contents of Storage are worth: " + DarkxGoldReturnValue + " gold.")
EndFunction
...

On my chest

...
Int Property myGoldValue = 0 Auto
GlobalVariable Property DarkxChestGoldValue Auto
...
Event OnClose(ObjectReference akActionRef)
	Utility.Wait(1.0)
	If myItemCount > 0
		DarkxChestGoldValue.SetValue(myGoldValue)
	EndIf
EndEvent
...

For the first, it SHOULD autocast. If it doesn't, just add an "as Int" without the quotes after DarkxChestGoldValue.GetValue().

 

For the second, you need to either use SetValueInt instead or do SetValue(myGoldValue as Float).

Link to comment
Share on other sites

Whenever I try to load Dawnguard and Skyrim in the creation kit, I get the following error message.

MASTERFILE: LOCALIZATION: zero entries or empty black size read from strings file STRINGS/Dawnguard_ENGLISH.STRINGS. Strings will be missing.

.

The creation kit then stops responding and shuts down. Is there any way to fix this?

 

I make two changes to my SkyrimEditor.ini file (found in the main Skyrim folder). You probably already have the first.

 

 

[General]
bAllowMultipleMasterLoads=1
 
[Archive]
SResourceArchiveList2=Skyrim - Shaders.bsa, Update.bsa, Dawnguard.bsa, HearthFires.bsa, Dragonborn.bsa, SkyUI.bsa

 

I added all three of the DLC and SkyUI to the BSA list so that the CK can find their language files, scripts, meshes, etc.

Link to comment
Share on other sites

I'm so confused... I've been working on a mod all day, (or rather, multiple mods, which culminated in a single greater mod) but when I finally got it working as well as could be expected and went to add the item to the player's inventory (I'm a bit too inexperienced/lazy to do a full-fledged quest, which it really should have for the use you'll get out of the item) and everything seemed fine, everything compiled great, the item was added to my inventory when I loaded up the game with the mod installed, and then... the item isn't working anymore :( Not entirely sure what I could have done to mess it up, but I guess I get to spend another couple hours tomorrow trying to figure out why the item isn't working properly now that it's getting added to the inventory properly. Any ideas as to what might have went wrong would be much appreciated.

Link to comment
Share on other sites

I'm so confused... I've been working on a mod all day, (or rather, multiple mods, which culminated in a single greater mod) but when I finally got it working as well as could be expected and went to add the item to the player's inventory (I'm a bit too inexperienced/lazy to do a full-fledged quest, which it really should have for the use you'll get out of the item) and everything seemed fine, everything compiled great, the item was added to my inventory when I loaded up the game with the mod installed, and then... the item isn't working anymore :sad: Not entirely sure what I could have done to mess it up, but I guess I get to spend another couple hours tomorrow trying to figure out why the item isn't working properly now that it's getting added to the inventory properly. Any ideas as to what might have went wrong would be much appreciated.

Wow... I can't believe it took me so long to notice that it wasn't working because somehow my script's properties weren't getting filled in correctly (when I created the properties, I made sure to name them the same as what they would be referencing and it showed the symbol that it should for them being filled; but they weren't actually referencing properly... it said they were referencing NONE ~.~). Filling in the properties seems to have fixed the issue I was having.

 

Now I'm having a different problem, which leads to my question - to check if the source container is NOT the player is it correct to use "akSourceContainer != Game.GetPlayer()"? This seems to be the only thing that isn't working as I think it should, so I thought perhaps I'm using the wrong operator or something... though I'm pretty sure I'm not, having used other programming languages before...

Link to comment
Share on other sites

 

 

Question - When working with Global variables, they're stored as float right? Does that mean you have to do a conversion if you try to change their value using the value of an int property (or when retrieving their value into an int property) within a script? Here's a couple fragments of what I'm working with atm:

On my "Utilicon" item

GlobalVariable Property DarkxChestGoldValue auto
Int Property DarkxGoldReturnValue = 0 auto
...
Function CheckVal()
Utility.Wait(0.5)
DarkxGoldReturnValue = DarkxChestGoldValue.GetValue()
Utility.Wait(0.2)
Debug.MessageBox("The contents of Storage are worth: " + DarkxGoldReturnValue + " gold.")
EndFunction
...

On my chest

...
Int Property myGoldValue = 0 Auto
GlobalVariable Property DarkxChestGoldValue Auto
...
Event OnClose(ObjectReference akActionRef)
	Utility.Wait(1.0)
	If myItemCount > 0
		DarkxChestGoldValue.SetValue(myGoldValue)
	EndIf
EndEvent
...

For the first, it SHOULD autocast. If it doesn't, just add an "as Int" without the quotes after DarkxChestGoldValue.GetValue().

 

For the second, you need to either use SetValueInt instead or do SetValue(myGoldValue as Float).

 

There is SetValueInt to set a GV as an integer. There is GetValueInt to retrieve a GV as an integer. Otherwise, SetValue and GetValue utilize floats.

Link to comment
Share on other sites

 

 

I'm so confused... I've been working on a mod all day, (or rather, multiple mods, which culminated in a single greater mod) but when I finally got it working as well as could be expected and went to add the item to the player's inventory (I'm a bit too inexperienced/lazy to do a full-fledged quest, which it really should have for the use you'll get out of the item) and everything seemed fine, everything compiled great, the item was added to my inventory when I loaded up the game with the mod installed, and then... the item isn't working anymore :sad: Not entirely sure what I could have done to mess it up, but I guess I get to spend another couple hours tomorrow trying to figure out why the item isn't working properly now that it's getting added to the inventory properly. Any ideas as to what might have went wrong would be much appreciated.

Wow... I can't believe it took me so long to notice that it wasn't working because somehow my script's properties weren't getting filled in correctly (when I created the properties, I made sure to name them the same as what they would be referencing and it showed the symbol that it should for them being filled; but they weren't actually referencing properly... it said they were referencing NONE ~.~). Filling in the properties seems to have fixed the issue I was having.

 

Now I'm having a different problem, which leads to my question - to check if the source container is NOT the player is it correct to use "akSourceContainer != Game.GetPlayer()"? This seems to be the only thing that isn't working as I think it should, so I thought perhaps I'm using the wrong operator or something... though I'm pretty sure I'm not, having used other programming languages before...

That operator should be working correctly. If you want to try something different but should function identically:

 

If !(akSourceContainer == Game.GetPlayer())

Link to comment
Share on other sites

 

That operator should be working correctly. If you want to try something different but should function identically:

 

If !(akSourceContainer == Game.GetPlayer())

 

I verified that it is working, but part of the function within the if statement isn't working properly...

*edit* But I'm pretty sure I've figured out why it wasn't working... testing now.

Edited by Darkxenoth
Link to comment
Share on other sites

How would I make a repeatable scene that occurs on certain days (Morndas as example)? It'll automatically start at a certain time on that day.

 

There are a couple ways I thought of to do it but they're not all that efficient, so I'd like to hear your ideas (mine were register updates in the quest, starting the scene repeatedly, or having a scene that "waits" on one phase that once ended properly restarts, first seems cleaner and more viable).

Link to comment
Share on other sites

Sorry... this is probably THE stupidest question ever, but once I finish up a mod, how do I export it all so that I can load it to Nexus? including the resources I used?

And for a less-stupid question... when I go to test my mod (a house), I have noticed that my followers don;t enter the house with me, and the area outside, they seem to sink beneath the platforms =/ (and my damn horse climbs the platforms) - what do I need to do to correct these issues?

Edited by Tilybeanz
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...