Jump to content

Need a simple script


Salamandre19

Recommended Posts

Hi Guys

 

I am creating a perk overhaul which is based on a starting perk where only penalties are listed. So I would need this perk to be active when the game starts.

I never tried any scripting yet, is it difficult to script? Can some of you give me some directions or even a sample of such script?

 

I guess the perk should be called in script by its ID or name?

 

(Another option would be that this perk is hidden, but maybe this is much harder to do? I tried the "hide perk" in CK option but doesn't work).

 

Thanks for help

Edited by Salamandre19
Link to comment
Share on other sites

You want to create a quest, add a new script to it, and write this:

Perk Property xPerk Auto

Event OnInit()
     Game.GetPlayer().AddPerk(xPerk)
EndEvent

Make sure you fill the property with your perk, and it should work. The perk will be added to the player, but it will be hidden.

Link to comment
Share on other sites

Thanks, when you say xPerk, that means I add its ID instead? So let's say the park calls Penalty.

Script should look

Perk Property Penalty Auto

Event OnInit()
Game.GetPlayer().AddPerk(Penalty)
EndEvent



And where is this property?

 

I created new quest, gave it a name then in scripts column, I clicked on add script, it open a box, I pasted inside:

Perk Property QUESTPenalties Auto

Event OnInit()
     Game.GetPlayer().AddPerk(QUESTPenalties)
EndEvent

(questpenalties is the name of perk)

Edited by Salamandre19
Link to comment
Share on other sites

Ok I managed to write the script, then add properties

 

EdVLF6.jpg

 

However the perk isn't added. I let it on perk tress, is not highlighted when I start the game, neither the abilities it enables are active. What I did wrong?

Maybe should I tell the quest to activate at game start, but how?

Edited by Salamandre19
Link to comment
Share on other sites

I got it to work, had to do extensive search to find why I was blocked ;)

 

Steps for those seeking for same procedure.

 

a) Search for scripts.rar in your data folder. Extract its content in data folder (where you are), but click "do not replace already existing scripts". If you don't do this step, you will be blocked at "extend" box, as it needs the scripts from the rar

b) Create new quest and open the scripts tab

c) click on add new script, select new script and give it a name

d)Click OK

e) now right-click on it then select edit source

f) In the box paste the script as given by Zebsi ("xperk" should be interpreted as your perk name)

h) Save (there is option to click on)

 

Then just click on properties, then it will propose a list, go to your perk and select it. Ok, then save. Thats all

 

Thanks Zebsi

Link to comment
Share on other sites

You package it to replicate Skyrim's data directory; create a folder named Data and place the esps within, as well as a folder named Scripts. Inside this folder, put your .pex file and create a new folder, titled Source. Finally, put your .psc file in the Source folder.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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