RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RESOLVED]Help with Character Creator Screen

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 87
Master of Stepmania
Hi everyone,

I'm currently working on a project which involves a character creation at the start of the game. My idea is to ask a lot of questions, activate different switches, then in the end check for all the possibilities. (Yes, that's a lot of possibilities, if there's an easier method don't hesitate to share it.)


So all in all, this idea is very simple. However, i have no clue on how to check for so many switches. Basically, what i'm wondering is how you would do this:

If "this" and "this" and "that" and "this" etc.
create character based on the above switches and answers

All help will be greatly appreciated.

Regards,
- David
« Last Edit: April 09, 2008, 01:36:34 PM by gameo »
Does 2+2 equal a peanut?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, you'd put them inside each other. Like so:

@>Conditional Branch: Switch [XXX] is ON
  @> Conditional Branch: Switch [YYY] is ON
    @> Whatever you want to happen when both are on
    @>
   : Else
     @> Whatever you want to happen when just XXX is ON
     @>
   : Branch End
 : Else
  @> Conditional Branch: Switch [YYY] is ON
    @> Whatever you want to happen when just YYY is ON
    @>
   : Branch End
 : Branch End
@>


 But, I would argue that for such a problem, variables are better, though you may need to be clever to use them.

For all the attributes you want your character to have, you can just assign one variable. That way, a response to a certain question can be assigned a certain value.

For instance, let's just take class selection now. Let's give one variable and two questions for simplicity

We have two possible classes:
Thief
Paladin

Now, we can say that for the character to become a Paladin, he would have to have an outcome above 4. Else he is a thief.


Question 1:

You see an old lady with expensive jewellry walking down the street and nobody is around. You:
(A) Mug her
(B) Offer to Escort her, out of the goodness of your heart
(C) Do nothing

Since (A) is something a Thief would do, add nothing to the variable
Since (B) is something a Paladin would do, add 4 to the variable
Since (C) is neither, add 2 to the variable

Question 2:

You see a lost child who appears to be rich in the wilderness. You:

(D) Offer to help her find her way back home
(E) Kidnap her and try to get a ransom.
(F) Point her in the right direction

Since (D) is something a Paladin would do, add 3 to the variable.
Since (E) is something a Thief would do, add 1 to the variable
Since (F) is something neither would do, add 2 to the variable


Now, we have these outcomes from answers:

AD - 3 - Thief
AE - 1 - Thief
AF - 2 - Thief
BD - 7 - Paladin
BE - 5 - Paladin
BF - 6 - Paladin
CD - 5 - Paladin
CE - 3 - Thief
CF - 4 - Thief

As you can see, it's much more dynamic than switches but somewhat harder to keep track of. That being said, it would take careful scoring (more careful than what I did) to make the choices -> class thing work logically, and the complexity only grows the more questions and classes you include. But, I would argue that those complexities exist also ion a switch based system.

Also, in response to your actual question - if you did it like this the branches would look like this:

@>Conditional Branch: Variable [Class] > 4
  @>Class = Paladin
@>Else
  @>Conditional Branch: Variable [Class] > 0
    @>Class = Thief
   :Branch End
 : Branch End

In truth, the second con. branch is unnecessary in this case, as there are only two options. If it is not greater than 4, then you are a thief. I included it to show you how it would be done for more cases.


***
Rep:
Level 87
Master of Stepmania
Amazing as always modern. I'm doing this with 4 classes now =D

Also, variables are a piece of cake if you've tried programming ;)

QUADOUBLE EDIT: Everything is fixed, and it's working. Thanks modern!
« Last Edit: April 09, 2008, 01:36:19 PM by gameo »
Does 2+2 equal a peanut?

**
Rep:
Level 85
I am already there
thanx soooo much man your the best! ;D