Pim_gd's Advanced Dialogue Guide (v1.01 - updated 10 December 2013) (3 Viewers)

HAMburgler

Content Creator
Joined
Dec 2, 2017
Thanks SkyHeart! Here's what I'm working with... a little embarrassing, but more because of my technical inexperience than the sexual nature lol.

Where exactly would I add the button script?
 

Attachments

Anal_Slut.txt
10.1 KB · Views: 253

SkyHeart

Casual Client
Joined
Apr 17, 2017
1. Animtools has a custom variable called "atv_position". which takes values from 1 to 4 (1 - oral, 2 - vaginal, 3 - anal, 4 - other)
Use that for the lines where you want her to react to the current position. // general:"[general*atv_position*]"
Than make a custom variable, something called like "last_atv_position" and before every line you intend to change the position on just copy the value of "atv_position" into your variable with a [SETVARBYNAEM] trigger. As such you will always know what type of position was before and you can have another "general" linetype that looks like this // general:"[general*last_atv_position*]" (If you have more than one linetype with the same name they will all have equal chances to fire when the linetype is called).
For anyone that may be reading this for informational puropses, I made a mistake here.
The values for "atv_position" range form 0 to 4 not from 1 to 4 (0 - oral, 1 - tit, 2 - vaginal, 3 - anal, 4 - other)
 

Deleted member 124113

Potential Patron
Joined
Jun 2, 2017
Hi :)
I'm currently working on a dialogue, and I ran into some trouble...
The problem is that I have written several lines of the linetype "pulled_up" but I only want the lines to play once, so that the next time she's pulled up it will chose a specific one of the other "pulled_up" lines, and not repeat itself.
Does anyone know how to do this? :)

I have tried different techniques I thought would work, but they dont :/ Any help would be most appreciated :)
 

SkyHeart

Casual Client
Joined
Apr 17, 2017
Hi :)
I'm currently working on a dialogue, and I ran into some trouble...
The problem is that I have written several lines of the linetype "pulled_up" but I only want the lines to play once, so that the next time she's pulled up it will chose a specific one of the other "pulled_up" lines, and not repeat itself.
Does anyone know how to do this? :)

I have tried different techniques I thought would work, but they dont :/ Any help would be most appreciated :)
Hi,
If you are comfortable with using dialogue actions and custom variables you could do this

Make a variable called something like pullUpValue. Than make one pulled_up line that looks like this:
pulled_up:"[pulled_up_*pullUpValue*]"
And than make specific lines for specific values and increase the variable's value every time a pulled_up line occurs.

