Jump to content

OSex+ The Greatest Virtual Sex Ever


Recommended Posts

Just checking in to praise the direction of this mod with the latest alpha. The AI stuff is inspired, loving that even if I don't get precisely what it's doing, I just like the outcomes. Expressions are much better now, as are sounds. The amount of transitions this mod puts the actors through is quite awe inspiring, I can only imagine what spin-off applications may come.

 

I had some issues running it so it's not something I can keep in a load order that I play with, but from what I tested I'm very excited for an eventual release when I can, it'll be a landmark event in adult orientated gaming. 

Link to comment

 

A note on this: I did in 0Sex a test by replacing the onupdate event which is the main loop of the script with a sendmod event so I could have a second layer of scripts states by being able to suffix the update event with a special string (I hoped). It would disconnect after a while so I came to the conclusion that Papryus will at times ignore a mod event but will never ignore an update event. I'm not sure if this 100% true but something I spent a bit of time testing. I can put the entire script in to AS basically now with this. I'm going to do bits at a time that make sense but there's nothing stopping me now, I'm skeptical that if the update event is being handled by an event it might drop is what I'm saying, i'll try it and see but at the very least maybe that part could just be handled by Skyrim and everything can go into Actionscript. If the timing could be exact it could open up a lot of possibilities, in terms of adding variations into loops, getting the spanks timed perfect etc. so it would be absolutely worth it if it works.

 
It's possible that Papyrus could get caught in a choked state during which it might miss an event being sent to it from skse. If that turns out to be the case, you should be able to accommodate for that with some checking here and there to keep things in sync.
 
I did look a bit further through SkyUI and couldn't find an alternative calling to Papyrus being used. In fact, I confirmed multiple uses of the event system and that GameDelegate appears set up to call some custom dll functions needed to do game engine things like play sounds.
 
I think that coding it in Actionscript will be a huge improvement. There probably will be some kinks to work out regarding timings, etc. But, removing the looping from Papyrus if at all possible would be ideal.
 

 

Yea 128 is Papyrus' array limit so that's the most I can pull from JSON with just one go, you're right that it all could be combined one string or use XML so it doesn't need so much processing. I'm not sure the max length string Skyrim can take but it would only need one extra pass of crunching to turn a single string into that data. My terminology in my head is vague on it as well sorry! By scene in that case I mean a looping static spot in the scene in between transitions. Basically any time you hit a key and are coming out of the transition to another looping scene that 0Sex stays on is when the script would do a json call and then send it up to the UI and the UI would eat the array with that function.

 

Ok. So, yeah, doing multiple JSON pulls at every scene seems like a highly suspect candidate for causing issues. It will probably work much better to just pull every piece of data you will need all at once at the beginning and not do any more pulls after. I would recommend pulling in the entire tree all at once and sending it all into the UI up front.

 

In the meantime, working from the current set up, instead of using a short-hand system like the one you describe, you could build that information into an xml string within papyrus. Then parse it after sending into flash. That would greatly simplify the "explode" side of things in Flash. The parser can handle little chunks of xml or a large file, as many different pieces that need to be parsed. 

 

 

I have a hard figuring what's going to be expensive and how things weigh up in terms of performance in Papyrus. I try to use as few JSON calls as possible but I don't have any idea if calling an array is more expensive then calling a string. I went to seek some help on it and was under the impression after the conversation that it's a json call itself that has a price but doesn't matter what kind so it would be better just to pull larger arrays as opposed to smaller strings. I wouldn't know how that applies to calling for a single string vs and array to make the script process. I use the single string at times because It allows be to supply a replacement if the JSON doesn't exist, where as the array doesn't and will get filled in with random junk if it doesn't exist and cause problems. So if I need to be super sure the JSON exists I use the single call just in a few cases.

 

That sounds right. Neither the type or size (within reason) of the data is likely to affect performance. It's the call itself that has to ping the file system and who knows what else. I think that the data needs to be consolidated into 1 or a few files and pulled in all at once. That's where, for me, JSON gets ugly and XML scales better when adjusting a lot of data by hand.
 

 

Maybe in time a combination of actionscript and a DLL even. DLL seems perfect for handling the facial expression loops I just can't figure out yet the syntax for the phoneme/modifier METHOD_FN my c++ is horrible. Most likely the ideal end game will involve Actionscript handling navigation and timing and a DLL handling the faces, since the DLL can connect directly to the expression/modifier/phonemes.  The big json load that I think is causing problems is on a new scene change shortly after the actors each start loading in their new sexdentity for the scene, they have to call a lot of files and it's x2 since per actor. I'm hoping in 1.07D it's lighter but if it's not I'll have to make the script space out the json calls so it's only doing a few at a time then waiting a bit, slowly bringing in the new sexdentity basically. If the DLL can access sexdentity data itself it could do this all on its own without every having to touch the papyrus.

 

You could set up custom expression functions in a dll and call them with GameDelegate in Flash the way the SkyUI guys do. Best of both worlds.
 

 

Agree on the naming conventions and sorry about them! I have a system that makes sense to me but I get that a lot that they make no sense. I generally put z in front of temp variables that are used in a function but not perm and use Final Fantasy Spell naming-convention on properties, Actra Actro Actraga etc. Depending on the situation.

 

I think that all developers rush through naming conventions at times. Especially when you have some complicated idea you want to finish before you forget a part of it. :)
 
That said, there is a sort of zen-like satisfaction in slowing down and doing that part in an organized way. And I do think that it ends up helping you as much as other developers. It forces you to put your ideas into a more organized frame of reference. I bet that if they studied it, they would find that someone who uses standard naming convention vs ad hoc would end up spending less time over-all on troubleshooting and more on writing new code.
 
