Jump to content

Sex animations.


Recommended Posts

I was thinking more about passing the idle as a property. It needs to belong to the actor, but if we extend the actor, we could potentially give him new idles. Or maybe idles that (s)he shares with another actor. Like a beast race, for instance.

 

The PlayIdle call is old news, I agree...

Link to comment

Unfortunately it seems that papyrus doesn't support this sort of reverse inheritance (called 'extension methods' in C#, other names in other languages). You can't add a method or property directly to a base class like Actor and have it propagate to all the descendants of that class. Tried this early on for another purpose and couldn't find anything like it in the language.

Link to comment

You can add them to a subclass just fine, normal inheritance in papyrus works as expected, however none of the vanilla actors will have the new properties you've defined -- only actors created from your subclass will.

 

I might be misunderstanding what you mean by property though; I was taking it in the OOP sense, like "someRef.property" since you said "it needs to belong to the actor" which I believe is correct, and the root problem.

 

Creating new animations is 'easy' enough, it's getting them assigned to the appropriate actors, so they can play them, that is the problem.

Link to comment

You can add them to a subclass just fine' date=' normal inheritance in papyrus works as expected, however none of the vanilla actors will have the new properties you've defined -- only actors created from your subclass will.

 

I might be misunderstanding what you mean by property though; I was taking it in the OOP sense, like "someRef.property" since you said "it needs to belong to the actor" which I believe is correct, and the root problem.

 

Creating new animations is 'easy' enough, it's getting them assigned to the appropriate actors, so they can play them, that is the problem.

