SMB92 Posted June 26, 2017 Share Posted June 26, 2017 Sorry should be OnInit(), forgot the () EDIT - fixed error in code, try pasting again. Another way you can add the perks is making them properties. Oh BTW, Don't forget to FILL THE PROPERTIES after compiling script. If you change the Quest name on the code to same as quest name in your esp, you can just use Auto-fill. Link to comment Share on other sites More sharing options...
SMB92 Posted June 26, 2017 Share Posted June 26, 2017 Also you might need to change: PlayerRef.AddPerk formidToPlayerRef.AddPerk(formid) Link to comment Share on other sites More sharing options...
securitywyrm Posted June 26, 2017 Author Share Posted June 26, 2017 (edited) We seem to be getting closer. For simplicity sake I cut it down to one perk. Now the error is Papyrus Compiler Version 2.8.0.4 for Fallout 4Copyright © ZeniMax Media. All rights reserved.Starting 1 compile threads for 1 files...Compiling "BoringPerksScript"...C:\Users\Robert\AppData\Local\Temp\PapyrusTemp\BoringPerksScript.psc(19,23): extraneous input 'b254' expecting RPARENNo output generated for BoringPerksScript, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on BoringPerksScript The perk it's trying to add is 0004b254, which is rank 1 of armorer. Oh for reference, the mod this will be for is http://www.nexusmods.com/fallout4/mods/24972/? , so once we get the 'basics' down I'm confident I can craft the if-then variables and subroutines for the 49 levels. Relevant code Function AddPlayerPerks() PlayerRef.addperk(0004b254) ;NOTE: If you didnt want the player to be a property, you could do Game.GetPlayer().AddPerk() however this is slower. BoringPerksQuest.Stop() EndFunction So somehow even though it's in (), it's seeing the "b254" as separate from the rest? Edited June 26, 2017 by securitywyrm Link to comment Share on other sites More sharing options...
SMB92 Posted June 26, 2017 Share Posted June 26, 2017 Yeah try the above fix with PlayerRef.AddPerk(0004b254) Instead of AddPerk 0004b254 Link to comment Share on other sites More sharing options...
securitywyrm Posted June 26, 2017 Author Share Posted June 26, 2017 (edited) Yeah try the above fix with PlayerRef.AddPerk(0004b254) Instead of AddPerk 0004b254 Scriptname BoringPerksScript extends Quest Actor Property PlayerRef Auto Const ;Make the player a property because we will reference him more than once Quest Property BoringPerkQuest Auto Const ;Reference to the quest itself Event OnInit() LevelCheck() EndEvent Function LevelCheck() while PlayerRef.GetLevel() <= 2 ;Start a loop to wait for when the player exceeds level 2 Utility.Wait(3) ;This is so the loop doesnt run at a million miles an hour endwhile AddPlayerPerks() EndFunction Function AddPlayerPerks() PlayerRef.AddPerk(0004b254) ;NOTE: If you didnt want the player to be a property, you could do Game.GetPlayer().AddPerk() however this is slower. BoringPerksQuest.Stop() EndFunctionI made the change, same error. Edit: Also, I don't know what you mean by "fill the properties once it compiles." I didn't see anything about that in the tutorials I've seen so far, they all said to leave it alone. EDit: Also tried Game.GetPlayer().AddPerk() , same error. Edit: think I found something, in a skyrim thread it said "you need to declare your perks as perk properties, not use their form IDs" I have no idea how to do that. Edited June 26, 2017 by securitywyrm Link to comment Share on other sites More sharing options...
SMB92 Posted June 26, 2017 Share Posted June 26, 2017 Yeah I thought formID wouldn't work, wasn;'t sure. So you should see the properties button on the quest script tab. These are the objects your script needs to know about, otherwise it won't know what to apply the script to. Google CK Papyrus Properties, there are some good links to show you what to do there. On the script, your perk properties would look like this: Form Property PERKTOADD Auto Const and your AddPerk function would look like: PlayerRef.AddPerk(PERKTOADD) Substitute PERKTOADD with the exact name of the Perk as it appears in CK (the EditorID). THen you will be able to Auto-FIll your properties. Link to comment Share on other sites More sharing options...
Galvon94 Posted June 26, 2017 Share Posted June 26, 2017 Surely it would be better to have a single property that is an array of perks, and loop through them, rather than thirteen different properties? Though I suppose you can't auto-fill that. Link to comment Share on other sites More sharing options...
securitywyrm Posted June 26, 2017 Author Share Posted June 26, 2017 (edited) https://www.dropbox.com/s/aihf5t3rkyd8z0m/Untitled-1.png?dl=0 seems to be the answer for filling in the perks. I'll see what I can do to get that to auto-fill. Edited June 26, 2017 by securitywyrm Link to comment Share on other sites More sharing options...
Galvon94 Posted June 26, 2017 Share Posted June 26, 2017 "BoringPerksQuest" is never defined, "BoringPerkQuest" is. It's a simple spelling error in your variable name. Link to comment Share on other sites More sharing options...
SMB92 Posted June 26, 2017 Share Posted June 26, 2017 Surely it would be better to have a single property that is an array of perks, and loop through them, rather than thirteen different properties? Though I suppose you can't auto-fill that.It would be but for now we get him used to using basics. OP: Make sure everything mentioned in the script, especially the properties, are exact name (EditorID) as they are in CK. Link to comment Share on other sites More sharing options...
Recommended Posts