Again, just my 10 cents. Maybe standard naming conventions are just a crutch that only hobbled brains like mine need. :)
 

 

Now that I'm looking at it again I supposed it's the same system MCM does it translations. Could I call a txt or xml or json from the UI and have it be received only the UI? I remember you mentioned the XML API was disabled. If I can do any of those for the sake of translation I imagine it would be better if I called the scenes $SceneName for the descriptive text instead of typing into the scenedata "Flip %N2 over" for example and have it reference a document so that translations could be used.

 

Unfortunately, there does not appear to be a way to call data directly into the Flash. I tried multiple variations of every method I know of. There are quite a few in Flash. But, they all seem to be removed by Scaleform. They probably sell Scaleform as having unneeded libraries removed so that it takes up the least amount of resources possible.

 

You could make a sort of translation index file. A list of keywords and their translations. Then a function just runs a search and replace for those words as the lines are displayed in UI.

 

 

 

Sorry PipDude, one more question. The systems takes button customization easy but they would have to all be included the swf as a library to choose from. Do you have any idea the cost this would have, meaning vaguely I guess, should I keep the buttons down to the absolute minimum so it doesn't punish Skyrim or can I have some fun with it?

 

 

A majority of them are just a few vectors some are more complex. I'd like to have palettes that developers can pick from but I don't want to do that if it's coming at a high price.

 

Have fun with it. That's going to be pretty light weight. People install mods to improve moss textures that are 100s of times larger. The flash might not even be using the same bucket of resources as the game engine.

 

For palettes, you could create a sort of gel movieclip that you change color with script. Then modders could change the color based on color hex value. For the button artwork, vectors will look nicer. But, you probably could load dds files with alpha externally for each button. Then modders could have their own sets of custom button graphics.

 

Following up regarding the JSON to XML translation: I looked through the json files a bit. It's pretty straightforward. I guess I'm not sure where to start on advice for that because I don't know how familiar you are with using XML? You may not really need any help on that...?

Link to comment

NEED help i start fnis generator after instal osex 1.07

It make a error and said missing somethink???!!!!!!

 

ps: before all of this i make a cleaning in the data folder and restart the game...

 

 

Fnis for users...

 

If you get errors after clicking consistency check thats harmless you can just play it. If you are getting errors during Fnis generation then all i can say is you messed up something (since you didnt post error report.)

Link to comment

 

 

 

Hi Pipdude,

Awesome as always thank you so much. This got me really excited I'd like to talk some specifics to try make a solution using your amazing knowledge on this stuff. In terms of XML I'm familiar with it a bit and can dabble but guidance is always appreciate I tend to do some caveman hack solution to organize once I reach a level of complexity I can't understand. Figuring out how you see the data transferring would help me get a grasp on working the system around it and I have a couple questions in the last spoiler regarding a solution and a specific wall I cant get by. I think could fix a lot of things.

 

---------------------------------------------

The first issue is in terms of the json transfers. I'm not grasping a way to move all the information at once. The limits I'm seeing is the array max of 128 and the max length of a string. It seems to me that no matter what for information to enter into the UI it's going to have to start first with papyrus accessing JSON and then sending the information to the UI (Unless a dll can bypass it) this could be multiplied by however much string exploding we can do to those  128 lines of an array although there might come a point when it becomes to hard for an outside developer to interpret the information and make their own scenes if there is too much exploding. (Ultimately I have some rough drafts of programs to write scenes so lots of exploding would be safe then but it's a ways off and could result in me just falling into endless coding and never being able to animate.)

 

SexDentity and the Scene files in a framework sense I need to have be created by placing text files with a goal of it being limitless in what can be added in terms of Identity data or scene data. In that case the documents that would be needed up front would be hard to calculate and pull all at once as it shifts in each scene, score level and speed. If it's all hard coded in then it loses the ability for custom sexdentity and scenes to be made but if it's all pulled I can't see how to make the script pull the entire suite that the actor could potentially need.

-------------------------------------------------

 

When the script pulls JSON

 

 

