Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Password help

Hi guys, new to the boards here and playing around with some different ideas to use later in the game I am creating. I put my main project on hold for now because I just keep finding new things I want to do with it, and I have to keep going back and changing everything when i learn something new.

Right now what I am trying to figure out is how to use variables for a password. I know how to set up a fixed number password, but  I want to set up a random password.
Example, talk to guy1 in one location, and that event uses the command:
@>Control Variables: [0008: RandomPW1] = Random No. (0...9999)
That should cause the variable RandomPW1 to be set to a random number between 0 and 9999.
I can get all this to work, but the problem I am having is, I don't know how to make the NPC pop up a text box with the actual numerical value.
example:
NPC1: Come for a password?
Choices yes/no
Yes = Ok (randomizes PW)
Text: Your password is....
Text: (variable value)
That way the user knows what the randomized variable is.

For this example I want to use a 4 digit PW.
I have several other questions but i'll settle for this one for now.
Thanks in advance for any help

Edited to add:
I'm not even sure if this is in the right area now, if not, i'm sorry, very tired writing this up, but I thought of more things to add about this specific question.

I assume that this will work the same way and once I figure out how to call up on screen the value of said variable, it will be the same for all types of events, but I also would like to add situations where other characters keep track of certain variables.
For example, a cleric learns a spell from someone, each time the spell is used it has its desired effect (heal/damage/whatever) and also calls a common event to add +1 to variable [Spell Name] I already have common events that check and say if variable = 20 for example, learned upgraded version.
I would like to have the character go back to the person they learned it from and have the person say something like: "Oh, I see you've been working on the skill I showed you, you've used it [xxx] times." [xxx]= value of variable.

Edit#2: Topic got moved to the right spot while I was editing it, Thanks )
 
I think i finally figured it out, after the line that gets a random variable between 0000-9999 I have
Text: Your password is \v[8]!
Seems to give me the variable.
I thought the \v\n type commands were only available if you were using one of the larger message enhancing scripts.
I think i finally answered my own question, but are there other ways to display this type of message on screen?  And, I also want to start using some of the message scripts i think, so that I can have my windows say the characters name in the corner that is talking instead of having every single text entry to be like:
Text: Char1: blahblahblah
Text: Char1: blahblahblah
Text: Char1: blahblahblah
Will setting up any of the other message scripts change the usability of the \v[ x ] function?
Is there a preferred script out there I should look for?
As it is, i'm probably going to have to go back and rewrite all events for my game up til now, so easier is always nice, but I would prefer something that will be better in the long run that I won't want to change again when I have a lot more story written up.
 
All of the custom message scripts are pretty handy. Don't worry, they won't overwrite \v[ x ] or any of the default functions. You can try ccoa's UMS, dubealex's AMS, or Mr. Mo's UCMS. If you want ccoa's UMS, you'll have to go to another site (rpgrpgrevolution, rmxpuniverse) to find it.
 
Thanks for the info, do you know of any pros/cons between them, or is there a write up somewhere I can look at comparing them? Sorry if that sounds incredibly lazy, but its getting to be sleepy time for me =P
 
Hmm, they're all pretty good. ccoa's has shortcuts, so you can configure "\v[30]\nm[\N[1]]\face[f1]\al\fl" into "\a1" and call it in a second. The UCMS has hover text, which allows you to walk while the text is showing. I haven't tried dubealex's, but it's pretty easy to use too. Just pick whichever fits your needs.
 
thanks much, i'll take a look around and see what looks good. I'm still new to a lot of the script type commands, and all the stuff like
"\v[30]\nm[\N[1]]\face[f1]\al\fl" into "\a1"
is still all greek to me, I only learned what I learned by looking  at some other threads completely unrelated and using trial and error from that
 
You'll get it :smile: All of the commands are listed at the beginning of each script. Once you get the hang of it (use it a couple of times), it's easy enough to memorize.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top