Advantages: not using the check function which destroys performace and making sure that no line is played twice
Disadvantages: No random element cause they will play in a specific order and you could find yourself running out of lines pretty quick( you can avoid that by letting go of the "only once" idea and reseting the variable to the first value when you reach the last line.

Hope this helps.
Happy writing
 

edgelord 3000

Content Creator
Joined
Jan 16, 2018
With DA and custom variables you could also try this:
Code:
pulled_up:"[pulled_up_A*varAplayed*]"
pulled_up:"[pulled_up_B*varBplayed*]"
pulled_up:"[pulled_up_C*varCplayed*]"
pulled_up:"[pulled_up_D*varDplayed*]"
pulled_up_A0:"Line A"{"set":{"varAplayed":1}}
pulled_up_A1:"[pulled_up_B*varBplayed*]"
pulled_up_B0:"Line B"{"set":{"varBplayed":1}}
pulled_up_B1:"[pulled_up_C*varCplayed*]"
pulled_up_C0:"Line C"{"set":{"varCplayed":1}}
pulled_up_C1:"[pulled_up_D*varDplayed*]"
pulled_up_D0:"Line D"{"set":{"varDplayed":1}}
pulled_up_D1:"[general]"

Basically, you have a unique variable for each line (which you create and set to 0 in initial_settings at the beginning of the dialog). Whenever a line is played, it first checks if the variable is set to 0 or 1.
If 0, then play the line and set the variable to 1, marking it as a played line.
If 1, then hop to the next line and check that variable, and so on.
If all the lines have been played, then in this example play a general line. This can be replaced with anything you like.

This solution keeps the randomness intact, but the amount of variables and triggers can become overwhelming. If you're not that bothered about having them played in order, SkyHearts' solution is the easier and therefore better one.

I suck at explaining things, so I hope this is understandable.
 

DigitalSmutExports

Content Creator
Joined
Sep 12, 2018
Where exactly would I add the button script?
The buttons will show up whenever the line they're on gets played. If you want them to pop up right away you can add it on the start line. I saw that you reviewed my bundle (that was nice to read - thanks). Check out the chapter 1 extra dialogue. The start line calls the [MenuPositionsGround] which calls the [MenuPositionsGroundInit] and there it is.
 

Deleted member 124113

Potential Patron
Joined
Jun 2, 2017
Hi,
If you are comfortable with using dialogue actions and custom variables you could do this

Make a variable called something like pullUpValue. Than make one pulled_up line that looks like this:
pulled_up:"[pulled_up_*pullUpValue*]"
And than make specific lines for specific values and increase the variable's value every time a pulled_up line occurs.

Advantages: not using the check function which destroys performace and making sure that no line is played twice
Disadvantages: No random element cause they will play in a specific order and you could find yourself running out of lines pretty quick( you can avoid that by letting go of the "only once" idea and reseting the variable to the first value when you reach the last line.

Hope this helps.
Happy writing

Thank you! I´m trying to understand, but could you maybe write a short example? :)
 

DigitalSmutExports

Content Creator
Joined
Sep 12, 2018
Deleted member 124113 Deleted member 124113

initial_settings:{"pullUpValue":1}

pulled_up:"[pull_up*pullUpValue*]"

pull_up1:"This will be the first line played" {"set":{"pullUpValue":2}}
pull_up2:"This will be the second line played" {"set":{"pullUpValue":3}}
.....
....
....
pull_up10:"This will be the tenth line played" {"set":{"pullUpValue":1}}

Initially pullUpValue is set to 1 in the initial settings, so the first time pulled_up is played it routes to pull_up1 which sets the value to 2. Once all ten lines have been played the value is set to 1 and we start over.
 
Last edited:

Deleted member 124113

Potential Patron
Joined
Jun 2, 2017
Deleted member 124113 Deleted member 124113

initial_settings:{"pullUpValue":1}

pulled_up:"[pull_up*pullUpValue*]"

pull_up1:"This will be the first line played" {"set":{"pullUpValue":2}}
pull_up2:"This will be the secong line played" {"set":{"pullUpValue":3}}
.....
....
....
pull_up10:"This will be the tenth line played" {"set":{"pullUpValue":1}}

Initially pullUpValue is set to 1 in the initial settings, so the first time pull_up is played it routes to pulled_up1 which sets the value to 2. Once all ten lines have been played the value is set to 1 and we start over.

Thank you! I'll try that :)
 

DigitalSmutExports

Content Creator
Joined
Sep 12, 2018
Here's a challenge for the code masters:

Can you use code to make the player name appear in all caps?
So if the player name is John
"HELLO *YOU*." would come out as "HELLO JOHN." for the player.
 

Deleted member 124113

Potential Patron
Joined
Jun 2, 2017
Hey :)
I have a problem once again...
I am using moreclothing and In the dialogue I'm writing I want the female to be stripped. But not like completely removing the top. More like going from a white tank, to a pushed down tank. If I want to remove the top completely I just write "[VA_SET_VARIABLE_da.clothes.tops.type_None]" but what do I do if I want it to go from, for instance, a cleavagetank to a pushed down tank? Hope someone know this or have a few tips to share :)
 

DigitalSmutExports

Content Creator
Joined
Sep 12, 2018
what do I do if I want it to go from, for instance, a cleavagetank to a pushed down tank?

[VA_SET_VARIABLE_da.clothes.tops_pusheddowntank,255,255,255] is basically how you do it. There are two things you have to notice here:

1. When it comes to colors there are several acceptable variants. They are
a) RGB (3 values)
b) RGBA (4 values)
c) 2x RGB (6 values, includes secondary top slider)
d) 2x RGBA (8 values, includes secondary top slider)

