Jump to content

[LE] Help with debug.MessageBox() on a spell hit


Cristobot

Recommended Posts

https://www.creationkit.com/index.php?title=Category:Papyrus

 

I do not know how to use it. But SKSE has a GetPerks function on the ActorValueInfo script.

 

Thanks, I didn't know about that! After some testing, I got it to work. It seems that GetPerks only returns the perks for the ActorValueInfo you're using. So if you're using Onehanded, it will return all of the Onehanded perks, and you can specify to only return the perks that the target knows. Because of this, I used the GetPerkTree function with a formlist to check for all perks that the target has:

 

Formlist Property TM_TargetPerks Auto ;empty list

Event OnEffectStart(Actor akTarget, Actor akCaster) 
    
    TM_TargetPerks.Revert()
    String TargetPerkNames
    
    Int I = -1 
    While I < 163 
        I += 1
        ActorValueInfo aVI = ActorValueInfo.GetActorValueInfoByID(I)
        aVI.GetPerkTree(TM_TargetPerks, akTarget, False, True) ;add all perks the target has for the current AVI to formlist. 
    EndWhile 
    
    Int M = (TM_TargetPerks.GetSize() - 1)
    Int Ia = -1
    While Ia < M
        Ia += 1        
        TargetPerkNames += (" - " + (TM_TargetPerks.GetAt(Ia) as perk).GetName())
    EndWhile 
    
    Debug.MessageBox("Perks: " + TargetPerkNames)
EndEvent
Link to comment
Share on other sites

 

Skills are also actor values. You can find a list here: https://www.creationkit.com/index.php?title=Actor_Values

 

Instead of using 3 message boxes, you can use a single message box with \n to denote new lines. You can also use \ to continue your papyrus line on the next line so it's easy to see. Example:

Debug.MessageBox("Health: " + akTarget.GetActorValue("Health") + \
"\n Magicka: " + akTarget.GetActorValue("Magicka") + \
"\n Stamina: " + akTarget.GetActorValue("Stamina") + \
"\n One Handed:" + akTarget.GetActorValue("OneHanded"))

 

Thanks so much for the tip and the link! Very helpful

Link to comment
Share on other sites

 

https://www.creationkit.com/index.php?title=Category:Papyrus

 

I do not know how to use it. But SKSE has a GetPerks function on the ActorValueInfo script.

 

Thanks, I didn't know about that! After some testing, I got it to work. It seems that GetPerks only returns the perks for the ActorValueInfo you're using. So if you're using Onehanded, it will return all of the Onehanded perks, and you can specify to only return the perks that the target knows. Because of this, I used the GetPerkTree function with a formlist to check for all perks that the target has:

 

Formlist Property TM_TargetPerks Auto ;empty list

Event OnEffectStart(Actor akTarget, Actor akCaster) 
    
    TM_TargetPerks.Revert()
    String TargetPerkNames
    
    Int I = -1 
    While I < 163 
        I += 1
        ActorValueInfo aVI = ActorValueInfo.GetActorValueInfoByID(I)
        aVI.GetPerkTree(TM_TargetPerks, akTarget, False, True) ;add all perks the target has for the current AVI to formlist. 
    EndWhile 
    
    Int M = (TM_TargetPerks.GetSize() - 1)
    Int Ia = -1
    While Ia < M
        Ia += 1        
        TargetPerkNames += (" - " + (TM_TargetPerks.GetAt(Ia) as perk).GetName())
    EndWhile 
    
    Debug.MessageBox("Perks: " + TargetPerkNames)
EndEvent

 

That is so awesome! It would have taken me many days to figure out! :smile: :smile:

I guess I will have to get SKSE working...

Link to comment
Share on other sites

 

Does anyone know if PC mods made with SKSE can be ported to Xbox?

No. They cannot. Xbox cannot run third party tools like SKSE.

 

 

 

Thanks so much for the information. You and dylbill have been so much help! Many things are starting to make sense with the Creation Kit.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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