Jump to content

Recommended Posts

 

On 12/11/2020 at 2:00 AM, Mister X said:

Oh, I didn't have in mind that those rewards scale :)

 

Well, I first had the idea to just divide the amount by 10 until it's less than 100. The problem there would be, that 99 gold would have a much higher chance than 101 gold.

So I think I use your idea, so there is a fixed min and max amount of gold that can trigger. This way, I even could calculate the base percentage each additional coin would add ^^

Ok, I've got a much more elegant solution for you, but first a coding lesson.  (this will be long-winded so bear with me)

 

That business of dividing by 10 until you get a number less than 100, there's a much easier way of doing that, and t's called modulus division (uses the '%' symbol).  Remember before you learned about decimal points you divided with a remainder?    (for example:  34 / 5 = 6 Remainder 4)

modulus division is dividing to find the remainder.  so...

 

34 % 5 = 4

50 % 40 = 10

100 % 10 = 0

100 % 100 = 0

50 % 100 = 50

 

So instead of using a loop to get a number less than 100...   (I don't know papyrus so I'm writing this in java)

 

x = gold received;

while (x >= 100)

     {

          x = x / 10;

     }

 

you would simple write:

 

x = gold received;

x = x % 100;

 

you don't have to worry if X is already < 100, because when X is < 100, then X % 100 just equals X.

 

modulus division is also the best way to check if a number is even or odd.  If X % 2 equals 1, x is odd.   If X % 2 equals 0, x is even.

 

lastly if X % Y equals 0, that means X is a multiple of Y.

 

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

As for the solution.  Quest reward gold is always a multiple of 100, so just exempt any gold received that's a multiple of 100 from being a mimic.  

 

if (x % 100 == 0) then gold is not a mimic

 

 

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

One last thing.  If you use the solution I have above, you'll have to re-work you mimic calculations.  might I suggest setting the MCM slider to adjust how much gold equals 1 percent chance increase.  So for example if the slider is set to 10 (not factoring in arousal):

 

10 gold has a 1% chance of being a mimic,

30 gold = 3% chance,

100 gold = 10% chance,

1000+ gold = 100% chance

 

So the calculation would look like this:

 

where

x = gold amount gained and

y = MCM slider setting


mimicPercentChance = x/ y / 100

 

 

you can also add a weight to it so that lower gold aren't ignored:

 

where

x = gold amount gained,

y = MCM slider setting,

