SDT Loader question (2 Viewers)

sby

Content Creator
Coder
Joined
Sep 11, 2012
on scrollbox:

"private var s:MarkerSlider;"

so i can't do: myscrollbox.s.setScrollSpeed(1);


i know encapsulation is cool and all, but this game was made around exposing privates ;)
 

ModGuy

Content Creator
Joined
Feb 17, 2011
sby said:
on scrollbox:

"private var s:MarkerSlider;"

so i can't do: myscrollbox.s.setScrollSpeed(1);


i know encapsulation is cool and all, but this game was made around exposing privates ;)

From Dev UI guide:

ScrollBox

Constructor:

var _sb = new ScrollBox(_width:Number, _height:Number, _padTop:int, _padBottom:int);

Properties:

sa ScrollableArea Control, notes in next section.

....


ScrollableArea

Constructor:

Not useful on its own.

Properties:

PADDING_BEFORE Pixels before container contents.
PADDING_AFTER ^ but after contents.
controls Array of Controls within area.
scrollControl Associated Slider if any.

Hence:

Code:
myscrollbox.sa.scrollControl.setScrollSpeed(1);
 

Tweak

Potential Patron
Joined
Nov 30, 2013
Thanks again to anyone that contributed to the loader, guides, and basic set-up. Just being able to play with the extra settings was (and will continue to be) very entertaining.
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
i kinda doubt anyone would know. . .

why some clothing attached to the hands would disappear after switching off of handjob mode?
or where the physical appearance of the hands switches from normal to handjob mode in the code.


~example load dantes kitchen gloves, turn handjob mode on and off


%chance modguy knows the answer: 6%
%chance everyone else combined (besides konashion himself) knows the answer: 1%
 

ModGuy

Content Creator
Joined
Feb 17, 2011
sby said:
i kinda doubt anyone would know. . .

why some clothing attached to the hands would disappear after switching off of handjob mode?
or where the physical appearance of the hands switches from normal to handjob mode in the code.

You're getting thrown off by timelines again.
The hand positions exist on different frame labels, as such the costumes for them also consist of different frames.
How these frames are used, I don't know. I have never really concerned myself with vanilla modding.
When the hand position changes it attempts to update the frame label of the costume, if it does not exist then it will result in strange behaviour.
See CharacterControl.setArmwear -> tryToSetFrameLabel
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
are you planning on making any sort of replacement registering for the functions?
not exactly sure how you could do it, i was thinking a simple dictionary using the 'g' referenced path as the key, and the mod that is registering it as a value.