In terms of when the script pulls JSON. It happens only when you change position, however a lot of pulls happen in a short period of time when that happens and I think that is the cause for a lot of the problems people are experiencing: (Note that in 1.07D I've separated the spell into two spells a main one that coordinates all the actors and a secondary one that each actor gets so I can easily give them data arrays no matter how many actors are involved so it's slightly different then 1.07C. I list the large JSON pulls in the next spoiler.

 

 

 

-------------------------------------------------

 

Highlights of some key points in the script that I think are very problematic

 

 

Here's the key problem points I see in the script and the plan I'm seeing to accomplish this. I'd be interested what you think I should do to fix this and also I put a couple of walls I'm facing in terms of my code-competency to see if you can help overcome them.

 

Here's the big sexdentity pull when you change scenes: Each actor script does this so it's multiplied by 2 in 0Sex and would be even worse in 3 person scenes+ This has to be dealt with differently if the script is going to take on multiple actors I think.

 

 

 

Cy_Eyes = JsonUtil.IntListToArray(sSTR[30], "<eyes>_"+sSTR[5])
Cy_ExpressionUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/expression/"+CycleMap[1], zOmScore)
Cy_EyesUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/eyes/"+CycleMap[2], zOmScore)
Cy_LidsUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/lids/"+CycleMap[3], zOmScore)
Cy_BrowsUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/brows/"+CycleMap[4], zOmScore)
Cy_MouthUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/mouth/"+CycleMap[5], zOmScore)
Cy_SquintUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/squint/"+CycleMap[6], zOmScore)
CySn_VoiceUnit = JsonUtil.IntListToArray(PAKD_Sex[2]+"/_map/Sound/Voice/"+CycleMap[11], zOmScore)

 

It's pulling various segments of it's data for voice and face. This data will need to be refreshed everytime a scene changes, an actors arousal score changes, or their speed changes. It could be combined some into smaller arrays and have it cut down by half maybe but that would limit SexDentity some in that the components would most likely need fewer options and be less interchangeable.

 

When any of these 3 types of events occur it pulls JSON data and stores it in designated arrays in the papyrus.

 

 

Each actor has 2 of what I call a "Cycle". One for Voice and one for expression. They are looping events that are created at the start of 0Sex that loop every 10-15 seconds. When you arrive at a new scene the script is given two words from the scene that say how it should process face and voice for that scene. They are combined are added to the event: 

 

Without any words it just goes to an empty version:

 

 

 

Event OnCycle_()
Utility.wait(5.0 + (R100() / 50)) 
 
GlobalCycle(sSTR[11]+sSTR[12]) <-- Calls the event again + the two keywords if they are there
 
EndEvent
This one does nothing except waits and then sends another cycle out later to see if the words showed up.

 
But if the script has certain words for example:

 

 

 

Event OnCycleSexAbstract_()
 
CyMail("Face", "Expression", Cy_ExpressionUnit[0])  <------------ Sends events for the script to use mfgconsole to adjust the faces based on the array
CyMail("Face", "Eyes", Cy_EyesUnit[0])
CyMail("Face", "Lids", Cy_LidsUnit[0])
CyMail("Face", "Brows", Cy_BrowsUnit[0])
CyMail("Face", "Mouth", Cy_MouthUnit[0])
CyMail("Face", "Squint", Cy_SquintUnit[0])
 
Utility.wait(5.0 + (R100() / 50)) 
 
GlobalCycle(sSTR[11]+sSTR[12]) <-- Calls the event again + the two keywords if they are there
 
EndEvent

 

Cymail calls an event based on the first integer in the array to tell it how to process. For example 2 makes it choose from 6 possible expressions, 32 makes it do 3 tiers each being more uncommon (Used more for voice)

 

 

 

 

 

 

-----------------------------------

The main issues I'm seeing that are dicking up the script and papyrus:

 

 

The main issues I face I believe are that

1. Entering a new scene requires way to much JSON pull even for just 2 actors I'd like 0SA to support many actors so while with 2 people might be able to just get by most of the time I believe anything more will be gameover.

 

2. Once you arrive at a loop the script is very minimal if you don't change scenes, there's no pulling JSON if you aren't switching to a different position but the script still feels heavy. I'm convinced this is from the facial expression system which I feel is important but has to be changed. I think it's due to point 3

 

3. MFG Phoneme and Modifiers using MFG console don't blend like expressions do. Meaning if you use the MFG Console's function to set the eye position or mouth position it will just snap into place instantly which wasn't ideal for this so I made a function that blends it. 

 

Basically moving it in intervals of 5 until it hits it's current goal I'm using no (wait) in it as it appears to be framerate capped anyways so it produces a result of 1 tick per frame which is ideal visually I feel:

 

 

 

If zCur > zGoal
    While zCur > zGoal
    zCur -= zSpeed
    MfgConsoleFunc.SetPhoneme(zAct, zMode, zCur)
    EndWhile
    ;zCur = zGoal
    ;MfgConsoleFunc.SetPhoneme(zAct, zMode, zCur)
ElseIf zCur < zGoal
    While zCur < zGoal
    zCur += zSpeed
    MfgConsoleFunc.SetPhoneme(zAct, zMode, zCur)
    EndWhile
    ;zCur = zGoal
    ;MfgConsoleFunc.SetPhoneme(zAct, zMode, zCur)
EndIf   

 

 

So when the CyMail goes out listed above the scene can find itself doing a heavy load of IF checks if it decides to swap a lot of the actors current expression

 

 

 

 

 

The Solution I see for a majority of the scripts load:

 

 

 

In some ways it's beyond my knowledge and I don't think I can do it without help and more understanding:

 

A DLL function ex:

Function BeginCycle(Actor) Native

Function NewCycleFace(Actor, scene_data[]) Native 

Function StopCycle(Actor) Native

 

"BeginCycle" would be called by papyrus (for now at least) at the start of 0Sex. Handing it all off to a DLL. The DLL would setup and manage the looping "cycles" until told to stop. 

 

The DLL would take the SceneData[] array and figure out the kind of sexdentity to use. It would then pull the information on it's own from the documents and create the blending effect and application of the phoneme's and modifiers until it gets told to update itself with another "NewCycleFace" call or until the scene ends.

 

-----------------------------------

 

If this is in place the scene would only have to deal with 3 IF checks every 2-4 seconds. It would have to make 1-2 JSON calls when a scene changes. This would be drastically less then what I'm doing now and it's the clearest path I can see to a substantial fix to the system, but I'm open to any other ideas to fix this better my knowledge is very weak on these things.

 

 

There are 2 walls I"m hitting trying to accomplish this that maybe you can help me through:

 

The Main Wall: I can get actors into C++ etc but I cannot figure out how to call this METHOD_FN in the "NiExtraData.h"

 

DEFINE_MEMBER_FN(SetPhonome, void, 0x005352D0, UInt32 type, float value);
DEFINE_MEMBER_FN(SetModifier, void, 0x005352A0, UInt32 type, float value);
 
There are other simpler method functions that I can get to compile like this one which goes no problem:
 
DEFINE_MEMBER_FN(GetLevel, UInt16, 0x006A7320);
CALL_MEMBER_FN(myActorRef, GetLevel)();

 

But the Phonome and Modifier ones I have no been able to solve. I'm looking to be able to recreate what RaceMenu and MFG console can do but in a way that's more efficient for how 0Sex needs them to be. I have a feeling even if I did hook up these functions correct they wont work because beth did something to them where they could no longer be "Caught". Perhaps it's some kind of approach involving editing the fields themselves instead of calling the functions which could potentially be broken. I'd need to find a way to get current modifier and phonome type and power as well as set type and power also by inputting an actor form.

 

The second thing I face is understanding how to setup access for the DLL to pull data. For other projects I've been able to code C++ that can read JSON using JSON.net. However while being in Visual Studio 2013 I can't find or set up any kind of data program that will work without me updating to VS2015 and making it apply to a certain version of netframework which I'm not sure if I should or shouldn't do (Worry that it would force people to download a certain version of something to be able to use the mod.)

 

 

 

------------

 

Sorry for all this talk Pipdude and I don't mean to sound demanding, I'm just excited about all the things you mentioned and am looking for ways to apply these awesome concepts and have it become a reality in 0SA. Thank you always for all your help and your time.

 

Link to comment

 

 

Hi Pipdude,

 

Awesome as always thank you so much. This got me really excited I'd like to talk some specifics to try make a solution using your amazing knowledge on this stuff. In terms of XML I'm familiar with it a bit and can dabble but guidance is always appreciate I tend to do some caveman hack solution to organize once I reach a level of complexity I can't understand. Figuring out how you see the data transferring would help me get a grasp on working the system around it and I have a couple questions in the last spoiler regarding a solution and a specific wall I cant get by. I think could fix a lot of things.

 
I think that a good general direction would be to make high level category nodes in your xml based on the same directory structure you already set up for JSON (but with more descriptive names :) ).
 
