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

Pim_gd

Content Creator
Joined
Jan 25, 2013
September 4, 2016
Introducing v4.05 of DialogueActions!
- Fixes a bug with [DELETELOCALS_<vars>] so that it actually works
- Make non-existing sound files give a red message, rather than an error
- Added [CUM_BLOCK_ON] and [CUM_BLOCK_OFF], as well as da.blockingOrgasm to stop him from cumming
Link in OP. Alternatively, get the latest version from the downloads page of the BitBucket repo.

Two bugfixes, and the introduction of a new feature which allows you to NOT make him cum. Possibly great for making pre_cum lines work properly when combined with automation. It's also great for any orgasm denial dialogues, I guess.
 

DrZombi

Content Creator
Joined
Jul 10, 2016
Hi Pim_gd Pim_gd ,

I'm sorry if this already exists but I've searched through the forum and the different docs that I have for the mods I used and I did not find any way to do this: I'd like to be able in my dialogue to get/set the value of the variable used by the Loader: CumInMouthCounter.

I already know where this variable is in SDT, and how I could get/set it as a percentage, and I know that it is possible to register custom variables for DA just like I registered my own triggers via the API, but I did not find out how to do this. The API.txt does not really explain how this works and I'm a bit lost. You just give some functions, with their parameters and return types but without really describing what they'll do and what we can expect from each one. Could you please give me a helping hand on this by either:
1) Tell me a little bit more about how I have to do to register a custom readable/writable variable in my own mod.
or
2) Directly add some da.cumInMouth variable to DA if you find that this could add it some value.

Thanks :)

EDIT: I do think that I'll have to register those functions: getVariableValue and setVariableValue, but I don't understand how to link them to the SDT variables since the getVariableValue only takes a String name as an argument. Moreover, I'd like to add some code (the same kind of code which is in CumInMouthCounter.swf) to be able to get/set this value as a percentage and not the raw SDT value which means nothing without its associated max value. I saw in the DA code that for your da variables, it is possible to add some code and not just get/set raw values from SDT, that's why I asked you to add it to DA if it were not possible for me to do this via the API.
 
Last edited:

DrZombi

Content Creator
Joined
Jul 10, 2016
Hi Pim_gd Pim_gd ,

After a closer look at the code of DialogueActions, I think that I now understand that the API is just not designed to allow external mods to register variables for now. So... Yes, I'd need you to work a little bit on that for a next release of DialogueActions if the idea is good for you. :grin:
So my order of preference would be this one:

1) Offer the registerVariableRead and registerVariableWrite functions (If I understood well, these are the ones I need) callable through the API just like you did with registerTrigger, so that modders would now be able to add their own variables (which I've been tricked into thinking that it was already possible since you offered the possibility to define custom variables in the json files for DialogueCheckers. That must be another feature I have not understood yet...)

2) Just add da.cuminmouth to HerTriggers.as (a lot quicker and easier I think but that will just offer one more variable and will not protect you from me coming to haunt your nightmares again :grin:)

3) I'll just create some [ADD_CUM_IN_MOUTH] and [SET_CUM_IN_MOUTH] triggers into my mod but that would be really dirty and won't provide as much usability and interest. :frown:

I'd create the code myself (for solution 2 at least I'm almost sure that I have understood DA's code well enough to do it) but since you rejected my previous forks of DA, it's just more logical to come here and bug you with my requests :wink:.
Yep, I know... You asked me to create my own mod using your API to not come and bug you but hey ! The API does not offer variable registering, it's not my fault :tongue:

I'm almost sure that it should be just a few lines of code, but if you don't have the time to and want me to give it a try a pre-create/pre-test it for you, just tell me. I'd be happy to do it and contribute :smile:

EDIT: Ok I think I found it for solution 1. It seems that it should just be 2 more lines to add to the Main class to expose the functions through the API since the methods I need are already public.

So... Could you do this in a next release (please) or is there any security/stability reason for not exposing variable registering to crazy people like me ? :rolleyes:
 
Last edited:

DrZombi

Content Creator
Joined
Jul 10, 2016
Hi Pim_gd Pim_gd ,