example:
var modname:String = "mymodname";
var functionlocation:String = "g.her.setDefaultBodyScale";
var reply:String = l.replacefunction( functionlocation, modname, replacementfunction );
if( replay != modname ) { l.updateStatus(modname+" cannot register "+functionlocation+" , was registered by "+reply);

the replacefunction would be returning the name of the mod that has the method replaced.



this would just be for convenience if others plan to use it. i will probably do something like:
if(g.her.setDefaultBodyScale != g.her.setDefaultBodyScale_l) { main.updateStatus("another mod is incompatible with "+mymodname); }



the benefit of the replacefunction is that people that use mods can tell what mods they are using are incompatible due to trying to replace the same function.
 

ModGuy

Content Creator
Joined
Feb 17, 2011
Fixed bug on proxy removal, expect in next release.

EDIT:

Fixed a bug on proxy return values.
Listeners can now return values or explicitly just listen by removing return type.
 

aztlan

Casual Client
Joined
Sep 14, 2013
Thanks too...

Could I make a request that you change the title of the thread to reflect the latest version number (or is thus not possible with pinned threads)? Or is there some other way we are supposed to keep track of weather. There us an updated version.
 

Faceless

Content Creator
Joined
Jun 12, 2011
Hey, ModGuy, I've noticed that her arms aren't transitioning to "loose" when she loses consciousness now. This is with v5.34, and no actual mods or imports loaded.
 

WeeWillie

Content Creator
Joined
Nov 8, 2013
aztlan said:
I think her arms going limp when she looses consciousness is controlled in the settings file now.

Yeah, it looks like if you set
passOutArmPos=0
her arms will go limp again. I wish this would have been default to keep behavior the same from past revisions.
 

ModGuy

Content Creator
Joined
Feb 17, 2011
aztlan said:
Thanks too...

Could I make a request that you change the title of the thread to reflect the latest version number (or is thus not possible with pinned threads)? Or is there some other way we are supposed to keep track of weather. There us an updated version.

Uhhhh... if you want.

Faceless said:
Hey, ModGuy, I've noticed that her arms aren't transitioning to "loose" when she loses consciousness now. This is with v5.34, and no actual mods or imports loaded.
aztlan said:
I think her arms going limp when she looses consciousness is controlled in the settings file now.
WeeWillie said:
Yeah, it looks like if you set
passOutArmPos=0
her arms will go limp again. I wish this would have been default to keep behavior the same from past revisions.

0 is now default, don't know why I left this as 1.
 

hugo_boss

Potential Patron
Joined
Jul 14, 2013
Hey ModGuy,
I really like how we can now use proxys to replace various methods. I do however have some suggestions about it, that could (in my personal opinion make things easier.
1.Suggestion:
Right now, both pre and post functions are called in order like:
pre1; pre2; original; post1;post2
I think, it would be more convenient in most cases, if the pre functions would be called in decending order. like this:
pre2; pre1, original; post1; post2
That way, a newly added pre-post pair would enclose the old "Method-Block", in the same way the first pair enclosed the original function.I think his could avoid conflicts, when a method is proxied by multiple mods.

2. Sugestion:
i think it would be good if there was a way to modify the input parameters, befor they are given to the original funktion, ore any other pre function. Iwas thinking about something like a second type of pre function, that returns an array,, wich will be forwarded as input parameters to the next function, similar to how the post functions work.

pre2(param1a, param1b); --> returns param2a and 2b
pre 1(param2a, param2b) --> returns param param3a and 3b
original (param3a, param3b) --> returns ret1
post1(ret1) --> returns ret2
post2 (ret2) --> returns final Value

I hope you see, what I meen with this and why I think it's a more logical wy to add aditional code to existing methods.

But of course, this is for you to decide. The loader is your Project after all, Just my 2 cents
 

ModGuy

Content Creator
Joined
Feb 17, 2011
The discussion for proxy implementation was already conducted over IRC with Pim and sby.
We considered a number of different ways to allow the user to replace methods and repeatedly ran in to conflicts in terms of:

Proxy as stack or queue.
Passing forward arguments on return.
How to correctly handle return values when dealing with vanilla.

Your idea for a stack based queue only makes sense when considering the ability to pass forward arguments.
However since passing arguments forward doesn't make sense, I don't think it's useful to implement either, let me explain:

hugo_boss said:
Iwas thinking about something like a second type of pre function, that returns an array,, wich will be forwarded as input parameters to the next function, similar to how the post functions work.

pre2(param1a, param1b); --> returns param2a and 2b
pre 1(param2a, param2b) --> returns param param3a and 3b
original (param3a, param3b) --> returns ret1

Pre functions were designed to do two things:

Listen for function execution.
Potentially modify return values for vanilla.

They were never designed to cascade because return values from one would not cleanly pass to another without special consideration.
Passing arguments forward is not a good idea. Preferably, you'd do the following:

Code:
Proxy some function.
Add pre, unhook.
Parse arguments, perform function and call original with new arguments.

Now of course this doesn't work with already proxied methods, and they shouldn't.
The reason why is because these mods have an established expectation of what kinds of values they should be receiving, being able to modify the input of these methods essentially means applying proxies to proxies and should never be a good idea.
If you're ever in a position where you NEED to do this, contact the mod author and discuss with them how better to implement their logic.
 

hugo_boss

Potential Patron
Joined
Jul 14, 2013
Okey, thanks for clearifying that.
My current Project could have benefited from something like that, because I actually do proxy a methode, that is already proxied by another Mod, that I don't want to break but I still managed to use a workarund there. And since you seem to have sollid reason for this kind of implementation, I leave it like that.

edit: Now that I think about it, i could probably also just "unproxy" the first proxy methode, add mine as a Pre and call the first methode from within mine, with medified parameters. Since all properties of IProxy are public, that could work, I think.
If I run into a dead end with my current methode, that could be worth a shot.
 

Faceless

Content Creator
Joined
Jun 12, 2011
ModGuy, I've been adding code to handle switching between futa and male, and this happens on a fairly regular basis.
EDIT: screencap removed
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at obj::Him/updatePenis_l()
	at obj.him.bodies::HimMaleBody/setSkin()
	at obj.him.bodies::HimMaleBody/setupElements()
	at obj.him.bodies::HimBody/setup()
	at obj::Him/setBody_l()
	at obj::InGameMenu/hisBodyLeftClicked_l()

Any idea what's going on? Here's the code I'm using to load the penis (this is in a frame listener).
Code:
if(!main.him.penis.contains(penis)) {
	main.loadManualIndex(
		penis,
		main.him.penis,
		main.him.penis.getChildIndex(
			main.him.penis.getChildAt(0)
		)+1
	);
}
 

ModGuy

Content Creator
Joined
Feb 17, 2011
The error itself is firing from SDT so I'm going to assume that when you check and add objects each frame it's screwing up the timeline.
I suggest you proxy that function anyway, it would be more reliable and only fire when needed.
If you can't get things to work then pass me a minimal mod to reproduce the error.
 

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.