Different auto modes (2 Viewers)

ModGuy

Content Creator
Joined
Feb 17, 2011
The way Kona implemented auto presets is as follows:

Each preset (Normal, Hard, Soft, Auto) has its own array of functions that each contain a number of conditions that define their behaviour.
Each function normally performs checks for alignment purposes then transitions the motion based on some mathematical function like a sin wave using the current penis position as the input.
After this we get some specific calls depending on the current function like providing a chance to let go or whatever, then the modified coordinates are returned to the main loop.

By defining your own set of function arrays you could probably just swap out the existing presets.
If you want even more functionality then it would make a nice request to directly add new presets to the built in menu, allowing the user to build auto modes from function blocks.
Better yet instead of using an equal randomness to select between blocks allow the user to assign custom weighting to each to adjust the possibility of each occuring.
I think dialogue writers being able control auto modes would diversify their work, although I don't consider anyone outside of a select three who would actually grind through the work involved.

Anyway enough of my rambling, you're going to get the usual response from me:

1. Ask sby.
1.1 If sby refuses, I'll create a basic implementation and forward to sby. Goto 1.
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
MG said:
1. Ask sby.
1.1 If sby refuses, I'll create a basic implementation and forward to sby. Goto 1.
knew that was coming from so far away.


hmm, might be interesting, not sure at the exact moment.
i will look into a bit of the auto code later and see if it fancies me
 

ModGuy

Content Creator
Joined
Feb 17, 2011
Code:
package flash
{
	public dynamic class Main extends flash.display.MovieClip
	{
		public var lProxy;
		var g;
		var auto;
		var autoActions:Array;
		var ejacActions:Array;

		public function initl(l) : void
		{
			g = l.g;
			auto = g.automaticControl;
			l.getVanillaClass("obj.AutomaticControl").autoModeNameList.push("Loader");

			proxyWrapper(g.automaticControl, "startAuto",startAuto);
			proxyWrapper(g.automaticControl, "randomEjaculatingMode",randomEjaculatingMode);
			autoActions = [exampleMode, auto.shallowFast, auto.fullSlow];
			ejacActions = [auto.holdDown, auto.shallowFast, auto.fullSlow];
			l.unloadMod();
		}
		function proxyWrapper(o, s, f):void{
			var lp = lProxy.createProxy(o, s);
			lp.addPre(f, true);
			lp.hooked = false;
		}
		function startAuto(p) : void {
			if(g.autoMode < 4){
				g.automaticControl.startAuto_l(p);
				return;
			}
			//Loader auto.
			auto.ejaculatingModes = ejacActions;
			auto.randomMode = loaderAuto;
			auto.runRandomMode();
		}
		//Ejac action selection algo.
		function randomEjaculatingMode() : void {
			if(g.autoMode < 4){
				g.automaticControl.randomEjaculatingMode_l();
				return;
			}
			auto.lastMode = auto.currentMode;
			auto.currentMode = auto.ejaculatingModes[getRandom(0,auto.ejaculatingModes.length)];
			auto.lastEjacMode = auto.currentMode;
			auto.nextModeTimer = 600;
			auto.modeRatio = 0;
			auto.transitioning = true;
			auto.transitionSpeed = 5/100;
		}

		function getRandom(min:int, max:int):int{
			return Math.floor(Math.random() * (max-min) + min);
		}

		//Next action selection algo.
		function loaderAuto() : void {
			auto.lastMode = auto.currentMode;
			if(g.her.isActingOff())
				auto.currentMode = auto.offHold;
			else
				auto.currentMode = autoActions[getRandom(0,auto.ejaculatingModes.length)];
			auto.modeRatio = 0;
			auto.transitioning = true;
			auto.transitionSpeed = 1/100;

			auto.nextModeTimer = getRandom(2, 6)*30;
		}


		function exampleMode() {
			if(g.penisOut)
			{
				auto.avoidPenisOut();
				return auto.currentPos;
			}
			auto.currentPos.x = auto.sinWave(30/100,auto.fullLength + 2/10,auto.currentPenisTipPos);
			auto.currentPos.y = Math.min(2/10,Math.max(-2/10,auto.offTilt));
			return auto.currentPos;
		}
	}
}