I'm sorry but I could not refrain myself from giving it a try and I just see your post now. So we were both working on this at the same time ^^
For your information, I made my custom DA 4.06 perfectly work by adding those lines to the Main.as (you know where to add them):
Code:
apiDict["registerVariableRead"] = new FunctionObject(variableManager.registerVariableReadComms, variableManager, null);
apiDict["registerVariableWrite"] = new FunctionObject(variableManager.registerVariableWriteComms, variableManager, null);

And those functions to VariableManager.as:
Code:
public function registerVariableReadComms(name:String, callbackFunction:Function, callbackTarget:Object, callbackArgs:Array):void {
           registerVariableRead(name, new FunctionObject(callbackFunction, callbackTarget, callbackArgs));
}
    
public function registerVariableWriteComms(name:String, callbackFunction:Function, callbackTarget:Object, callbackArgs:Array):void {
            registerVariableWrite(name, new FunctionObject(callbackFunction, callbackTarget, callbackArgs));
}

With these, I could register the variable "mt.cuminmouth" in MoreTriggers both read/write and for what I've been able to see for now, It worked with "set" and "check" so that sounds good for me (and no other error at loading or during gameplay for now either). That's all hot and ready to include :smile:

EDIT: Oh! By the way, I took advantage that it worked to add the custom variable to my json file for DialogueCheckers so I can now fully confirm that your new system totally works :smile:
 
Last edited:

Pim_gd

Content Creator
Joined
Jan 25, 2013
Hi Pim_gd Pim_gd ,

I'm sorry but I could not refrain myself from giving it a try and I just see your post now. So we were both working on this at the same time ^^
For your information, I made my custom DA 4.06 perfectly work by adding those lines to the Main.as (you know where to add them):
Code:
apiDict["registerVariableRead"] = new FunctionObject(variableManager.registerVariableReadComms, variableManager, null);
apiDict["registerVariableWrite"] = new FunctionObject(variableManager.registerVariableWriteComms, variableManager, null);

And those functions to VariableManager.as:
Code:
public function registerVariableReadComms(name:String, callbackFunction:Function, callbackTarget:Object, callbackArgs:Array):void {
           registerVariableRead(name, new FunctionObject(callbackFunction, callbackTarget, callbackArgs));
}
  
public function registerVariableWriteComms(name:String, callbackFunction:Function, callbackTarget:Object, callbackArgs:Array):void {
            registerVariableWrite(name, new FunctionObject(callbackFunction, callbackTarget, callbackArgs));
}

With these, I could register the variable "mt.cuminmouth" in MoreTriggers both read/write and for what I've been able to see for now, It worked with "set" and "check" so that sounds good for me (and no other error at loading or during gameplay for now either). That's all hot and ready to include :smile:

EDIT: Oh! By the way, I took advantage that it worked to add the custom variable to my json file for DialogueCheckers so I can now fully confirm that your new system totally works :smile:

You're doing duplicate work, see this commit:
Pim_gd / SDTDialogueActions / commit / ba34dfeba685 — Bitbucket

Variable write already existed. It's just the variable read that was missing. Anyway, if you could verify my version works just as good as yours does, I can update the docs and commit and release.

As for "check"; DA doesn't hook check variables properly; if you try to use check then it will fail (try checking for a specific value, and don't set it beforehand). Fixing this is pretty much impossible without breaking dialogpatch.
 

DrZombi

Content Creator
Joined
Jul 10, 2016

Ok, I've been tricked by the late time, my extreme tiredness, AND the fact that the function you're talking about has been renamed to "registerVariableWriteHandlerComms". :frown:
I did not notice that under this name, the function just calls registerVariableWrite. My bad !

Variable write already existed. It's just the variable read that was missing. Anyway, if you could verify my version works just as good as yours does, I can update the docs and commit and release.

Ok, I just verified your dev version and I can confirm that it works just as well as what I did after re-doing the tests. Which is perfectly logical since we call the same functions with just a different name ^^

As for "check"; DA doesn't hook check variables properly; if you try to use check then it will fail (try checking for a specific value, and don't set it beforehand). Fixing this is pretty much impossible without breaking dialogpatch.

This is what I have tried:

intro1:"[intro2]Bla bla bla" {"set":{"mt.cuminmouth":80}}
intro2:"Bla bla again" {"check":{"mt.cuminmouth":80}}

-> Works perfectly, intro2 is played

