Guest Posted February 1, 2015 Posted February 1, 2015 But think about the future. Are you going to add a MCM menu? Are you going to manage upgrades from different versions? Change my previous example to: int isJUGActive = 0 Event OnInit() if (isJUGActive < 100) isJUGActive = 100 ; do your first initialization stuff if !PlayerRef.IsInFaction(JugsFaction) PlayerRef.AddToFaction(JugsFaction) endif Debug.Notification("JUGs activated for the first time!") endIf if (isJUGActive < 150) isJUGActive = 150 ; do your upgrade stuff if PlayerRef.getItemCount(JugsPotion) == 0 PlayerRef.addItem(JugsPotion, 1) endif Debug.Notification("JUGs upgraded from version 1.0 to version 1.5") endIf EndEvent This will give you a pretty-safe way when somebody upgrades your mod without uninstalling. N.B.: if you plan to use MCM you should use the MCM variables for the version to handle your upgrades.
chajapa Posted February 1, 2015 Author Posted February 1, 2015 OK, I'm pretty happy with how this is starting to develop, but I have one... issue... and it's not consistent. It doesn't happen all the time. EXAMPLE: I have a Topic, which my player starts by speaking to the NPC (as normal) Inside the topic I have 3 infos. These are NOT extended character length. They're short enough to be "standard" length infos. According to what I've read, if I have 3 infos and NONE of them are marked "Random", no conditionals within infos, just text... then these infos should be displayed one after another. And when they're done, I would get the next linked Topic (assuming normal link, not invisible... just a normal link) SOMETIMES what happens is that I'll see the first info displayed and then...... nothing... that info disappears from screen and we wait.... It's as though I am waiting while the infos display... fade... move on to the next.... but they're not displayed. Only the first one was displayed. Then it moves on to the next linked Topic as though everything is normal. This doesn't always happen. On the SAME Topic, it may display all 3 infos as it should... it may display the first 2 and not the last one.. or it may display only the first one. Is this maybe a matter of script load or something? Would I be better off splitting these multiple-info topics and using an invisible continue to have the NPC keep talking?
WraithSlayer Posted February 1, 2015 Posted February 1, 2015 Your wording is a bit confusing there. On one hand, it sounds like you have three different topic infos in a list (which would have their own conditions and Random flags, etc, but the game would only pick 1 out of the list), but on the other, it sounds like you put 3 conversation lines in the Response Text section of a single topic info. (which are supposed to be played one after the other, but they all belong to the same info so only 1 set of conditions and such) If you meant the former, the game will only pick one of the infos; namely, it goes from top to bottom on the list until it finds a topic info that meets the conditions set. If you meant the latter, no idea why some of the dialogue is skipping. Having several lines in the Response Text section is a bundle deal: they all play in order when the topic info starts. Maybe your INI edits are coming back to curse you?
Guest Posted February 1, 2015 Posted February 1, 2015 I had some problems months ago with multiple responses in the same topic. If the are random they work well. If the are conditioned they work well. If the have to be a sequence I had many times some lines skipped. Here you may want to add a sequence of topics, with just one response for each, no text (except maybe the first) for the player, and a magical-mystical "Invisible continue" between the different lines.
chajapa Posted February 1, 2015 Author Posted February 1, 2015 Your wording is a bit confusing there. On one hand, it sounds like you have three different topic infos in a list (which would have their own conditions and Random flags, etc, but the game would only pick 1 out of the list), but on the other, it sounds like you put 3 conversation lines in the Response Text section of a single topic info. (which are supposed to be played one after the other, but they all belong to the same info so only 1 set of conditions and such) If you meant the former, the game will only pick one of the infos; namely, it goes from top to bottom on the list until it finds a topic info that meets the conditions set. If you meant the latter, no idea why some of the dialogue is skipping. Having several lines in the Response Text section is a bundle deal: they all play in order when the topic info starts. Maybe your INI edits are coming back to curse you? That ^ I just played for half an hour and "recruited" 2 followers and 2 NPCs and went through as many of the multi-line responses as I could remember and.... it didn't happen once. So I can only guess that it might have something to do with what all ELSE is going on while it's trying to display the text. Is Apropos sending to the notification area at the same time? Is Milk Mod? How many things are trying to update the screen or an area of it at the same time? And what is the environment around the characters? Is there a lot going on? Stuff like that... So I'll keep an eye on it but I don't really think it's an issue with the mod at this point as much as it may be an issue with my hardware's capabilities (I'm actually running all this on a Mac Mini... quad-core, 16GB RAM, but Intel HD4000 graphics) or.... something. I'm learning. heheheh
chajapa Posted February 3, 2015 Author Posted February 3, 2015 In my search for idles that I could use as gestures during conversation, I found a couple of ZaZ animations that could work. I've got the names of the animations to make them run using player.playidle <animation name> in game so I could see them. NOW... that means I have to put a property in my main script to have access to the animation.... right? So would main script get this?: zbfSexLab Property ZaZanim Auto I think zbfSexLab is the main script for ZaZ animation pack. Then I'm declaring a property. "ZaZanim" is how I'd be referring to it in MY mod..... right? And if that part is ok... I still don't know what I'd set the Property value TO. If I want to use an animation called ZaZAPC204, would I call it like this?: Debug.SendAnimationEvent(akSpeaker, "ZaZanim.ZaZAPC204")
Guest Posted February 3, 2015 Posted February 3, 2015 Hi chajapa, you don't need properties for animations. They are accessed just by name/id. For ZAZ you don't really need zazSexlab, it is used to inject the Zaz animations in SexLab. You may want to use zbfBondageShell, but I don't think it will be useful for the mod you develop. If you just want the animations you can follow two approaches. 1) Do not put Zaz Animation Framework as master of your mod In the dialogue fragment just write a line like: Debug.SendAnimationEnvet(akSpeaker, "id of the zaz animation") In this case if Zaz is not installed (or the specific animation is missing) nothing will happen but the dialogue will progress just fine 2) Put Zaz as mater Do the same line of code. In this case your animation will play for sure (99.999999999%) But your mod will be usable only from who has Zaz installed. My opinion? Use the first mode. Third bad & weird & nasty option: Copy the animation .hkx file, create a JUGs_Anims.txt file with only this animation (but with a different id), run FNIS for modders, go in CK and add your new idle. In this case it will always play and you have no dependency on Zaz. Of course ask @xaz the grant to use his animation in your mod independently.
chajapa Posted February 3, 2015 Author Posted February 3, 2015 OK... I currently do not have ZaZ animations as a master. The only masters my mod has right now is Skyrim, update, and SexLab. I'll try the #1 method as it seems easiest. I just find it odd after all of our previous discussion, that I do not have to add anything to my main quest or the fragment to have access to the ZaZ animations.
WraithSlayer Posted February 3, 2015 Posted February 3, 2015 That's just how animations work. You'll find that for the majority of things, you do need to link properties like you've learned, animations are one of the few exceptions.
chajapa Posted February 3, 2015 Author Posted February 3, 2015 well that's going to make my life a lot easier! At some point I might try adding a couple of the poses from Sex Slaves (which are Halo's and they're ok to use, but he'd like credit which makes sense). There are a couple that could actually be used in the kinds of conversations that are developing. I *think* I've got a handle on how to do it. I just have to be brave enough to actually TRY it! heheh. Thank you again!
chajapa Posted February 3, 2015 Author Posted February 3, 2015 No idea how,... brain fart or something... but I started a new topic instead of typing in this one. Can you have a look at THIS please? thanks
chajapa Posted February 4, 2015 Author Posted February 4, 2015 OK... I can't figure this one out either... I want to make the NPC I'm talking to a MilkMaid (from Milk Mod Economy) The author says I need something like this: int MME_AddMilkMaid = ModEvent.Create("MME_AddMilkMaid") ; Int Does not have to be named "MME_AddMilkMaid" any name would do ModEvent.PushForm(MME_AddMilkMaid, MILKmaid[i]) ; Form The animation target ModEvent.Send(MME_AddMilkMaid) I'm not sure what he means by "Form the animation target"... from the animation target maybe? He has this stuff in HIS mod...: RegisterForModEvent("MME_AddMilkMaid", "onMME_AddMilkMaid") and later in the script... Event onMME_AddMilkMaid(Form Sender) actor akActor = Sender as Actor ;Notification("Event received") if MilkQ.MILKmaid.find(akActor) != -1 MilkQ.AssignSlot(akActor) else Notification( "Target already milkmaid" ) endif EndEvent So... I'm still not sure how this send event stuff is supposed to work Any ideas for me?
Guest Posted February 4, 2015 Posted February 4, 2015 MilkMod is using event communications. He register for events, and you are suppose to send one event. More or less it works like this: 1) You define an Event with its name (MME_AddMilkMaid, in your example) 2) You add some data to the event (in your case you add an Actor to the event. the SKSE function uses Form that is the most generic possible one) 3) Send the event At this point somebody in another script should do a RegisterForModEvents, to listen to the events that are sent. RegisterForModEvents want as first parameter the event name you created, and as second parameter an event function to be called. The function in your case is "Event onMME_AddMilkMaid(Form Sender)" This function will be called if: * the RegisterForModEvent is done * the event is sent At this point the function will simply receive the Form you sent (the Actor in your case) and do whatever is supposed to do. Warning: this is a generic description on how events work. Something special for MilkMod Economy? No idea. Never used the mod. I use often events for SexLab and other mod, not for MilkMod.
chajapa Posted February 4, 2015 Author Posted February 4, 2015 ok... reading as much as I can.... does this look like it would work? I mean with the line before that defines and the one after that actually send s the event. I'm just wondering if this is a valid way to send akSpeaker as MILKMaid ModEvent.PushForm(MME_AddMilkMaid, akSpeaker as MILKmaid[i]) ; Form The animation target
Guest Posted February 4, 2015 Posted February 4, 2015 ModEvent.PushForm(MME_AddMilkMaid, akSpeaker as MILKmaid[i]) ; Form The animation target Is wrong. Just do ModEvent.PushForm(MME_AddMilkMaid, akSpeaker) ; Form The animation target You don't have to (and you can't) cast an Actor (akSpeaker is an Actor) to an "entry of an array", that I suppose is an actor too. Just give the value you want (your akSpeaker) and goodbye.
chajapa Posted February 4, 2015 Author Posted February 4, 2015 ok, I'll try this and see if I can make it work Do I have to do any RegisterForModEvent in MY script ?
chajapa Posted February 4, 2015 Author Posted February 4, 2015 well... THIS did not work... ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment ;NEXT FRAGMENT INDEX 1 Scriptname JUGs_MakeAMaid1C024 Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_0 Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE int MME_AddMilkMaid = ModEvent.Create("MME_AddMilkMaid") ; Int Does not have to be named "MME_AddMilkMaid" any name would do ModEvent.PushForm(MME_AddMilkMaid, akSpeaker) ; Form The animation target ModEvent.Send(MME_AddMilkMaid) ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment SexLabFramework Property SexLab Auto JugsMain Property Jugs Auto It's sending the event, because I'm getting a response from Milk Mod saying "Target is already a Milk Maid". This makes me think that the event thinks I'm trying to make ME a MilkMaid, not the NPC... (I am already a MilkMaid, even though I'm Male player because I am milk maid "master" by default)
WraithSlayer Posted February 5, 2015 Posted February 5, 2015 Do I have to do any RegisterForModEvent in MY script ? No, Register is for catching events, you're just broadcasting one. In this case, it's MilkMod that registers for an event, not your mod. As for your code, it looks right as far as I can see. How does the milk-mod handle maids? Using a faction, I assume? You can try getinfaction <faction_id> in the console to be absolutely sure that the target you're testing with is not yet a milk maid.
chajapa Posted February 5, 2015 Author Posted February 5, 2015 She's not yet a maid... I haven't made her one. When an actor becomes a Maid, there's a whole process he runs that sets a bunch of variables for breast size, milk count, painCount, how much Lactacid they have and ...stuff. So IF I were to just add them to the MME_MilkMaidFaction, things would probably glitch out. I had assumed that sending a mod event would be the easiest way to do this, but... I can't get it to work. If I give them Lactacid (an item from Milk Mod)... I mean have them EQUIP it... it's a potion marked as a food item... that triggers the creation of a MilkMaid as well. In console I can target an NPC and "equipitem <ID of Lactacid> But to do that in script I'd have to somehow retrieve the correct ID.... In my game, this profile, the ID is like... 580343F2 (can you tell I've typed it a lot?) So I'm assuming I'd have to GetFormFromFile, point that to MilkModNEW.esp and get the ID of 0x00043F2 and then akSpeaker.equipitem( <the_retrieved_ID> ) The Lactacid from MME has some...effect on it and I think that's what starts the "make_this_NPC_a_MilkMaid" process. So if I *CAN* retrieve it, it has to come over WITH whatever effects it has.... not some doppelganger
chajapa Posted February 5, 2015 Author Posted February 5, 2015 hmmm.... could I just: akSpeaker.equpitem(Game.GetFormFromFile(0x00043F2, "MilkModNEW.esp"))
WraithSlayer Posted February 5, 2015 Posted February 5, 2015 I only suggested getinfaction for debug purposes, not as a replacement method for creating a milk maid. As for the lactacid, it should work, provided the item does the same thing you wanted the mod event to.
chajapa Posted February 5, 2015 Author Posted February 5, 2015 I just tried: akSpeaker.equpitem(Game.GetFormFromFile(0x00043F2, "MilkModNEW.esp")) nuthin' The item ID is correct. (580343F2) wait.... not enough zeroes in there.... back in a few
chajapa Posted February 5, 2015 Author Posted February 5, 2015 Nope... still didn't work I wonder if I have to do the whole... Potion Lactacid = Game.GetFormFromFile(0x00043F2, "MilkModNEW.esp") as Potion and then akspeaker.equipitem(Lactacid) I don't know if "Potion" is a valid object type or.... *shrug* Papyrus log from the attempt: [02/04/2015 - 08:53:21PM] ERROR: Cannot equip a None item stack: [ (502AAF2B)].Actor.EquipItem() - "<native>" Line ? .JUGs_MakeAMaid1C024.Fragment_0() - "JUGs_MakeAMaid1C024.psc" Line 12
WraithSlayer Posted February 5, 2015 Posted February 5, 2015 You seem to have forgotten a 3 in there (580343F2 != 0x00043F2), and you also have too many zeroes on your item ID. Try: Game.GetFormFromFile(0x343F2, "MilkModNEW.esp")
chajapa Posted February 5, 2015 Author Posted February 5, 2015 BY THE NINES! That did it! Stupid zeroes.... (or... me!) So now I can CREATE a milkmaid in dialogue. A legit MilkMaid And it LOOKS like the only thing that happens if someone doesn't have Milk Mod, is that it puts an entry in the Papyrus log that we're trying to equip a NONE item. well... I HAVE MilkMod... so not getting the ITEM right didn't crash anything... but what if they don't have MikModNEW.esp when it looks for it? Any danger there? Nevermind... apparenty if MilkModNEW doesn't exist in someone's game, it'll just put an entry in the pap log. Now... if I could just find a swirly magic animation so some EFFECT shows on the npc when they are made into a milkmaid this way.... Not hugely important, but would be nice. Something like you see for a heal spell. or... something...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.