Pim_gd's Mods - DialogueActions v4.08 (15 Jan 2017) (2 Viewers)

Deleted member 70674

Vivacious Visitor
Joined
Nov 18, 2016
Your advice has been perfect so far! However I'm running into another problem. During my 2nd scene, as soon as the game reaches a [AUTO_X] trigger it stops working. The 2nd reading on the counter (I think how much the guy will cum) reads NaN% and the girl disappears, with the guy frozen in place. The [Auto_x] triggers work in the previous part so I'm very confused. Dialogue checker doesnt return any errors either.
 

Jaxx

Content Creator
Joined
Aug 15, 2016
We're getting away from the thread's topic. You should make a new one in the appropriate forum part and post your dialogue file so we could take a look at what's wrong, as what you describe could run quite deep. Tag me in your original post and I'll come help you.
 

bodoefm

Potential Patron
Joined
Jan 18, 2017
This is a "silent mod". Nothing's meant to be displayed in any tab :wink:
You did it correct and now you just have a bunch of new triggers useable in dialogues. If you want to be sure that DA is well loaded, and see what's new, you can use my Trigger Tester Dialogue. You'll find it in my Helper Bundle (see my signature).
Thanks so much for this :smile:
 

bodoefm

Potential Patron
Joined
Jan 18, 2017
Code:
{"set":{"da.pleasurePercentage":0}}
You can find DA's variables in the mod's documentation, filename is Variables.txt, there are quiite a lot, especially since Pim's last update.
On this front, having a little trouble with a conditional line and pleasurepercentage
None of these seem to work:
{"check":{"da.pleasurePercentage">20}}
{"check":{"da.pleasurePercentage":>20}}
{"check":{"da.pleasurePercentage":20}}

Anyone want to help a noob out?
 

DrZombi

Content Creator
Joined
Jul 10, 2016
On this front, having a little trouble with a conditional line and pleasurepercentage
None of these seem to work:
{"check":{"da.pleasurePercentage">20}}
{"check":{"da.pleasurePercentage":>20}}
{"check":{"da.pleasurePercentage":20}}

Anyone want to help a noob out?

Hi B bodoefm ,

For this one you'll have to go back a couple pages in this thread. You'll see that Pim_gd Pim_gd and @sby worked together to resolve a bug with the checking of DA & MT custom variables. You'll have to read a bit but you'll find that to be able to check correctly on these kind of variables you'll have to use the latest versions of DA et @sby 's Dialog Patch v4. And you'll have to load them both in the correct order in your $INIT$ folder.

Also, please note that when checking a numerical value for equality, you can do what you wrote, but when you want to check for < or >, you have to put the expression between quotes like this:

{"check":{"da.pleasurePercentage":">20"}}
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
Additionally, if your dialogue is not working, haul it through the dialogue checker first, maybe it will tell you why it´s broken.
 

aztlan

Casual Client
Joined
Sep 14, 2013
Looking at the new-ish trigger [PUSSYDRIP_<durationInFrames>]
If you use [PUSSYDRIP] will it play the standard 50 frames of leaking?
So [PUSSYDRIP] is the equivalent of [PUSSYDRIP_50]?
Or do you need to explicitly specify a number of frames?
 

Jaxx

Content Creator
Joined
Aug 15, 2016
I just checked and [PUSSYDRIP] doesn't work without parameter, you have to specify the number of frame
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
Uhhhh...

No, you cannot use [PUSSYDRIP] without values, because it takes 1 argument as seen here:

Pim_gd / SDTDialogueActions / source / src / HerTriggers.as — Bitbucket

What this means is that I should add the ability to have it do the default because why not? So consider that in the release for v4.09 as well.

Hmm actually look

Pim_gd / SDTDialogueActions / commit / 1d959c9a89c7 — Bitbucket

There we go, it's in for v4.09. Maybe I'll go and fix the rest of what I had to do for v4.09 as well tomorrow so I can finally get it out the door and patch up DialogueActions with all the new variables.

So for v4.08, no. For v4.09dev3 and lower, no. For v4.09dev4 (not made yet, either not coming or needs more content) or v4.09 release, yes.
 

aztlan

Casual Client
Joined
Sep 14, 2013
This uses the sweat animation right?
Is there any way to change the color and transparency of it?
I'd love to be able to make it opaque and and choose the color (RGBA).
 

Rudgar

Content Creator
Joined
Nov 18, 2016
Uhhhh...

No, you cannot use [PUSSYDRIP] without values, because it takes 1 argument as seen here:

Pim_gd / SDTDialogueActions / source / src / HerTriggers.as — Bitbucket

What this means is that I should add the ability to have it do the default because why not? So consider that in the release for v4.09 as well.

Hmm actually look

Pim_gd / SDTDialogueActions / commit / 1d959c9a89c7 — Bitbucket