z = weight value, and                   (Z should be and integer between 0 and 100.  realistically shouldn't be much higher than 30.  should also be set via MCM)

W = z * | 1-(x / y) |                       (that's Z multiplied by the absolute value of 1 minus the value of X over Y)


mimicPercentChance = ((x / y) + W) / 100             

 

 

What the weighted equation is doing is adding a portion of Z's value to the mimic percent chance.  The higher the gold amount (X), the lower the portion of Z will be added to the mimic chance.  This effectively means Z equals mimicPercentChance when X equals 1.  Setting Z equal to 0 effectively removes the weight completely.

 

The reason for the absolute value part is to prevent negative numbers once X > Y*100.  at that point, it doesn't matter that the portion of Z is getting bigger instead of smaller because the non-weighed part of the equation has already exceeded 100% anyway

Link to comment

@kaldwin Thank you for your effort!

I do know about the modulo, I just forgot it for the time of the first try.

 

BTW, the current version already has another way of calculating the gold chance: You give a min amount of gold, below doesn't trigger, and a max amount that has 100% chance without the modifier applied. The difference of those two values then determines how much additional percentage a single coin adds.

 

More or less it's your approach, just the other way around. I think it's more intuitive to set a coin amount rather than a percentage value for one coin.

Link to comment
8 hours ago, Mister X said:

@kaldwin Thank you for your effort!

I do know about the modulo, I just forgot it for the time of the first try.

 

BTW, the current version already has another way of calculating the gold chance: You give a min amount of gold, below doesn't trigger, and a max amount that has 100% chance without the modifier applied. The difference of those two values then determines how much additional percentage a single coin adds.

 

More or less it's your approach, just the other way around. I think it's more intuitive to set a coin amount rather than a percentage value for one coin.

It's no trouble.  It took me more time to write the response than it did to come up with the formula.  I would also agree that the your current method of calculating mimic chance is more intuitive.  I just wanted to give you a formula that would work with the "check for multiples of 100" approach of ignoring quest gold, if you decided to use it

Link to comment
  • 2 weeks later...
  • 4 weeks later...

I've tried the first edition.  Gonna give 1.4 a try.  Gold trigger has me interested.  When fist time playing. Had fun but then later got frustrated.  No item was in the safe.  Making me wanting for a single chance of activation.  Mainly a trigger only putting the item on for the first time.  Just recently thought a alternative trigger could be when the item breaks.  Though some combat scenes can get hectic for CPUs.  So a proc to occur during combat could be problematic.

Link to comment
  • 2 weeks later...

@Mister X I am having a problem with the mod. It works fine for a while, but at some point it stops changing items. Also it seems that the gold mimic trigger does not work. I see also that arousal sometimes goes to 0, -1 and -2, so I hope these corner cases are not causing issues with the mod.

 

I am using the mod by disabling the equipping events and only enabling the gold and random chance events. I also changed some of the other settings like drop enchanted equipment. You can see my settings here https://i.imgur.com/kznbdBE.jpg https://i.imgur.com/NPlE7gJ.jpeg https://i.imgur.com/3YovP8p.jpeg

I have Devious-Mimic-Clothes-SE_1-4-1.7z, Alternate Start - Live Another Life 4.1.3, Devious Devices SE 5.0.7z and the CBBE patches for it detailed here https://www.loverslab.com/topic/99700-devious-devices-se-50-2020-11-26/page/111/?tab=comments#comment-3077930 for 3BBB.

 

 

Other mods, like devious containers, keep working as intended. But for devious mimic clothing even if I now re enable the settings to trigger on equipping clothes nothing happens even if the chances are set to 100%.

It is a slightly troublesome issue as it can be fixed by reloading an old save, but it is difficult to know when the mod stops working so a lot of gameplay may be lost.

Is there a way to figure out what is wrong or somehow unstuck the mod?

 

I am also using SL Defeat SSE.7z and Death Alternative - Your Money Or Your Life 7.0.1a.2 along with Devious Captures 2.9.0.7z.

Together they make death into a SL scene and trigger devices being equipped and some kind of event afterwards or a release where I can run away after death.

It seems that the mod would get stuck after a death event like that based on my observations. So I may be able to reproduce the issue if needed.

 

Also here is a log I get when a successful mimic change occurs. I don't know if it is important or not. Nothing appears in the logs when a transformation should be occurring but doesn't.

[02/06/2021 - 01:01:53PM] ERROR: Cannot call HasKeyword() on a None object, aborting function call
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_Trigger.TriggerMimic() - "dmc_Trigger.psc" Line 232
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_Trigger.OnUpdateGameTime() - "dmc_Trigger.psc" Line 133
[02/06/2021 - 01:01:53PM] warning: Assigning None to a non-object variable named "::temp40"
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_Trigger.TriggerMimic() - "dmc_Trigger.psc" Line 232
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_Trigger.OnUpdateGameTime() - "dmc_Trigger.psc" Line 133
[02/06/2021 - 01:01:53PM] ERROR: Cannot call HasKeywordString() on a None object, aborting function call
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_Trigger.TriggerMimic() - "dmc_Trigger.psc" Line 240
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_Trigger.OnUpdateGameTime() - "dmc_Trigger.psc" Line 133
[02/06/2021 - 01:01:53PM] warning: Assigning None to a non-object variable named "::temp30"
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_Trigger.TriggerMimic() - "dmc_Trigger.psc" Line 240
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_Trigger.OnUpdateGameTime() - "dmc_Trigger.psc" Line 133

 

 

Here is a log related to having gold percentages at 100% and probably having the event trigger. Nothing happens though:

[02/06/2021 - 03:05:24PM] ERROR: Cannot call TriggerGold() on a None object, aborting function call
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:05:24PM] warning: Assigning None to a non-object variable named "::temp3"
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29

 

Some more:

[02/06/2021 - 03:21:01PM] ERROR: Cannot call TriggerGold() on a None object, aborting function call
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:21:01PM] warning: Assigning None to a non-object variable named "::temp3"
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:21:01PM] ERROR: Cannot call TriggerGold() on a None object, aborting function call
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:21:01PM] warning: Assigning None to a non-object variable named "::temp3"
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:21:02PM] ERROR: Cannot call TriggerGold() on a None object, aborting function call
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:21:02PM] warning: Assigning None to a non-object variable named "::temp3"
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:21:04PM] [Zad]: UpdateControls()
[02/06/2021 - 03:21:21PM] ERROR: Cannot call TriggerGold() on a None object, aborting function call
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:21:21PM] warning: Assigning None to a non-object variable named "::temp3"
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:21:22PM] ERROR: Cannot call TriggerGold() on a None object, aborting function call
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:21:22PM] warning: Assigning None to a non-object variable named "::temp3"
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:21:22PM] ERROR: Cannot call TriggerGold() on a None object, aborting function call
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29
[02/06/2021 - 03:21:22PM] warning: Assigning None to a non-object variable named "::temp3"
stack:
        [alias PlayerRef on quest mrxdmc_Main (17005901)].dmc_CheckEquip.OnItemAdded() - "dmc_CheckEquip.psc" Line 29

 