That should be enough to get started.

EDIT:

How did I not document this argh:
Code:
l.getVanillaClass(className:string)
 

wands

Potential Patron
Joined
Jan 16, 2014
Ok I would love to help on this one but I have only will not so much skill. For Loader ATP v10 most of all, To be able to program auto mode from tip to depth! Now Doomknight posted his data mining in Modders Resource and this section "[AUTOMATIC CONTROL, Part 2]" looks like the source to every command?!? Just without the structure, So much like tweaking any position file in settings folder (AKA .txt) to get the position right where you want, is the same possible for the auto mode step by step command now that you fixed it in 5.36 MG?

And to continue right through a ejack without interruption?
 

ModGuy

Content Creator
Joined
Feb 17, 2011
That code above allows for complete control over auto mode in that you can completely replace the behaviour of auto mode, add your own modes and behaviours.
So...
wands said:
And to continue right through a ejack without interruption?

Is simple to do. It would be a case of pushing active movement on to the ejacActions array.
 

wands

Potential Patron
Joined
Jan 16, 2014
Simple to do he says...If I were one of you guys sure but to break it down to something as simple as altering decimal based coordinates on a text file like positions, this idea is not based on that kind of simple. So your going to tell me to go learn flash again aren't you...Dam!
 

ModGuy

Content Creator
Joined
Feb 17, 2011
wands said:
Simple to do he says...If I were one of you guys sure but to break it down to something as simple as altering decimal based coordinates on a text file like positions, this idea is not based on that kind of simple. So you going to tell me to go learn flash again aren't you...Dam!

MG said:
I don't consider anyone outside of a select three who would actually grind through the work involved.

Anyway enough of my rambling, you're going to get the usual response from me:

1. Ask sby.
1.1 If sby refuses, I'll create a basic implementation and forward to sby. Goto 1.

I'm not saying harass sby, but harass sby.
 

JosephBado

Potential Patron
Joined
Sep 2, 2013
Wands, first off I just wanna say, I fully support this idea, and second, it was a joke. We know that you didn't say that but from what I've witnessed in my first couple of days in this community people really like to have fun and mess around with each other, even the staff members seem to do it once and awhile. xD
 

wands

Potential Patron
Joined
Jan 16, 2014
LOL it is so much fun just reading (JosephBado) While here don't sweat it! LOL I have seen this close knit group once before, and even upset them enough to take down a multi-post I made in error! LOL

Just to say it...set me on the path and you found another grinder, I can no more readily put down a good book than leave a question unanswered. Plus I want to make fullytanks elf bend to will! LOL
 
D

Doomknight

@Wands; What sby is probably saying in his quote is that you made absolutely no sense whatsoever in that post. I read and reread:

"Ok I would love to help on this one but I have only will not so much skill. For Loader ATP v10 most of all, To be able to program auto mode from tip to depth! Now Doomknight posted his data mining in Modders Resource and this section "[AUTOMATIC CONTROL, Part 2]" looks like the source to every command?!? Just without the structure, So much like tweaking any position file in settings folder (AKA .txt) to get the position right where you want, is the same possible for the auto mode step by step command now that you fixed it in 5.36 MG?

And to continue right through a ejack without interruption?"

And it still doesn't make sense. Perhaps consider rewording it. For example:
-> What is "Loader ATP v10"? (Unless that is a thing that is used around here and never noticed it before that is)
-> What do you mean by "program the Loader from Tip to Depth"?
-> The Datamining was the source from a pre-decompiled SDT.swf (or was it Kona's latest? I can't remember) that I did. Surprised Anon never deleted it.
-> No idea what this means: "So much like tweaking any position file in settings folder (AKA .txt) to get the position right where you want, is the same possible for the auto mode step by step command now that you fixed it in 5.36 MG?"?
-> What do you mean by continue to "ejaculate without interruption"?
 

