gammons123 Posted September 7, 2019 Posted September 7, 2019 Hi, Is there any documentation available that is aimed at amateurs that want to leverage the AAF system etc in a mod? I've found the API documentation but it seems to assume i already know how to use it. In sexlab/sexout it was relatively simple to start sex via dialogue. Are there any instructions or simple examples available for that? everything seems to be complex interlocking frameworks (which are great if you know what you are doing) but I'm not there yet. Thanks in advance. EDIT: Here is what I have learned so far from reading around and experimenting. If you follow these steps you should be able to create a simple mod that allows you to initiate sex from dialogue. All credit goes to those modders who have already created/figured this stuff out. Install Mod Organiser 2 Make one profile for playing the game Make a another profile for modding This will have only the mods that your mod will depend upon Add the creation kit as an executable in Mod Organiser 2/launch the CK from MO2 It might take a couple of minutes to load the creation kit, start off with few dependencies to make sure it does not crash Save often in CK Install AAF, depencies and themes according to the steps listed here Make sure to install the script source when running the installer Test that it is working correctly Create A dialogue quest/NPC as required for your mod. These tutorials are really good and cover all the basics To begin sex from dialogue add the code in the spoiler to a script fragment Put it in the begin on end fragment make sure the dialogue is set to end the scene The script might fail to compile because it doesn;t know about PlayerRef yet. Add a Property to the script fragmentor of type 'actor' call it 'PlayerREF'. ti should then autofill with the correcct reference. Edit/save the script fragment again and it should now compile Siwtch MO2 profile and enable your new .esp test in game - when your desired dialogue line completes your player/npc should get down to business. the different settings you can change in this script are listed here but I'm not sure how to use most of them. The following code is based on what I found here and credit belongs to EgoBallistic Spoiler ; declare the script object. In a large script this would be a global AAF:AAF_API AAF_API ; initialize the script object. You can do things like "if AAF_API == None" to check for errors. AAF_API = Game.GetFormFromFile(0x00000F99, "AAF.esm") as AAF:AAF_API ; now do an animation. First populate an Actor array Actor[] actors = new Actor[2] actors[0] = PlayerRef actors[1] = akActor ; next set up the scene parameters which will get passed to AAF in a SceneSettings struct ; always use GetSceneSettings() instead of declaring the struct, so you wont ; need to recompile if the struct definition changes in the API AAF:AAF_API:SceneSettings settings = AAF_API.GetSceneSettings() settings.duration = 30 settings.preventFurniture = true ; Finally, start the animation with our Actors and settings: AAF_API.StartScene(actors, settings) I have also found that unless you are going to voice your mod, you will find that the camera jumps around and that you cannot skip text in conversations. To solve this you can use this tool which seems to work great, and makes testing (and possibly the final product) much better. 3
dagobaking Posted September 8, 2019 Posted September 8, 2019 This might be a little dated now as it was posted many versions ago. So, double-check the API calls. But, Flashy made a guide for modders here: https://bitbucket.org/dagobaking/advanced-animation-framework/wiki/Templates/Modders Templates by Flashy (JoeR) Beyond that, the best guide you have is the source files for existing mods. If you want to replicate something in an existing mod like starting sex via dialogue, look at the source code from one of the mods that does this. Of course, if you get stuck, you can always ask for help here or on discord as well. 1
gammons123 Posted September 8, 2019 Author Posted September 8, 2019 3 hours ago, dagobaking said: Of course, if you get stuck, you can always ask for help here or on discord as well. Thanks very much, I'll have a look and see how I get on. 3 hours ago, dagobaking said: , Flashy made a guide for modders here: https://bitbucket.org/dagobaking/advanced-animation-framework/wiki/Templates/Modders Templates by Flashy (JoeR) I did see that on the Wiki, I guess I'll have to study until it makes sense.
gammons123 Posted September 15, 2019 Author Posted September 15, 2019 I have updated the first post with some steps other noobs like me can follow to get something basic working with AAF. I also have another question if anyone knows the answer. There are settings for including/excluding tags when using AAF as in my initial post. Is there a list of the tags that are in use anywhere? Is this in the animations packs themselves? I had a look at some of the XML files in one but I didn't see anything. Thanks in advance.
gammons123 Posted September 16, 2019 Author Posted September 16, 2019 A list of tags that can be used when calling animations I found in some XML files. Spoiler <!-- Tags so far as Follows: --> <!-- The first tag is the Author --> <!-- F,M,P,F_M,F_F,M_M,F_M_M,F_M_M_M,F_M_M_M_M,2P,3P,4P,5P --> <!-- NoFurn,SingleBed,DoubleBed,Bed,Mattress,SleepingBag,Stool,Chair,Couch,Car,Table,PoolTable,Wall,CryoPod,PAStation,Stocks,Shackles,Throne,Pillory,HydroPillory --> <!-- Dancing,Foreplay,Switch,Kissing,Hugging,Cuddle,TitJob,Doggy,Kneeling,FaceDown,Standing,HandJob,BlowJob,Masturbation,69,Missionary,Carry,PowerBomb,CowGirl,Spanking, Bound --> <!-- FromBehind,FromFront,FromSide --> <!-- Loving,Neutral,Aggressive --> <!-- Held0,Held1,Held3,Held5,Held7,Held9 indicates the receivers(Actor0) restraint level, 0 being free, 9 being shackled --> <!-- Stim-9,Stim-7,Stim-5,Stim-3,Stim-1,Stim0,Stim1,Stim3,Stim5,Stim7,Stim9 indicates how stimulating this is for the receiver, negative values = pain --> <!-- Love-9,Love-7,Love-5,Love-3,Love-1,Love0,Love1,Love3,Love5,Love7,Love9 indicates how much this would effect a relationship between actors, negative values = hate --> <!-- Dom-9,Dom-7,Dom-5,Dom-3,Dom-1,Dom0,Dom1,Dom3,Dom5,Dom7,Dom9 indicates how much this Alters the Submissiveness or Domination Level for the receiver (Actor0), negative values = Submission, Giving Actors should be affected by the opposite value --> <!-- NullToSelf --> <!-- HandToHand,HandToNipples,HandToMouth,HandToVagina,HandToPenis,HandToAnus,HandToStrapOn,HandToEither,HandToStick --> <!-- PenisToHand,PenisToNipples,PenisToMouth,PenisToVagina,PenisToPenis,PenisToAnus,PenisToStrapOn,PenisToEither,PenisToStick --> <!-- StrapOnToHand,StrapOnToNipples,StrapOnToMouth,StrapOnToVagina,StrapOnToPenis,StrapOnToAnus,StrapOnToEither,StrapOnToStick -->
dagobaking Posted September 20, 2019 Posted September 20, 2019 On 9/15/2019 at 1:19 PM, gammons123 said: Is there a list of the tags that are in use anywhere? Is this in the animations packs themselves? I had a look at some of the XML files in one but I didn't see anything. @Halstrom is the master-of-tags. He has been working with @an3k and others on the "One Patch" project. They might be able to give more insight into progress on the tags and where you could see a list. It's kind of a fluid thing because someone has to attach them to new animations as they come out. New animations/uses could introduce the need for new tags. 1
Halstrom Posted September 20, 2019 Posted September 20, 2019 On 9/17/2019 at 12:49 AM, gammons123 said: A list of tags that can be used when calling animations I found in some XML files. Hide contents <!-- Tags so far as Follows: --> <!-- The first tag is the Author --> <!-- F,M,P,F_M,F_F,M_M,F_M_M,F_M_M_M,F_M_M_M_M,2P,3P,4P,5P --> <!-- NoFurn,SingleBed,DoubleBed,Bed,Mattress,SleepingBag,Stool,Chair,Couch,Car,Table,PoolTable,Wall,CryoPod,PAStation,Stocks,Shackles,Throne,Pillory,HydroPillory --> <!-- Dancing,Foreplay,Switch,Kissing,Hugging,Cuddle,TitJob,Doggy,Kneeling,FaceDown,Standing,HandJob,BlowJob,Masturbation,69,Missionary,Carry,PowerBomb,CowGirl,Spanking, Bound --> <!-- FromBehind,FromFront,FromSide --> <!-- Loving,Neutral,Aggressive --> <!-- Held0,Held1,Held3,Held5,Held7,Held9 indicates the receivers(Actor0) restraint level, 0 being free, 9 being shackled --> <!-- Stim-9,Stim-7,Stim-5,Stim-3,Stim-1,Stim0,Stim1,Stim3,Stim5,Stim7,Stim9 indicates how stimulating this is for the receiver, negative values = pain --> <!-- Love-9,Love-7,Love-5,Love-3,Love-1,Love0,Love1,Love3,Love5,Love7,Love9 indicates how much this would effect a relationship between actors, negative values = hate --> <!-- Dom-9,Dom-7,Dom-5,Dom-3,Dom-1,Dom0,Dom1,Dom3,Dom5,Dom7,Dom9 indicates how much this Alters the Submissiveness or Domination Level for the receiver (Actor0), negative values = Submission, Giving Actors should be affected by the opposite value --> <!-- NullToSelf --> <!-- HandToHand,HandToNipples,HandToMouth,HandToVagina,HandToPenis,HandToAnus,HandToStrapOn,HandToEither,HandToStick --> <!-- PenisToHand,PenisToNipples,PenisToMouth,PenisToVagina,PenisToPenis,PenisToAnus,PenisToStrapOn,PenisToEither,PenisToStick --> <!-- StrapOnToHand,StrapOnToNipples,StrapOnToMouth,StrapOnToVagina,StrapOnToPenis,StrapOnToAnus,StrapOnToEither,StrapOnToStick --> Yep that's pretty much it although there have been some extra ones and some of those may be removed in the next sweep through as there are better ways of doing what they did. 1 hour ago, dagobaking said: @Halstrom is the master-of-tags. He has been working with @an3k and others on the "One Patch" project. They might be able to give more insight into progress on the tags and where you could see a list. It's kind of a fluid thing because someone has to attach them to new animations as they come out. New animations/uses could introduce the need for new tags. I've pretty much done the tagging updates for On Patch, I think its up to an3k now organising all the FOMOD stuff and maybe thee is other work happening by others. 1
gammons123 Posted September 24, 2019 Author Posted September 24, 2019 I have tried putting my AAF calls in a quest script rather than a script fragment. I have got it to start an animation with my chosen actors, but it seems to be ignoring the scene settings I have specified. Is anyone able to tell me what I've done wrong? script in spoiler. EDIT: The Sections For Consent Mode, Timer, Message boc can be ignored, left them in just in case. Spoiler Scriptname MyScripts:GSLV_test_01 extends Quest Conditional ; Properties Int Property NumPadMinus = 109 Auto Const Quest Property DialogueQuest Auto Const Actor Property PlayerRef Auto Actor Property GSLV_Test_01_ref Auto Bool Property ConsentToggle = false Auto conditional Message Property Message01 Auto AAF:AAF_API AAF_API ; declare the script object. In a large script this would be a global Struct SceneSettings Float duration Bool preventFurniture Bool usePackages String position String includeTags String excludeTags EndStruct ;initialisation Event OnInit() RegisterForKey(109) AAF_API = Game.GetFormFromFile(0x00000F99, "AAF.esm") as AAF:AAF_API ; initialize the script object. You can do things like "if AAF_API == None" to check for errors. endevent ;Consent Mode Toggle Event OnKeyDown(int keyCode) if (keyCode == 109 ) ConsentToggle = !ConsentToggle If ConsentToggle == true Debug.Notification("Consent Given") Elseif ConsentToggle == false Debug.Notification("Consent Revoked") endif MessageBoxTest() endif EndEvent ; Message Box Template Function MessageBoxTest() Int iButton = Message01.Show() If iButton == 0 Debug.Notification("button0") TimerTest(0.033, 10) return elseif iButton == 1 TimerTest(0.25, 11) return elseif iButton == 2 Debug.Notification("button2") return elseif iButton == 3 Debug.Notification("button3") return endif EndFunction ; Timer Template Function TimerTest(float fTimer, int iTimerID) StartTimerGameTime(fTimer, iTimerID) ; in game hours EndFunction Event OnTimerGameTime(int aiTimerID) If aiTimerID == 10 Debug.Notification("Timer one ended!") elseIf aiTimerID == 11 Debug.Notification("Timer two ended!") AAFStart() EndIf EndEvent ;AAF Template Function AAFStart() Debug.Notification("started aaf function") AAF:AAF_API:SceneSettings settings = AAF_API.GetSceneSettings() ;SceneSettings settings = new SceneSettings settings.duration = 8 settings.preventFurniture = True settings.usePackages = True settings.position = None settings.includeTags = "Kissing" settings.excludeTags = "Aggressive" Actor[] actors = new Actor[2] actors[0] = PlayerRef actors[1] = GSLV_Test_01_ref AAF:AAF_API.GetAPI().StartScene(Actors, settings) EndFunction
gammons123 Posted September 25, 2019 Author Posted September 25, 2019 I got it to work, may have been using the API incorrectly so have updated my script referencing another mod (AAF SEU) as reference. This caused a problem where AAF wasn't getting anything at all, had to investigate further. Long story short I found that initialising the AAF_API using the OnInit() event was not working, no idea why - maybe it only runs when the quest is started? Event OnInit() AAF_API = Game.GetFormFromFile(0x00000F99, "AAF.esm") as AAF:AAF_API endevent Instead I moved that to another funciton for testing and found that it worked. Script as follows for anyone interested. Spoiler Scriptname MyScripts:GSLV_test_01 extends Quest Conditional ; Properties Int Property NumPadMinus = 109 Auto Const Quest Property DialogueQuest Auto Const Actor Property PlayerRef Auto Actor Property GSLV_Test_01_ref Auto Bool Property ConsentToggle = false Auto conditional Message Property Message01 Auto AAF:AAF_API AAF_API ; declare the script object. In a large script this would be a global Actor[] Property SexActorStorage Auto ;initialisation Event OnInit() RegisterForKey(109) endevent ;Consent Mode Toggle Event OnKeyDown(int keyCode) if (keyCode == 109 ) ConsentToggle = !ConsentToggle If ConsentToggle == true Debug.Notification("Consent Given") Elseif ConsentToggle == false Debug.Notification("Consent Revoked") endif MessageBoxTest() endif EndEvent ; Message Box Template Function MessageBoxTest() Int iButton = Message01.Show() If iButton == 0 Debug.Notification("button0") TimerTest(0.033, 10) AAF_API = Game.GetFormFromFile(0x00000F99, "AAF.esm") as AAF:AAF_API return elseif iButton == 1 TimerTest(0.1, 11) return elseif iButton == 2 Debug.Notification("button2") return elseif iButton == 3 Debug.Notification("button3") return endif EndFunction ; Timer Template Function TimerTest(float fTimer, int iTimerID) StartTimerGameTime(fTimer, iTimerID) ; in game hours EndFunction Event OnTimerGameTime(int aiTimerID) If aiTimerID == 10 Debug.Notification("Timer one ended!") elseIf aiTimerID == 11 Debug.Notification("Timer two ended!") AAFStart() EndIf EndEvent ;AAF Template Function AAFStart() Debug.Notification("started aaf function") Actor[] actors = new Actor[2] actors[0] = PlayerRef actors[1] = GSLV_Test_01_ref AAF:AAF_API:SceneSettings settings = AAF_API.GetSceneSettings() ;SceneSettings settings = new SceneSettings settings.duration = 8 settings.preventFurniture = True settings.usePackages = True settings.position = None settings.includeTags = "Kissing" settings.excludeTags = "Aggressive" AAF_API.StartScene(actors, settings) EndFunction
Senator Blutarsky Posted February 3, 2020 Posted February 3, 2020 My advice is to start drinking heavily. Aaf related mod or not. You’ll need it. EDIT: but I am wondering if I should actually add aaf compatibility to something I’m working on or just keep it as a tounge in cheek “breaking the fourth wall” kind of reference for comedic value. Idk.
Heinzelman Posted October 13, 2023 Posted October 13, 2023 On 9/8/2019 at 12:43 AM, gammons123 said: Hi, Is there any documentation available that is aimed at amateurs that want to leverage the AAF system etc in a mod? I've found the API documentation but it seems to assume i already know how to use it. In sexlab/sexout it was relatively simple to start sex via dialogue. Are there any instructions or simple examples available for that? everything seems to be complex interlocking frameworks (which are great if you know what you are doing) but I'm not there yet. Thanks in advance. EDIT: Here is what I have learned so far from reading around and experimenting. If you follow these steps you should be able to create a simple mod that allows you to initiate sex from dialogue. All credit goes to those modders who have already created/figured this stuff out. Install Mod Organiser 2 Make one profile for playing the game Make a another profile for modding This will have only the mods that your mod will depend upon Add the creation kit as an executable in Mod Organiser 2/launch the CK from MO2 It might take a couple of minutes to load the creation kit, start off with few dependencies to make sure it does not crash Save often in CK Install AAF, depencies and themes according to the steps listed here Make sure to install the script source when running the installer Test that it is working correctly Create A dialogue quest/NPC as required for your mod. These tutorials are really good and cover all the basics To begin sex from dialogue add the code in the spoiler to a script fragment Put it in the begin on end fragment make sure the dialogue is set to end the scene The script might fail to compile because it doesn;t know about PlayerRef yet. Add a Property to the script fragmentor of type 'actor' call it 'PlayerREF'. ti should then autofill with the correcct reference. Edit/save the script fragment again and it should now compile Siwtch MO2 profile and enable your new .esp test in game - when your desired dialogue line completes your player/npc should get down to business. the different settings you can change in this script are listed here but I'm not sure how to use most of them. The following code is based on what I found here and credit belongs to EgoBallistic Hide contents ; declare the script object. In a large script this would be a global AAF:AAF_API AAF_API ; initialize the script object. You can do things like "if AAF_API == None" to check for errors. AAF_API = Game.GetFormFromFile(0x00000F99, "AAF.esm") as AAF:AAF_API ; now do an animation. First populate an Actor array Actor[] actors = new Actor[2] actors[0] = PlayerRef actors[1] = akActor ; next set up the scene parameters which will get passed to AAF in a SceneSettings struct ; always use GetSceneSettings() instead of declaring the struct, so you wont ; need to recompile if the struct definition changes in the API AAF:AAF_API:SceneSettings settings = AAF_API.GetSceneSettings() settings.duration = 30 settings.preventFurniture = true ; Finally, start the animation with our Actors and settings: AAF_API.StartScene(actors, settings) I have also found that unless you are going to voice your mod, you will find that the camera jumps around and that you cannot skip text in conversations. To solve this you can use this tool which seems to work great, and makes testing (and possibly the final product) much better. I dont know if you are still on LL and reading this, but: Thank you very much! You saved me from giving up, because i was totally overwhelmed by the wiki. With this script as a starting base i think i am able to understand it better, but the most important thing: It works and it saves me hours if not days. 1
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