Without having really fully analyzed it all, it looks like there are 3 categories that might warrant separate xmls:
 
game_settings.xml
sexdentity.xml
animation_data_core.xml
 
Those could be combined as well. But, I suppose someone might want to replace sexdentity or animation core altogether in a mod and not have to maintain the game settings. animation_data_core.xml would hold all of the information for all of your animations. [Other modders would create their own branch xml files that would load at key points in the main tree.]
 

 

The first issue is in terms of the json transfers. I'm not grasping a way to move all the information at once. The limits I'm seeing is the array max of 128 and the max length of a string. It seems to me that no matter what for information to enter into the UI it's going to have to start first with papyrus accessing JSON and then sending the information to the UI (Unless a dll can bypass it) this could be multiplied by however much string exploding we can do to those  128 lines of an array although there might come a point when it becomes to hard for an outside developer to interpret the information and make their own scenes if there is too much exploding. (Ultimately I have some rough drafts of programs to write scenes so lots of exploding would be safe then but it's a ways off and could result in me just falling into endless coding and never being able to animate.)

 

Considering those limitations, I do not think that a large data load will be practical with this JSON set-up. Those work-arounds are likely to introduce other weakness points and complications to the code. I don't think it's worth going down that path. It may be that the instability is something that just has to be lived with until the system can go through more of an overhaul.
 

 

SexDentity and the Scene files in a framework sense I need to have be created by placing text files with a goal of it being limitless in what can be added in terms of Identity data or scene data. In that case the documents that would be needed up front would be hard to calculate and pull all at once as it shifts in each scene, score level and speed. If it's all hard coded in then it loses the ability for custom sexdentity and scenes to be made but if it's all pulled I can't see how to make the script pull the entire suite that the actor could potentially need.

 

I can set it up to allow exporting the XML back out as a string and saved. So, you could have a large sexdentity.xml that is updated in flash based on what happens and then the modified version is sent back to papyrus as a string and saved to a file. The modifications can include adding character records, etc. anything.
 
If you imagine a scenario where a single sexdentity.xml will contain too much data for the system to handle (due to so many characters, etc. in one playthrough) a system could be made where it loads sexdentity data just based on characters involved and creates a new xml for them. Essentially the same thing as the JSON. But, without the data limitations and probably runs faster since the load is just a text file to string load. No parsing taking place until it gets to flash.
 

 

When the script pulls JSON

 

 

