Jump to content

Script works but can it be better?


Recommended Posts

What maxaturo said. I would advise though making two versions of your mod. An SKSE version and a None SKSE version. You can put them both up on your mod page under main files and direct users to use one or the other. That way you don't need to add checks in your scripts. Good luck with the mod though!

Link to comment
Share on other sites

  On 3/21/2020 at 2:29 AM, maxarturo said:

You don't need to add them as "extra dependencies", you just include in your mod (in their corresponding folders) the "scripts - pex - psc" and the "po3_papyrusextender.dll" in the skse plugins folder.

That's all...

Oh, I read the page for the mod but didn't realise that the author allowed redistribution, I should get new glasses:)

Link to comment
Share on other sites

  On 3/21/2020 at 3:33 AM, dylbill said:

. An SKSE version and a None SKSE version. You can put them both up on your mod page under main files and direct users to use one or the other. That way you don't need to add checks in your scripts.

Well I already have an skse aware/non-skse version and an mcm aware version in the fomod, plus lots of patches. It will be easier to keep a version that covers both skse and non-skse but using the dll has potential, I shall rustle up a version for testing.

 

diziet

Link to comment
Share on other sites

  On 3/21/2020 at 6:06 PM, dizietemblesssma said:

 

  On 3/21/2020 at 2:29 AM, maxarturo said:

You don't need to add them as "extra dependencies", you just include in your mod (in their corresponding folders) the "scripts - pex - psc" and the "po3_papyrusextender.dll" in the skse plugins folder.

That's all...

Oh, I read the page for the mod but didn't realise that the author allowed redistribution, I should get new glasses:)

 

 

Making an SKSE plugin extension with no permission to "distribute" would make no sense !, because no modder would be able to use it.
Have a nice weekend.
Link to comment
Share on other sites

  On 3/21/2020 at 7:19 PM, maxarturo said:

 

 

Making an SKSE plugin extension with no permission to "distribute" would make no sense !, because no modder would be able to use it.

Indeed, but I thought the 'distribution' was to be by downloading the mod as-is. :)

Into work tomorrow, rather that than staying at home like so many these days. Anyone reading this stuck indoors, stay frosty!

 

diziet

Link to comment
Share on other sites

dizietemblesssma wrote: "Well I already have an skse aware/non-skse version and an mcm aware version in the fomod, plus lots of patches."

I had never seen a non skse script version from you. Are you sure with this?

My advice do not overwhelming you mod download page with too many patches. It is not very userfriendly.

 

In times of "Corona" I can go a bit deeper with your script and that is the result.

 

dz_mcm_ActivatorScript

  Reveal hidden contents

 

 

dz_mcm_QuestScript

  Reveal hidden contents

 

Link to comment
Share on other sites

The first script I posted checked for skse and if not found used equipitem instead of equipitemex, the player lost both hands weapon equipping but everything I've read says that skse is needed to do that. Just recently I've had great help using skse to add ammo functionality.

 

All my patches are in one FOMOD, the FOMOD selects the mcm versus non-mcm version based on the presence of SkyUi.esp, the user still has the option to choose the non-mcm version if they want. The non-mcm version is the one that checks for skse and uses equipitem if necessary,

The limit on mcm menus, though large (well for me it would be) means I don't want to force a user to have one, its only real utility is the ignore combat check, some player homes are in wilderness areas with wild animals such that even after entering a home the player is still deemed in combat and won't undress even if alone! And turning off player undressing seems to defeat the point of the patch.:)

 

Some player homes already have NPC undressing so I have versions of those two scripts that just add player undressing, a total of 4 scripts. The FOMOD keeps track of player homes detected and selects the appropriate scrips and esps for install.

 

I notice tnat you added torch to the activator script, is a torch not something that my existing script would pick up? I had thought it to be treated as a weapon. If not then I can see it's utility for completeness, though I image few players wanting to enter a pool or bath holding a torch; not if they were expecting to 'unequipall' once in. :)

 

diziet

Link to comment
Share on other sites

  On 3/22/2020 at 5:41 PM, ReDragon2013 said:

dz_mcm_ActivatorScript

  Reveal hidden contents

 

I'm not sure what these lines are for. I looked up OnCellAttach https://www.creationkit.com/index.php?title=OnCellAttach_-_ObjectReference and the talk page but I'm still a bit confused as to why you feel they are needed.

 

I'm getting lots of interesting and useful info from this and other threads, I feel the need to read and understand before moving on to what will probably be ver3 of my mod patches!

Although with all those already existing patches with triggerboxes and attached scripts I guess I'll be keeping the filenames. :smile:

Link to comment
Share on other sites

event OnCellAttach() will be fired here, if player and activator (which has this script attached) share the same parent cell, the detach event is fired as opposite

 

It is always a good idea to shrink the memory usage of actor and objectreference as much as possible, because of persistence.

To check Skyui mod loaded we can use the attach event too.

 

I came across with another idea (for naked player), because you are using a spell for npcs, but not for the player.

Scripts could be as follow:

 

dz_mcm_ActivatorScript

  Reveal hidden contents

 

 

dz_mcm_PlayerNakedEffectScript

  Reveal hidden contents

 

Edited by ReDragon2013
Link to comment
Share on other sites

  Quote

 

event OnCellAttach() will be fired here, if player and activator (which has this script attached) share the same parent cell, the detach event is fired as opposite

It is always a good idea to shrink the memory usage of actor and objectreference as much as possible, because of persistence.

 

 

Could you expand on how that shrinks memory? Since the activator does of course not move, it seems trivial that the player and the trigger are in the same cell?

 

 

  Quote

 

To check Skyui mod loaded we can use the attach event too.

 

 

 

Again I probably come across as being obtuse. :smile: But I'd like to understand the whys as well as the whats.

 

 

  Quote

 

I came across with another idea (for naked player), because you are using a spell for npcs, but not for the player.

 

 

 

When I first looked at doing these patches it was because I wondered why so many player home mods only had NPC undressing in, when the obvious thing would be to include the player. My reading lead me to numerous references to the game engine having a problem with using a spell on the player but not NPCs. My own testing showed the magic effect of 'unequipall' used by all NPC undressing mods, would undress the player, but whereas dispelling the spell would 'redress' an NPC the player stayed undressed.

 

Hence my doing things the 'long way around'. :smile:

I don't know if placing the functions of filling arrays with the players equipment in a spell would meet the same problem.

If not then perhaps the end result of all this discussion about my patches over a few threads here could result in a very small modders resource on the Nexus? A few generic scripts that others can take and use in their player home mods - or any mod that wants to undress people. :smile:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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