1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Faster Hand Job?

Discussion in 'Filled Requests' started by futahiro, May 6, 2015.

  1. futahiro

    futahiro Potential Patron

    Joined:
    May 6, 2015
    Messages:
    4
    Likes Received:
    0
    I hate to create multiple threads so quickly but my other request is to maybe have a speed controller for how fast the girl character gives a hand job.

    Thanks in advance.
     
  2. stuntcock

    stuntcock Club Regular Staff Member Moderator

    Joined:
    Jun 5, 2012
    Messages:
    1,522
    Likes Received:
    355
    This one is doable. I'd break it up into three components:
    • movement patterns
      • when the game is running in Auto mode, it has a set of "movement patterns" which the girl can follow. Each set (and the associated code) can be found in the AutomaticControl class.
      • these sets are associated with intensity. The "Soft" mode involves mostly shallow movements; "Hard" involves deeper ones.
      • whenever the game begins a new movement pattern, it simply generates a random Duration interval (called nextModeTimer). These are roughly calibrated based on the intensity - Hard mode uses shorter intervals than Soft mode - but there's a lot of random variance.
        • There's a subtopic here involving scripted actions wherein the girl moves to a specific depth and then does something (e.g. lick the glans; waggle her eyebrows). But this stuff applies to fellatio rather than handjobs, and the timing is all hardcoded. So we can probably just ignore it.
      • when the Duration interval expires, the game will randomly select a new "movement decision" from the set, and run it. It will also generate a new (random) Duration interval.
      • the game can potentially employ the same "movement pattern" twice in succession, but there's guard code which should force it to automatically re-select whenever this occurs.
    • oscillation speed
      • once the girl has decided to move her hand(s) to a new position, the game theoretically uses its inverse kinematics system (IKController class) to manage the details of limb movement.
      • in practice, the actual "smoothing" logic of IKController is circumvented. The game simply snaps the hand into an appropriate starting position, and then uses simple trigonometry (AutomaticControl.sinWave) to smoothly oscillate the hand(s) back and forth within the designated range (e.g. glans to mid-shaft, or tip to hilt).
      • the oscillation rate ("number of strokes per minute") is determined by the game's clock. Hence, the girl's hands will exhibit more rapid linear motion if the penis is longer.
      • completely replacing the sinWave function is possible, and it would allow us to achieve faster (or slower) oscillation, but it would carry unintentional side-effects. For instance: it would apply the "speed change" to fellatio (and vaginal/anal sex) rather than making the change exclusive to handjob mode.
        • Fortunately, ModGuy is a benevolent god. We can use fancy logic to ensure that that the new code will apply only to handjobs.
    • user interface
      • most Loader mods don't touch the GUI, because the code is a pain-in-the-ass and GUI modifications raise compatibility risks ("what happens if the handjob speed slider gets drawn in a particular x,y position which is also used by the SlaveBazaar dialog buttons?")
      • hence, you'll probably need to accept keyboard shortcuts (e.g. Ctrl+Semicolon for slower, Ctrl+Apostrophe for faster).

    Suggested Approach:
    • proxy the standardAuto, hardAuto, softAuto, and handsOffAuto methods of [g.automaticControl]. Add a Post method which will adjust (or just randomly "reroll") nextModeTimer of [g.automaticControl] according to the mod parameters.
    • proxy the sinWave function of [g.automaticControl]. Leave it hooked, but add a Pre function which uses new trig code based on the mod parameters.
      • the Pre function should check g.leftHandJobMode and g.rightHandJobMode. If both handjob modes are inactive, then the function should return nothing (which will cause Loader.lProxy to invoke the original sinWave function).
    • setup keyboard shortcuts. You'd initially have 4 (inc/dec duration intervals; inc/dec oscillation rate) but after some experimentation you could try to setup a linear relationship among the adjustable parameters and simplify the controls to 2 shortcuts (inc/dec handjob speed).



    General feedback may be appropriate at this stage. If you haven't understood the previous technical bullshit then don't worry.

    Have you already experimented with the various auto modes (normal, soft, hard, self)? Do you recognize that there are different patterns of handjob strokes used by the game? Do you understand that the switching between these patterns is separate from the actual rate at which the girl's hands move within a particular stroking pattern?

    Do you want to see her hands oscillating more quickly/slowly within each movement pattern? Do you want to see shorter/longer intervals before she switches to a different stroke pattern? Or do you find that some of the movement patterns are boring, and you'd prefer to see the game focus on shorter (or longer) ones?

    Would you want to see "handjob speed" placed entirely under the player's control? Or would you prefer to see some influence from the "Auto Mode" setting in the GUI (note: this is currently included) and/or the girl's mood (note: this is currently ignored)?

    Do you care about whether the faster/slower stroke speed has a commensurate effect on the Pleasuree statistic (e.g. faster/slower orgasm)? Or can we just ignore it?

    Do you want the ability to define custom stroke patterns? It's possible, but you'd need to make a pretty convincing "pitch" in order to justify the additional workload.

    If you want to see much slower action, then we could look at more advanced techniques. For instance: break up the handjob movement with scripted behaviours (e.g. pause the stroking motion for a few seconds, make eye contact, lick lips, then resume stroking). Caution: this would be a much more ambitious modding project than the "Suggested Approach" that I've outlined above.
     
  3. futahiro

    futahiro Potential Patron

    Joined:
    May 6, 2015
    Messages:
    4
    Likes Received:
    0
    If possible just to control or increase the handjob speed. Nothing to extremely technical.
    If possible to just have a key combination or maybe even just using the scroll wheel to increase the speed to above average.
    That's all that i'm really asking for nothing fancy.
     
  4. stuntcock

    stuntcock Club Regular Staff Member Moderator

    Joined:
    Jun 5, 2012
    Messages:
    1,522
    Likes Received:
    355
    It may seem like a very simple change from the User perspective, but that doesn't mean that it will be easy to implement in code.

    When thinking about (or working on) a request, a modder will often try to incorporate other requests and proposals. For example: while reviewing the code to assess the feasibility of handjob acceleration, I saw some potential for extending Auto Mode to support simultaneous fellatio and handjob actions.

    Let's assume that I don't end up including that feature (because it's out-of-scope, or it's too difficult, or whatever). Even so, the technical discussion may be useful for someone six months hence who decides to tackle the problem.

    Keystrokes are fine, as previously discussed. The scrollwheel is not an option - it's already used for zoom control.

    This is why I asked about your familiarity with Auto modes - the game already includes several different handjob speeds, and it's possible that you just haven't played around with SDT enough to realize it.

    It's also possible that you're observing a below-average handjob speed because you're running the game at high resolution and high quality. If your processor core is overburdened then the game will slow down (not just graphics refresh rate -- the actual simulation is impaired) and so you'd see a handjob movement rate which might seem unreasonably slow. If this is the case, then the acceleration mod won't be very useful to you - the animation will appear choppy and unconvincing.

    This is fine. The request is valid and I'm willing to work on it. Still, it would be polite to answer some of the questions I've asked instead of brushing them off.

    I have a simple prototype which can vary the oscillation speed of Hard Mode handjob strokes, to anywhere between 20% and 500% of normal. If you want to try it out, here's a stable version which is hardcoded for 250%. This speed is more "silly" than "sexy" (the actual mod will allow you to fine-tune the speed, as requested). Let me know if you notice any major bugs.
     
  5. futahiro

    futahiro Potential Patron

    Joined:
    May 6, 2015
    Messages:
    4
    Likes Received:
    0
    This will actually work just for what i need, Thank you for taking the time to do this so i'll take the time to properly respond to you.

    The other modes: Yes i have tired the other auto modes but they weren't as fast as for what i was looking for, The game wasn't the issue it was just the the Animtool position i was using for some reason wasn't at the speed that made it look normal.

    If all of these could be applied into a settings txt file that would be amazing, But if you feel like it's not worth you effort for making the mod personally then all i ask for is to basically have the ability of being able to increase the pleasure amount during the hand job, Set the speed for hand job and then if possible to also set or change how long it stays in one type of motion. (You know how it sometimes slows down sometimes is what i'm referring too)

    This should help explain a bit better what i'm looking for. Thanks for doing this.
     
  6. stuntcock

    stuntcock Club Regular Staff Member Moderator

    Joined:
    Jun 5, 2012
    Messages:
    1,522
    Likes Received:
    355
    This is important information - it helps everyone to understand the problem(s) that the mod is supposed to solve! It would have been even better if you had posted the actual Animtools position file, so that the mod-maker could test its behaviour.


    I agree - it would be nice. I asked you a bunch of questions at the start because I wanted to understand your requirements. But you ignored most of those questions and insisted:
    Therefore, I'm going to refuse out of spite. Next time*, please put more effort into communication and cooperation.


    Accelerating the stroke speed will automatically produce faster pleasure gain and earlier orgasm. Decelerating the stroke speed will have the opposite effect. At very low speeds we'll observe that the increase is smaller than the automatic "decay" - hence, the action can be sustained indefinitely and orgasm will never occur.

    I have not included an independent pleasure-adjustment mechanic in the mod; I had assumed that the intent was to keep pleasure linked to the stroke speed (because stroke speed is visible to the player and also controllable).


    Yes, I know what you're referring to. Unfortunately, it falls under the spite category of "things that I'm not willing to fix at the moment." :P

    *If you want to see further work on this mod, then I'll ask you to perform a simple act of penance: contribute something to the SDT modding community. For example: vector-trace a requested hairstyle, write a dialog, create a Loader mod.



    There's a lot of room for extension on this mod. Acceleration (or optional removal) of the scripted/hardcoded actions is the most obvious, because these actions tend to "break the flow" of gameplay.

    There's also potential for integration of Auto Mode with character traits - we could link the speed-adjustment to resistance (so that a sexually-adventurous girl would act with more vigour than a timid one) or to attitude (perhaps the Angry girl just wants the guy to orgasm quickly so that she can go home).

    Alternatively, we could setup a positive- or negative-feedback loop. The girl could start slow and then speed up as the guy approaches orgasm (in the case of a guy-in-control scenario, this could demonstrate that the character is horny, impatient, violent, etc). For girl-in-control fellatio or handjob scenario, she could start at normal speed but deliberately slow down when orgasm is imminent (as a "teasing" or "edging" behaviour - ideally this would include Dialog hooks).

    As previously mentioned, it's possible to setup simultaneous Auto Mode actions for handjob and fellatio. Unfortunately, it tends to look silly - even with the oversized penis used in SDT, there simply isn't enough "room" for simultaneous hand and mouth animation unless the movements are coordinated. It's necessary to set the hands to "Hard Mode" (so that they tend to stay near the hilt) and the mouth to "Soft Mode" with high resistance (so that it tends to stay near the tip). All of this must be done in code, because we don't have separate sets of UI controls. And even after doing all of that, the result is fairly silly - the girl is constantly "punching" herself. But those problems aren't inherent flaws with the idea; they're consequences of the rushed/kluged implementation. A proper solution could be implemented.


    The coding for all of the aforementioned stuff isn't especially difficult, but I have some concerns about scope and compatibility. Therefore I'm going to shelve this mod until I can get some feedback w/r/t the reliability of the V1 release, and until there's a clear consensus regarding which features would actually be useful for SDT users.



    Anyways, here's V1 of the mod. It can be loaded at startup (via Mods.txt) or at runtime (via the Swf Mod button). If the settings file is absent then the mod will complain but it will work normally - you just won't have access to any of the fancy options.

    Auto Mode Accelerator
     
    Last edited: Dec 22, 2015