Caliban44 Posted July 28, 2015 Share Posted July 28, 2015 So, just to be absolutely sure, I currently have a separate script that has the magic effect application and the registration function, and I pass all the mods I want registered through that. In reality, those effects and functions need to go into the original script that came with the mods I want to register (in this case, Beeing Female and Fill Her Up)? I would, if you put them in the OnEffectStart() and OnInit() functions of magic effects and quests respectively it keeps everything nice and self-contained. Meaning that when you finish writing these patches they could be released to the public without requiring both of them. It could work just fine in another script but then it'd require an additional esp (which I'm told isn't a problem for most people as not everyone is constantly a few mods away from the limit like I am) and it'd be dependent on having both installed, making it restrictive to which members of the forum could download and use it. If I'm following this correctly, having them separate would also mean that if one of the mods changes significantly, the individual C.A.N.S. script for that specific mod could be updated all on its own, rather than having one script to has to be re-released every time any of the mods changes something. Here's a question from the non-script-literate side of the room: if C.A.N.S. is somehow wildly successful, would there be a way for the mods that C.A.N.S. addresses to build in support for C.A.N.S.? In other words, is there a chunk of code that the author of Hentai Pregnancy or Fill Her Up or Milk Mod could add that would check if C.A.N.S. was installed, and then if it was, output C.A.N.S.-compatible commands rather than its normal behavior? Basically it would give the mod native compatibility with C.A.N.S., without the need for a separate script. I don't think having individual patch files / modules on the C.A.N.S. download page for each mod is a bad idea at all! I'm just wondering if there's a way to give the authors of node-altering mods an easy way to add in a chunk of code to make their mod "C.A.N.S. Compatible" (if they feel like it, of course). if Feliks inplements an api Here is the api from creature framework to get him started To register your mod with the framework, register for this event on game load: RegisterForModEvent("CFRegister", "OnCreatureFrameworkRegister")And in the event, you do the actual registration of your mod and its armour swaps. Use the RegisterMod(string modId, string modName) API method to register your mod, and the RegisterCreatureArmorSwapToMod(string modId, Race raceForm, Armor skinForm, string raceName, string skinName, Armor normalArmor, [Armor arousedArmor, [int[] restrictedSlots]]) API method to register swaps. The last two parameters are optional. Example: event OnCreatureFrameworkRegister(Form api) CreatureFramework CFAPI = api as CreatureFramework if !CFAPI.IsModRegistered("some-cool-mod") CFAPI.RegisterMod("some-cool-mod", "Some Cool Mod") CFAPI.RegisterCreatureArmorSwapToMod("some-cool-mod", WerewolfRace, none, "Werewolf", "", NormalArmor, ArousedArmor) endIf endEventPassing none as a skin means that the swap will be available for all skins of that race. Link to comment
Feliks Posted July 28, 2015 Author Share Posted July 28, 2015 So, just to be absolutely sure, I currently have a separate script that has the magic effect application and the registration function, and I pass all the mods I want registered through that. In reality, those effects and functions need to go into the original script that came with the mods I want to register (in this case, Beeing Female and Fill Her Up)? I would, if you put them in the OnEffectStart() and OnInit() functions of magic effects and quests respectively it keeps everything nice and self-contained. Meaning that when you finish writing these patches they could be released to the public without requiring both of them. It could work just fine in another script but then it'd require an additional esp (which I'm told isn't a problem for most people as not everyone is constantly a few mods away from the limit like I am) and it'd be dependent on having both installed, making it restrictive to which members of the forum could download and use it. If I'm following this correctly, having them separate would also mean that if one of the mods changes significantly, the individual C.A.N.S. script for that specific mod could be updated all on its own, rather than having one script to has to be re-released every time any of the mods changes something. Here's a question from the non-script-literate side of the room: if C.A.N.S. is somehow wildly successful, would there be a way for the mods that C.A.N.S. addresses to build in support for C.A.N.S.? In other words, is there a chunk of code that the author of Hentai Pregnancy or Fill Her Up or Milk Mod could add that would check if C.A.N.S. was installed, and then if it was, output C.A.N.S.-compatible commands rather than its normal behavior? Basically it would give the mod native compatibility with C.A.N.S., without the need for a separate script. I don't think having individual patch files / modules on the C.A.N.S. download page for each mod is a bad idea at all! I'm just wondering if there's a way to give the authors of node-altering mods an easy way to add in a chunk of code to make their mod "C.A.N.S. Compatible" (if they feel like it, of course). if Feliks inplements an api Here is the api from creature framework to get him started To register your mod with the framework, register for this event on game load: RegisterForModEvent("CFRegister", "OnCreatureFrameworkRegister")And in the event, you do the actual registration of your mod and its armour swaps. Use the RegisterMod(string modId, string modName) API method to register your mod, and the RegisterCreatureArmorSwapToMod(string modId, Race raceForm, Armor skinForm, string raceName, string skinName, Armor normalArmor, [Armor arousedArmor, [int[] restrictedSlots]]) API method to register swaps. The last two parameters are optional. Example: event OnCreatureFrameworkRegister(Form api) CreatureFramework CFAPI = api as CreatureFramework if !CFAPI.IsModRegistered("some-cool-mod") CFAPI.RegisterMod("some-cool-mod", "Some Cool Mod") CFAPI.RegisterCreatureArmorSwapToMod("some-cool-mod", WerewolfRace, none, "Werewolf", "", NormalArmor, ArousedArmor) endIf endEventPassing none as a skin means that the swap will be available for all skins of that race. Yeah something like that. It's on the horizon, the soft dependency mod event version. The thing is that would require some serious rewriting of well.. pretty much everything. It wasn't an approach I'd known about until I was already balls deep into CANS. I'm currently trying to come up with a way to use both without enforcing some hard dependencies. I think I've got an idea, but I want to get some other stuff nailed down before I rip out the experimental modevents workarounds, Link to comment
Ed86 Posted July 28, 2015 Share Posted July 28, 2015 The way I understand it, CANS intercepts all of the node checks and passes through some internal maths and then spits out a change if there is any difference between the "GetNodeScale" and "SetNodeScale" floats for that particular mod, which is why the mod has to be registered with CANS. It's node changes are stored as a float within CANS, and CANS is effectively the only mod that makes the changes. Right now, I've changed over to separate script patches as Feliks suggested instead of using an additional esp to effect the changes, as I'd need to change the scripts that came with the original mods (sgo_QuestController for Soulgem Oven, and MilkQUEST for MME) anyway. Might as well free up space in load orders. As for Fill Her Up, I'm having trouble recompiling the script with the changes, so that one will have to wait until Feliks or I can (or anyone else who wants to take a stab at it, my edits and error logs are posted above) can figure out what's wrong. As far as I can tell none of the errors in the sr_inflatequest should be showing up at all. The only thing I can think of is for some reason it's using the 0.5.0.0 scripts and not the 0.7 scripts. Try deleting whatever CANS files you have and replacing them with the new ones.Reinstalled CANS 0.7 and still get the same error for sr_inflatequest. Here's what I have sofar if anyone want to test the patches out. you haven't included sources Oops. Here's one with the sources included hm.....well its all broken1) integration, you need to modify esp for script changes to work or do soft dependency 2) you lack many bones scaling NetImmerse.SetNodeScale(akActor, "NPC L Breast P1", CurrentSize, false) NetImmerse.SetNodeScale(akActor, "NPC R Breast P1", CurrentSize, false) NetImmerse.SetNodeScale(akActor, "NPC L Breast P2", CurrentSize, false) NetImmerse.SetNodeScale(akActor, "NPC R Breast P2", CurrentSize, false) NetImmerse.SetNodeScale(akActor, "NPC L Breast P3", CurrentSize, false) NetImmerse.SetNodeScale(akActor, "NPC R Breast P3", CurrentSize, false) these are used when actor transformed to werewolf and has 3 rows of breasts NetImmerse.SetNodeScale(akActor, "NPC L Breast01", CurveFix, false) NetImmerse.SetNodeScale(akActor, "NPC R Breast01", CurveFix, false) you dont have function for breast curve ;NetImmerse.SetNodeScale(akActor, "NPC L GenitalsScrotum [LGenScrot]", CurrentSize, false) ;NetImmerse.SetNodeScale(akActor, "NPC R GenitalsScrotum [RGenScrot]", CurrentSize, false) i think there are left and right Scrotum though im not sure since ive never tested ill do proper integration later, you should add missing functions for bone scaling Will do, I honestly didn't realize there were bones for werewolf breasts. Or mods that messed with them. In general I just grabbed the nodes I saw mods messing with already and did that. Will push an update either tonight or tomorrow. this is how i see my integration, when you finalize framework, lines like CANS.Breast(akActor, "Milk Mod Economy", BreastBase, false) ;3rd person should be uncommented MilkQUEST.psc Link to comment
Feliks Posted July 28, 2015 Author Share Posted July 28, 2015 The way I understand it, CANS intercepts all of the node checks and passes through some internal maths and then spits out a change if there is any difference between the "GetNodeScale" and "SetNodeScale" floats for that particular mod, which is why the mod has to be registered with CANS. It's node changes are stored as a float within CANS, and CANS is effectively the only mod that makes the changes. Right now, I've changed over to separate script patches as Feliks suggested instead of using an additional esp to effect the changes, as I'd need to change the scripts that came with the original mods (sgo_QuestController for Soulgem Oven, and MilkQUEST for MME) anyway. Might as well free up space in load orders. As for Fill Her Up, I'm having trouble recompiling the script with the changes, so that one will have to wait until Feliks or I can (or anyone else who wants to take a stab at it, my edits and error logs are posted above) can figure out what's wrong. As far as I can tell none of the errors in the sr_inflatequest should be showing up at all. The only thing I can think of is for some reason it's using the 0.5.0.0 scripts and not the 0.7 scripts. Try deleting whatever CANS files you have and replacing them with the new ones.Reinstalled CANS 0.7 and still get the same error for sr_inflatequest. Here's what I have sofar if anyone want to test the patches out. you haven't included sources Oops. Here's one with the sources included hm.....well its all broken1) integration, you need to modify esp for script changes to work or do soft dependency 2) you lack many bones scaling NetImmerse.SetNodeScale(akActor, "NPC L Breast P1", CurrentSize, false) NetImmerse.SetNodeScale(akActor, "NPC R Breast P1", CurrentSize, false) NetImmerse.SetNodeScale(akActor, "NPC L Breast P2", CurrentSize, false) NetImmerse.SetNodeScale(akActor, "NPC R Breast P2", CurrentSize, false) NetImmerse.SetNodeScale(akActor, "NPC L Breast P3", CurrentSize, false) NetImmerse.SetNodeScale(akActor, "NPC R Breast P3", CurrentSize, false) these are used when actor transformed to werewolf and has 3 rows of breasts NetImmerse.SetNodeScale(akActor, "NPC L Breast01", CurveFix, false) NetImmerse.SetNodeScale(akActor, "NPC R Breast01", CurveFix, false) you dont have function for breast curve ;NetImmerse.SetNodeScale(akActor, "NPC L GenitalsScrotum [LGenScrot]", CurrentSize, false) ;NetImmerse.SetNodeScale(akActor, "NPC R GenitalsScrotum [RGenScrot]", CurrentSize, false) i think there are left and right Scrotum though im not sure since ive never tested ill do proper integration later, you should add missing functions for bone scaling Will do, I honestly didn't realize there were bones for werewolf breasts. Or mods that messed with them. In general I just grabbed the nodes I saw mods messing with already and did that. Will push an update either tonight or tomorrow. this is how i see my integration, when you finalize framework, lines likeCANS.Breast(akActor, "Milk Mod Economy", BreastBase, false) ;3rd person should be uncommented The last bool can be ignored, CANS will handle that issue internally Link to comment
TechBaNe Posted July 28, 2015 Share Posted July 28, 2015 Strange. I was able to compile all of those scripts in that zip file. As far as I know, you also need all of the sources from the mods those scripts are dependant on (both hard and soft), which I made sure I had. It's these attached source files that I can't seem to compile using any script editor. FWAbilityBeeingFemale.psc sr_inflateQuest.psc Link to comment
chajapa Posted July 29, 2015 Share Posted July 29, 2015 sr_inflateQuest.psc is encoded UTF-8 without BOM change it to ANSI and it will compile. I don't have Beeing Female so I can't check that one. NotePad++ can make the conversion in one click. EDIT ** just downloaded the beeingfemale psc (duh) and it's encoded UTF-8 Change that to ANSI as well Link to comment
TechBaNe Posted July 29, 2015 Share Posted July 29, 2015 I'm not sure how to do that in notepad++, I've only recently started using it. Link to comment
chajapa Posted July 29, 2015 Share Posted July 29, 2015 I'm not sure how to do that in notepad++, I've only recently started using it. Have your file open. The toolbar at the top has an entry called "encoding"..... it will SHOW you the current encoding by a radio button already selected. You'll see in the same dropdown a "Convert to ANSI" selection. Select it! Done Then you can open CK as normal and compile as you normally would. I just ran into this exact same problem last week. Link to comment
TechBaNe Posted July 29, 2015 Share Posted July 29, 2015 Okay, I'll do that, thanks! EDIT: Just tried converting to ANSI and setting it to encode in ANSI. Saved and reopened it. It still won't compile, and it switched itself back to UTF-8 without BOM. EDIT 2: All of the other scripts that did compile were also encoded in UTF-8 without BOM, so I'm really not sure what's going on. Link to comment
chajapa Posted July 29, 2015 Share Posted July 29, 2015 Are you compiling in CK? I've never looked for a setting in CK regarding encoding. Link to comment
TechBaNe Posted July 29, 2015 Share Posted July 29, 2015 Nope, I'm using notepad++ to compile since CK was giving me too much grief. Link to comment
Feliks Posted July 29, 2015 Author Share Posted July 29, 2015 (edited) weird, I've just checked and all th CANS scripts are in UTF-8 Without BOM. Gonna copy 'em and convert 'em to ANSI, see if it changes anything at all. Edit: Took significantly longer than usual to compile, but nothing seems to have changed with the CANS_Framework script. Hm. Edited July 29, 2015 by Feliks Link to comment
Feliks Posted July 29, 2015 Author Share Posted July 29, 2015 Hey kind of weird idea, but I'm a bit sleep deprived and though it'd probably be a good idea to run it by a few people before I took a look at it. The obvious drawback of magic effects is their inability to affect people who are not loaded and that they'll fall off npc's whenever you change cells. The big drawback to quest aliases is a limit of 128. So, what if I did something else entirely, specifically: a hidden item that applied the affect. Assuming it's possible, does anyone see any serious drawbacks to this method? Link to comment
TechBaNe Posted July 29, 2015 Share Posted July 29, 2015 I don't see any problems. Just have to make it undropable or re-add itself if it was ever lost. Afterall, HDT Havok Object works in a similar way except for the part about it removable. I also asked milzschnitte and Srende if they'd be able to help with their scripts. Update: milzschnitte is working on implementing CANS in the next update of Beeing Female Link to comment
IronRose Posted July 29, 2015 Share Posted July 29, 2015 What about making the object a Quest Item for a C.A.N.S.-generated quest? The only wrinkle would be the need* to add a "clean-up/uninstall" button to C.A.N.S. that would end the quest and delete all of those items before someone removes the mod. It might also be wise to test what happens if a PC or NPC steals the item, or has more than one in their inventory. There are a lot of mods that mess with inventory settings in weird ways... * You wouldn't NEED to, I guess, but the alternative is to leave a whole bunch of NPCs with useless items and phantom quests, which is sloppy. Link to comment
TechBaNe Posted July 29, 2015 Share Posted July 29, 2015 What about making the object a Quest Item for a C.A.N.S.-generated quest? The only wrinkle would be the need* to add a "clean-up/uninstall" button to C.A.N.S. that would end the quest and delete all of those items before someone removes the mod. It might also be wise to test what happens if a PC or NPC steals the item, or has more than one in their inventory. There are a lot of mods that mess with inventory settings in weird ways... * You wouldn't NEED to, I guess, but the alternative is to leave a whole bunch of NPCs with useless items and phantom quests, which is sloppy. Is there a way to set the item to being invisible in the inventory menu? Link to comment
Feliks Posted July 29, 2015 Author Share Posted July 29, 2015 What about making the object a Quest Item for a C.A.N.S.-generated quest? The only wrinkle would be the need* to add a "clean-up/uninstall" button to C.A.N.S. that would end the quest and delete all of those items before someone removes the mod. It might also be wise to test what happens if a PC or NPC steals the item, or has more than one in their inventory. There are a lot of mods that mess with inventory settings in weird ways... * You wouldn't NEED to, I guess, but the alternative is to leave a whole bunch of NPCs with useless items and phantom quests, which is sloppy. Is there a way to set the item to being invisible in the inventory menu? That was the plan. I'll need to fiddle with it a bit. Link to comment
Feliks Posted July 30, 2015 Author Share Posted July 30, 2015 Alright guys, two new versions up. 0.8.0.0 is the same as the old version but with a few added bones and a fix for torpedo breasts (thanks to Ed86) 0.9 makes the experimental leap from magic effects to items for the framework. This is gonna need some testing, but implementation has not changed. After it is confirmed that this method works I'll roll out the 1.0 release and focus on making the code easier to read for instructional and implementation purposes as well as adding any other features I (or the community) feel it is missing. Info on the item: It's an item called CANS_Controller that should not appear in the player's inventory but should be equipped as soon as the magic effect is applied (may require a clean save, or forcing a reset of the CANS quest through the console). It currently uses slot 59 because I couldn't come up with anything off the top of my head that uses that. If this causes problems for anyone I can easily change it or release multiple versions in the future. Edit: For the love of Akatosh, anyone who knows something about this or is just curious please read through CANS_Core and CANS_Framework and see if you can figure out whether or not it would work. I think it should, but this wouldn't be the first time code that should have worked just didn't for me. Link to comment
Conscripted Posted July 30, 2015 Share Posted July 30, 2015 When are the patches for other mods going to come out? Link to comment
TechBaNe Posted July 30, 2015 Share Posted July 30, 2015 When are the patches for other mods going to come out? That depends on how complicated the scripts are, who's working on it, and how much time they have. milz is adding CANS support to Beeing Female and hopes to have it out this weekend, so that's likely to be the first one out. Fill Her Up, Soul Gem Oven 2, Milk Mod Economy, and Mana Tanks are currently being worked on, and need to be tested (not to mention fixed for some problems mentioned earlier in the thread). So it's a matter of interest and people willing to chip in. Link to comment
Feliks Posted July 30, 2015 Author Share Posted July 30, 2015 When are the patches for other mods going to come out? TechBane's got it right. I'm fiddling with EC but the new update to EC kind of required me to toss that out and start over. Plus I'd rather implement the final framework-side features for the 1.0 update than frankenstein someone's script rn. I'll probably take a look at DCL in the near future. Link to comment
Deathmaw Posted July 30, 2015 Share Posted July 30, 2015 Is there no way to have the item just sit in the inventory and not be equipped? Is there a specific reason it needs to be equipped? Link to comment
TheBlackSilhouette Posted July 30, 2015 Share Posted July 30, 2015 Just popping in for a quick thumb's up. That is all. Link to comment
Feliks Posted July 30, 2015 Author Share Posted July 30, 2015 Is there no way to have the item just sit in the inventory and not be equipped? Is there a specific reason it needs to be equipped? I'm currently testing that. I assumed that it wouldn't do anything without being equipped, but the more searching I do the more that looks pointless. At the moment though it serves the purpose of having a setup and ending event when equipping and unequipping, as soon as I write a better function I'll push out 0.9.1 with a replacement. Link to comment
WaxenFigure Posted July 30, 2015 Share Posted July 30, 2015 Is there no way to have the item just sit in the inventory and not be equipped? Is there a specific reason it needs to be equipped? I'm currently testing that. I assumed that it wouldn't do anything without being equipped, but the more searching I do the more that looks pointless. At the moment though it serves the purpose of having a setup and ending event when equipping and unequipping, as soon as I write a better function I'll push out 0.9.1 with a replacement. Of course the real question is why is an item needed? Did you attach a magic effect to it? If so you can cast a spell via script and set a magic effect that way and eliminate the need for an item altogether. Link to comment
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