2. I wrote pusheddowntank as an example but moreclothing decides itself what to call the mod internally and so it's not necessarily exactly what you wrote in the moreclothing settings file. Equip a character with the mod and generate charcode from the modding tab and take a look. That way you see what moreclothing calls the mod.
 

Deleted member 124113

Potential Patron
Joined
Jun 2, 2017
[VA_SET_VARIABLE_da.clothes.tops_pusheddowntank,255,255,255] is basically how you do it. There are two things you have to notice here:

1. When it comes to colors there are several acceptable variants. They are
a) RGB (3 values)
b) RGBA (4 values)
c) 2x RGB (6 values, includes secondary top slider)
d) 2x RGBA (8 values, includes secondary top slider)

2. I wrote pusheddowntank as an example but moreclothing decides itself what to call the mod internally and so it's not necessarily exactly what you wrote in the moreclothing settings file. Equip a character with the mod and generate charcode from the modding tab and take a look. That way you see what moreclothing calls the mod.
Thanks! that really helped me out :)
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
Here's a challenge for the code masters:

Can you use code to make the player name appear in all caps?
So if the player name is John
"HELLO *YOU*." would come out as "HELLO JOHN." for the player.

SPLITSTRING and APPENDSTRING can do this in a veeeeeeery large set of lines. Basically, splitstring on da.him.name, declare empty variable, if the first character is an a, put A and increment index, else if first character is a b, put B and increment index...

Probably you can make a double for loop

Code:
i = 0
result = ""
allLowerCase = "qwertyuiopasdfghjklzxcvbnm"
allUpperCase = "QWERTYUIOPASDFGHJKLZXCVBNM"
lowerCaseArray = splitString(allLowerCase)
upperCaseArray = splitString(allUpperCase)
while i < name.length
  j = 0
  while j < lowerCaseArray.length
    if name.charAt[i] == lowerCaseArray[j]
      appendString(result, upperCaseArray[j])
      j = lowerCaseArray.length
    endif
  endwhile
  currentResult = splitString(result)
  if currentResult.length > i
    appendString(result, name.charAt[i])
  endif
endwhile

Writing it in Dialogue code is probably hell.

Code:
initial_settings:{"i":0, "base":"result.charAt.", "x":"bananas are tasty", "space":" "}
intro:"[split]"
split:"Splitting *x* into single characters...[SPLITSTRINGBYNAEM_x_result][print]"
print:"[SETVAR_i_0][printChar_INSTANT]"
printChar_INSTANT:"[SETVARBYNAEM_varname_base][APPENDVARBYNAEM_varname_i][printCharCheck_INSTANT]"
printCharCheck_INSTANT:"[SETVARBYNAEM_currentChar_*varname*][printChar*i == result.length*_INSTANT]"
printChar0_INSTANT:"[printCharText*currentChar == space*]"
printChar1_INSTANT:"[printCharDone]"
printCharText0:"*currentChar*...[SETVAR_i_+=1][printChar_INSTANT]"
printCharText1:"next word... [SETVAR_i_+=1][printChar_INSTANT]"
printCharDone:"Done."

This was something I wrote a while back for detecting spaces.

You can see how to loop through an array here.

You'd need another array loop in the i-based array loop for the inner while...

Anyway, good luck with that.
 

Deleted member 124113

Potential Patron
Joined
Jun 2, 2017
Hello :)
I was wondering what you guys would do to change the charactercode in the middle of a dialogue? To "swtich girls" so to speak.
I know there are different ways to do this, but which do you prefer?
I know there's one way where you put a charcode in the initial_settings. However that does not always work for me, so I might do it wrong :/ Either way I want to learn your ways if you have any :)
 

Blue Lightning

Avid Affiliate
Joined
Sep 8, 2014
Thanks SkyHeart! Here's what I'm working with... a little embarrassing, but more because of my technical inexperience than the sexual nature lol.

Where exactly would I add the button script?
Hi, H HAMburgler I hope you don't mind if I provide some feedback on this.