intro1:"[intro2]Bla bla bla" {"set":{"mt.cuminmouth":80}}
intro2:"Bla bla again" {"check":{"mt.cuminmouth":">75"}}

-> Works perfectly, intro2 is played

intro1:"[intro2]Bla bla bla"
intro2:"Bla bla again" {"check":{"mt.cuminmouth":0}}

-> Works perfectly, intro2 is played

intro1:"[intro2]Bla bla bla"
intro2:"Bla bla again" {"check":{"mt.cuminmouth":10}}

-> Works perfectly, intro2 is not played

For now, I have not been able to find a not working "check", but I'll pay attention to it and let you know if I encounter this kind of bug so that we can specify a bit more the exact scenario when it should fail. Still good to be aware of this though :smile:

Many thanks to you for your reactivity on this. I hope that now I won't have to bug you too much about DA functionnalities :tongue:
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
DrZombi DrZombi it is my experience that the last case DOES NOT work perfectly:

Given a dialogue like this:

Code:
all:"CLEAR"

start:"*da.clothes.panties.r* teeeeesting![nextLine]"
nextLine:"It worrrrrks! *da.clothes.panties.r* ffffffff" {"check":{"da.clothes.panties.r":">0"}}

This is what you'll get in the logs:

Code:
478: Playing line "*da.clothes.panties.r* teeeeesting![nextLine]"
479: Running checks for line: "It worrrrrks! *da.clothes.panties.r* ffffffff"
480:    Line will not play: "da.clothes.panties.r" needs to be >0 but is currently set to undefined

And this is what you get on the screen: (wearing white panties)

Code:
255 teeeeesting!
 

DrZombi

Content Creator
Joined
Jul 10, 2016
Don't misunderstand me, I totally trust you and I'm sure that you did not say this without knowing what you're talking about. That's why I said that I'll come back to you with more details if I do experience this problem in the future. I maybe just have been lucky that it went ok in my test. Maybe because I linked to a SDT variable, and not something that I created/initialized myself in the mod. I was just giving you feedback about what I tested, and the results I had, not trying to tell you're a liar :oops:

Incidentally, where do you find those logs about how the dialogue ran ? I did not know about this, it could save me lot of time !
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
Modding tab -> Edit button for dialogue (it's next to load), then log button in the top right corner of the editor.
 

DrZombi

Content Creator
Joined
Jul 10, 2016
Still works fine for now, I always make sure that my variables are setted and it goes well.
As far as I'm concerned, you can definitely commit this in the future official 4.06 version :smile:
 

Gurudo99

Potential Patron
Joined
Dec 24, 2015
So I'm having an issue with Dialogue Actions and I couldn't find an answer in any of the posts so I'm hoping someone can help. I can't load any "special" dialogues, because when I do it says DialogueActions Api not found and I have no clue how to fix it. Any help is appreciated! c:
 

Gurudo99

Potential Patron
Joined
Dec 24, 2015
Should have added that it doesn't only occur when I load a dialogue, it's when I load DA period. I have it in my INIT folder if that matters.
 

stuntcock

Content Creator
Joined
Jun 5, 2012
So I'm having an issue with Dialogue Actions
Not exactly. You're having an issue with MoreTriggers.

it says DialogueActions Api not found
MoreTriggers extends the DialogueActions mod. It is not a replacement for DialogueActions. You must load DialogueActions (e.g. by including it in your Mods\$INIT$ folder and mentioning it in Mods\$INIT$\Mods.txt) before you attempt to load MoreTriggers.

Please note that MoreTriggers is not a mandatory upgrade for SDT users. It is intended primarily for authors who want to experiment with new features. Unless you've downloaded one of those new experimental dialogues, you don't actually need the MoreTriggers mod. If you're using WeeWillie's dialogue bundle, for example, then DialogueActions is already included and no additional mods are required.

-----------------------​

If you're still having difficulty, then you'll need to provide some more information so that we can figure out what's going wrong.
  • which version of DialogueActions are you using? Where did you download it? Could you try replacing your DA file with the latest version from pim_gd?
  • which TXT dialogue file(s) are you attempting to use?
  • please copy-paste the contents of your Mods\$INIT$\Mods.txt file
  • please try running the game via the Flash Player Projector content debugger, to determine whether any exceptions are being thrown during mod loading
 

DrZombi

Content Creator
Joined
Jul 10, 2016
All what stuntcock stuntcock said is true and if you want us to be able to help you, we'll definitely need more information on what you were tring to do.

I'd just like to add that:
  • - MoreTriggers and TimedTriggers are not the only mods which use the DA API. Colin's Custom Automation does it as well.
  • - Which kind of Loader do you use ? The plain basic ModGuy's Loader ? The sby's pack ? Mine ? Slingerbult Slingerbult 's ? One of your own ?
  • - Are you trying to load an entire character folder or just a dialogue file ?
  • - Are there not any instructions in the dialogue about which mods are needed for the dialogue to run ?
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
October 2, 2016
Introducing v4.06 of DialogueActions!
- Updated known bugs list with 2 entries, one for da's variables in check line-attributes not working, one for da.finishes being swallowed in any line with line-attributes
- Added API function registerVariableReadHandler, which allows you to expose dialogue variables.
- Updated API Documentation with small descriptions (one-liners) as to what you'd use the functions for.
- Fixed a bug where lines with a line name that is 7 characters long ("general", "pre_cum", "restart", "swallow", "choking", button1 through 9) that only contains triggers was played instantly even although they shouldn't have
Link in OP. Alternatively, get the latest version from the downloads page of the BitBucket repo.

One bugfix, one added feature. It's useful to be able to actually register variable read handlers as that allows you to "export" variables. The bugfix is something I have detected and fixed based on the code - I hope this is what explained some of the "strange" behavior.
 

outlawtorn316

Avid Affiliate
Joined
Sep 4, 2016
I have a question involving Variable Arithmetic. Currently I'm working on a dialogue, and my hopes and dreams for it is easily outclassing my skill (Which is good because it forces me to LEARN!), but anywho, I developed some algorithms to handle all my stat growth and decay, HOWEVER, I just realized that the "^" operator doesn't work.. ie... 5^2=25 I have very limited knowledge in how these mods actually interact with the main game and flash in general, so with that being said is it impossible to implement powers into Variable Arithmetic? I totally nutted my code so it would work but the lack of exponential growth and decay kinda makes me a little sad. :) I appreciate all the hard work you guys are doing to make the game so much more fun to tinker with! Thanks for reading!!