In terms of when the script pulls JSON. It happens only when you change position, however a lot of pulls happen in a short period of time when that happens and I think that is the cause for a lot of the problems people are experiencing: (Note that in 1.07D I've separated the spell into two spells a main one that coordinates all the actors and a secondary one that each actor gets so I can easily give them data arrays no matter how many actors are involved so it's slightly different then 1.07C. I list the large JSON pulls in the next spoiler.

 

 

 

I agree with the reasoning there. Multiple pulls in a short time is a plausible cause of the issues. It could be that there is a bug in the JSON pull code that causes it to get tripped up under some condition.

 

 

Highlights of some key points in the script that I think are very problematic

 

 

Here's the key problem points I see in the script and the plan I'm seeing to accomplish this. I'd be interested what you think I should do to fix this and also I put a couple of walls I'm facing in terms of my code-competency to see if you can help overcome them.

 

Here's the big sexdentity pull when you change scenes: Each actor script does this so it's multiplied by 2 in 0Sex and would be even worse in 3 person scenes+ This has to be dealt with differently if the script is going to take on multiple actors I think.

 

 

 

Cy_Eyes = JsonUtil.IntListToArray(sSTR[30], "<eyes>_"+sSTR[5])
Cy_ExpressionUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/expression/"+CycleMap[1], zOmScore)
Cy_EyesUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/eyes/"+CycleMap[2], zOmScore)
Cy_LidsUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/lids/"+CycleMap[3], zOmScore)
Cy_BrowsUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/brows/"+CycleMap[4], zOmScore)
Cy_MouthUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/mouth/"+CycleMap[5], zOmScore)
Cy_SquintUnit = JsonUtil.IntListToArray(PAKD_Sex[1]+"/_map/face/squint/"+CycleMap[6], zOmScore)
CySn_VoiceUnit = JsonUtil.IntListToArray(PAKD_Sex[2]+"/_map/Sound/Voice/"+CycleMap[11], zOmScore)

 

It's pulling various segments of it's data for voice and face. This data will need to be refreshed everytime a scene changes, an actors arousal score changes, or their speed changes. It could be combined some into smaller arrays and have it cut down by half maybe but that would limit SexDentity some in that the components would most likely need fewer options and be less interchangeable.

 

When any of these 3 types of events occur it pulls JSON data and stores it in designated arrays in the papyrus.

 

 

Each actor has 2 of what I call a "Cycle". One for Voice and one for expression. They are looping events that are created at the start of 0Sex that loop every 10-15 seconds. When you arrive at a new scene the script is given two words from the scene that say how it should process face and voice for that scene. They are combined are added to the event: 

 

Without any words it just goes to an empty version:

 

 

 

Event OnCycle_()
Utility.wait(5.0 + (R100() / 50)) 
 
GlobalCycle(sSTR[11]+sSTR[12]) <-- Calls the event again + the two keywords if they are there
 
EndEvent
This one does nothing except waits and then sends another cycle out later to see if the words showed up.

 
But if the script has certain words for example:

 

 

 

Event OnCycleSexAbstract_()
 
CyMail("Face", "Expression", Cy_ExpressionUnit[0])  <------------ Sends events for the script to use mfgconsole to adjust the faces based on the array
CyMail("Face", "Eyes", Cy_EyesUnit[0])
CyMail("Face", "Lids", Cy_LidsUnit[0])
CyMail("Face", "Brows", Cy_BrowsUnit[0])
CyMail("Face", "Mouth", Cy_MouthUnit[0])
CyMail("Face", "Squint", Cy_SquintUnit[0])
 
Utility.wait(5.0 + (R100() / 50)) 
 
GlobalCycle(sSTR[11]+sSTR[12]) <-- Calls the event again + the two keywords if they are there
 
EndEvent

 

Cymail calls an event based on the first integer in the array to tell it how to process. For example 2 makes it choose from 6 possible expressions, 32 makes it do 3 tiers each being more uncommon (Used more for voice)

 

 

 

 

 

 

 

Problem: The Number of JSON Pulls

 

My understanding is that the only reason why the system needs to make that many pulls (and that many really seems to be asking for problems to me) is that Papyrus data limitations prevent that data from coming in as one large pull. I don't see any other solution than to use an alternative data system. XML as a string is the only one I'm aware of that gets us past the Papyrus data restrictions. So, that is my recommended solution.

 

Instead of having to refresh the data all the time, couldn't you just load the data that it would refresh to also? (I mean if data restrictions weren't an issue).

 

Problem: Looping

 

Instead of continuously looping to poll for that stuff in Papyrus, you could set up more of a timer system that is triggered by flash. So, each of those expression or other events is in the data as a time (when it happens) and a value (what happens). There could be some other associated information needed like "duration" maybe. In xml, it would look something like this (the dummy data has no reflection on technical reality. just giving you an idea of what it would look like as xml):

<expression time="10" feature="eyes" value="150"/>
<expression time="15" feature="mouth" value="5"/>
<expression time="25" feature="eyes" value="200"/>
<expression time="30" feature="mouth" value="10"/>

In flash, you wouldn't need to do any loop to handle that. You would instantiate timers that trigger the appropriate function with the right data in 10 seconds, 15 seconds and so on. And those functions would just fire at those moments.

 

I think that something like the above model is more clear and easy to work with. But, if you like shorthand approach you could do the same and do more "exploding":

<expression command="10,eyes,150"/>
<expression command="15,mouth,5"/>
<expression command="25,eyes,200"/>
<expression command="30,mouth,10"/>
 

 

The main issues I'm seeing that are dicking up the script and papyrus:

 

 

The main issues I face I believe are that

1. Entering a new scene requires way to much JSON pull even for just 2 actors I'd like 0SA to support many actors so while with 2 people might be able to just get by most of the time I believe anything more will be gameover.

 

2. Once you arrive at a loop the script is very minimal if you don't change scenes, there's no pulling JSON if you aren't switching to a different position but the script still feels heavy. I'm convinced this is from the facial expression system which I feel is important but has to be changed. I think it's due to point 3

 

3. MFG Phoneme and Modifiers using MFG console don't blend like expressions do. Meaning if you use the MFG Console's function to set the eye position or mouth position it will just snap into place instantly which wasn't ideal for this so I made a function that blends it. 

 

Basically moving it in intervals of 5 until it hits it's current goal I'm using no (wait) in it as it appears to be framerate capped anyways so it produces a result of 1 tick per frame which is ideal visually I feel:

 

 

 

If zCur > zGoal
    While zCur > zGoal
    zCur -= zSpeed
    MfgConsoleFunc.SetPhoneme(zAct, zMode, zCur)
    EndWhile
    ;zCur = zGoal
    ;MfgConsoleFunc.SetPhoneme(zAct, zMode, zCur)
ElseIf zCur < zGoal
    While zCur < zGoal
    zCur += zSpeed
    MfgConsoleFunc.SetPhoneme(zAct, zMode, zCur)
    EndWhile
    ;zCur = zGoal
    ;MfgConsoleFunc.SetPhoneme(zAct, zMode, zCur)
EndIf   

 

 

So when the CyMail goes out listed above the scene can find itself doing a heavy load of IF checks if it decides to swap a lot of the actors current expression

 

 

 

 

 

