Need help with something I'm sure RPG M VX Ace can do without scripts

Status
Not open for further replies.

gvduck10

Quacker Jack
Veteran
Joined
Dec 23, 2012
Messages
322
Reaction score
124
First Language
English
Primarily Uses
N/A
So I am trying to make conditional branches where NPCs will have different dialogue if certain stats are high enough.

Basic concept:

-------------------------------------

If

Strength (in this case Bravery), is >= 20 NPC will say "dialogue b"

Else

NPC will say their default "dialogue a"

-------------------------------------

It is just the bolded part I can't figure out. The only option in cond. branch I'm not familiar with is Variable, and I'm assuming that's what I{ll need. Instructions needed.

thanks!!!!!
 
Last edited by a moderator:

djDarkX

Retro & Remastered Music Guru
Veteran
Joined
Jan 17, 2013
Messages
2,700
Reaction score
1,901
First Language
Music
Primarily Uses
RMMV
Yeah, it's easy enough.

First, right before you call the branch, set up variables to save stat data to them.  (ex. 1 = ATK, 2 = DEF, etc.)

To do this, simply use Control Variables and set it to Game Data using Actor n and then the stat in question. (n = actor name)

The event should look like this: Control Variables: [0001: name_of_stat] = [n]'s ATK

Now, call the conditional branch to check the variable against the number you want it to check for.  Simple!

A couple more steps are required in the process, but it's easily done.  Hope this helps!
 

MyLordRobinson

Emperor of Carnelia
Veteran
Joined
May 13, 2012
Messages
881
Reaction score
84
First Language
English
Primarily Uses
Himeworks also has a script that easily allows you to edit choices depending on data within your game.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Himeworks also has a script that easily allows you to edit choices depending on data within your game.
Though we try to encourage people (especially new users) NOT to use scripts unless they're actually needed. So if there's an easy way to do it via events, then that would be the preferred option.


The only issue here is that I don't see a parameter called STRENGTH, so you may have to find out what it's really called. Only the basic parameters that you see on the Class screen (not listed in features, but the one with the parameter curves) are available in Control Variables through the Game Data option. The others (listed as Sp-Parameter and Ex-Parameter in Features) would require you to use the Script box in Control Variables.
 
Last edited by a moderator:

gvduck10

Quacker Jack
Veteran
Joined
Dec 23, 2012
Messages
322
Reaction score
124
First Language
English
Primarily Uses
N/A
thanks to you both.... kind of scared to try scripts (never had any success in the past)
 

gvduck10

Quacker Jack
Veteran
Joined
Dec 23, 2012
Messages
322
Reaction score
124
First Language
English
Primarily Uses
N/A
Though we try to encourage people (especially new users) NOT to use scripts unless they're actually needed. So if there's an easy way to do it via events, then that would be the preferred option.

The only issue here is that I don't see a parameter called STRENGTH, so you may have to find out what it's really called. Only the basic parameters that you see on the Class screen (not listed in features, but the one with the parameter curves) are available in Control Variables through the Game Data option. The others (listed as Sp-Parameter and Ex-Parameter in Features) would require you to use the Script box in Control Variables.
That is exactly what I am referring to. I would just change the name for my purposes. I would be using ATK DEF ect, that are pre-programmed into RPG M VX Ace. However, would a control variable also take into consideration equipment adjustments??
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
gvduck10, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


Variables can do a lot of things. I suggest playing the Variables Guide and getting acquainted with them.
 
Last edited by a moderator:

gvduck10

Quacker Jack
Veteran
Joined
Dec 23, 2012
Messages
322
Reaction score
124
First Language
English
Primarily Uses
N/A
The guide was helpful, but left with me one question.... If I set my Variables to [actions]'s ATK, DEF, ect, at the beginning of the game, will the system check his current stat when it sees the variable within an event, or merely "record" his stat at the beginning of the game and always use that.

The difference being: would I always need to set the control variable command before the conditional branch, or is just using the variable enough once its been set?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You need to set it just before you use it in a conditional branch.


Control Variables puts a value into a variable, and it stays as that value until you change it again. It does not create a link between the variable and the Actor's stats that updates itself automatically.
 
Last edited by a moderator:

gvduck10

Quacker Jack
Veteran
Joined
Dec 23, 2012
Messages
322
Reaction score
124
First Language
English
Primarily Uses
N/A
It definitely takes equipment into account. I just tested that part. I also confirmed that I must use the Control Variable in each event, prior to any conditional branch, if I want the system to check the most current ATK, DEF, ect. stat. Thank you for all your help!!

Now I can build a dating component into my RPG where the "maidens" will have different reactions to your character depending on your levels of cuteness, affluence, wit, ect. HURRAY
 

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 Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top