Jump to content

'Not a threat' Mod concept - seeking advice from more experienced papyrus scripters


Recommended Posts

Hi folks,

 

I had an idea for a... Hopefully very simple mod I'd like to write, mainly because I find SD+ and Deviously Helpless to be too unreliable, bloated, or buggy for my personal taste. TBH it's not even (necessarily) an adult mod, but given the experience I'm going for is, I figured I'd ask here.

 

The overall experience I'm hoping to create is:

 

Quote

If you're restrained (and either naked or just not literally coated in heavy armor), intelligent enemies (humanoids and falmer, mainly) don't see you as a threat unless you attack them , pickpocket them, or start pilfering their goods.

 

That's it! The goal is for other mods (i.e. your combat and/or noncombat scene mods of choice) handle any other activities.

 

As for implementation, the idea is:

 

Quote


1. Detect whether the player is restrained, preferably by checking equipped items for tags (to reduce/eliminate reliance on specific frameworks), including an MCM option so the player can add whatever tags they want. The complications here I foresee are: When does the detection take place?

- Preferably it'd just check when you equip or unequip something, but that might have its own shenanigans - what if a mod unequips all of your gear at once - would that create a giant script collapse? If I then put a timer to buffer between checks, would that cause cases where an equipped item isn't propertly detected?

- I could have it check periodically, but it'd have to be reasonably frequently for this to make sense, and I already don't like periodic scripts in my savegames where they're avoidable. 

- Is there an efficient way to even check all equipped items for tags? 

- How can I flag this to not prevent attacks from mods like Sexy Adventures, Cursed Loot, Defeat, Yamete!, etc?

 

If the player is restrained, 

2. Cause all humanoid and humanoid-allied enemies to become non-hostile to the player - not friendly, but basically the same state random citizens are in a town, where if you attack them or steal something they'll still try to tear your face off. 

- I'd guess factions are the best method for this, particularly with Falmer, where I'd assume their critters are in the same faction as them. Does this have potential negative side effects?

- Alternatively, I could try turning off combat AI, but that's super janky in my experience so how about no.

- Alternatively, I could try using a calm spell on everything in the area, but I definitely don't want the visuals from that, and it also sounds like it could be quite janky and have substantial performance hits. 

 

If the player is not restrained,

3. Remove whatever flag was set above.

- Complication: I'd prefer for players to not suddenly get attacked if e.g. restraints get removed as part of a scene. Are there reliable ways to check whether a scene is active and/or being prepped?

 

 

That's it!

 

The question I have for all of you is: Is anyone familiar enough with something similar that you can point me to the right resources to learn how to create a mod like this? I've dabbled in script editing in papyrus before, and I've done programming work in quite a few languages, but I've never actually tried to make a scripted mod from whole cloth before. Stability and performance are unfortunately one of the clearest goals here, so I realize I'm probably in for quite a challenge, and would like to avoid as many known pitfalls as I can.

 

Thanks!

Edited by transfer
adding some formatting to make things a bit more clear.
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use