baddarkl Posted October 8, 2018 Share Posted October 8, 2018 I'm trying to create a perk that boosts the player's Science, Repair, and Survival skills while in the crafting menus. For starters, I created an ability that simply provides +10 to each skill. Then I went into CraftingWorkbenchRecipesScript, CraftingReloadingBenchRecipesScript, and CraftingCampfireRecipesScript and added the following lines right below "Begin OnActivate": --------------------------------------------------- If Player.HasPerk NewPerk == 1 If Player.IsSpellTargetAlt NewAbility == 0 Player.AddSpellNS NewAbility EndifEndif ---------------------------------------------------- This succeeds in giving the player a bonus to those skills. The problem I've had is trying to remove the bonus once the player leaves the crafting menu. I created a new script with the following: ---------------------------------------------- Begin GameMode If Player.IsSpellTargetAlt NewAbility == 1 Player.Dispel NewAbilityEndif End ----------------------------------------------- This script apparently doesn't do anything, as the skill bonuses remain long after I've left the menu. I tried attaching a duration to the skill bonuses in the new ability. I thought back to Morrowind, and figured that time wouldn't pass in a menu, but if the bonuses only last 1 second, then they should simply expire 1 second after normal gameplay resumes. For whatever reason though, the bonuses just didn't expire. I tried attaching the condition "MenuMode 1077 == 1" to the bonuses in the ability, however it seems MenuMode just doesn't work as a conditional function. Link to comment Share on other sites More sharing options...
Mktavish Posted October 9, 2018 Share Posted October 9, 2018 Well since you are messing with scripts , might as well just put the skill increase right in the scripting , and scrap using an effect to get it done.But instead of editing vanilla scripts , you should make your own quest and script for that , since it is not recommended to edit vanilla scripts ... plus you could get it done with one script rather than 1 for each crafting activator instance. Here is a script I tested and is working ... ~~~~~~~~~~~~SCN zzzCraftBoostScript Int SkillBoost Begin MenuMode 1077 If SkillBoost == 0 && Player.HasPerk NewPerk == 1 PlayerRef.ModAV Repair 10 PlayerRef.ModAV Science 10 PlayerRef.ModAV Survival 10 Set SkillBoost to 1 endifEnd Begin GameMode If SkillBoost == 1 PlayerRef.ModAV Repair -10 PlayerRef.ModAV Science -10 PlayerRef.ModAV Survival -10 Set SkillBoost to 0 endifEnd ~~~~~~~~~~~~~~~~ Then with your perk you already made , But remove the perk entries you have on it.Put a condition on the quest of ... HasPerk NewPerk == 1Run On Reference PlayerRef Hope that helps . Add edit : Oh ya a mention ... instead of changing those vanilla scripts back in the Geck.Use FNVedit ... and just delete the entries on your mod for those scripts. Link to comment Share on other sites More sharing options...
baddarkl Posted October 10, 2018 Author Share Posted October 10, 2018 I've tried what you suggested, and I can't get it to work. I think I'm doing something wrong with the quest. Do I need to have quest stages for this to work? Does it require Start Game Enabled to be toggled? When I choose a reference for the quest condition, it has a drop-down menu for both Cell and Ref. Do I need to select from both lists, or just PlayerRef from the second list? Does the Script Processing Delay matter? Link to comment Share on other sites More sharing options...
Mktavish Posted October 10, 2018 Share Posted October 10, 2018 On the Quest , Quest Data tab ... this is what I set. Priority 90Start Game Enabled [checked]Script process delay [checked default] But could set it .5 ? didn't test others since it seemed to work fine.And by the way I am just using the console command of " Player.GetAv Repair" once I open the recipe menu.Didn't try making anything so do not know if menumode 1077 became inactive and lost the bonus.But it shouldn't until gamemode is active again. So that is how it then gives the bonus while the recipe menu is open , at least for me anyways. If you were saying you were never getting the bonus ?But I had not fully tested the opposite side of it keeping the bonus from adding , and the quest condition field with HasPerk appears to not work. Meaning it does not turn it off.So I ended up just adding that condition into the script ( edited last post in green) And then that kept it from giving a bonus in the recipe menu without the perk.But it appears I have another problem , although it may not effect or concern you since your method of giving the perk is probably different than mine.I created an activator to give me the perk , and then second activation to remove the perk.But for some reason I can't get it to remove the perk , not even with a console command.And all I can think is , having nothing in the perk entries field is causing it ??? Anyways ... hope that helps. Link to comment Share on other sites More sharing options...
baddarkl Posted October 10, 2018 Author Share Posted October 10, 2018 OK, I finally got it to work. Thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts