deboned

Villager
Member
Joined
Jul 15, 2015
Messages
8
Reaction score
0
First Language
English
Primarily Uses
Hi everyone! I'm relatively new to RPGMaker and I've been immersing myself in tutorials to learn how to do everything.  I'm starting to try working with scripts but this is the hardest part for me because I have no programming or coding background at all.

I recently downloaded a script by Mr.Bubbles (script here: https://mrbubblewand.wordpress.com/rgss3/gender-functions/ ) that allows you to assign genders and have gender functions and requirements for your actors, but I have one issue I can't figure out: I only have one playable character but I made it so the player is able to choose whether they want to play as a male or a female, so I can't figure out how to assign gender to the actor once the player has chosen what gender they want to be.

Also, if the case is that i CAN'T assign gender after the player has chosen, if i do set up two separate players for both genders, how can I make it so when the NPC's talk to the player they know which actor the player has chosen, because with the \N[n] system I don't know how to make that a vary based if the player chose actor1 or actor2.

i'm sorry if any of this sounds confusing or vague.  I hope someone can help me out with this!!
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
347
Primarily Uses
If they're locked to the first position, you could use \P[0] to get the name. Alternatively, you could probably store which actor the main character is in a variable and go \N[\V[variable]], but I'll need to test that and see if that actually works. (Edit: Yes, the second method works, at least with the default message system.)
 
Last edited by a moderator:

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,942
Reaction score
1,332
First Language
English
Primarily Uses
RMMV
You could also just change the actor graphic depending on what the player's choice was. Like make the choice branch and make one option Male and one option Female. Then If they choose male you can keep the default graphic and if they choose female you can change the actor's graphic with the change actor graphic option.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,200
Reaction score
15,547
First Language
English
Primarily Uses
RMMV
It sounds like you're trying to do something that you don't really need a script for.


Just have a single actor set up in the database. Based on the player's choices, use the Change Actor Name, Change Actor Graphic and Change Actor Class (if necessary) commands to customize that one actor as necessary. If you need to use he/she or refer to the actor's gender anywhere in dialogue, also set a switch to indicate whether they chose a male or female, and use conditional branches to act on the value.


Moving to VX Ace Support
 

deboned

Villager
Member
Joined
Jul 15, 2015
Messages
8
Reaction score
0
First Language
English
Primarily Uses
Thank you for the help! I can't believe how simple the answer was after all haha  :guffaw:
 

Palsa

General of Aurda
Veteran
Joined
Dec 21, 2012
Messages
343
Reaction score
84
First Language
English
Primarily Uses
Use variables, they're a gift from the divine god of game making. :)
I'm going to use 4 characters as an example, they could just as easily be interpreted as male or female.

1. Create a variable called Player.

2. When making your character creation event, change the variable to match the associated character, example:

Jack: 00

Jill: 01

Robin: 02

Marian: 03

'00' Will be your default character, this can also work with genders, example:

Male: 00

Female: 01

Or just as easily:

Female: 00

Male: 01

Depending on the type of game your looking at.

If a gender option is all your planning to have, then you can also use a switch instead of a variable, example:

Male: Off

Female: On

Whichever character is set to 'Off' would be the default character, just as '00' would be if a variable were used.

3. Create a conditional branch set to the Player variable or switch that is used.

4. Change the number to one of the characters, and add whatever scene or action you want the event to show for that character, example:

Conditional branch>Player variable: 00

-Show message: [Jack:] "Who the heck digs a well on top of a hill!?"

Conditional branch>Player variable: 01

-Show message: [Jill] "Shut up and fetch a pail of water already!"

For determining a player character from the beginning, have the player sprite start out as invisible, and change it in the character select event, along with the associated Player variable, once the variable is set, the conditional branches should take care of the rest during game play.

You can also go farther if you want, and use multiple variables to make a truly unique character, but that's up to you.

Another thing to note is that you can change the player's character through eventing, and assign different statistics about the player, characters, events and even system to specific variables.

I like to do that in a common event at the start of the game, so that it's easy to call up when I need it later on, but someone else should explain that, as I don't have the time right now.

Good luck with your project, and I hope my explanation was easy enough to follow. :)
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

Guys, I made a trailer! And, I also launched the Steam page! If you would like to support the game, please Wishlist it :ahappy: ->
working on some tilesets _ノ乙(、ン、)_

CIBl8xT.png


Oq8WKHX.png
aww man, color hex code #C4C4C4 doesn't work for the tint value in this scene I need something darker, which stinks just because I liked that one it was my favorite plastic explosive three times...#696969 (nice) should work better (WHY IS MY BRAIN LIKE THIS)
Tell it to me straight, doc. If I've been trying to piece together a "shorter" game to learn stuff outside of game jams... am I just running away from my WIP? :v

Forum statistics

Threads
117,284
Messages
1,106,124
Members
153,467
Latest member
Kip_
Top