There we go, it's in for v4.09. Maybe I'll go and fix the rest of what I had to do for v4.09 as well tomorrow so I can finally get it out the door and patch up DialogueActions with all the new variables.

So for v4.08, no. For v4.09dev3 and lower, no. For v4.09dev4 (not made yet, either not coming or needs more content) or v4.09 release, yes.
*IF* you publis a new patch or even a new version, will you then please update the documentation, if necessary? Please?
Kind regards, Me
 

cosmo777

Content Creator
Joined
Jan 22, 2016
Nevermind... Got confused by the documentation instructing this line:
{"set":{"da.background.load":"filename.png"}}

I didn't need to use "set" in order to load a background
 
Last edited:

Pim_gd

Content Creator
Joined
Jan 25, 2013
DialogueActions v4.09 dev version 4 is on bitbucket, with the first set of Him features. @WeeWillie hope this is enough for what you need right now...

Pim_gd / SDTDialogueActions / Downloads — Bitbucket

Changelog:
- Added default value for [PUSSYDRIP_<durationInFrames>] trigger, which is 50 frames because that's what the masturbation has been using.
- Added da.him.body.gender {read and write} - Controls his body type. Values are "Male" and "Female".
- Added da.him.body.skin {read and write} - Controls his skin type. Values are, for the Male body, "Light" and "Dark"; for the Female body, "Light", "Pale", "Tan" and "Dark".
- Added da.him.body.balls {read and write} - Controls his balls type. Values are "None" and "Normal".
- Added da.him.body.balls.size {read and write} - Controls his balls size. Values range from 0.5 to 1.3, but mods may alter the minimum and maximum sizes.
- Added da.him.body.breasts {read and write} - Controls his breast size. Values range from 1 to 149, but for the Male body, the value is always 0 since there are no breasts.
- Added da.him.ejaculating {read only} - Whether he's currently ejaculating. Values are "true" and "false".

What's left is penis handling. That's penis width, length and type for him and her. As well as RGB for the strapon. Then after that every thing just needs to be updated in the DialogueChecker and there's full support (well, unless I forgot something, which I probably did...) for all the sliders and buttons in the bottom menu in dialogues. Seems like something that should have been done earlier, instead of constantly adding features here and there.

Also the code needs cleaning, as usual. Right now there's all these weird files handling one thing or another ("HerTriggers" and "HimTriggers" have duplicated code) and you can't find crap (because "PenisTriggers" is what contains [SHOW_BALLS] etc, but "HimTriggers" contains da.him.body.balls.size).

So restructuring the code might make it easier for people (that includes me) to find things in DialogueActions. I might also make it easier later on to add variables via the mod api - take a look at this:

Code:
        private function calculateNewValue(getter:FunctionObject, newValue:*):Number {
            var newVal:Number = 0;
            if (newValue is Number) {
                if (newValue < 0) {
                    newVal = getter.call() + newValue;
                } else {
                    newVal = newValue;
                }
            } else if (newValue is String && !isNaN(Number(newValue))) {
                if ((newValue as String).charAt(0) == "-" || (newValue as String).charAt(0) == "+" ) {
                    newVal = getter.call() + Number(newValue);
                } else {
                    newVal = Number(newValue);
                }
            } else {
                return NaN;
            }
            return newVal;
        }

What this does is, well, lemme show case an example...

Code:
        public function setHerBreastSize(value:*):void {
            var newVal:Number = calculateNewValue(new FunctionObject(getHerBreastSize, this, []), value);
            if (isNaN(newVal)) {
                m.displayMessageRed("da.her.body.breasts attempted set to " + value + ", unable to identify value as numeric");
                return;
            }
            newVal = Math.min(newVal, 149);
           newVal = Math.max(newVal, 0);
            g.characterControl.setBreasts(newVal);
            g.strandControl.checkElementAnchors(g.her.torso.midLayer.rightBreast); //This is included in the "breastSliderRelease" handler...
            g.inGameMenu.updateBreastSlider();
        }

This is the code that handles da.her.body.breasts, and allows you to {"set":{"da.her.body.breasts":"+20"}}.