[/quote']

 

Cant you add new properties to every subclass (I know it would be alot of code and whatnot but just wondering)? Or if not, you said only the vanilla characters would not have the properties, what about new npcs and the sort?

 

Link to comment

You can add them to a subclass just fine' date=' normal inheritance in papyrus works as expected, however none of the vanilla actors will have the new properties you've defined -- only actors created from your subclass will.

 

I might be misunderstanding what you mean by property though; I was taking it in the OOP sense, like "someRef.property" since you said "it needs to belong to the actor" which I believe is correct, and the root problem.

 

Creating new animations is 'easy' enough, it's getting them assigned to the appropriate actors, so they can play them, that is the problem.

[/quote']

 

Cant you add new properties to every subclass (I know it would be alot of code and whatnot but just wondering)? Or if not, you said only the vanilla characters would not have the properties, what about new npcs and the sort?

 

 

Papyrus has basic OOP stuff, and it is all functional. You can make a new class called "SexActor", extending the base Actor class easily. It will have all the properties and methods of the Actor class, plus any new ones you add. Any NPCs you make that use SexActor as their base class will get all those features.

 

However no vanilla NPCs will have any of them, because they descend from Actor, not SexActor.

 

Basic OOP inheritance.

Link to comment

You can add them to a subclass just fine' date=' normal inheritance in papyrus works as expected, however none of the vanilla actors will have the new properties you've defined -- only actors created from your subclass will.

 

I might be misunderstanding what you mean by property though; I was taking it in the OOP sense, like "someRef.property" since you said "it needs to belong to the actor" which I believe is correct, and the root problem.

 

Creating new animations is 'easy' enough, it's getting them assigned to the appropriate actors, so they can play them, that is the problem.

[/quote']

 

Cant you add new properties to every subclass (I know it would be alot of code and whatnot but just wondering)? Or if not, you said only the vanilla characters would not have the properties, what about new npcs and the sort?

 

 

Papyrus has basic OOP stuff, and it is all functional. You can make a new class called "SexActor", extending the base Actor class easily. It will have all the properties and methods of the Actor class, plus any new ones you add. Any NPCs you make that use SexActor as their base class will get all those features.

 

However no vanilla NPCs will have any of them, because they descend from Actor, not SexActor.

 

Basic OOP inheritance.

 

And I take it theres no way to change the vanilla NPCs base class? So would new NPCs be able to have new animations? I know some programming in C++ and Java but not enough to do really complex things so I'm just trying to keep up and maybe throw some ideas out there.:D (but I'm sure you already have had them heh :heart:)

Link to comment

And I take it theres no way to change the vanilla NPCs base class? So would new NPCs be able to have new animations? I know some programming in C++ and Java but not enough to do really complex things so I'm just trying to keep up and maybe throw some ideas out there.:D (but I'm sure you already have had them heh :heart:)

 

I think you can but it's a terrible idea, as it would conflict with any other mod that modifies NPCs via the CK. Every NPC record would be altered, and thus duplicated in the ESM. Any mods loaded after "yours" that don't have yours as a master and also alter NPCs would undo your changes, and loading yours after theirs would undo their changes.

 

Which puts us squarely back into shitty mega-'bashed' patch land, that players have to create and apply manually.

 

This may end up being an avenue that some modders take, if they can get it to work, but I don't count myself among them. My goal is to make my mods compatible with others 'out of the box' without the players having to jump through hoops to use them.

Link to comment

So you can add new animations to new NPCs you have created? Is that at least a start or did I miss something? :huh:

 

If DocClox is right when he said "if we extend the actor, we could potentially give him new idle". I don't know if that's correct or not; I certainly don't know how to do it myself. There doesn't appear to be any way in the CK to create new idles, or we'd already be doing it, right?

Link to comment

So you can add new animations to new NPCs you have created? Is that at least a start or did I miss something? :huh:

 

Dunno yet, but it might be an avenue of attack. I'm back home now at least, and with a bit of luck I may a little time to investigate a few ideas I've been kicking around. Probably nothing will come of any of them, but I want to do some digging.

 

After that ... well, a nasty hack that gets animations running is probably better than no animations at all. Especially if we do it in a reasonably responsible manner.

 

 

 

Link to comment

 

Dunno yet' date=' but it might be an avenue of attack. I'm back home now at least, and with a bit of luck I may a little time to investigate a few ideas I've been kicking around. Probably nothing will come of any of them, but I want to do some digging.

 

After that ... well, a nasty hack that gets animations running is probably better than no animations at all. Especially if we do it in a reasonably responsible manner.

[/quote']

 

Alrighty! well good luck and gods speed! :D Heres to hoping something DOES come out of it, I believe in you! :P

 

 

Link to comment

Well, first of all, the source of Actor is available to us. So can absolutely modify actor and have the effects propagate to all classes. And as long as all we're doing is adding properties we're probably safe. Well, unless there are serialised actors in the game data that assume a certain record length, in which case it'll be CTD and revert. I've not tried it yet.

 

But for languages of this type, the usual approach is to have some reflection mechanism that lets you interrogate the object and iterate over its members. If that's the case it ought to work.

 

The bad news is that Idle is just one line. It's a class declaration, and sets the type to hidden. So I'm speculating that the class details are kept internal to the CK, and that the "hidden" keyword is to stop us trying to prying into it's internal structure using reflection, or just by trying to access likely member names and seeing which break and which don't.

 

I'm also wondering if they based Papyrus on a readily available language, and if so whether a python decompiler (say) might get any information out of the compiled files.

 

And if we know what to look for in a compiled Papyrus file we may be able to pick the idle definition out of the exe image. (I doubt it though - if they used Lua as a model, they may have built it up in memory command by command through the C api. It all depends on how much time they wanted to spend locking us out).

 

Anyway, investigations continue. Just thought you'd like to know what I was thinking

Link to comment

I think modifying Actor directly (where is that source by the way? I don't remember seeing it.) would be a bad idea for the same reason that modifying the NPCs in the CK is a bad idea -- the modifications are going to be subject to all those horrible load order and 'patch' issues if any other mods modify it.

 

Reflection is a good way to get information if it's supported, but it's not really a doorway to modification of the base class.

 

On a related interesting note though, the papyrus interpreter itself is contained within a DLL that seems to be easily replaced (or modified or extended) and there is a command line script compiler included as well.

 

Check out the 'Papyrus Compiler' in your skyrim directory (not data directory) if you haven't already. I'm getting way ahead of myself, but it appears that it may be possible to replace the entire scripting language with something better -- though all the scripts would need rewritten/ported as well.

 

The compiler exe is so small that it's likely to assume it just processes command line arguments and then calls the dll to do the heavy lifting.

Link to comment

Guys, I FOUND A SOLUTION.

It's not perfect, but the best we have right now.

 

It's base on Custom Races and still replaces existing animations for that race. But since we can change an actor's race with SetRace just for a short while, replacing existing animations here will not cause undesired side-effects.

  1. Copy meshes\actors\character\defaultfemale.hkx to MyDefaultFemale.hkx
  2. In MyDefaultFemale.hkx replace "DefaultFemale.hkx" by "MyDefltFemale.hkx"
    -- length of both filenames have to be IDENTICAL !!!
  3. Copy meshes\actors\character\characters female\DefaultFemale.hkx to MyDefltFemale.hkx
  4. In MyDefltFemale.hkx replace an existing Idle Animation with your new one -- length of both filenames have to be IDENTICAL !!!
  5. In CK: Create a new race in CK (Copy of an existing one; set Morph Race and Armor Race)
  6. In CK: In your new race's "BodyData" -> "Behavior Graph" enter link of your new MyDefaultFemale.hkx (NOT the MyDefltFemale.hkx !!!)

I have tested this by adding a new NPC with my new custom race into the game, and changing "mt_idle.hkx" into "MY_Idle.hkx" in the new MyDefltFemale.hkx. Then I renamed the Lydia animation into "MY_Idle.hkx" and put it into meshes\actors\character\animations\female

 

Hey, what do you think this new girl just couldn't stop doing? :D

Link to comment

Fore that seems pretty fucking brilliant. That was some nice switching going on there. I think I remember reading the Doc proposing something similar but it seems you both had the right idea. At least for now until there's a less hack job way of getting new animations in the game.

 

I'm starting to believe this is the only way we're going to get it done though....

Link to comment

I think modifying Actor directly (where is that source by the way? I don't remember seeing it.) would be a bad idea for the same reason that modifying the NPCs in the CK is a bad idea -- the modifications are going to be subject to all those horrible load order and 'patch' issues if any other mods modify it.

 

Nah... I mean you'd get issues with different mods to Actor.psc overwriting one another, and the other base classes ... and that's going to happen anyway, let's face it. But adding properties is safe enough if we use a responsible naming system. And the actual methods appear to be locked away in a binary somewhere, so there's not much danger. Of course, given fore's announcement it's all kind of academic.

 

All the same:

 

\Steam\SteamApps\common\skyrim\Data\Scripts\Source\Actor.psc

 

is where you find the file. Not that it matters in the face of fore's announcement, obviously.

 

Link to comment

Can someone come up with a way to hotswap texture files? For a before (dry) and after (sweaty) effect?

Truth be told, I have less naughty ambitions for that particular function...

I think it would be cool to have your character get progressively dirtier, then revert to a clean texture after taking a swim. But I thought I'd throw the idea in this pot because I know what really gets you guys motivated. :D

Link to comment

I think it's still an interesting track. The solution is temporary more or less, to my mind anyway, until the oddball issues with the format are worked out re: length of names and stuff like that. I'd much rather have something dynamic and extensible that doesn't require creating 100 races, or however many are needed to cover all the different animations. SexoutNG has about 500 animation files (.kfs) in total, though not all are used; the total use count is closer to 200.

 

I don't know how many idle 'slots' are available to be manipulated this way per-race, but if it's not a pretty high number, I don't think this is a workable solution long term. I'm also a little concerned about the effect this will have when used in conjunction with other race mods. I would hate to see character traits getting lost if someone playing with a custom race is switched to a 'sex race' for sex and then back again.

 

Might be better, if this is as good as we can get, to clone the involved actors, hide the originals, and swap the clone races. Afterwards delete the clones and unhide the originals. This approach has problems too of course.

 

I'm hoping for SKSE providing a way to call animations by filename on an actor, or a skyrim CK version of the GECK powerup to be released that allows proper editing of the idles. I don't think any other method is really workable long term.. well except for beth fixing the CK themselves to allow it, but we may as well wish for it to start raining hundred dollar bills. ;)

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   0 members

    • No registered users viewing this page.
×
×
  • 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