It looks like what you want is to be able to switch between oral and anal positions. So what you need is something like the following:
line:"[BUTTONALL_OFF][BUTTON10_ON][BUTTON9_ON]This is the text that will display for this line."{"set":{"da.button10.name":"ORAL","da.button9.name":"ANAL"}}
I always put the [BUTTONALL_OFF] trigger first to clear off any buttons that might be displayed already. Convenient to have in case you load your dialogue after a different dialogue that also used buttons.
You can use up to 10 buttons, The display in descending numerical order from top to bottom, so Button 10 is on top, Button 9 is below that, and so on. So I used the triggers [BUTTON10_ON] and [BUTTON9_ON] to make those two buttons display.
The triggers only cause the buttons to display, to actually turn them on so they function, you need to give them a name with the set command and assigning a value to the "da.button10.name" and "da.button9.name" variables.

Notice how I've separated the two commands within the Set command with a comma? You neglected to do this a few times in you dialogue. For example:
resistance:"Yeah baby choke on that fucking cock"{"style":"Him"}{"check":{"atv_position":"==1"}}
Once you close the wavy brackets, it stops parsing the line for commands, so the check command for the line isn't performed. The correct format would be this:
resistance:"Yeah baby choke on that fucking cock"{"style":"Him","check":{"atv_position":"==1"}}

Ok, so now we've got to tell these buttons what to do. So we need to use the button linetype. For example:
button10:"[ANIMTOOLS_ATV_defaultsdt]I want your cock in my mouth!"
button9:"[ANIMTOOLS_ATV_AnalMediumBody_randomdude123]I want your cock in my ass!"

As to where to put it in your dialogue, it sounds like you want to be able to switch positions from the get-go. I'd suggest using a start linetype, because it will automatically trigger as soon as your dialogue loads.
start:"[BUTTONALL_OFF][BUTTON10_ON][BUTTON9_ON][intro]"{"set":{"da.button10.name":"ORAL","da.button9.name":"ANAL"}}
button10:"[ANIMTOOLS_ATV_defaultsdt]"
button9:"[ANIMTOOLS_ATV_1Anal1]"
I'm assuming 1Anal1 is a custom AnimTools position that you're using?

Ok, so now that we've got it so you can switch positions at the click of a Button, how about addressing some of your earlier questions.
1. Is there a way to distinguish between her reacting to using the position currently, and her reacting to having used the position previously? ie. "Oh yeah fuck my ass" vs. "You want me to suck it after it's been in my ass?"

For this, we're going to need to create some custom variables. We can already track the current position using "atv_position" but we'll need to come up with a custom variable for tracking the previous position. Let's say "last_position" for that.

Now, because this is a custom variable, we need to give it a default value. This value needs to be stated in a line called initial settings, which should be the second line after the dialogue name.
initial_settings:{"last_position":"none"}
We'll set the initial value as "none" since there hasn't been a position switch yet at the start of the dialogue. Next, we need to place a few Set commands to change the value of the variable. The logical place would seem to be the button lines we established earlier.
button10:"[ANIMTOOLS_ATV_defaultsdt]"{"set":{"last_position":"anal"}}
button9:"[ANIMTOOLS_ATV_1Anal1]"{"set":{"last_position":"oral"}}
Then you can add a line such as:
general:"You want me to suck it after it's been in my ass?"{"check":{"atv_position":"==0","last_position":"anal"}}

3. Is it possible to have her produce a dialogue line with a count of the transitions back and forth? "you already fucked me ass-to-mouth 3 times!"
(3b)Or responding to a transition and referring to a past trigger? "you want to fuck me in the ass again? you just came on my face!"
For the first part, you could do a custom variable that has a numerical value, then set it to increase by one each time the thing happens. So, let's say "atm_counter" with an initial value of 0 and a +1 increase each time moving from anal to oral.
initial_settings:{"last_position":"none","atm_counter":0}

button10:"[ANIMTOOLS_ATV_defaultsdt]"{"set":{"last_position":"anal","atm_counter":"+1"}}
button9:"[ANIMTOOLS_ATV_1Anal1]"{"set":{"last_position":"oral"}}
For the second part, you'd need a custom variable to track if he just came on her face.
 

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.