If I can expose that "calculateNewValue" in some fancy wrapper, modders could register bounded properties with plus and minus support (so you can, I dunno, increase the delay on your more triggers animation by 5 more seconds?), in a single line, instead of having to do all of that crap themselves (which they'd be likely to, well, not do).

In other news, I had a talk with @Slingerbult earlier (or not, but then I'm getting people mixed up) about allowing buttons to be interruptible. Cum lines currently interrupt active lines, in that she will stop talking when cum lands on her face and will switch to a cum_on_face line. With this change, you could have buttons that have direct effect, instead of making the user guess as to whether they actually pressed the button. But that's something for v4.10, I think.
 
Last edited:

Rudgar

Content Creator
Joined
Nov 18, 2016
I desperated sometimes because multiplication in DA seemed not to work. After testing a lot it suddenly worked just as it should. Then I randomly found out something ...

Neither does this work:
Code:
initial_settings:{"x":"*","var1":10,"var2":20}
start:"*var1 x var2*"
Nor does this:
Code:
initial_settings:{"x":"*"}
start:"*10 x 20*"
But this does! Both!
Code:
initial_settings:{"x":"*"}
start:"*var1 x var2 + 0* / *10 x 20 + 0*"

Did anyone experience the same?

Respectfully,
Rudgar
 
Last edited:

Pim_gd

Content Creator
Joined
Jan 25, 2013
Correct!

The bug is here:

Pim_gd / SDTDialogueActions / source / src / VariableManager.as — Bitbucket

Code:
       public function variableInsert(args:Array) { //No return type, might cause problems
            if (args.length != 4) {
                return;
            }
            var x:* = getVariableValue(args[1]);
            if (x != undefined) {
                return x;
            } else {
                var index:int = findIndexOfNextSplit(args[1]);
                if (index != -1) {
                    return evaluateStringQuation(args[1]);
                }
            }
        }

What we're looking at here is DialogueActions's proxy for variable insertions, the whole *10 x 20* part in a line.

First, we try to see if "10 x 20" is a variable (either registered via DialogueActions, or natively available in SDT). Since it's most likely not (spaces and all), we move on to the next section - "findIndexOfNextSplit".

Code:
       public function findIndexOfNextSplit(variable:String):int {
            var operators:Array = ["+", "-", "*", "%", "/", "\\", "(", ")", "==", "!=", "<=", ">=", "||", "&&", ">", "<", "="];
            if (operators.indexOf(variable) != -1) {
                return -2; //Nope, not an operator, truuuust me. Hotfix to prevent false positive errors.
            }
            ...

This is a poorly written piece of code, it needs refactoring. It has two functions - the first, you see above - is the passed in variable an operator?

The second...

Code:
           var checkArray:Array = new Array();
            checkArray.push([variable.indexOf("+"), "+"]);
            checkArray.push([variable.indexOf("-"), "-"]);
            checkArray.push([variable.indexOf("*"), "*"]);
            checkArray.push([variable.indexOf("%"), "%"]);
            checkArray.push([variable.indexOf("/"), "/"]);
            checkArray.push([variable.indexOf("\\"), "\\"]);
            checkArray.push([variable.indexOf("("), "("]);
            checkArray.push([variable.indexOf(")"), ")"]);
            checkArray.push([variable.indexOf("=="), "=="]);
            checkArray.push([variable.indexOf("!="), "!="]);
            checkArray.push([variable.indexOf("<="), "<="]);
            checkArray.push([variable.indexOf(">="), ">="]);
            checkArray.push([variable.indexOf("||"), "||"]);
            checkArray.push([variable.indexOf("&&"), "&&"]);
            checkArray.push([variable.indexOf(">"), ">"]); //Yes, I could have skipped <= and >=, but I didn't feel like it.
            checkArray.push([variable.indexOf("<"), "<"]);
            checkArray.push([variable.indexOf("="), "="]);
            checkArray.sortOn([0], [Array.NUMERIC]); //And voila.
            for (var i:uint = 0, isize:uint = checkArray.length; i < isize; i++) {
                if (checkArray[i][0] != -1) {
                    return checkArray[i][0];
                }
            }
            return -1;
        }

What's the position of the next operator in the variable name?

Key here is that "10 x 20" contains NO operators! Not directly, anyway.

And this is a mistake on my part - I should treat any variable insertion that contains a space as valid for arithmetic.

The "+ 0" adds an operator, and after that parsing works fine.
 

Rudgar

Content Creator
Joined
Nov 18, 2016
Take your time with fixing it - now that we know the "random feature" :wink: and how to work around it, no harm will happen.
I'm just glad to help making something really good a little bit better.

(Edit: to be honest: I'm happy about having figured it out at all actually.)

Respectfully,
Rudgar
 
Last edited:

tomasan

Potential Patron
Joined
Jun 2, 2017
Hello, Pim_GD
I wanted to add a vigour reader for your mod...
So, I added some lines on the SDTVariables.as file:
Code:
package
{
   public class SDTVariables extends CustomVariableHolder
   {
      
      
      public function SDTVariables(G:Object, M:Main)
      {
         super(G,M);
      }
      
      public function registerVariables(v:VariableManager) : void
      {
         v.registerVariableRead("da.mouthfull",new FunctionObject(this.getMouthFull,this,[]));
         v.registerVariableRead("da.vigour",new FunctionObject(this.getVigour,this,[]));
         v.registerVariableRead("da.held",new FunctionObject(this.getHeld,this,[]));
         v.registerVariableRead("da.finishes",new FunctionObject(this.getFinishes,this,[]));
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("hoverOptions"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("showMouse"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("strandShaders"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("mirrored"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("spit"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("tears"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("mascara"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("smudging"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("nostrilSpray"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("sweat"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("breathing"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("gagging"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("coughing"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("tongue"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("dialogue"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("invertControls"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("bukkakeMode"),v);
      }
      
      private function buildFunctionName(name:String) : String
      {
         return "cb" + name.charAt(0).toUpperCase() + name.substr(1) + "Clicked";
      }
      
      private function createHandlerForBooleanSDTFeature(name:String) : SDTBooleanFeatureHandler
      {
         return new SDTBooleanFeatureHandler(m,"da.sdtoptions." + name,g,name,new FunctionObject(g.inGameMenu[this.buildFunctionName(name)],g.inGameMenu,[null]));
      }
      
      private function registerHandlerForBooleanSDTFeature(handler:SDTBooleanFeatureHandler, v:VariableManager) : void
      {
         v.registerVariableRead(handler.getVariableName(),new FunctionObject(handler.isEnabledAsUint,handler,[]));
         v.registerVariableWrite(handler.getVariableName(),new FunctionObject(handler.setEnabledness,handler,[]));
      }
      
      public function getMouthFull() : Boolean
      {
         return g.her.mouthFull;
      }
      
      public function getHeld() : Boolean
      {
         return g.him.currentArmPosition == 0;
      }
      
      public function getFinishes() : int
      {
         return g.totalFinishes;
      }
      
      public function getVigour() : int
      {
         return g.her.vigour;
      }
   }
}

It works well, the result is between 0 and 1050.
But i don't have any flash compiler. I used a flash decompiler to modify directly your code.
Feel free to copy paste the code for your next realease.
And thank you, your mod is the best.
 

DrZombi

Content Creator
Joined
Jul 10, 2016
Hello, Pim_GD
I wanted to add a vigour reader for your mod...
So, I added some lines on the SDTVariables.as file:
Code:
package
{
   public class SDTVariables extends CustomVariableHolder
   {
     
     
      public function SDTVariables(G:Object, M:Main)
      {
         super(G,M);
      }
     
      public function registerVariables(v:VariableManager) : void
      {
         v.registerVariableRead("da.mouthfull",new FunctionObject(this.getMouthFull,this,[]));
         v.registerVariableRead("da.vigour",new FunctionObject(this.getVigour,this,[]));
         v.registerVariableRead("da.held",new FunctionObject(this.getHeld,this,[]));
         v.registerVariableRead("da.finishes",new FunctionObject(this.getFinishes,this,[]));
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("hoverOptions"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("showMouse"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("strandShaders"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("mirrored"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("spit"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("tears"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("mascara"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("smudging"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("nostrilSpray"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("sweat"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("breathing"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("gagging"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("coughing"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("tongue"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("dialogue"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("invertControls"),v);
         this.registerHandlerForBooleanSDTFeature(this.createHandlerForBooleanSDTFeature("bukkakeMode"),v);
      }
     
      private function buildFunctionName(name:String) : String
      {
         return "cb" + name.charAt(0).toUpperCase() + name.substr(1) + "Clicked";
      }
     
      private function createHandlerForBooleanSDTFeature(name:String) : SDTBooleanFeatureHandler
      {
         return new SDTBooleanFeatureHandler(m,"da.sdtoptions." + name,g,name,new FunctionObject(g.inGameMenu[this.buildFunctionName(name)],g.inGameMenu,[null]));
      }
     
      private function registerHandlerForBooleanSDTFeature(handler:SDTBooleanFeatureHandler, v:VariableManager) : void
      {
         v.registerVariableRead(handler.getVariableName(),new FunctionObject(handler.isEnabledAsUint,handler,[]));
         v.registerVariableWrite(handler.getVariableName(),new FunctionObject(handler.setEnabledness,handler,[]));
      }
     
      public function getMouthFull() : Boolean
      {
         return g.her.mouthFull;
      }
     
      public function getHeld() : Boolean
      {
         return g.him.currentArmPosition == 0;
      }
     
      public function getFinishes() : int
      {
         return g.totalFinishes;
      }
     
      public function getVigour() : int
      {
         return g.her.vigour;
      }
   }
}

It works well, the result is between 0 and 1050.
But i don't have any flash compiler. I used a flash decompiler to modify directly your code.
Feel free to copy paste the code for your next realease.
And thank you, your mod is the best.

Every working addition to SDT and DA is a good thing but just so that you know it, I've already been requested for an access to the vigour counter and it has been done. You can find the mt.vigour variable in MoreTriggers :smile:
 

tomasan

Potential Patron
Joined
Jun 2, 2017
Thank you. I'll check that.
I realized that i put the code in the wrong place, i should modify HerTrigger instead of SDTVariables. my previous message is not so good.
 

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.