securitywyrm Posted July 5, 2017 Author Share Posted July 5, 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. I think I've figured out where I'm going wrong. The "Editor ID" is different from "Base ID" listed on http://fallout.wikia.com/wiki/Fallout_4_perks , isn't it? My current plan: I'm trying to make a script using the SM event for 'on level up' to activate the quest, and then run through a long if-then, so like... If game.GetPlayer() == 4 add perks you should get at level 4If game.GetPlayer() == 5 add perks you should get at level 5End if Would that work? Link to comment Share on other sites More sharing options...
securitywyrm Posted July 6, 2017 Author Share Posted July 6, 2017 Okay ... I have made a plugin that runs a script on level up, at the moment it's a debug message saying "OMFG player leveled up" HOWEVER... the adding perks part is where I'm stuck. Here's my code. Scriptname WyrmMods01:RunOnLevelUpScript extends Quest Form Property Armorer01 Auto Const Form Property Basher01 Auto Const Form Property BigLeagues01 Auto Const Form Property Blacksmith01 Auto Const Form Property Commando01 Auto Const Form Property DemolitionExpert01 Auto Const Form Property GunNut01 Auto Const Form Property Gunslinger01 Auto Const Form Property HeavyGunner01 Auto Const Form Property IronFist01 Auto Const Form Property LocalLeader01 Auto Const Form Property Rifleman01 Auto Const Form Property Science01 Auto Const Function LevelUpFunction() ; your code here Debug.Notification("OMFG Player Leveled up") if PlayerRef.GetLevel() == 2 PlayerRef.AddPerk(Armorer01) PlayerRef.AddPerk(Basher01) PlayerRef.AddPerk(BigLeagues01) PlayerRef.AddPerk(Blacksmith01) PlayerRef.AddPerk(Commando01) PlayerRef.AddPerk(DemolitionExpert01) PlayerRef.AddPerk(GunNut01) PlayerRef.AddPerk(Gunslinger01) PlayerRef.AddPerk(HeavyGunner01) PlayerRef.AddPerk(IronFist01) PlayerRef.AddPerk(LocalLeader01) PlayerRef.AddPerk(Rifleman01) PlayerRef.AddPerk(Science01) EndIf EndFunctionFrom what I understand, that should add all those perks when player reaches level 2 (The trigger for quest is in SM event node level up). However, the auto-fill properties button is still greyed out. What do? Link to comment Share on other sites More sharing options...
shavkacagarikia Posted July 6, 2017 Share Posted July 6, 2017 That script has two problems.1) if quest starts when player levels up and you want stuff to run when that happens, you need OnQuestInit() event. That LevelUpFunction won't run itself.2) Instead of Form type, you need Perk type properties. So your script should be this: Scriptname WyrmMods01:RunOnLevelUpScript extends Quest Perk Property Armorer01 Auto Const Perk Property Basher01 Auto Const Perk Property BigLeagues01 Auto Const Perk Property Blacksmith01 Auto Const Perk Property Commando01 Auto Const Perk Property DemolitionExpert01 Auto Const Perk Property GunNut01 Auto Const Perk Property Gunslinger01 Auto Const Perk Property HeavyGunner01 Auto Const Perk Property IronFist01 Auto Const Perk Property LocalLeader01 Auto Const Perk Property Rifleman01 Auto Const Perk Property Science01 Auto Const Event OnQuestInit() Debug.Notification("OMFG Player Leveled up") if PlayerRef.GetLevel() == 2 PlayerRef.AddPerk(Armorer01) PlayerRef.AddPerk(Basher01) PlayerRef.AddPerk(BigLeagues01) PlayerRef.AddPerk(Blacksmith01) PlayerRef.AddPerk(Commando01) PlayerRef.AddPerk(DemolitionExpert01) PlayerRef.AddPerk(GunNut01) PlayerRef.AddPerk(Gunslinger01) PlayerRef.AddPerk(HeavyGunner01) PlayerRef.AddPerk(IronFist01) PlayerRef.AddPerk(LocalLeader01) PlayerRef.AddPerk(Rifleman01) PlayerRef.AddPerk(Science01) EndIf EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts