From what I can see, the auto modes are coded into the loader itself
Nitpick: they aren't hardcoded into
Loader.swf. They're hardcoded into
SDT.swf.
is there a method of extending a class in pre-compiled code
This is a trivial operation; almost every mod does it. AS3 is
incredibly lax about data-hiding. You can extend an object at runtime. Extending a class is also possible, but it's rarely necessary -- most of the important SDT classes (e.g.
Her,
Him,
InGameMenu) get instantiated only once. So you can just grab that one instance (e.g.
g.her) and mess around with it directly (e.g.
g.her.visible = false; ).
Strands actually do get generated during gameplay, so it's sometimes appropriate to extend those classes instead of tinkering with each instance.
Using Loader modding techniques is preferred, because if you directly replace a function (or kill an instance variable) then your mod may suffer compatibility problems with other mods.
@ModGuy's lProxy technique allows us to temporarily hook the native function calls and add "Pre" or "Post" functions which will react whenever those functions are invoked.
I was trying to add a dialogue trigger that would cause the animation to hold in place (rather than pause the game or turn off automatic control).
Go here. Talk to
@Pim_gd.
Later I would like to add triggers to pull down to some level (basically equivalent to moving the mouse to certain points on the screen)
It's been proposed before. Talk to
@Pim_gd.
so I am not sure if there is a way to alter them without altering the loader source and recompiling it.
They're defined in memory structures (
obj.AutomaticControl). They can be edited using brute-force memory intrusion, or more subtly via Loader modding techniques. Recompilation of the SWF file is not necessary.
The key question is how
disruptive you're willing to be. For instance: you could completely
replace the Hard auto mode with an instruction such as
"goto penetration depth 30, oscillate ±0 units". This would constitute an indefinite "hold" action. Then you'd simply use the standard dialog trigger to switch to Hard mode when you want to hold that particular depth ... and then switch back to Normal mode when it's narratively appropriate (e.g. after speaking the next six lines).
The downside would be that the game state would be
damaged by your modding activity. If the user gets bored with your mod, then they'll need to restart the game completely in order to restore the Hard auto mode to its normal functionality. The other downside is that completely replacing the auto modes leaves you with a maximum of 4 custom settings - which may be insufficient for your narrative.
It would be more prudent to write some custom code, in order to
add a new temporary Auto mode option instead of
replacing any of the existing ones. You'd then need some new fancy syntax in your Dialogue file which would define this custom mode, establish timing, and switch to/from the custom mode when appropriate.
But this is all moot unless you can either convince
@Pim_gd to add your requested feature - or learn AS3 and do it yourself (note: the code for the dialogueActions mod is shared on a public repo).
Edit -
@ModGuy provided
some sample code to add new customized Auto modes. This approach assumes that you're writing a Loader mod; it isn't useful if you're just hoping to add an invocation line to your Dialogue file. But it's the sort of thing which you might conceivably
add to the dialogueActions codebase in order to fulfill your requirements.