Jump to content

2 Screenshots

About This File

Basic animation player with support for external sources to add more idles, idle length, randomization, tags, naming and stuffs

 

This is functionality was originally integrated in my PuppetMaster mod but I decided to break it out for ease of development and reuse. It is not a stand-alone mod and will do nothing on it's own, it simply provides some convenience functions to other addons.

 

WHAT IS THIS
An idle player with some extra features over the usual "playidle" command

 

* Custom events - "VoyeurIdleStart" and "VoyeurIdleEnd" allows detection of when an idle starts or ends making it possible to make sure idles can finish or aren't blocked by an already ongoing one
* Randomization - Keyword tagging allows playback from a select group of idles.
* Expansion - "registerIdle" allows external sources to expand the library of idles
* Labels - Give any idle a description making it easier to identify.
* Duration - Specify idle duration to make control and chaining of several easier, requirement for the start and end events to work since there is no way to detect the duration from the idle directly AFAIK. This requires you to play the idle first, time it and then pass the duration in the register command.

 

HOW TO ADD MORE IDLES
I've included a sample mod "VoyeurAnimationLoader" showing how this can be done. Core function with type and default value below.

 

function registerIdle(idle inIdle, int inDuration = 10, keyword inKeyword = none, string idleName = "unnamed", bool waitForFinish = true)

 

To access the script from another mod you need to add the Voyeur:VoyeurAnimationHandler quest referance cast it as Voyeur:VoyeurAnimationHandler. Sample below from the loader will create the handle and add the magnolia dance idle to Voyeur. There are other ways to do this but they're not covered in the source currently.

Voyeur:VoyeurAnimationHandler handle = voyeurHandle as Voyeur:VoyeurAnimationHandlerhandle.registerIdle(IdleMagnoliaSong05, 10, none, "Magnolia" )


OTHER FUNCTIONS
Checks if the idle is registered.
bool function findIdle(Idle inIdle)

 


Returns the id of the passed idle, -1 if not found.
int function findIdleNumber(Idle inIdle)

 

Returns an int array with all idles with the matching keyword (not tested)
int[] function getAllAnimationNumbersWithKeyWord(Keyword inKeyword)

 

Returns number of registered animations, useful if you want to use your own selector rather than the default built in
int function getNumberOfanimations()

 

Returns the name of the matching idle id
String function getAnimationName(int idleId)

 

Plays the specified idle on the actor
bool Function playRegisteredIdle(Actor inActor, int idleId)

 

Play a random idle from all registered (not untested)
bool Function playRandomIdle(Actor inActor)

 

Play a random idle tagged with matching keyword (not untested)
bool Function playRandomIdleWithKeyword(Actor inActor, Keyword inKeyword)

 

Shows the default animation selection menu
int Function showAnimationSelector(int inCurrentChoice = 0)

 

BUILT IN SUPPORT
Dave's Poses

 

HALP PLZ NO WORK!
Well I have no idea what I'm doing, I just make random edits and slam that compile key until the errors are gone. Plus this is more a resource than a mod and currently it isn't prioritized for any support whatsoever since I'm focusing on other projects.
Try it out, poke around in the source, add or remove functions, use it as a base for your own mod or make a superior version or whatever. Just link back to this page if you use anything from it. If you fix/optimize something or have reasonable suggestions feel free to leave a comment about what and how and I'll see if it can be integrated on the next (if any) update.

 

SHOULD DO LIST
* Try to change idle definition from an integrated struct to it's own class/object separating functions and making things easier to update/manage
* Add a Message object to the idle struct (or class) meaning a notice can be registered and displayed even in environments where debug.notification isn't availible
* Add a holotape interface to compliment the Message menu, combined with the addition of the message variable above the name could be displayed in top left corner when toggling through idles making it easier to keep track of what's selected
* Maybe add some way/mode to have the game start a timer on idles without a set duration and a way for the player to issue a "break" when they end. This would allow the user to set/modify duration without having to use stopwatch or similar ancient methods
* Add some way to delete idles and/or the option to move them to a "disabled" storage
* Make it possible to register more than 128 idles
* Add a custom event mods can send to inform Voyeur they've added new idles to the registration queue rather than the current oninit/onload variant.

 

CREDITS
DocClox for help and ideas


What's New in Version 0.2

Released

  • 0.1 Voyeur
  • * Initial Release
  • 0.2
  • * The loader now detects if Dave's poses (gun version) is installed and adds those idles to Voyeur
  • * Extended registration queue with one array increasing limit from 128 to 256
  • * Extended max registrated idles with three arrays increasing limit from 128 to 512
  • * Modified functions to handle multiple arrays
  • * Added function to postpone queue processing until external mod has sent the all done with setQueueFinished()
  • * Added bool to ignore waiting for idle duration


×
×
  • 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