Salamandre19 Posted November 21, 2019 Share Posted November 21, 2019 (edited) 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 November 21, 2019 by Salamandre19 Link to comment Share on other sites More sharing options...
Zebsi Posted November 22, 2019 Share Posted November 22, 2019 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 More sharing options...
Salamandre19 Posted November 22, 2019 Author Share Posted November 22, 2019 (edited) 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 November 23, 2019 by Salamandre19 Link to comment Share on other sites More sharing options...
Salamandre19 Posted November 23, 2019 Author Share Posted November 23, 2019 (edited) Ok I managed to write the script, then add properties 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 November 23, 2019 by Salamandre19 Link to comment Share on other sites More sharing options...
Salamandre19 Posted November 23, 2019 Author Share Posted November 23, 2019 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 rarb) Create new quest and open the scripts tabc) click on add new script, select new script and give it a named)Click OKe) now right-click on it then select edit sourcef) 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 More sharing options...
Salamandre19 Posted November 23, 2019 Author Share Posted November 23, 2019 (edited) I have one more question please. This script I added to this quest, it is stored in scripts/source folder. Can someone give me a hint how to add this source/script if I ever release the mod? It consists from 2 esp files Edited November 23, 2019 by Salamandre19 Link to comment Share on other sites More sharing options...
Zebsi Posted November 24, 2019 Share Posted November 24, 2019 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 More sharing options...
Salamandre19 Posted November 24, 2019 Author Share Posted November 24, 2019 Thanks, all is clear except the .pex file. I have none of that. Only 2 esp + the script you gave me, which is a .psc file Link to comment Share on other sites More sharing options...
Recommended Posts