1. Agreed. I think that is addressed earlier in this post. XML as a string is the only apparent solution to slimming down data pull calls.
 
2. Also addressed above. Using timed expressions would be lighter than loops.
 
3. My hunch is that the number of IF checks is not as much of a drain as the quantity of Phoneme nudges. It is possible that that method of animating the expressions is just a costly approach. Not much way around it other than maybe compromising on steps (you could make that compromise dynamic based on how much is going on at once. a "phoneme bandwidth" if you will.). Isn't there an alternative for animating expressions? Although a royal PIA, is there not a way to do these things through the engine via tri files, etc.?
 

 

The Solution I see for a majority of the scripts load:

 

 

 

In some ways it's beyond my knowledge and I don't think I can do it without help and more understanding:

 

A DLL function ex:

Function BeginCycle(Actor) Native

Function NewCycleFace(Actor, scene_data[]) Native 

Function StopCycle(Actor) Native

 

"BeginCycle" would be called by papyrus (for now at least) at the start of 0Sex. Handing it all off to a DLL. The DLL would setup and manage the looping "cycles" until told to stop. 

 

The DLL would take the SceneData[] array and figure out the kind of sexdentity to use. It would then pull the information on it's own from the documents and create the blending effect and application of the phoneme's and modifiers until it gets told to update itself with another "NewCycleFace" call or until the scene ends.

 

-----------------------------------

 

If this is in place the scene would only have to deal with 3 IF checks every 2-4 seconds. It would have to make 1-2 JSON calls when a scene changes. This would be drastically less then what I'm doing now and it's the clearest path I can see to a substantial fix to the system, but I'm open to any other ideas to fix this better my knowledge is very weak on these things.

 

 

There are 2 walls I"m hitting trying to accomplish this that maybe you can help me through:

 

The Main Wall: I can get actors into C++ etc but I cannot figure out how to call this METHOD_FN in the "NiExtraData.h"

 

DEFINE_MEMBER_FN(SetPhonome, void, 0x005352D0, UInt32 type, float value);
DEFINE_MEMBER_FN(SetModifier, void, 0x005352A0, UInt32 type, float value);
 
There are other simpler method functions that I can get to compile like this one which goes no problem:
 
DEFINE_MEMBER_FN(GetLevel, UInt16, 0x006A7320);
CALL_MEMBER_FN(myActorRef, GetLevel)();

 

But the Phonome and Modifier ones I have no been able to solve. I'm looking to be able to recreate what RaceMenu and MFG console can do but in a way that's more efficient for how 0Sex needs them to be. I have a feeling even if I did hook up these functions correct they wont work because beth did something to them where they could no longer be "Caught". Perhaps it's some kind of approach involving editing the fields themselves instead of calling the functions which could potentially be broken. I'd need to find a way to get current modifier and phonome type and power as well as set type and power also by inputting an actor form.

 

The second thing I face is understanding how to setup access for the DLL to pull data. For other projects I've been able to code C++ that can read JSON using JSON.net. However while being in Visual Studio 2013 I can't find or set up any kind of data program that will work without me updating to VS2015 and making it apply to a certain version of netframework which I'm not sure if I should or shouldn't do (Worry that it would force people to download a certain version of something to be able to use the mod.)

 

 

 

 

The dll Solution:
 
You might find that the dll solution isn't any better because the bottleneck may not be the script speed. It's probably more that the game engine is being nudged along and manipulated in a way that it wasn't intended. It may be being forced to do some kind of costly calculation like its setting up for an animation each time it clicks along a tiny amount. 
 
C++ Help:
 
C++ I'm not going to be much help with. I've only set up the very basic plugin sample and otherwise haven't really done anything with it.
 
I can't say for certain. But, I do suspect though that making the nudges in C++ won't improve the performance of that approach much. I could be completely wrong.
 

 

Sorry for all this talk Pipdude and I don't mean to sound demanding, I'm just excited about all the things you mentioned and am looking for ways to apply these awesome concepts and have it become a reality in 0SA. Thank you always for all your help and your time.

 

No need to apologize. I enjoy helping out. I couldn't commit enough time to support a mod properly with MCM menu, helping users troubleshoot and get it working with their mod config, accommodate 1000 gender variations, high heels, glow-in-the-dark breasts and every other thing users demand of public mods. So, pitching in as I can on interesting mods like yours is a good way to help without getting overwhelmed and burnt out.

Link to comment

O-GIRL AND O-BOY NEED YOUR HELP

 

This is for the buttons on the UI:

 

Objective: Generate a "Stick Figure" that is sexier then your average stick figure, both must be heroic formed bodies Athetlic / Muscular but as 0Sex policy dictates only the female rear can be slightly hypersexualized but the chest must be on the smallish end.

 

It must be a vector based drawing set up in a way that can be moved like a puppet so she/he can be posed in a variety of positions and look like the same character across all buttons. Nothing fancy just segments of the body that can line up if rotated and place at joints etc. Bust, Torso, Head, Thigh x2, calf x 2, ass close, ass far, feet x 2, upper arm, lower arm, hands, preferably.

 

Here's my current attempt at it.I will keep pursuing improving 0Girl and 0Boy but as you can see here they need some work: (although not to bad with a little more work I think) Can you sex my 0-Girl up a little better? When I draw cartoons I don't capture the fun, energetic side of cartoon characters and tend to make them bland like hieroglyphics instead of a lovable character. Even if you just want to try a little touch up on her.

 

tumblr_o3372cNDoA1ubnr1mo2_r1_500.png

 

 

If anyone has vector skills and can tweak or improve O-Girl please give it a shot for me I've attached the AI file with my current progress. 

 

