Jump to content

[LE] Quick Questions, Quick Answers


Recommended Posts

Code on item itself i didnt do anything with the bandit alias yet just thought maybe i could try something later never did.

Scriptname Dan_GoldQuest extends ObjectReference

Quest Property Dan_Quest01 Auto
ReferenceAlias Property BanditBoss  Auto  


Event OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer)
	if (newContainer == Game.GetPlayer())
			Dan_Quest01.SetObjectiveDisplayed(30)
			Dan_Quest01.SetStage(30)
	endif
EndEvent 

Code for the end dialogue

getowningquest().setstage(40)
PlayerRef.RemoveItem(Dan_Gold,1,true,Dan)
Dan_RelPoints.Mod(50)

Everything is defined in quest aliases. I have the bottom code all set in properties yet it gives an error for the remove item. I have to go to work in the morning so I don't have time to mess with it rn.

Link to comment
Share on other sites

NEXT FRAGMENT INDEX 1
Scriptname Dan__TIF__041B90D1 Extends TopicInfo Hidden

Actor Property PlayerRef Auto
GlobalVariable Property Dan_RelPoints Auto
ReferenceAlias Property Dan Auto
ReferenceAlias Property Dan_Gold Auto

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
getowningquest().setstage(40)
PlayerRef.RemoveItem(Dan_Gold,1,true,Dan)
Dan_RelPoints.Mod(50)
;END CODE
EndFunction
;END FRAGMENT



E:\SteamLibrary\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\Dan__TIF__041B90D1.psc(15,10): type mismatch on parameter 1 (did you forget a cast?)
E:\SteamLibrary\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\Dan__TIF__041B90D1.psc(15,10): type mismatch on parameter 4 (did you forget a cast?)

I'm wondering if it's because I'm trying to use reference aliases? I've been messing with the properties a bit but I think RefAlias is what we want.

 

Link to comment
Share on other sites

I'm testing it by going into coc to warp into the cell from the main menu. Then doing the quest with a bit of cheating and warping around. So far it's not taking the item, but the quest does complete properly and I get the Gold/RelPoints reward. Now it stays in my inventory as stolen lol.

 

HUGE EDIT: So I was able to find a way to get the gift scenes to work. as far i can tall its like 90% fine. Maybe waaay too clunky? Idk. I just set one for each gifttype then made a separate ForceGreet package for each gift type as well. Not sure why its working now. Then set the scene stop after dialogue is played and the globalvariables to be reset to 0. So far so good lol.

 

Ok, So I'm testing out that code you gave me to increase the relationship rank. However, when the points reach the threshold, it does not go up. It just stays at zero. Doing some small fiddling to see what might work atm. I'm probably just stupid and have to call it somewhere. (https://www.creationkit.com/index.php?title=Function_Reference#Method_One:_Setting_up_the_Target_Script_as_a_Filled_Property)

Link to comment
Share on other sites

Is there any way to get current game difficulty setting? I'm trying to use a script to DamageAV("health" [amount]) but since this function does not scale the damage with difficulty, I find it balance breaking. It should be possible to get the various difficulty damage multipliers with GetGameSettingFloat() but there doesn't seem to exist any setting nor global variable that tells me which of the difficulties player is actually using, hence I cannot know which of the values to fetch.

 

So, I tried figuring out the current difficulty setting in a really backwards way by making a spell to deal 1 damage to player and recording the damage done, so I could use it to compare with all the difficulty damage multipliers and find the current difficulty setting myself. However, the script engine runs in parallel with things such as health regeneration, so the value outputted is not accurate. I'd assume stopping health regeneration temporary could work to some extend, but even then, active healing spells throw the result off so it still wouldn't be reliable.

 

Seems like a weird omission to not being able to access this information or that the DamageAV functions itself doesn't let us determine if the damage should be scaled or not. Am I missing something?

 

Any insights and ideas would be appreciated.

Edited by Phaxx
Link to comment
Share on other sites

@Phaxx

If you do not mind using SKSE, have a look at GetINIInt. It should be able to get the iDifficulty value as found in the SkyrimPrefs.ini.

 

That said, I have never used it. And while there is an example, it may be a little confusing.

 

EDIT: I took a quick peek at GetINIFloat, the example there has a comment that sheds light on how to set it up properly.

Int CurrentDifficulty = Utility.GetINIInt("iDifficulty:GamePlay") 
;gets the value of iDifficulty in the GamePlay section of SkyrimPrefs.ini
Edited by IsharaMeradin
Link to comment
Share on other sites

  • 2 weeks later...

Trying to import weapon nifs from another game using nifly since niftools does not like the weapons because of multiple UV mapping. I go into NifSkope and to my inexperienced eyes everything seems fine. I can put the texture paths and it loads, and it exports fine as far as I know. Loading it into the CK I can make it a weapon duplicating a vanilla form ID and renaming it, and it sees the textures in the model section. However, when I go in game, the weapons are invisible even though the mesh and textures works fine in the CK. It'd probably something dumb I'm doing on my end, but I can't figure it out. Net searching hasn't really gotten me anywhere so O figured I ask here. I can provide the nif if needed.

Link to comment
Share on other sites

Trying to import weapon nifs from another game using nifly since niftools does not like the weapons because of multiple UV mapping. I go into NifSkope and to my inexperienced eyes everything seems fine. I can put the texture paths and it loads, and it exports fine as far as I know. Loading it into the CK I can make it a weapon duplicating a vanilla form ID and renaming it, and it sees the textures in the model section. However, when I go in game, the weapons are invisible even though the mesh and textures works fine in the CK. It'd probably something dumb I'm doing on my end, but I can't figure it out. Net searching hasn't really gotten me anywhere so O figured I ask here. I can provide the nif if needed.

To avoid guessing games it's probably best if you upload the nif and textures.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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