The gold trigger is easy to test by placing gold into a container and then taking it out of there.

Link to comment

@Hermangk First of, sorry for the late answer, I was quite busy the last few weeks.

Second, this one is the thread for the LE version, not the SE version. I don't know if you have Skyrim SE and just mixed up the threads. If you have LE though, I'd highly suggest you do use the LE version of my mod.

 

The problem with the gold trigger in your log snippets (the last one) could be a result of using the wrong mod version. It seems like the property, that points to the trigger script, isn't properly filled in your game. I just double checked that, at least on my end it's filled and gold did trigger successfully.

 

@RyreGruel Was the equipment already enchanted or did you enchant it yourself? I did look up the method I use to identify enchanted gear and it seems that it has problems with user enchanted stuff. I will try to find a reliable method to identify user enchanted stuff, too.

Link to comment

@Mister X You are right, I did mix up the threads when posting the issue. Sorry about that. I am on Skyrim SE and I use the SE version of the mod. And to be honest, that is quite a quick reply time.

 

I tried removing some of my mods (drunk redux, kidnapped redux), regenerated merged patch for SL survival, and regenerated the rest of the animations etc.

Loading old save was still corrupt and had the error, but a new game seems to work with the gold trigger. I will experiment some with the death alternative / defeat bug in case it was also fixed. Sad to lose the save though.

I may have either not generated the patch, the mod got corrupted (by another mod?) or I may have installed the mod during a gameplay. The last option is unlikely as I recall making a new game to start with this new mechanic in use.

Link to comment
8 hours ago, RyreGruel said:

@Mister X Yeah my cloths were enchanted by myself unfortunately. I hope you can find a reliable method without too much hassle.

 

I have looked into the issue: I use GetEnchantment for Armors, but that function can't recognize user enchantments :/ I have to try and implement another GetEnchantment function, but that doesn't work for armor while it's in the player inventory ... so it can take some while until I figured something out.

 

@stas2503 Thanks, I've uploaded the translation ?

Link to comment
4 minutes ago, A_guy_with_the_plan said:

hey question how do i set it to where it does not work if you already worn it, after sex/bathing anything that removes outfits and reequip it will make one of them become a mimic 

 

There's a toggle in the MCM that's named "Worn armor is safe" - as soon as armor was worn and unequipped at least once safely, it's considered safe and you can wear it, take it off and reequip it as much as you want.

It will loose the safe state as soon as it leaves the player inventory, though! So, when the clothes are put in a closet for bathing, they won't be safe anymore.

Link to comment
3 hours ago, Mister X said:

 