wands

Potential Patron
Joined
Jan 16, 2014
Ok, fair enough, pull the book out of my mouth and speak English.

*Loader animated tool positions v10,
*in animated tool positions during auto mode it uses a randomizer that causes a few pumps to be out-shallow shallow-mid depth and mid depth-full depth in no repeatable order just random chaos.
*In the data mining "[AUTOMATIC CONTROL, Part 2]" I have seen numerically assigned, by individual class, values that describe each individual motion.
*In animated tool positions in the settings folder you can tweak the individual positions .txt files you can change what you will to suit you liking...change the histweenendx if you want him to pump deeper for example. The start and end positions to every movement possible, the earlier versions of the loader could not use auto mode because she would start to curl and turn into a pinwheel Mod Guy fixed that in 5.36.
*During an ejaculation sometimes the auto mode will just stop dead, all the way in or out and not restart full motion until the end if at all. I just mean that to continue riding her right through the orgasm some spurts fly onto her butt some end up inside but keep pumping!

So I was just hoping that a .txt file could be built that could define the actions of auto mode from a light loving bang in bed to a hard ride through the forest! You can use a custom dialogue to change positions and actions and features, but alas auto mode is just chaos.
 

ModGuy

Content Creator
Joined
Feb 17, 2011
As of right now, compiled bytecode is required to define the logic of auto mode states.
This is because it's more complex than start/end points and actually factors in game state as well as throwing in some randomness.
Of course it would be possible to define motion presets in a text file but advanced stuff would need to be coded in.
 

wands

Potential Patron
Joined
Jan 16, 2014
I can and have coded so that is in my realm, by advanced I "think" you mean direct function and point to point variables. I am not asking anyone to do it for me, or hold my hand, just, if of course it is possible then tell me where to start and set me loose in the desert to live or die on my own! LMAO

Can I change my name from Wands to 4th Grinder? LOL

Special thanks to...
MG and SBY for everything basically, and to BuckWild for ever suggesting this...
"var lp = lProxy.createProxy(g.automaticControl, "adjustAim");
lp.hooked = false;"
So did Sby or MG fix it? But thanks to both!
To Anon for NOT deleting one post and to Doomknight for posting it in the first place.

And just for shits and giggles could a new option be added the pre existing modes in the UI to include yours? and then the .txt file take over in auto mode?
 
D

Doomknight

@Wands; To change your forum name:

Click "Profile" at top of screen
Click "Account Settings" in dropdown menu
Change name in Forum Name field
 

wands

Potential Patron
Joined
Jan 16, 2014
Of all of this? that's how you comment? LMAO smart ass! I really like this person!

But as I remember it Doom, even Sby did not get me right off...MG did...So as a whole how can we move forward together? We communicate, I needed to be reminded that not everyone knows code speak, tell that to MG now and then as well...(dose not suffer newbs well) but Try and see what happens, or just stand there and do nothing...I might drive them nut's but at least they are driven!!!
 

ModGuy

Content Creator
Joined
Feb 17, 2011
The code I provided pushes a new entry on to the vanilla array for loader auto modes.
As such it is possible to have the custom mode appear in the game UI.
I believe it also handles toggling between vanilla/loader auto handling by forwarding the event when using a vanilla preset and manually handling it when not.
I have provided an example function in there near the end but didn't really explain any of it.
If I get some free time later this week I'll sort this out properly.

As for you sby, let me know if you're going to pick this up.
If not I'll finish it and then the usual.
 

wands

Potential Patron
Joined
Jan 16, 2014
I would give my left...arm...to earn the right to be a part of that conversation! So then, and if, SBY tell me I can help? Lots of time and motivation on my end! LOL

If just a beta tester, anything I can do to help!
 

ModGuy

Content Creator
Joined
Feb 17, 2011
So the ability to add preset modes and swap action sets is now possible.
It would be nice to have alternative selection algos but that's trivial to implement so leave that till later.
The question now becomes:

How the hell do users configure this shit.