EDIT: Ok maybe I'm just math illiterate. NEW QUESTION! I'm trying to multiple with the [SETVAR..] trigger but getting weird results. Examples...
[SETVAR_stamina_-=*( 2 x 5 )*] returns a "not a number" error... so I tapped into 20 year old highschool math know how and did this..
[SETVAR_stamina_-=*( 2 ( 5 ) )*] where "stamina" originally was 100... and it returned 75. So for grins and also trying to find an explaination I tried ( 2 ( 3 ) ) and it returned 77...so somehow it seems its is ignoring the parentheses and LITERALLY subtracting 25 and 23... which means there is no way I can do multiplication, however when I look at other dialogues for examples they can clearly use "x" as an operator...
For not being a mathmatically inclined person, this just makes me face hurt lol. Can someone explain this to me please? And why does it seem the "x" operator isn't working? Using DialogueActions 4.06. Any help would be appreciated, this is very frustrating. Math is supposed to be logical not magical. :)
 
Last edited:

DrZombi

Content Creator
Joined
Jul 10, 2016
Hi outlawtorn316 outlawtorn316 ,

When I began dialogue writing myself, I stumbled upon the exact same problem as you. I never figured out how to make fucking multiples so I just ended up rewriting all my logic to just use + and - :grin:

If this is not possible for you, check this:

Did you not forget to add this to your initial settings to make DA aware that the x "variable" must be replaced by the real multiplier operator ? "x":"*"
I don't know what you're trying to do by replacing the x with a parenthesis, but here is an example of working code from the smartGirl2 dialogue:
* ( next.ox == 3 x ( next.th == 3 ) ) + ( next.th == 3 ) + 3 *

What I see here is that as long as you keep spaces between all your operators, the x should be good. But again, I've not tested it myself since I've been able to work around it for now :wink:

Here is a line that I do use myself and which I'm sure is working (but without any mult):
[increase_pleasure
*( da.pleasurePercentage < 85 ) + 84*_INSTANT]

As you can see, I do not put parenthesis when it is not needed, so for you, I'll try this:
[SETVAR_stamina_-=
*2 x 5*]
 

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.