in the file: Left is my working file in segments which would be posed, the right side is post being processed after the paths have been transformed into a single thing, and with added border on the far right.

 

Link to comment

 

 

 

 

I'm thinking that it might be helpful if I were to write a full circle example that loads, uses and then saves an xml file. That would probably help you envision how this could be used to replace the current system.

 

What do you think?

 

 

I'm going through the information but while you're here I'll get this question and thank you for all this information.

 

Yea that would help me a lot visualize. I understand now and I think the basis of your concept involves an ability XML has to be packed by XML into a string and then sent through papyrus as 1 single entity that then is caught and easily unpacked back into it's data structure.It sounds promising and could help a lot. 

 

I think really all we need to do is find a way to lighten the super json load that happens and the timings of the expression modifiers and it will be stable enough. I'm not expecting it to be perfect sailing skyrim as I think it's taking to the limit what Skyrim is willing to do... but reliability within reason is what I think needs to be shot for in this case. I plan anyways when expanding into the combat script that's a lot lighter to also make a secondary script that 0Sex can use that's similar in stress to 1.06. I can run 1.07 on mine without issues but my game is light so people in a heavier modded game could opt to just use the lighter script with a little less detail. I think that could be a good solution to this as well.

 

I have throttles on the MFG I can tone it down with one variable so that's always possible and also CYMail is shipping all at once. It could randomly pick from just a few to mail. So instead of sending out all 8 events I can make it do 2-3 at a time. Worse case then generate code that does the big upload in waves so it over a period of time loads all the JSON needed but I think we can find a solution elsewhere.

 

It's definitely jacked up use of MFG but it's something I can't give up on and I need to find a way no matter what the cost: Examples like this and expanding it into kissing etc. so the lips actual move correctly. It's the same as I used in 1.06 just this is more intense now in terms of how much of the entire face I'm controlling, so it can be toned down and returned to 1.06's smoothness with just a little sacrifice. The only thing really happening different is more detailed face control more frequently and the major json call.

 

FrenchFoolhardyCrocodileskink.gif

 

It might not even be the JSON calls or the MFG. People claim 1.07a was smoother in a lot of cases and it was making a ton more JSON calls then I am now. 1.07a didn't use arrays and instead I was making lots of calls for single strings to JSON. I condensed a lot of the information into arrays so I had to call it a lot less which 1.07b and onward is basically. It's possible there's just a hole somewhere in the script that's causing endless loops and I just haven't found it yet. It's likely with the introduction of many arrays and how arrays get filled in with random stuff if they don't register or exist that an array feeding unintended information is causing it to happen.

 

Dr. Transitionatron is heavyish too and going on at the same time as the scene is changing, I'm going to try moving him into the UI first as all he does is send events so it's a perfect fit with no modifications. It runs during transitions and just takes lines of code one at a time in a string array and runs functions based on IF checks: like this

 

        "WAIT","0.25",
        "MFG","Adjust","1",
        "PhX","1","0",
 

 

Link to comment

O-GIRL AND O-BOY NEED YOUR HELP

 

.....

 

Here's my current attempt at it.I will keep pursuing improving 0Girl and 0Boy but as you can see here they need some work: (although not to bad with a little more work I think) Can you sex my 0-Girl up a little better? When I draw cartoons I don't capture the fun, energetic side of cartoon characters and tend to make them bland like hieroglyphics instead of a lovable character. Even if you just want to try a little touch up on her.

 

 

What's wrong with hieroglyphics? The ancient Egyptians managed to convey sexiness even through hieroglyphs in their ancient porn mags, "And as she arched her back, the drops of sweat on her breasts caught the setting sun over the Nile...."

Link to comment

 

What's wrong with hieroglyphics? The ancient Egyptians managed to convey sexiness even through hieroglyphs in their ancient porn mags, "And as she arched her back, the drops of sweat on her breasts caught the setting sun over the Nile...."

 

 

You have a good point there, maybe I'll stick with it. I might have been hoping a little more for O-Girl to have that "I want to hit that in a cartoon kind of way..." feel to her as opposed to:

 

tumblr_o3372cNDoA1ubnr1mo4_r1_1280.png

 

Nice example by the way I liked it.

Link to comment

Just to remind you: 1.07a also had freezes. They were not introduced in b and c, but they did happen lot more often. Most obvious problem i found was that 0sex gets to the point where it doesnt know how to progress. But still keeps the ability to end scene (so key input is working) and play redress animations (so animations are working). Error probably happens somewhere where it decides whats playing currently and whats comming next which leads to a freeze.

Link to comment

Just to remind you: 1.07a also had freezes. They were not introduced in b and c, but they did happen lot more often. Most obvious problem i found was that 0sex gets to the point where it doesnt know how to progress. But still keeps the ability to end scene (so key input is working) and play redress animations (so animations are working). Error probably happens somewhere where it decides whats playing currently and whats comming next which leads to a freeze.

 

Thanks Kinky,

I think you're exactly right on that.

 

The first time the scene hits a new loop it loads in registration information for the scene like how long it is, does it have speeds etc.

then it plays the animation.

 

The first frame of the animation has an animationevent it it that registers for an update of the loop based on the duration that was just registered

 

After that the loop just repeats and waits until the user does a key press to change the scene. The animation is looping on it's own so it keeps calling the update event.

 

----------------------

Theoretically it should be solid but I think there's something like you said happening in between here as a result of papyrus delay.

 

It's hard to find but at the moment if I had to guess I'd say it's something like this. Let's say you have a 2 second long scene, and the loop starts taking longer then 2 seconds to process due to papyrus getting bogged down. It would start getting a backlog of registration that keeps extending the wait time further and further so the scene never registers to update itself and can't respond to any key presses because it needs to restart the loop to register a change in scene. (something like this maybe)

 

