Jump to content

scripting + console commands


CeeTeeDee

Recommended Posts

Make a new quest in CK, set it start game enabled. Add a single reference alias to it that you force to point to the player.

Add this script to the alias:

Scriptname myWeightScript extends ReferenceAlias
 
Actor property targetActor auto
 
Event OnPlayerLoadGame()
    float currentWeight = targetActor.GetWeight()
    float targetWeight = 50.0
    float delta = (currentWeight / 100) - (targetWeight / 100)
 
    targetActor.GetLeveledActorBase().SetWeight(targetWeight)
    targetActor.UpdateWeight(delta)
EndEvent

After that, save the script and open its properties (double click it on the list), and fill the targetActor property to point to the character you want. Now it'll update on every game load, except the first one after activating your mod.

 

This is based purely on the documentation in the CK wiki, I haven't used weight change functions before, so dunno if there are any quirks ;)

http://www.creationkit.com/UpdateWeight_-_Actor

http://www.creationkit.com/SetWeight_-_ActorBase

 

 

You can't call console commands directly, instead you need to find and use an equivalent function somewhere, which may or may not exist.

Link to comment

I'm not sure about what you're asking...

 

You want to know if is possible emulate a Console command via script? Sure...

 

You want to know how to do? there are a dozen of way to do this, you should be more specific... what you want to do, exactly?

 

 

Edit: Ok, Srende First :P

Link to comment

Make a new quest in CK, set it start game enabled. Add a single reference alias to it that you force to point to the player.

Add this script to the alias:

Scriptname myWeightScript extends ReferenceAlias
 
Actor property targetActor auto
 
Event OnPlayerLoadGame()
    float currentWeight = targetActor.GetWeight()
    float targetWeight = 50.0
    float delta = (currentWeight / 100) - (targetWeight / 100)
 
    targetActor.GetLeveledActorBase().SetWeight(targetWeight)
    targetActor.UpdateWeight(delta)
EndEvent

After that, save the script and open its properties (double click it on the list), and fill the targetActor property to point to the character you want. Now it'll update on every game load, except the first one after activating your mod.

 

This is based purely on the documentation in the CK wiki, I haven't used weight change functions before, so dunno if there are any quirks ;)

http://www.creationkit.com/UpdateWeight_-_Actor

http://www.creationkit.com/SetWeight_-_ActorBase

 

 

You can't call console commands directly, instead you need to find and use an equivalent function somewhere, which may or may not exist.

 

 

You know, its people like you that keep this community going.

 

Thanks alot, i'll give it a try.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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