DeepBlueFrog Posted January 25, 2021 Posted January 25, 2021 Is there a Modder's guide to adding compatibility to MME with other mods? I looked through the first post and couldn't see anything. I am going to be working more heavily on Hormones and SexLab stories/Milk Farm in a couple of weeks and I would like to explore adding compatibility with MME if possible.
forsythia_vahl Posted January 25, 2021 Posted January 25, 2021 5 hours ago, Fasterflight225 said: Unbound pumps do not provide their own lactacid, they draw from the player's inventory. There is a debug option that removes this, but otherwise, only bound pumps provide their own lactacid. That checkbox you clicked only causes pumps to feed one unit of lactacid when you first get in, even if your character is full... it does not remove the need to supply lactacid. Thanks! I installed the fancy version. It seems that I have to find bound pumps in orcs camps or caves
Fasterflight225 Posted January 25, 2021 Posted January 25, 2021 1 hour ago, DeepBlueFrog said: Is there a Modder's guide to adding compatibility to MME with other mods? I looked through the first post and couldn't see anything. I am going to be working more heavily on Hormones and SexLab stories/Milk Farm in a couple of weeks and I would like to explore adding compatibility with MME if possible. I don't know about hormones... but MME already flags actors who wear equipment flagged as 'Milking Curiass' as cows and functions properly for them. Technically, Sexlab Stories: Milk Farm's curiasses are supposed to automatically count for such, but because they're Devious gear that doesn't take up the body slot, MME doesn't see them. Literally just use a curiass model that takes up the #32 slot, and it'll flag the cows as MME cattle. MME demands lactacid consumption to make milking work. Just throw a few bound pumps into the cow's routine, and it'll be fine-ish. The real sticking point is keeping these systems from reaching out and fucking with a player far away, as MME wasn't designed with random cows not affiliated with a player just wandering around in mind. ...I think a good start would be flagging the cows as Milk Slaves? I don't know if that'd stop MME from asking the player if they want to make them milkmaids every time they get in pumps, but it 'should' stop their milk from getting put in the player's inventory when it shouldn't. ...I tried something like this a while ago, and was stopped not by MME, but by Sexlab Stories Devious. It uses its own (glacially slow) lactation code and items for its quest progression, and I couldn't get the quest scripts to recognize MME milk instead. While I will freely admit the failure on my inability to tamper with the code, MME's player-centric design will chafe against any mod hoping to establish NPC dairy farms.
Fasterflight225 Posted January 25, 2021 Posted January 25, 2021 6 minutes ago, forsythia_vahl said: Thanks! I installed the fancy version. It seems that I have to find bound pumps in orcs camps or caves I mean... You're supposed to buy Lactacid from... some type of vendors, I don't remember, it's been too long. I do remember it's stupidly overpriced, so it might be better to just replace the Fancy pumps with bound ones using the console.
forsythia_vahl Posted January 25, 2021 Posted January 25, 2021 2 hours ago, Fasterflight225 said: I mean... You're supposed to buy Lactacid from... some type of vendors, I don't remember, it's been too long. I do remember it's stupidly overpriced, so it might be better to just replace the Fancy pumps with bound ones using the console. Got it. I will reinstall it with all the pumps replaced by the bound ver.
Fasterflight225 Posted January 25, 2021 Posted January 25, 2021 57 minutes ago, forsythia_vahl said: Got it. I will reinstall it with all the pumps replaced by the bound ver. I think you loose the surrounding structures doing that... I meant targeting them and using placeatme to replace the standard pumps with their bound variants.
Ed86 Posted January 25, 2021 Author Posted January 25, 2021 7 hours ago, DeepBlueFrog said: Is there a Modder's guide to adding compatibility to MME with other mods? I looked through the first post and couldn't see anything. I am going to be working more heavily on Hormones and SexLab stories/Milk Farm in a couple of weeks and I would like to explore adding compatibility with MME if possible. no, but you could ask most mme data stored in StorageUtil
decaluka Posted January 26, 2021 Posted January 26, 2021 @DeepBlueFrog Compatibility between MME and SL Parasites would also be awesome too! After all, MME is already supposed to be compatible with a few parasitic armors.
Baltasarr80 Posted January 26, 2021 Posted January 26, 2021 7 minutes ago, decaluka said: @DeepBlueFrog Compatibility between MME and SL Parasites would also be awesome too! After all, MME is already supposed to be compatible with a few parasitic armors. yes i think so too and i also saw somethink about Milking threw estrus and that would also somewhat support sl parasites
Fasterflight225 Posted January 26, 2021 Posted January 26, 2021 45 minutes ago, decaluka said: @DeepBlueFrog Compatibility between MME and SL Parasites would also be awesome too! After all, MME is already supposed to be compatible with a few parasitic armors. 36 minutes ago, Baltasarr80 said: yes i think so too and i also saw somethink about Milking threw estrus and that would also somewhat support sl parasites The fault lies with Sexlab Parasites. They're DD gear, which come in three parts, and the part your character actually wears deliberately has no name so it can't easily be targeted by the console, because bondage fetish. Giving it a name makes it able to be flagged as Parasite Armor by MME's MCM. Giving it the name 'Tentacle Armor' will make it automatically be flagged as such.
decaluka Posted January 26, 2021 Posted January 26, 2021 @Fasterflight225 So you're saying it should be possible to change the name of that main piece of armor through TES5EDIT for it to be recognized by MME?
Fasterflight225 Posted January 26, 2021 Posted January 26, 2021 8 minutes ago, decaluka said: @Fasterflight225 So you're saying it should be possible to change the name of that main piece of armor through TES5EDIT for it to be recognized by MME? That's exactly what I'm saying. Even Creation Kit can do it, assuming its training wheels are removed. Again, any name will allow MME's MCM menu to see it, so it can be manually flagged as Parasitic armor. Giving it the name 'Tentacle Armor' will automatically flag it as such, as MME auto-flags armor based on its in-game name.
DeepBlueFrog Posted January 26, 2021 Posted January 26, 2021 3 hours ago, Fasterflight225 said: The fault lies with Sexlab Parasites. They're DD gear, which come in three parts, and the part your character actually wears deliberately has no name so it can't easily be targeted by the console, because bondage fetish. Giving it a name makes it able to be flagged as Parasite Armor by MME's MCM. Giving it the name 'Tentacle Armor' will make it automatically be flagged as such. I fixed that in a recent version. Tentacle armors now have a name. I will also make sure the armors in Stories Devious also have a name where it counts. On 1/25/2021 at 2:44 AM, Ed86 said: no, but you could ask most mme data stored in StorageUtil I can't try MME for multiple reasons but I will download it and study the code and esp structure. On 1/24/2021 at 9:20 PM, Fasterflight225 said: I don't know about hormones... but MME already flags actors who wear equipment flagged as 'Milking Curiass' as cows and functions properly for them. Technically, Sexlab Stories: Milk Farm's curiasses are supposed to automatically count for such, but because they're Devious gear that doesn't take up the body slot, MME doesn't see them. Literally just use a curiass model that takes up the #32 slot, and it'll flag the cows as MME cattle. MME demands lactacid consumption to make milking work. Just throw a few bound pumps into the cow's routine, and it'll be fine-ish. The real sticking point is keeping these systems from reaching out and fucking with a player far away, as MME wasn't designed with random cows not affiliated with a player just wandering around in mind. ...I think a good start would be flagging the cows as Milk Slaves? I don't know if that'd stop MME from asking the player if they want to make them milkmaids every time they get in pumps, but it 'should' stop their milk from getting put in the player's inventory when it shouldn't. ...I tried something like this a while ago, and was stopped not by MME, but by Sexlab Stories Devious. It uses its own (glacially slow) lactation code and items for its quest progression, and I couldn't get the quest scripts to recognize MME milk instead. While I will freely admit the failure on my inability to tamper with the code, MME's player-centric design will chafe against any mod hoping to establish NPC dairy farms. Thanks for the details. I will dissect them in the coming days.
box of rocks Posted January 26, 2021 Posted January 26, 2021 Mastery level and maid level (both PC and NPC) won't go up. I have used Lactaid and had followers and leveling won't work. [Edit] I got it working, I was just too drunk to play skyrim with mods.
Lupine00 Posted January 31, 2021 Posted January 31, 2021 @Ed86 Maybe you remember that about a year ago I set out to add MME milking as a deal for DF? And then ... I guess 2020 happened ... anyway, now I'm actually trying to finish off that code. I looked at the milking scripts in MilkQuest, (e.g. milkquest.psc) and found that there's a nice MilkToContainer script that milks to a specified MilkBarrel argument ... great. However, the placed milk pumps don't call that variant, or have any way for it to get set. Instead they call the old milking function that sets the MilkBarrel to None. So, it's not like the code is designed so I can specify a MilkBarrel object via StorageUtil or a Property and it will be used - the MilkBarrel is passed in the triggering call, and that comes from the pump, and the pump uses the old call that doesn't specify a barrel. But even if it didn't, how would the pump even know the barrel I want? It looks like I'd have to overwrite all the milk pumps to call it from the pumps. (That would be silly). OR I'd have to provide a patched milkquest.psc in DF ... which presumably would conflict with almost any plausible update to MME, because there is so much code in that file. Would you consider a hack to milkquest that would check StorageUtil for an object in a field called "MME_MilkBarrel" or something? This is basically the patch I'd make (have made in fact): Spoiler Starting line 1246 of milkquest.psc ;MilkingType == 2 bound/ disable player control, do not enable after milking done ;MilkBarrel == container where milk should be stored after milking If !MilkBarrel ObjectReference defaultBarrel = StorageUtil.GetFormValue(akActor, "MME_MilkBarrel_Default") As ObjectReference If defaultBarrel MilkBarrel = defaultBarrel EndIf EndIf ObjectReference overrideBarrel = StorageUtil.GetFormValue(akActor, "MME_MilkBarrel_Override") As ObjectReference If overrideBarrel MilkBarrel = overrideBarrel EndIf if akActor.HasSpell( BeingMilkedPassive ) ;if MilkingType != 1 ;prevents msg spam from aidrivenplayer bound milkpump, since its activates script endlessly, The intent is that a mod can put either a default of override barrel on the cow, and the default will be used if no MilkBarrel is specified in the call while the override will always be used if it exists, regardless of what was passed. In practice, what I'm doing now is simply catching the end of milking event and then searching through the player's inventory for some milk. But I can end up removing some other random milk they already had, rather than milk they just produced. Also, more annoyingly, it can fail completely if the PC is wearing a DD gag, because that removes the milk instantly, before I can check for it. If I could send to a special "MilkBarrel", I can then be confident that any milk in there was produced by the player, and DD won't remove it, allowing me to properly rob the player of milk (some milk may be returned to the player).
Ed86 Posted January 31, 2021 Author Posted January 31, 2021 2 hours ago, Lupine00 said: @Ed86 Maybe you remember that about a year ago I set out to add MME milking as a deal for DF? And then ... I guess 2020 happened ... anyway, now I'm actually trying to finish off that code. I looked at the milking scripts in MilkQuest, (e.g. milkquest.psc) and found that there's a nice MilkToContainer script that milks to a specified MilkBarrel argument ... great. However, the placed milk pumps don't call that variant, or have any way for it to get set. Instead they call the old milking function that sets the MilkBarrel to None. So, it's not like the code is designed so I can specify a MilkBarrel object via StorageUtil or a Property and it will be used - the MilkBarrel is passed in the triggering call, and that comes from the pump, and the pump uses the old call that doesn't specify a barrel. But even if it didn't, how would the pump even know the barrel I want? It looks like I'd have to overwrite all the milk pumps to call it from the pumps. (That would be silly). OR I'd have to provide a patched milkquest.psc in DF ... which presumably would conflict with almost any plausible update to MME, because there is so much code in that file. Would you consider a hack to milkquest that would check StorageUtil for an object in a field called "MME_MilkBarrel" or something? This is basically the patch I'd make (have made in fact): Reveal hidden contents Starting line 1246 of milkquest.psc ;MilkingType == 2 bound/ disable player control, do not enable after milking done ;MilkBarrel == container where milk should be stored after milking If !MilkBarrel ObjectReference defaultBarrel = StorageUtil.GetFormValue(akActor, "MME_MilkBarrel_Default") As ObjectReference If defaultBarrel MilkBarrel = defaultBarrel EndIf EndIf ObjectReference overrideBarrel = StorageUtil.GetFormValue(akActor, "MME_MilkBarrel_Override") As ObjectReference If overrideBarrel MilkBarrel = overrideBarrel EndIf if akActor.HasSpell( BeingMilkedPassive ) ;if MilkingType != 1 ;prevents msg spam from aidrivenplayer bound milkpump, since its activates script endlessly, The intent is that a mod can put either a default of override barrel on the cow, and the default will be used if no MilkBarrel is specified in the call while the override will always be used if it exists, regardless of what was passed. In practice, what I'm doing now is simply catching the end of milking event and then searching through the player's inventory for some milk. But I can end up removing some other random milk they already had, rather than milk they just produced. Also, more annoyingly, it can fail completely if the PC is wearing a DD gag, because that removes the milk instantly, before I can check for it. If I could send to a special "MilkBarrel", I can then be confident that any milk in there was produced by the player, and DD won't remove it, allowing me to properly rob the player of milk (some milk may be returned to the player). hold on *starts time machine* *goes back in time 2 years* *adds MilkPUMP_milkbarrel_example* Scriptname MilkPUMP_milkbarrel_example extends ObjectReference MilkQUEST Property MilkQ Auto ObjectReference Property MilkBarrel Auto ;after milking put milk & cum into barrel ;---------------------------------------------------------------------------- EVENT OnActivate(ObjectReference akActionRef) Actor akActor = akActionRef as Actor IF !akActor.HasSpell( MilkQ.BeingMilkedPassive ) && akActor.GetSitState() <= 3 && akActor.GetSitState() > 0 && MilkQ.Sexlab.IsValidActor(akActor) if akActor == MilkQ.PlayerRef Game.ForceThirdPerson() endif MilkQ.MilkingToContainer(akActor, 0, 0, 0, MilkBarrel) ENDIF ENDEVENT *returns to present* done
Lupine00 Posted January 31, 2021 Posted January 31, 2021 1 hour ago, Ed86 said: Scriptname MilkPUMP_milkbarrel_example extends ObjectReference I want the player to just use the MME added pumps as normal, but the milk goes to the follower. How am I going to get that outcome with your example? What object am I going to put that event on? Even if I put the pump in an alias, then both scripts will run and it will race to see which one gets in first. And even if that could be resolved, which I sort of doubt, then there'd be the issue of how the pump gets in an alias before the player clicks on it. Call me a lazy dummy, but I like to keep things simple. Is it completely ridiculous for you to add functionality so that MilkBarrel can simply be set once, nice and easy, per cow, and stay set until changed? Like in my patch? It just makes more sense to me to administer per cow rather than per pump anyway.
Ed86 Posted January 31, 2021 Author Posted January 31, 2021 1 hour ago, Lupine00 said: I want the player to just use the MME added pumps as normal, but the milk goes to the follower. How am I going to get that outcome with your example? What object am I going to put that event on? Even if I put the pump in an alias, then both scripts will run and it will race to see which one gets in first. And even if that could be resolved, which I sort of doubt, then there'd be the issue of how the pump gets in an alias before the player clicks on it. Call me a lazy dummy, but I like to keep things simple. Is it completely ridiculous for you to add functionality so that MilkBarrel can simply be set once, nice and easy, per cow, and stay set until changed? Like in my patch? It just makes more sense to me to administer per cow rather than per pump anyway. oof ... i guess for actor your variant can work hm.... doesnt seem very safe, but i guess it can work w/o dependencies Scripts.7z
TBDM Posted January 31, 2021 Posted January 31, 2021 I've noticed a conflict between this mod and the 1.2 version of 360 Movement Overhaul (https://www.nexusmods.com/skyrim/mods/101507). I am using that version because I haven't tried using Nemesis as I wasn't sure if it worked well with Sexlab (Last I had read it had no creature animations and I think a lower animation limit). However the behavior files seem to conflict with MME so that I cannot enter into any milk pumps with 360 Movement Overhaul installed. Is there a way for me to fix this?
Lupine00 Posted January 31, 2021 Posted January 31, 2021 6 hours ago, Ed86 said: hm.... doesnt seem very safe, but i guess it can work w/o dependencies Thanks. Where do you see a hazard with this change?
Ed86 Posted February 1, 2021 Author Posted February 1, 2021 7 hours ago, Lupine00 said: Thanks. Where do you see a hazard with this change? multiple mods try to change that some mod changes target, gets removed, and then its fucked using something like below would be safer, since you can unset IsSlave tag in mcm, but you dont want dependency i guess set StorageUtil.GetIntValue(akActor, "MME.MilkMaid.IsSlave") == 1 catch event and MilkE.InitiateTradeToContainer(StorageUtil.GetFloatValue(akActor,"MME.MilkMaid.MilkingContainerMilksSUM") as int, 0, akActor, MilkBarrel) StorageUtil.SetFloatValue(akActor, "MME.MilkMaid.MilkingContainerMilksSUM", 0)
Emeraldnoir Posted February 1, 2021 Posted February 1, 2021 I installed this, met all the requirements, and couldn't find any Milk pumps. I do not use city mods at all, and left most of the game alone. Only armors and such mods are used. I also tried using Being a Cow, and with or without that mod, the milk pumping stations didn't appear.
Lupine00 Posted February 2, 2021 Posted February 2, 2021 7 hours ago, Emeraldnoir said: I installed this, met all the requirements, and couldn't find any Milk pumps. I do not use city mods at all, and left most of the game alone. Only armors and such mods are used. I also tried using Being a Cow, and with or without that mod, the milk pumping stations didn't appear. You installed the milk pump ESP but did not enable it?
Lupine00 Posted February 2, 2021 Posted February 2, 2021 20 hours ago, Ed86 said: multiple mods try to change that some mod changes target, gets removed, and then its fucked using something like below would be safer, since you can unset IsSlave tag in mcm, but you dont want dependency i guess set StorageUtil.GetIntValue(akActor, "MME.MilkMaid.IsSlave") == 1 catch event and MilkE.InitiateTradeToContainer(StorageUtil.GetFloatValue(akActor,"MME.MilkMaid.MilkingContainerMilksSUM") as int, 0, akActor, MilkBarrel) StorageUtil.SetFloatValue(akActor, "MME.MilkMaid.MilkingContainerMilksSUM", 0) It took me a little reading to figure out what this is all about. So, now I understand that milk slaves don't generate any milk by default, and it has to be made by explicit call. Having "got" it, I think this has about the same risks of conflict as the container override on the cow, with the possible downside that the player will be confused by being set a milk slave. With the container override approach it's easy to definitively detect any conflict by checking the StorageUtil override value for the container is what you expect it to be. If it isn't what you expect, you can warn the player, disable problem functionality, or whatever. With the milk slave, it's possible for it to fail in multiple ways, most of which will likely result in extra milk appearing from somewhere - depending on what the conflicting mod does. Not a big problem, but still a bit broken. In practice, I don't think there are any mods using milk slave on the player, and I am absolutely certain there are none using the StorageUtil override, as it didn't exist before. Conflicts are somewhat theoretical at this point. So I prefer to stick with the StorageUtil override approach and not rewrite my working code yet again.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now