I'm looking to restructure the scene to put a shield in place for this it's just a little tricky to figure out as there's a lot going on in that spot. This would most likely result in the animation repeating but no keys working.

 

If your transitioning and the animation freezes at the end of the transition and never starts the next scene (Frozen on last frame of the transition) it's something different. I think it might be caused by the animation being triggered by the first frame of the animation. I mentioned in an earlier post that it feels like Papyrus will not 100% of the catch an event call t should so it might just miss the animation call.

 

I'm trying to move away from using the animation call and letting the loop itself have the update at least for now so I believe it would then impossible to desync as it would always get there no matter slow papyrus gets.

 

There's some disadvantages to but I think it's much better then 0Sex stopping.

 

--------------------------

 

Also here's preview of the UI complete. I'm changing over a few scenes to use the data style the UI needs so there's enough to test and will put it up, later in the day if all goes well with 1.07D. It wont be full 0Sex just a handful of scenes to see the UI, if people like it then I'll do over all the scenes which wont take long. (The buttons and page icons will be special and not all the same, this is just a debugging menu for making the UI.)

 

tumblr_o3372cNDoA1ubnr1mo5_r1_400.gif

 

 

It's showing page tab and actor tab. It's actually one key less then planned because you can page tab just by pushing against the edges. Left or Right for example on this line tabs the page, where as there's a key to tab the actors. I'm thinking WASD + Q or E for the controls. DPAD feels uncomfortable to operate with one hand as I have to use my right to do that where as I want to move the mouse at the same time so I wind up dpading with my left hand.

Link to comment

I'm thinking WASD + Q or E for the controls. DPAD feels uncomfortable to operate with one hand as I have to use my right to do that where as I want to move the mouse at the same time so I wind up dpading with my left hand.

 

I think people needs WASD to adjust their camera in TFC mode as well. Or the 0Sex UI can be toggled off to release WASD keys?

Link to comment

 

I'm thinking WASD + Q or E for the controls. DPAD feels uncomfortable to operate with one hand as I have to use my right to do that where as I want to move the mouse at the same time so I wind up dpading with my left hand.

 

I think people needs WASD to adjust their camera in TFC mode as well. Or the 0Sex UI can be toggled off to release WASD keys?

 

Didn't think of that, true. It could turn off fc but I think that might be to chaotic to have the camera locking, making tfc temporaily ignore wasd would be awesome but i'm not sure possible. hmmmmmmmmmm

Link to comment

Why not use the arrows instead of WASD when using the UI?

 

It works ok but since it's on the right side you have to use your left hand on the dpad and right hand on the mouse to navigate and move the camera around.

 

 

Unfortunately, there does not appear to be a way to call data directly into the Flash. I tried multiple variations of every method I know of. There are quite a few in Flash. But, they all seem to be removed by Scaleform. They probably sell Scaleform as having unneeded libraries removed so that it takes up the least amount of resources possible.

 

 

 

Not quite sure how this would work but throwing it out there to see what you think: 

I haven't looked into it yet but it seems like the flash can access a .txt. Maybe assemble one super XML string in a text document that the flash can pull and explode? Something compressed from all currently installed scenes and sexdentity.

 

Not sure if there's serious consequences to that I see a lot of things involving accessing a .txt say that bad things will happen if the file is too large.

Link to comment

 

Why not use the arrows instead of WASD when using the UI?

 

It works ok but since it's on the right side you have to use your left hand on the dpad and right hand on the mouse to navigate and move the camera around.

 

 

Oh right. Do you think it's possible to use the mouse for interract with the UI? With scroll wheel and right/left click? I don't remember if it's already on use but I don't think so.

Link to comment

Im not sure how you made selection work. You mentioned you use mouse. What is it used for?  Is user interface hidden and shows on modifier key press? Or to be more precise how would i order Fione to kneel before guy? What keys are pressed?

Link to comment

Im not sure how you made selection work. You mentioned you use mouse. What is it used for?  Is user interface hidden and shows on modifier key press? Or to be more precise how would i order Fione to kneel before guy? What keys are pressed?

 

Holding alt opens the menu when you let it go the menu closes.

 

Up Down Left Right currently moves on the grid of boxes, since there's only one line in this case if you push left or right it will go to the next page. Basically when you're in the last or first column of the grid pushing left (or right on the first column) goes to the next page.

 

The grid of boxes can go up to a max of 3 columns with 6 boxes in a row but it's unlikely to get that many outside of clothing related scenes on certain pages.

 

pressing shift changes between Fione and Guy.

 

It's currently set to change scenes on release of alt to whatever you were hovering over but I don't like it since it doesn't have a safe place to put your selector if you don't want to make any choices so most likely it will need an accept key to lock in your choice.

 

WASD (Up, Down Left Right) |  Q( Accept) + E (Change actor)  would be ideal except I got reminded it's on the TFC keys.

 

Mentioning of mouse was in relation to having the controls be on the DPAD, you wind up wanting to use your right hand to mouse so you have to put your left hand on the dpad to navigate which doesn't feel ideal.

Link to comment

My suggestion would be to replace Alt with Right Ctrl since its closer to Dpad so you dont have to stretch little finger when playing with left hand. Shift should probably be used in combination with left and right (in case of multiple actors) coz pressing single Shift often (happened to me in some other games) can activate windows sticky keys. I forgot it is in combination with Alt and not single. Also im bit confused on left and right shouldnt it be opposite? Left for previous if there is no column to the left, right for next if there is no column to the right?

 

Other then that i like control setup based arround dpad. Would it be good to add 2 sec delay for control confirmation instead of extra button?

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   1 member

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use