Jump to content

Creating a perk, and adding it through a script


Campaigner

Recommended Posts

Hello Nexus, I come asking for help on something simple. The chain of events I want to follow is as such;

 

1. Find item

2. Read item

3. Gain hidden perk without notification

 

I'm aiming to make a mod that adds new items, but I don't want them found anywhere except through player crafting, and I don't want players to start with the ability to craft them. I'm completely lost on how to do this, as it's not as simple as making the perk and adding it through a skill book or whatever. Could someone give me a runthrough on what to do? I can't find any tutorials anywhere for this, and the closest I've gotten was adding perks to an existing perk tree, which is NOT what I want. Skyforge Smithing is a perk, but it's not visible anywhere until after completing the Companions quest, and I want my perk to be the same way.

Link to comment
Share on other sites

On your item attach a script like this

 

Event OnRead()

Game.getPlayer().addPerk( "your perk here")

endEvent

 

I got this error when doing that;

 

type mismatch on parameter 1 (did you forget a cast?)
No output generated for 0000script, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on 0000script

 

I'm not so good with scripts. What did I mess up?

Edited by Campaigner
Link to comment
Share on other sites

  • Recently Browsing   0 members

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