That just passes through this function, it doesn't cause the crash. I'd probably look at the actual spell that's being evaluated, as it's using an EP function and using those incorrectly can cause a crash. As is though, there is nothing to show that this is a problem caused by PEPE or one that I could fix
Technically no, but it's just specifically the multiple spell patch, and only if someone is actually aiming to use those perk entry points. I should preface them not being compatible with that lack of compatibility being aimed at authors not users
There's a bizarre crash issue I've found using the combination of this mod and OStim On Demand. When going through the dialogue for the "Drink at the Tavern" scenario my game always crashes at the "Toast" dialogue.
Here's my crash log: https://pastebin.com/T9B9KpqY
Though maybe I just need to download an earlier version of PEPE to work with 1.5.97?
Edit: Turns out the crash occurs regardless of whether or not this mod is installed, so it's probably just a OOD related crash. You can disregard this.
Did you uninstall an enchantment mod recently? Or a mod that had enchantments that you can put on an item? Because the crash seems to be happening because it's reading a dynamically made spell. If it's missing magic effects, that might cause a crash. I was experimenting with what would happen if I uninstalled enchantment mods mid way through a save and the address is exactly the same.
Tldr, might be a mod you uninstalled, it can't find a magic effect for a made enchantment, results in a crash when trying to do something like get the cost of the enchant
If this is the case, that save might be fucked, because reinstalling it likely won't fix it if you've already saved over the removal. But maybe ask around on that.
Turns out my problem was to do with Various Dialogue Tags' OStim On Demand module. Given that OOD has been updated a couple times since the tags were made for it. OStim On Demand applies a magic effect during the particular scenario I mentioned, and the tags edit messes up the system causing a crash.
So, with this PEPE installed, this just expands Creation Kit's overall list of Entry Points to use?
I am looking to create an entire new Entry Point that works similarly to modifying Armor Weight values - but instead it's for Weapons, Ingredients, Potions, Consumables and Miscellaneous items.
Is there a particular tool I will need to view and to create a new Entry Point? How far can I go in creating a new Entry Point without the CK or the game itself hitting a limitation or breaking on me?
I'm entirely new to this sort of thing and I'd LOVE to learn how it works, and to be able to play around with what I have to work with to learn new things!
You only need CK/xEdit for the making of a plugin that uses the entry point, however you'd still need to make an skse plugin to do that. Just to make sure there's no confusion, i code perk entry points don't do anything. They're more like a function that mutates an input depending on what perk entries someone has. They have to be manually by someone somewhere, and that's the only way they can do anything. If this was already understood forgive my clarification
You're entirely fine! I wanted to ask to see if it was entirely doable, and if something like this mod already did it. But I think it doesn't - it just brings the Entry point coding for perks up to where they likely more easily accessible.
I thought I'd ask incase there was a way to create an entirely new Entry Point for perks to use.
For now, I'll have to keep searching and see if it's doable.
Yeah it's certainly doable. It would take hooking through an skse plugin but it'd be doable. Chances are you wouldn't even really need this plugin to do it either, just let it consider forms that aren't armor. But you'd have to hunt down the address of where it handles that
I'm trying to get the Modify Skill Use perk entry to work. I've called it like so: RE::HandleEntryPoint(RE::PerkEntryPoint::kModSkillUse, player, &skillImprove, "", 0, std::vector<RE::TESForm*>{}); Or as RE::HandleEntryPoint(RE::PerkEntryPoint::kModSkillUse, player, skillImprove);
But I keep getting an error return of 2(UnmatchedArgs). I'm clear on what args I'm supposed to pass to this since I can see in the Rested perk it can just flatly apply to the perk owner that is already being passed in. I tried adding in player in the array too as an arg, but that still didn't work. Which arg am I missing?
You still have to submit arguments even if the perk entry doesn't use it. You're submitting no arguments for an entry point that requires them, thus mismatched arguments. Additionally, you'd need a category, that's the string that is empty, otherwise it will just run on every perk with the same base entry point. It also needs a channel, that's the 0 there, needs to be either 255 or a specific number corresponding with the rank of the expected perk entry (255 means it doesn't care about what's used).
In the use case I wanted I wasn't aliasing the perk entry with any that I made. I wanted the normal entry point, hence no category or rank.
Looking through the source I found that here is where you determine expected arg count. You're missing kModSkillUse from this function. I rebuilt from source the PEPE plugin in debug and confirmed that the issue is it doesn't have any expected arg count for the Mod Skill Use perk entry. Got this in the PerkEntryPointExtender.log: EntryPoint.h(467): [debug] unmatching args 0 vs -1 (22)
I added the missing kModSkillUse to the 0 arg return switch case, rebuilt and confirmed that it now works. Added the Rested spell to the player and confirmed the entry point picks up on it. You just need push an update with kModSkillUse in the GetEntryPointTargetCount.
if you're not using a category, you don't need to use the API for that as there's no merit to do so. You're right, I didn't put it in the list. I'll update that later
Hey I was looking to make my own perk entries. I was hoping to make one to force a stagger or knockdown. Currently such effects have to be handled by applying a combat hit spell, which a big reason why so many perk mods have to play around the one spell per hit limitation, so having its own entry to cause a stagger or knockdown on hit would be much cleaner.
I can't seem to figure out how to for example implement a new perk entry with GROUP=Stagger Catergory=1 that replaces Mod Attack Damage and the recieved magnitude is the amount seconds until the affected actor can stagger again.
In addition, could I replace the Adjust Limb Damage perk for some hyper armor perk implementations where actor is immune to stagger from weapons of without particular material keywords, or do I have to replace fully implemented perks entries?
I've been looking through the code and have plenty of C++ experience, but I'm new to SKSE plugin development and it's surprisingly hard to find good API documentation. If you have any discord links or can offer any other resources I'd appreciate it.
It would be better to view a perk entry as something that mutates a given value rather than something that really does anything. Whatever you do with the value is ultimately going to be the project you use, the part my project does is just allow reuse of them. So actually using the categorized perks outside of papyrus is not entirely something I've documented.
But the gist of it is you need the API header from the github, and to use the non-templated functions (the template ones are sort of broken and endlessly call themselves). From there you just need:
Ah I understand. We aren't actually hooking in to where the game currently uses those perk entry functions to hijack those events, were just defining our own entry point we can test when we want to do something. I managed to get a plugin working that listens to hit events and then uses to the PEPE entry point call to check if I should apply the knockdown or stagger.
I'll enable VR it and some of my other mods. I disabled them for a while because I don't have VR and can't really explore any issues exclusive to it, but 1.5.97 mostly have the same offsets so they should probably work. Still, use with caution
Hey there! I'm working on a project, and I'm wondering if this mod could be helpful for it. Part of the project involves writing a script which needs to be able to keep track of all perks affecting power attack stamina costs. If I could return the float values of the magnitudes for all perks on an actor that have the "Mod Power Attack Stamina" entry point, then this becomes really simple, so I'm wondering if there's a way to do that with this mod.
Great, thanks! So, if I wanted to get the value of any Mod Power Attack Stamina perks on the player, I figure I would make use of this function: ApplyPerkEntryPointFloat(Actor Target, "Mod Power Attack Stamina", Form[] args, float base_value, string category = "", int channel = 1, int handle = 0) but after looking at the documentation, I'm still not sure what to pass in for the "Form[] args", and "float base_value", since I would also need to somehow specify the operation being performed on the initial cost (multiply, set value, etc).
Also, how might I go about accounting for perks with entry points that only activate conditionally? For instance, if a perk modifies power attack stamina costs ONLY when dual wielding, is there something I need to do to specify that? Or will the float value returned by ApplyPerkEntryPointFloat dynamically change when different conditions are met?
It uses the actual perk fragment function so it accounts for the current conditions of the target. What you'd submit for arguments are what is in the perk entries conditions (minus perk owner, that is the target), and the base value is just what ever the unchanged base power attack stamina is. I don't know what formula is there but you can likely get it off of uesp or something of the like.
The base value part makes complete sense, thanks for the continued help - my only remaining question would be, how do I format the perk condition arguments, since I'm not sure exactly what "Form[ ]" means? For example, in the case that the conditions include "GetEquippedItemType" as the condition function, and the parameters are "left", "right", "voice", "instant", and so the final condition is "GetEquippedItemType(Left) >= 1", how would I format that? Here's a screenshot of the exact perk window in CK: https://imgur.com/a/XMiKSYQ
It has nothing to do with the conditions themselves, it's the tabs of the perk entry where it says "Perk Owner" and "Weapon". Since you don't account for perk owner (its the target) you would have an array that's a size of 1 with the given weapon in it. You don't make conditions any differently, everything gets made the exact same if you're not looking to make a new perk entry point.
And if you are then the only thing you need to mess with this the rank and editor id, everything else should function the same
Got it, thanks again. Is the value entered for the "Form[ ] args" a string containing the name of the weapon type? Would I use "ItemTypeSword", for example?
If you're not a mod author or intending to use it as one you shouldn't care. TLDR of the description is you can use perk points from papyrus and make new ones either in a plugin or papyrus.
54 comments
https://pastebin.com/GaNJGL4S
Game plugins
https://pastebin.com/ZxAhLCsy
There's a bizarre crash issue I've found using the combination of this mod and OStim On Demand. When going through the dialogue for the "Drink at the Tavern" scenario my game always crashes at the "Toast" dialogue.
Here's my crash log:
https://pastebin.com/T9B9KpqY
Though maybe I just need to download an earlier version of PEPE to work with 1.5.97?
Edit: Turns out the crash occurs regardless of whether or not this mod is installed, so it's probably just a OOD related crash. You can disregard this.
Tldr, might be a mod you uninstalled, it can't find a magic effect for a made enchantment, results in a crash when trying to do something like get the cost of the enchant
If this is the case, that save might be fucked, because reinstalling it likely won't fix it if you've already saved over the removal. But maybe ask around on that.
I am looking to create an entire new Entry Point that works similarly to modifying Armor Weight values - but instead it's for Weapons, Ingredients, Potions, Consumables and Miscellaneous items.
Is there a particular tool I will need to view and to create a new Entry Point? How far can I go in creating a new Entry Point without the CK or the game itself hitting a limitation or breaking on me?
I'm entirely new to this sort of thing and I'd LOVE to learn how it works, and to be able to play around with what I have to work with to learn new things!
I thought I'd ask incase there was a way to create an entirely new Entry Point for perks to use.
For now, I'll have to keep searching and see if it's doable.
RE::HandleEntryPoint(RE::PerkEntryPoint::kModSkillUse, player, &skillImprove, "", 0, std::vector<RE::TESForm*>{});
Or asRE::HandleEntryPoint(RE::PerkEntryPoint::kModSkillUse, player, skillImprove);
But I keep getting an error return of 2(UnmatchedArgs). I'm clear on what args I'm supposed to pass to this since I can see in the Rested perk it can just flatly apply to the perk owner that is already being passed in. I tried adding in player in the array too as an arg, but that still didn't work. Which arg am I missing?
Looking through the source I found that here is where you determine expected arg count.
You're missing kModSkillUse from this function.
I rebuilt from source the PEPE plugin in debug and confirmed that the issue is it doesn't have any expected arg count for the Mod Skill Use perk entry. Got this in the PerkEntryPointExtender.log:
EntryPoint.h(467): [debug] unmatching args 0 vs -1 (22)
I added the missing kModSkillUse to the 0 arg return switch case, rebuilt and confirmed that it now works. Added the Rested spell to the player and confirmed the entry point picks up on it.
You just need push an update with kModSkillUse in the GetEntryPointTargetCount.
I can't seem to figure out how to for example implement a new perk entry with GROUP=Stagger Catergory=1 that replaces Mod Attack Damage and the recieved magnitude is the amount seconds until the affected actor can stagger again.
In addition, could I replace the Adjust Limb Damage perk for some hyper armor perk implementations where actor is immune to stagger from weapons of without particular material keywords, or do I have to replace fully implemented perks entries?
I've been looking through the code and have plenty of C++ experience, but I'm new to SKSE plugin development and it's surprisingly hard to find good API documentation. If you have any discord links or can offer any other resources I'd appreciate it.
But the gist of it is you need the API header from the github, and to use the non-templated functions (the template ones are sort of broken and endlessly call themselves). From there you just need:
"RE::HandleEntryPoint(RE::PerkEntryPoint::WhateverEntryPoint, whatever_actor, &the_float, "NameOfTheCategory", the_uint8_channel, { forms_for_conditions, ... } )"
If that example makes sense.
Thanks!
ApplyPerkEntryPointFloat(Actor Target, "Mod Power Attack Stamina", Form[] args, float base_value, string category = "", int channel = 1, int handle = 0)
but after looking at the documentation, I'm still not sure what to pass in for the "Form[] args", and "float base_value", since I would also need to somehow specify the operation being performed on the initial cost (multiply, set value, etc).
And if you are then the only thing you need to mess with this the rank and editor id, everything else should function the same