There's a toggle in the MCM that's named "Worn armor is safe" - as soon as armor was worn and unequipped at least once safely, it's considered safe and you can wear it, take it off and reequip it as much as you want.

It will loose the safe state as soon as it leaves the player inventory, though! So, when the clothes are put in a closet for bathing, they won't be safe anymore.

thanks its explains alot becues i did all of the above lol

Link to comment

For some reason it seems the "Worn armor is safe" option doesn't work for me.

Even with the option enabled, repeatedly equipping and unequiping the same piece of armor eventually leads to it being a mimic (just unequiping to inventory, not dropping or moving to any container).

I literally just have the inventory open and I'm clicking the same item to equip and unequip it, and after a few times it triggers being a mimic.

It's possible that this is a conflict with some other mod I have installed. I'll try stripping down my modlist to just this and it's requirements and see if it still happens.

Other then that this seems like a great idea with a lot of potential. Nice match with Deviously Cursed Loot and similar mods. I'd love to see this all fixed up and polished.

Link to comment
7 hours ago, Dudesonn said:

For some reason it seems the "Worn armor is safe" option doesn't work for me.

Even with the option enabled, repeatedly equipping and unequiping the same piece of armor eventually leads to it being a mimic (just unequiping to inventory, not dropping or moving to any container).

I literally just have the inventory open and I'm clicking the same item to equip and unequip it, and after a few times it triggers being a mimic.

It's possible that this is a conflict with some other mod I have installed. I'll try stripping down my modlist to just this and it's requirements and see if it still happens.

Other then that this seems like a great idea with a lot of potential. Nice match with Deviously Cursed Loot and similar mods. I'd love to see this all fixed up and polished.

 

OK, I will look at it. Normally, no other mod should be able to interfere easily, as long as they don't suppress vanilla script events, and that won't happen.

Maybe I screwed up some conditions again ?

Link to comment

Great mod! There are quite a few armors that integrate with MME that are "devious" if PC is a milk maid. See below (copied from MME mod page).  Would you consider creating a patch for those (or some - maybe just the parasite) armors for folks that use this and MME? I haven't tried them all but I believe at least the last two won't unequip without the cure.

 

Cow Harness 1
-Dwemer milking device 1
-Milker 1 2

Below armors will consume milk and feed Lactacid.
These armors are considered Living:
-Spriggan Armor 1 2
-Spriggan Host 1
-Living Arm 1
-Hermaeus Mora 1
-HM Priestess 1

These armors are considered Parasite, trigger tentacle rape if EC+ installed, will consume milk and feed Lactacid:
-Tentacle Armor 1
-Tentacle Parasite 1

Link to comment

Devious Mimic Clothes 2.0 - Beta 1

 

This is the first beta of Version 2.0 of Devious Mimic Clothes, for all who want to test it.

Be warned though: I tried a new technique to speed up things, which may result in bugs I hope to collect with this open beta.

Second, you will need a new savegame to test it, that has not seen any DMC installed. If you already test the DCUR beta, you may try the DMC beta alongside ;) 

 

Third, it's mostly a technical update, so don't expect groundbreaking new features. What you may expect is faster processing, as I integrated multithreaded script processing and removed quite a bunch of redundant security checks.

 

Fourth, I hope I've added most of the features v1 already has, but if you miss something, please tell me!

 

Requirements

  • SKSE
  • Skyrim LE
    • DawnGuard
    • HearthFires
    • DragonBorn
  • SexLab Framework
  • SexLab Aroused - any version should do
  • Devious Devices - v5.x
    • Assets
    • Integration
    • Expansion
  • A new savegame

What has changed

  • It should run noticeable faster than the old version
  • Better way to choose what Devious Devices to use

Removed

  • ZAZ isn't explicitely respected anymore as the framework states they go along nicely
  • The external event hook to trigger mimics. May come back later

 

To optimize the beta testing, please enable Papyrus logging and attach those if you come across any bugs. I've added quite a bunch of logging into the test version, so you may track down some issues on yourself.

Eg. if it never triggers, but you get TRUE for the actor and a device to use, your chances just never met ;) 

Devious-Mimic-Clothes-LE_2.0.0-beta.1.7z

