Jmathers Posted April 20, 2015 Posted April 20, 2015 Hey guys, i need help understanding my papyrus fully, i've taken over the animal mansion mod, so now i need to fully understand what is causing what. in order to bug hunt the mod more effectively. and Sexlab is beyond me for the moment, so i need help this is the latest CTD. what i am trying to fix. when i am looking at it, it is Littered with SSL messages. if you look at it, there are SSL every where with Line References, are those problems, is skyrim screaming at me telling me the SSL stuff is broke? that is the last moment where i got a CTD. while i understand what is going on to a degree. i have problems finding the problem in this.. mess stuff like this "alias Animal on quest NA_PS_Jarl (190456FE)].NA_StartSexStandardScript.OnActivate()" is part of the mod i'm working on. while i do see the Warning, i don't think it is the CTD, as the animation did it's thing, and then let me continue. [04/20/2015 - 11:28:52PM] SEXLAB - Thread[0] Thread[0]: Entering Making State[04/20/2015 - 11:28:52PM] SEXLAB - [sslActorAlias <alias ActorAlias004 on quest SexLabThread00 (03061EEF)>]: Slotted 'Prisoner' [04/20/2015 - 11:28:52PM] ERROR: Cannot call ForceRefIfEmpty() on a None object, aborting function call stack: [SexLabThread00 (03061EEF)].sslThreadController.PickAlias() - "sslThreadModel.psc" Line 133 [SexLabThread00 (03061EEF)].sslThreadController.AddActor() - "sslThreadModel.psc" Line 157 [SexLabThread00 (03061EEF)].sslThreadController.AddActors() - "sslThreadModel.psc" Line ? [SexLabQuestFramework (03000D62)].sexlabframework.StartSex() - "SexLabFramework.psc" Line 950 [SexLabQuestFramework (03000D62)].sexlabframework.QuickStart() - "SexLabFramework.psc" Line 954 [alias Animal on quest NA_PS_Jarl (190456FE)].NA_StartSexStandardScript.OnActivate() - "na_startsexstandardscript.psc" Line 28 [04/20/2015 - 11:28:52PM] warning: Assigning None to a non-object variable named "::temp18" stack: [SexLabThread00 (03061EEF)].sslThreadController.PickAlias() - "sslThreadModel.psc" Line 133 [SexLabThread00 (03061EEF)].sslThreadController.AddActor() - "sslThreadModel.psc" Line 157 [SexLabThread00 (03061EEF)].sslThreadController.AddActors() - "sslThreadModel.psc" Line ? [SexLabQuestFramework (03000D62)].sexlabframework.StartSex() - "SexLabFramework.psc" Line 950 [SexLabQuestFramework (03000D62)].sexlabframework.QuickStart() - "SexLabFramework.psc" Line 954 [alias Animal on quest NA_PS_Jarl (190456FE)].NA_StartSexStandardScript.OnActivate() - "na_startsexstandardscript.psc" Line 28 [04/20/2015 - 11:28:52PM] SEXLAB - [sslActorAlias <alias ActorAlias002 on quest SexLabThread00 (03061EEF)>]: Slotted 'Dog' [04/20/2015 - 11:28:52PM] SEXLAB - Thread[0] NOTICE: Selecting new creature animations - [] [04/20/2015 - 11:28:52PM] SEXLAB - NOTICE: Found Animations(8): (Dog) Doggystyle, (Dog) Dominate, (Dog) Missionary, (Dog) Panicnew, (Dog) Panic Consensual, (Dog) DayelyteDogFun, (Dog) DayelyteDogSpooning, (Dog) Panic Dog Sucking, [04/20/2015 - 11:28:52PM] ERROR: Cannot call ActorRef() on a None object, aborting function call stack: [SexLabThread00 (03061EEF)].sslThreadController.FindSlot() - "sslThreadModel.psc" Line 757 [SexLabThread00 (03061EEF)].sslThreadController.PositionAlias() - "sslThreadModel.psc" Line 770 [SexLabThread00 (03061EEF)].sslThreadController.UpdateActorKey() - "sslThreadModel.psc" Line 964 [SexLabThread00 (03061EEF)].sslThreadController.FireAction() - "sslThreadController.psc" Line 30 [SexLabThread00 (03061EEF)].sslThreadController.Action() - "sslThreadModel.psc" Line 781 [SexLabThread00 (03061EEF)].sslThreadController.StartThread() - "sslThreadModel.psc" Line ? [SexLabQuestFramework (03000D62)].sexlabframework.StartSex() - "SexLabFramework.psc" Line 950 [SexLabQuestFramework (03000D62)].sexlabframework.QuickStart() - "SexLabFramework.psc" Line 954 [alias Animal on quest NA_PS_Jarl (190456FE)].NA_StartSexStandardScript.OnActivate() - "na_startsexstandardscript.psc" Line 28 [04/20/2015 - 11:28:52PM] SEXLAB - Thread[0] Adjustment Profile: DayelyteDogSpooning.NordRaceF.DogRaceC
Guest Posted April 20, 2015 Posted April 20, 2015 Looking at the log file it does not seem to be a sexlab problem but an error from "na_startsexstandardscript" (the mod that is using SexLab.) In this case the NPCs used in the sex animations seems to be not defined. Maybe later the same script/mod will do something nasty that will cause the CDT.
Jmathers Posted April 21, 2015 Author Posted April 21, 2015 thank you for the answer, that helps alot this is the statement if( akActionRef == PlayerRef ) if ( Animal.GetActorReference().GetFactionRank(NA_AnimalWorkFaction) > 0 && Animal.GetActorReference().GetFactionRank(NA_AnimalWorkFaction) < 5 ) ;if animal is activated by player and able to have sex if(Animal.GetActorReference().GetRace() != FrostbiteSpiderRace) ;if Animal is not a spider Int iButton = NA_StartSexOption.Show() ; Shows menu. If iButton == 0 ; StartSex RegisterForModEvent("AnimationEnd_AnimalSex", "AnimalSexEvent") SexLab.QuickStart( PlayerRef, Animal.GetActorReference(), hook="AnimalSex") NA_NPCCheering.SetValue(1) endIf before the na_npccheering is line 28 I included the psc file, so u can see the entire script, the payprus doesn't come up with an error, and from what i learned the code is correct, so i don't understand what is wrong. if you could just give me a reference / hint to the error, so i can learn where the problem is and how to fix it (if you know how to), rather then giving me the solution, i'd greatly appricate it. *note ; the property in the psc file called "animal" is a reference to any animal that is in the faction for the mod, each animal is unique in the faction
Guest Posted April 21, 2015 Posted April 21, 2015 Maybe the "Animal" is an empty ref when this code executes. Try to replace with: if( akActionRef == PlayerRef ) Actor theAnimal = Animal.GetActorReference() if (!theAnimal) Debug.Trace("No Animal available, dude...") else if ( theAnimal.GetFactionRank(NA_AnimalWorkFaction) > 0 && theAnimal.GetFactionRank(NA_AnimalWorkFaction) < 5 ) ;if animal is activated by player and able to have sex if(theAnimal.GetRace() != FrostbiteSpiderRace) ;if Animal is not a spider Int iButton = NA_StartSexOption.Show() ; Shows menu. If iButton == 0 ; StartSex RegisterForModEvent("AnimationEnd_AnimalSex", "AnimalSexEvent") SexLab.QuickStart( PlayerRef, Animal.GetActorReference(), hook="AnimalSex") NA_NPCCheering.SetValue(1) endIf endIf endIf endIf endIf
Jmathers Posted April 21, 2015 Author Posted April 21, 2015 hey CPU, you where right, after i implimented your IF statements and countered the variables, it seems like the animal didn't get implimented properly. i re-ran the quest, with 4 or 5 times, and the debug log, did not make 1 mention to the startstandardsex script. so hopefully that bug is now fixed thank you now on to other 10000 bugs. i want to try and avoid anything from the mod making it in the debug, cause it then means there is a bug in it.
Jmathers Posted April 21, 2015 Author Posted April 21, 2015 sadly it didn't fix it I went through, and checked, the animal is conditional and random from who ever is in the faction EDIT: it does the same with the client. random npc IF it is in the npc side faction. by the time, the player gets to the animal it is allready selected as the reference and the reference is used as a marker to what animal it is and points to the "animal" and the same reference is used to enagage the sex scene as you can see, the animal is in and selected and during stage 10, is also used as the Target Ref, for the way pointer so from how i understand it, quest starts, picks any animal under the faction, asigns it the alias as animal then in the following stages, uses it as a target ref. so why it's throwing up the above code, is now beyond me.
Guest Posted April 21, 2015 Posted April 21, 2015 Maybe the ReferenceAlias of the quest is not getting filled. The alias is got as "conditional filling", but it may be filled or not. Also probably some doe needs to refresh the alias, because it it filled by default only when the quest starts. (Or when a scene using the alias will start.) I cannot do more without checking the full mod. But if I have to decide, then I will not pick an animal in this way, I will do it directly in the code in a more safe way. Alias conditional fillng? It is a big mystery to understand how they work.
Jmathers Posted April 21, 2015 Author Posted April 21, 2015 well the condition is set so it is more random from my understanding. u can get a copy of it from the forum on page 94 http://www.loverslab.com/topic/32285-the-animal-mansion/page-94 post 1872 and i can send u the source. via pm. would take a minute. :edit side note; i put your debug.trace in, replayed the quest, saved the game and hunted for the sentence on screen and in the payrus, and it wasn't to be found anywhere. what leads me to believe at that stage, the animal, referenece is not empty edit:
Guest Posted April 21, 2015 Posted April 21, 2015 Animal Mansion is an abandoned mod. I don't think it will be easy to fix it without understanding its logic. Again, instead of relying to an alias filled randomly, I prefer to set it (randomly) directly inside the script. But then: * when this script is called? * this script is attached to what? * are you trying to fix Animal Mansion for your own use or are you trying to resurrect the mod?
Jmathers Posted April 21, 2015 Author Posted April 21, 2015 as per page 1, Sky_mds has given me owership of it, i have resurrected the mod, and made severa significant updates to it. but while bug hunting, i kept running in to that bug. on page 94 is my most recent public update of the mod. edit : i am pming him on a regular basis, when it comes to some stuff, but from my knowledge of conditions, sexlab and creationkit that bug should not be occuring. at all.
Guest Posted April 21, 2015 Posted April 21, 2015 Ok, I was not aware of this. I do not follow the mod at all. Did you get already a good idea about how the mod is structured? If you are improving, rewriting it, then maybe you may want to switch from some old implementations to some new implementations.
Jmathers Posted April 21, 2015 Author Posted April 21, 2015 yes, i got a fairly good understanding of his thinking, and how he does things. the mod starts 1 quest that controlls everything, then the main NPC theana gives you main quests, when you finish a main quest, you unlock an animal and then you have to entertain the clients by having sex with the animals xnumber of times, decided by the mcm menu. once you archieve xnumber you get a new quest, and then it just loops. over and over again main quest + xnumber of side quests (misc quests/ entertain the client / train a animal for a npc at there home. etc) each main quests adds a new animal to the list of possible animals you encounter, during the entertainment of the clients each main quest. sends a +1 to the mcm counter for cheating / skipping buged main quests when a main quest is active, the npc will not give you a new quest until it is done. that is how he structured it. and his randomistation cuts out soo many things, its fabulous. so instead of having to re-write the Entire subsection of the mod, for each private show, it be easyer and simpler to try and fix it permenantly. Edit: if you do know a way to randomise it differently and your willing i am willing to learn a new way. providing it works edit 2: if your looking at the mod in creation kit all of the mods stuff is labeled "na_" na_main <-- is the controller na_mcm <-- guess na_mq_ <-- main quests na_sq_ <--side quests na_ps_ <-- private shows na_p_ <- PAARRRTYYS!!
Guest Posted April 21, 2015 Posted April 21, 2015 I see. But just selecting a random animal in the papyrus code is about 5 lines of code. And you can writhe a "select animal" function just once in the main quest code and then use it every time you need. Just to avoid rnadomly filled ReferenceAlias that hare hard to be controlled. Example (following the code you posted before): Actor Property PlayerRef Auto Faction Property na_AnimalWorkFaction Auto Actor Function getRandomAnimal(int minRank = 1, int maxRank = 4, Race toAvoid = None) Cell theCell = PlayerRef.getParentCell() int numNPCs = theCell.GetNumRefs(63) ; 63 are actors Actor[] animals = new Actor(16) int numAnimals = 0 while (numNPCs) numNPCs -= 1 Actor animal = theCell.GetNthRef(numNPCs, 63) if (animal && animal.isInFaction(na_AnimalWorkFaction) && animal.getFactionRank(na_AnimalWorkFaction)>=minRank && animal.getFactionRank(na_AnimalWorkFaction)<=maxRank) if (!toAvoid || animal.getLeveledActorBase().getRace()!=toAvoid) ; "this one is good" animals[numAnimals] = animal numAnimals += 1 if (numAnimals > 15) numNPCs = 0 endIf endIf endIf endWhile ; Now get a random one, if at least one is available if (numAnimals == 0) return None ; Sorry, no animals available in the cell with the specified factions else return animals[Utility.randomInt(0, numAnimals-1) endIf EndFunction Then in the other script you can avoid the RefrenceAlias completely, and just before you start the sex scene you will do something like: Actor theAnimal = naMainQuest.getRandomAnimal(1, 4, toAvoid=FrostbiteSpiderRace) if (!theAnimal) Debug.Trace("No Animal available, dude...") else ; "if you get there then the animal is ok and has the correct faction rank" if(theAnimal.GetRace() != FrostbiteSpiderRace) ;if Animal is not a spider Int iButton = NA_StartSexOption.Show() ; Shows menu. If iButton == 0 ; StartSex RegisterForModEvent("AnimationEnd_AnimalSex", "AnimalSexEvent") SexLab.QuickStart( PlayerRef, Animal.GetActorReference(), hook="AnimalSex") NA_NPCCheering.SetValue(1) endIf endIf endIf endIf <name of the main quest script> Property naMainQuest Auto
Jmathers Posted April 21, 2015 Author Posted April 21, 2015 woah! that is soo over my head. damn. your like 10 levels above me in papyrus knowledge i feel dumb now!
Jmathers Posted April 21, 2015 Author Posted April 21, 2015 ok, so from my understanding, this selects an animal randomly, between rank 1 and 4, "theCell" ?? is that the location of the animals, and the numNPCs is that random npcs (i.e. the client) ? so i would have to add this. to thaena before / during the selection of the random private show. if i understand it, you given a random npc as the client. and random animal. or is it just the animal? if i'm wrong, please tell me.
Guest Posted April 21, 2015 Posted April 21, 2015 Hey, you are not dumb, you have an enormous courage to take over a big mod like Animal Mansion. You have my whole respect and appreciation. About the code I wrote: * the function will get a random animal that is inside the cell where the player is when the function is called. Why the player cell? Because is nonsense to start an animation when the player is not there. The original implementation through a ReferenceAlias conditional will do something similar. It will not peek an animal that is in Solitude if the scene is playing in Whiterun. The parameters I added allows you to specify the minimum and maximum level for the rank of the faction. I don't know how this faction is used but probably has an important role in the mod. And because I saw in the code that there was a "filter" on FrostBiteSpider race, then I added another parameter (optional) to avoid a specific race. I don't think you have to add this to a NPC (Thaena???) the code should go to the script attached to the main quest. Let me explain the code line by line: Actor Function getRandomAnimal(int minRank = 1, int maxRank = 4, Race toAvoid = None) ; "This is the definition of the function, will have 3 optional parameters and will return an Actor" Cell theCell = PlayerRef.getParentCell() ; " This gets the cell where the player is currently on" int numNPCs = theCell.GetNumRefs(63) ; 63 are actors "This will get the number of <something, where 63=Actors> in the cell" Actor[] animals = new Actor(16) ; "This will initialize a temporary array to store all valid actors we will find later, to then get one randomly" int numAnimals = 0 ; "This is to understand how many actors are already in the array" while (numNPCs) ; "This will cycle on all the actors in the cell, until it will reach 0 (zero) then it will stop" numNPCs -= 1 ; "This is to progress on the cycle, the getNThRef accept values from 0 to numNPCs-1 " Actor animal = theCell.GetNthRef(numNPCs, 63) ; "This gets the actual actor in the 'numNPCs' position in the cell" if (animal && animal.isInFaction(na_AnimalWorkFaction) && animal.getFactionRank(na_AnimalWorkFaction)>=minRank && animal.getFactionRank(na_AnimalWorkFaction)<=maxRank) ; "This is the filtering code (continues on next lines" ; " 'animal' this quick check is to avoid errors if the actual actor does not exists (may happen)" ; " animal.isInFaction(na_AnimalWorkFaction) checks that the actor is actually in the faction " ; " animal.getFactionRank(na_AnimalWorkFaction)>=minRank checks that the faction rank is at least the minimum level (and there is a default value of 1 for this parameter) " ; " animal.getFactionRank(na_AnimalWorkFaction)<=maxRank checks that the faction rank is not higher that the max value (4 is the default) " if (!toAvoid || animal.getLeveledActorBase().getRace()!=toAvoid) ; "This will check is a race is specified and if it is specified that is is not the race 'toAvoid' , this is used to avoid some races" ; "this one is good" animals[numAnimals] = animal ; " this places the actor, that passed all the tests, in the temp array " numAnimals += 1 ; " Here we will tell that the temp array has one item more " if (numAnimals > 15) ; "this is to avoid problems in case there are too many possible animals. 16 is for sure enough to have a good random selection" numNPCs = 0 ; "in case we consumed all the temp array we are going to exit the main cycle, we do not need more actors" endIf endIf endIf endWhile ; Now get a random one, if at least one is available if (numAnimals == 0) ; "This checks if we get at least one valid actor" return None ; Sorry, no animals available in the cell with the specified factions else return animals[Utility.randomInt(0, numAnimals-1)] ; "This will get a random number from 0 to the number of actors in the temp array, and then gives back the actor in the array" endIf EndFunction
Jmathers Posted April 21, 2015 Author Posted April 21, 2015 wow, thank you for that explanation, it was much needed. and yes i am dumb, cause you see, the mod will basically add a ton of animals in the mod's basement of the house, and have 1 animal of each and / or multiple, depending on the current animation selection eg. 2 spiders / 4 draugurs. due to the gangbang animation that is out for skyrim. so yes i am dumb because i failed to mention it to you, because I forgot about them. and was too focused to fix this damn glitch because the randomness currently implimented allowed a random number of draugers to spawn and then do the animation for it, so it was excluded from the general 1 on 1, script just like the spiders.
Guest Posted April 21, 2015 Posted April 21, 2015 No need to apologize, my friend. It was my bad to have not get that you are in charge of this mod now. If you need any further help on scripting (and also the quests, aliases, triggers, etc.) feel free to ask. Please do me a favor: remove the need to talk to animals. This breaks tons of mods. Have a look to my brothel mod. There is a full set of animals and quests on them (actually there is only one quest on animals right now, but I will add more in future.) No need to talk to animals, the sex is triggered by triggers or script conditions or when you "pay" and then open a cage.
Jmathers Posted April 21, 2015 Author Posted April 21, 2015 ok, i'll take a look at the mod now, might inspire me
Recommended Posts
Archived
This topic is now archived and is closed to further replies.