Independent penis length and width. (1 Viewer)

blackmare

Potential Patron
Joined
Sep 3, 2015
Is there anyway to make the penis size sliders independent of each other so increasing the length doesn't also increase the width by default?
 

stuntcock

Content Creator
Joined
Jun 5, 2012
blackmare said:
Is there anyway to make the penis size sliders independent of each other so increasing the length doesn't also increase the width by default?
Why not just adjust the length slider to the desired value, and then adjust the width slider back to the desired value?



Since the task is trivial (we simply need to copy-paste a function from SDT.swf and then comment out one line of code), here you go:
Code:
package flash {
	import flash.display.MovieClip;
	public dynamic class Main extends MovieClip {
		public var lProxy;
		public var him;
		public var her;
		private var EventBus;
		
		public function initl(l) : void {
			EventBus = l.getVanillaClass("obj.EventBus");
			
			var setPenisLength = (lProxy as Class).createProxy(him, "setPenisLength");
			setPenisLength.addPre(setPenisLength_Pre, true);
			setPenisLength.hooked = false;
			l.updateStatusCol("Penis length and width sliders have been decoupled.", "#00ff00");
		}
		
		private function setPenisLength_Pre(newLength:Number) : void {
			 var widthCoefficient:Number = him.currentPenisWidthScale / him.currentPenisLengthScale;
			 him.currentPenisLengthScale = him.MIN_PENIS_SIZE + (him.MAX_PENIS_SIZE - him.MIN_PENIS_SIZE) * newLength;
			 //him.currentPenisWidthScale = Math.max(him.MIN_PENIS_SIZE,Math.min(him.MAX_PENIS_SIZE, widthCoefficient * him.currentPenisLengthScale));
			 him.penis.scaleX = him.currentPenisLengthScale;
			 him.penis.scaleY = him.currentPenisWidthScale;
			 her.hisPenisSizeChanged(him.currentPenisLengthScale * him.currentPenis.length);
			 EventBus.dispatch("penisTipPosChanged");
		}
	}
}

There's something wrong with the preceding code - it doesn't run properly after being passed through the Lightweight Compiler. I just compiled it as a heavyweight Flash mod since I doubt that the mod will actually be used (because the length-width coupling has existed since early SDT and everyone already knows about the workaround). Therefore IDGAF about efficiency.

Edit: the aforementioned problem has been fixed. Credit to MG.



SDT-anisotropicPenisAdjustment.mod

√ tested with penisrangeV4
X not tested with anything else
 

Faceless

Content Creator
Joined
Jun 12, 2011
I think it's just the compiler doesn't play nice with the proxy system, because I ran into a similar issue when trying to tie some stuff to an RGB slider.
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
hmm, during one of my past mods i actually had to re-incorporate the combined scaling xD
 

stuntcock

Content Creator
Joined
Jun 5, 2012
Faceless said:
I think it's just the compiler doesn't play nice with the proxy system, because I ran into a similar issue when trying to tie some stuff to an RGB slider.
MG provided a corrected code snippet which compiles and runs properly. Upon review, I believe that the problem was a missing visibility modifier:
Code:
// This is broken ...
function initl(l) : void {


// This works ...
public function initl(l) : void {

The ultimate cause of the error is laziness. When writing AS3 code in Flash as "companion" logic for template-based mods (such as costumes and hairstyles), we can be very sloppy about specifying visibility modifiers, return types, etc... This stuff can usually be forgotten (or deliberately excluded) without any adverse effect on the mod's behaviour. After a while, you pick up bad habits :-[

I've updated the code block in the previous post, and replaced the MOD file with a "lightweight" compiled version. I don't like the public-variable approach suggested by MG (because it feels like action at a distance) but I've left it in because it's effective and very concise.
 

Faceless

Content Creator
Joined
Jun 12, 2011
stuntcock said:
The ultimate cause of the error is laziness. When writing AS3 code in Flash as "companion" logic for template-based mods (such as costumes and hairstyles), we can be very sloppy about specifying visibility modifiers, return types, etc... This stuff can usually be forgotten (or deliberately excluded) without any adverse effect on the mod's behaviour. After a while, you pick up bad habits :-[

I've updated the code block in the previous post, and replaced the MOD file with a "lightweight" compiled version. I don't like the public-variable approach suggested by MG (because it feels like action at a distance) but I've left it in because it's effective and very concise.
Hm, interesting. This isn't really helped by the fact that the Flash IDE automatically wraps things into classes for you, so you can get away with not using classes at all, and thus trying to apply visibility simply doesn't work.
 

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.