Link to comment

Just to update on my previous post - the "worn armor is safe" option still didn't work even with a clean modlist.

However after updating to 2.0 the problem disappeared. Tested it both with my full modlist and a clean one, and everything works great now.

Whatever you did in the update seems to have fixed the problem.

 

I did come across another issue in 2.0, which I later learned was due to bad papyrus settings in my skyrim.ini.

In mimic's MCM menu I set the equip chance to 100% and disabled everything else, then tried equipping a few items for testing.

I noticed that scripts were not executing immediately when I equipped or unequipped an item.  Instead after equipping something I had to either go thru a load door or initiate a sexlab animation.

Immediately after cell change or upon animation end, the mimic script would execute (debug message in top left corner would appear) and the last item I equipped (minutes ago) would now be recognized as a mimic.

But I soon noticed that scripts from various other mods were bugging out as well. Since I have a very script-heavy modlist I increased the iMaxAllocatedMemoryBytes (papyrus setting in skyrim.ini) from the default 76kb to about 1mb. This fixed all my issues and Mimic Clothing works perfectly now.

I don't know enough about papyrus to really understand what was happening to cause such strange behavior but if anyone in the future reports a similar bug the same solution might work for them as well.

 

I also checked my papyrus log to see if it was throwing any errors or messages you might find useful, but it seems there's only a single line in the whole log related to this mod.

[02/12/2021 - 10:33:04AM] [DD Mimic Clothes] Unequip event is blocked

 

Love the mod, definitely has a permanent place in my modlist.

I'm also curious what kind of future plans do you have for this mod? Any planned features, integrations with other mods etc?

Link to comment
45 minutes ago, Dudesonn said:

Just to update on my previous post - the "worn armor is safe" option still didn't work even with a clean modlist.

However after updating to 2.0 the problem disappeared. Tested it both with my full modlist and a clean one, and everything works great now.

Whatever you did in the update seems to have fixed the problem.

That's really, really interesting: I use the exact same method in both versions ^^ ?

 

46 minutes ago, Dudesonn said:

I increased the iMaxAllocatedMemoryBytes (papyrus setting in skyrim.ini) from the default 76kb to about 1mb. This fixed all my issues and Mimic Clothing works perfectly now.

Glad this worked out for you. Yeah, v1 of DMC puts not that much stress on the script engine, but for a longer period of time. DMC2 utilizes multithreading, so it should be faster but in return creates more stress for the engine.

 

47 minutes ago, Dudesonn said:

single line in the whole log related to this mod

That's strange again, in my own logs I have multiple lines per trigger. Maybe just try to search for "Mimic" in the file

 

49 minutes ago, Dudesonn said:

I'm also curious what kind of future plans do you have for this mod? Any planned features, integrations with other mods etc?

I don't have any fixed plans yet. First I wanted the mimic feature to run, that's done. Now I want it to run fast and stable without creating major bugs or incompatibilities, that's what I work on. If that's (mainly) the case, I'll look for other features to add. Maybe I even declare the mod as finished then, with the only need to update when a new major DD version gets released.

 

Another idea is an adaption for the upcoming Toys framework, but for that the framework first needs to get more stable and settled.

 

BTW, did you feel a speed increase? So, after you worked out the Allocation, do you think the triggers are faster than in v1?

 

Link to comment

Devious Mimic Clothes 2.0 - Beta 2

 

Changes since Beta 1

  • ADDED event test key (shown in MCM debug tab if enabled), will trigger a random event with 100% base chance (modifiers still applied, so don't worry if it doesn't trigger every time)
    • Can't be changed, as it's only meant for testing purposes
    • You have to hold the key at least 1.5 secs
  • CHANGED the way devices are chosen for the body regions
    • No more buttplugs when equipping helmets! (Helmets can occupy the circlet slot, too, in that case they were also considered jewelry)
  • Some bugfixes and minor improvements

Updating from Beta 1 should be possible (but not required, below is full mod), still a new game is required when v1.x was installed before!

Devious-Mimic-Clothes-LE_2.0.0-beta.2.7z

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