Conditional Dialogue... How the fuu...

Status
Not open for further replies.

KrazENooB

Villager
Member
Joined
May 22, 2013
Messages
12
Reaction score
0
First Language
English
Primarily Uses
I could have sworn the method for making conditional dialouge, as in...

I have the character select an element.

Then, I have a NPC comment on that said selection displaying something like.

"Ho, ho! I see you like [ElementSelection]"

On top of this, I need that selection to be persistent, for later. This is all part of a sort of character creation process.

Player selects element, Element chosen is stored.

Player selects a "Body", Body chosen is swapped with current actor sprite, and then given said element as a trait for purposes of attack type, resistance, and weakness.

Then, that is all stored in a assigned "Player Character Actor" slot.

With my game, I currently have it planned as having up to a party of 20, and going on collectible party members, ranging up to 140 actors/battlers, not to include collectible/recruit able shop-keeps and support characters.

So, to re-cap.

My question is, how would I store my Element Selection, and then use that in dialogue, and later in giving the chosen actor the traits.

That first bit being the current portion I am having trouble with.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
When making the selection, you're using a choice command in the event.

In each choice, you use a different control variable command to store the choice number in a variable.

Then at any later point of the game, you can use a conditional branch on the content of that variable to check which option was choosen and display a different dialogue dependin gon that choice.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
I know of no scripts ( other than my own ) that allow for adding elemental affinities.
Therefore, if you want to add element stats i recommend using that...

No onto your query...

Lets say your choices are Fire, Ice, Thunder and Water, which by the default database are element ID 3, 4, 5 and 6.
You would simple make a variable equal the value of the element id after the choice selection....

Screenshot Of Event.


Damn Ninjas...
I knew I had taken too long with my screenshots and tests :D
 
Last edited by a moderator:

KrazENooB

Villager
Member
Joined
May 22, 2013
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Dekita
Sound like a good start, I am gonna give it a tinker and see if it works. However, that being said.   What if I want an event that stores an actors "Element Type" so that later in diaolouge I can call on it through use of a variable.

For example, I want my choices set up as said, but instead of 4 different variables, it's one per actor, and instead it SETS that variable number to that Element, then calls the variable and displays the element?

Or is that how you'r script is working?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
The screenshot Dekita provided DOES use a single variable. It gives it one of four values, depending on the player's choice.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
Dekita

Sound like a good start, I am gonna give it a tinker and see if it works. However, that being said.   What if I want an event that stores an actors "Element Type" so that later in diaolouge I can call on it through use of a variable.

For example, I want my choices set up as said, but instead of 4 different variables, it's one per actor, and instead it SETS that variable number to that Element, then calls the variable and displays the element?

Or is that how you'r script is working?
My script is not required, for the suggestion that I offered, to work.

The suggestion i provided would indeed store a variable (until you changed it again) which could be caled at any time from anywhere in your game / external scripts.

As Shaz stated my suggestion does only use one variable. If you wanted to have this feature for each actor you would have to have an event that only [x]actor could speak to and arrange a specific variable for each actor.

Of course you would still follow the example given.
 
Last edited by a moderator:

izanamikun

Veteran
Veteran
Joined
Nov 19, 2013
Messages
34
Reaction score
1
First Language
English
Primarily Uses
Ok, I think I found the tutorial you are hoping for. It tells you how to use basic variable scripting to store words that can be called in text boxes. Scroll down to the section titled "Using Strings (letters, words, statements)" and you will have exactly what you are looking for:

http://forums.rpgmakerweb.com/index.php?/topic/16541-intermediateadvanced-game-variables/

I want to THANK THE BEJEESUS out of you, too because I've been looking for this very thing for awhile now. I found it because I saw your question and decided to research it again. So thanks! And I hope this helps!

With this, you can store each player's element as a variable in WORDS instead of numbers and call it directly using V\[n] in the text box. You'll still need a different variable for each character, but this uses MUCH LESS conditional branches, making it simpler.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
With this, you can store each player's element as a variable in WORDS instead of numbers and call it directly using V\[n] in the text box. You'll still need a different variable for each character, but this uses MUCH LESS conditional branches, making it simpler.
My method also stores the element name in the variable; therefore , when calling the variable it shows the name, eg Fire.

Also, 1 conditional branch per actor is not simple enough already ? 

Edit: 

Please dont take offense at these comments. I just read them back and they do seem quite "abrupt" and "to the point". I just want to make my point clear that the methods I provide do exactly as you state.

However, tutorials are always worth a read, for newbies or pro's :)
 
Last edited by a moderator:

izanamikun

Veteran
Veteran
Joined
Nov 19, 2013
Messages
34
Reaction score
1
First Language
English
Primarily Uses
Perhaps I misunderstood what you posted, Dekita. I didn't see anything in your post that referenced exactly HOW to make the variable a word instead of a number, so when you used numbers in your screen shot it just looked like more work than the tutorial showed. I'll admit I'm not versed in scripting, even the basic stuff so you probably meant the same thing the tutorial covered. I apologize for any confusion on my part; but I figured the tutorial explained what seemed to be missing from yours.

In any case, I was really just excited to find that tutorial! I had been upset for some time that I couldn't store words in variables and having it spelled out like the tutorial does was a gem for me. I've been using the basics of the program for quite some time, but as far as scripting goes I'm still very much a noob. For those of us that don't have any basic programming knowledge or scripting experience, what you posted originally could look very different than you meant. You know, you gotta speak slowly so we understand. Haha.

Sorry again, though, for misunderstanding what you posted. I see now after you point it out it is exactly the same as the tutorial, only you don't show when you set the original variables as words. That was what got me confused. With your screenshot and the tutorial, Kraze should have no problems with this solution! ;)
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
I didn't see anything in your post that referenced exactly HOW to make the variable a word instead of a number,
id = $game_variables[11]text = $game_system.elements[id]$game_variables[12] = textThis piece of code is what enters text into the variable.

It first finds the element ID from the choice selected.

Then gets the name of that element from the settings within the database ($game_system.elements)

and finally, it attaches the name onto another variable.

Also, again I would like to mention I wasnt trying to insult your offering or anything like that. So, i also apologize if my reply seemed rude :)
 

izanamikun

Veteran
Veteran
Joined
Nov 19, 2013
Messages
34
Reaction score
1
First Language
English
Primarily Uses
So the elements are hard-coded in the software is what I'm getting from this. Is there a list someplace that shows what elements are used and what their corresponding numbers are?

I dunno if Kraze needs it, but I would love to have that reference. I'm sure it's somewhere in the help file, but I find it difficult to navigate with some queries...

And no worries. I'm just slow is all. ;)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
No, the elements are in your System tab. You can add, remove and change them as you wish.
 

izanamikun

Veteran
Veteran
Joined
Nov 19, 2013
Messages
34
Reaction score
1
First Language
English
Primarily Uses
Oh! I'm a dunce. That makes far more sense. Sorry about that!
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
If for some reason you wanted to manually print out a list of elements on to your console, you could do this.... (script call)

$game_system.elements.each {|i| p i }but i dont know why anyone would need to do that because as Shaz stated, its in the database system tab :)
 

KrazENooB

Villager
Member
Joined
May 22, 2013
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Thanks all, WOW.

So much information to work with. I will try everything out, see what fits for my needs. Thank you all for the quick reply!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top