It's straightforward for a modder to define a series of actions but a user has no control of this.
Would it be acceptable to simply have a mod add a bunch of presets, or are people looking for animtools level of configuration?
Here's what's available so far, it's mostly placeholder and by no means the full range of control:

Code:
package flash
{
	import flash.utils.Dictionary;
	public dynamic class Main extends flash.display.MovieClip
	{
		public var lProxy;
		var loader;
		var g;
		var auto;
		var autoStatic;
		var autoActions:Dictionary = new Dictionary();
		var ejacActions:Dictionary = new Dictionary();
		


		public function initl(l) : void
		{
			loader = l;
			g = l.g;
			auto = g.automaticControl;
			autoStatic = loader.getVanillaClass("obj.AutomaticControl");
			proxyWrapper(g.automaticControl, "startAuto",startAuto);
			proxyWrapper(g.automaticControl, "randomEjaculatingMode",randomEjaculatingMode);
			
			addPreset("Loader",[exampleMode], [exampleMode]);
			l.unloadMod();
		}

		//Add a preset in the form of active actions and ejac actions.
		public function addPreset(name:String, actions:Array, ejac:Array):void {
			autoStatic.autoModeNameList.push(name);
			autoActions[name] = actions;
			ejacActions[name] = ejac;
		}
		function proxyWrapper(o, s, f):void {
			
			var lp = lProxy.createProxy(o, s);
			lp.addPre(f, true);
			lp.hooked = false;
		}

		//Check if vanilla auto, otherwise assign our loader mode.
		function startAuto(p) : void {
			if(g.autoMode < 4){
				g.automaticControl.startAuto_l(p);
				return;
			}
			//Loader auto.
			auto.ejaculatingModes = ejacActions[autoStatic.autoModeNameList[g.autoMode]];
			auto.randomMode = loaderAuto;
			auto.runRandomMode();
		}
		
		//Ejac action selection algo.
		function randomEjaculatingMode() : void {
			if(g.autoMode < 4){
				g.automaticControl.randomEjaculatingMode_l();
				return;
			}
			auto.lastMode = auto.currentMode;
			auto.currentMode = auto.ejaculatingModes[getRandom(0,auto.ejaculatingModes.length)];
			auto.lastEjacMode = auto.currentMode;
			auto.nextModeTimer = 600;
			auto.modeRatio = 0;
			auto.transitioning = true;
			auto.transitionSpeed = 5/100;
		}

		//Begin timer to select new action, min & max in seconds.
		function getRandom(min:int, max:int):int{
			return Math.floor(Math.random() * (max-min) + min);
		}

		//Next action selection algo.
		function loaderAuto() : void {
			auto.lastMode = auto.currentMode;
			if(g.her.isActingOff())
				auto.currentMode = auto.offHold;
			else
				auto.currentMode = autoActions[autoStatic.autoModeNameList[g.autoMode]][getRandom(0,auto.ejaculatingModes.length)];

			auto.modeRatio = 0;
			auto.transitioning = true;
			auto.transitionSpeed = 1/100;

			auto.nextModeTimer = getRandom(2, 6)*30;
		}

		//An example routine for auto mode.
		function exampleMode() {
			if(g.penisOut)
			{
				auto.avoidPenisOut();
				return auto.currentPos;
			}
			auto.currentPos.x = auto.sinWave(20/100,auto.fullLength + 1/10,auto.currentPenisTipPos+2/10);
			auto.currentPos.y = Math.min(2/10,Math.max(-2/10,auto.offTilt));

			drawAutoMouse();

			return auto.currentPos;
		}

		//Draw the mouse position to the screen.
		function drawAutoMouse(){
			var gfx = loader.loadedSWF.uiLayer.graphics;	//Please never do this. Really. It's terrible.
			gfx.clear();
			gfx.beginFill(0x00FF00);
			gfx.drawCircle(auto.currentPos.x*500+100, (auto.currentPos.y+1)*200+100, 4);
			gfx.endFill();
		}
	}
}
 

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.