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.

A couple questions...there're real quick trust me.

sup,
    I have a couple questions for a game im creating, they are listed below.
  • In my game when coming up against say a locked door or whatever, you can choose to either, a) pick the lock using the thief guy, b) smash it open with the warrior, c) melt it with the warlock etc etc...Now i know how to present the options of what to do, but is their a way of randomizing whether it works or not via the certain skill. For example the higher your strength the better chance of smashing the door successfully. If you don't understand ask and ill explain more.
  • My other question is concerning characters and dialog. In the beginning of the game you can choose to play as either one of the four characters in your party, each of them on the same quest. Over time your party members die off, because of i.e greed, or betrayal etc. Now the problem is that the character you choose will be the last one left, so lets say you choose the thief, and the warrior is the first to die. But what if someone chose the warrior? i dont want him to die first, instead i want the thief to die first for instance. What im trying to say is, "is there a way to dictate which of the preset scenarios occure?" and if so, what is the most convenient way. Cus i kno i can make it but ill basicly have to make 4 games, one for each char...and that would be a pain in the ass. 
  • Finaly my last question may sound juvenile and noobish, but what exactly do the skills govern? I mean what is the formula? like, "for each point of strength, our attack power is increased by .5%" Cus i honestly still havnt figuered out what dexterity does, and im kinda hazy on agility. or atleast point me to a place that has this info. Cus i cant read the help files, thier in japanese..and i lost my winxp disc to download the language pack...
I guess they weren't such quick questions after all...but thanks in advance i'll really appreciate this.
 
1. Use conditional branches. This probably isn't the fastest way, but you could try this:
Code:
@>Conditional Branch: Warrior Str >= 50
  @>Control Variables: [0001: Random] = 1
 : Else
  @>Conditional Branch: Warrior Str >= 25
    @>Control Variables: [0001: Random] = Ran (1..2)
   : Else
    @>Control Variables: [0001: Random] = Ran (1..4)
   : Branch End
 : Branch End
@>Conditional Branch: Variable [0001: Random] = 1
  @>#Smash Open Door
 : Else
  @>You failed to smash the door open.
: Branch End
Basically, the code above says: if your warrior has more than 50 strength, there's a 100% chance of breaking open the door. If your warrior has between 25 and 50 strength, there's a 1/2 (50%) chance of breaking open the door. If the warrior has less than 25 str, there's a 1/4 (25%) chance of breaking it open. Of course, you can tweak the values around to make it suitable.

2. At the beginning, you can turn on switches. If you choose the warrior, turn on Switch: Warrior. Then in the scenario where the warrior dies, do:
Code:
@>Conditional Branch: Switch [0001: Warrior] == On
  @>Make thief die instead
 : Else
  @>Make warrior die
: Branch End
And do the same with switches for the thief, warrior, etc.

3. I'm not sure the exact formula for things, but I know that "dextality" is how often you hit enemies, and agility is how often you dodge enemies and I believe how often you run from battles.
 
For # 2, here's what I would do. (there are many ways, none of them 'wrong')...

In the beginning, when the player selects his character. Just order the characters.
For example, he picks the warrior. And you want the others to die off in this order: Thief, Warlock, Cleric

Remove all of the characters from the party, then add them back in this order:
Warrior, Cleric, Warlock, Thief

Then, later when they start dying off, have the 'last' player in the party die off.
(check the number of characters in the party, and kill off the last one)

Make sense?
 
That is actually a very good idea!!! Sorry I didn't reply earlier, i was out of town. Any idea how i can ask the program to check for the last character and automatically kill it off? or would i have to manually do that?
 
Hmmm, let's think....

We have these commands:

Control Variables: [0002: # in party] = Party Members
Conditional Branch: [Aluxes] is in the party

What we don't have is the order.

You could store the order in variables when the player chooses a character.
Then, later use a whole bunch of conditional branches to determine which actor to remove.

OR, we could simplify it by using a bit of scripting...
Code:
Control Variables: [0002: # in party] = Party Members
Conditional Branch: Variable[0002: # in party] == 4
    Script: n = $game_party.actors[3].id
              $game_party.remove_actor(n)
Conditional Branch: Variable[0002: # in party] == 3
    Script: n = $game_party.actors[2].id
              $game_party.remove_actor(n)
Conditional Branch: Variable[0002: # in party] == 2
    Script: n = $game_party.actors[1].id
              $game_party.remove_actor(n)
Conditional Branch: Variable[0002: # in party] == 1
     # Kill main player - Game over
     # Or don't do anything

Or, even better....
Paste this above main in the script editor
Code:
class Game_Party
  #--------------------------------------------------------------------------
  # * Remove Last Actor     
  #--------------------------------------------------------------------------
  def remove_last_actor
    n = @actors.size
    i = @actors[n - 1].id
    # Delete actor
    @actors.delete($game_actors[i])
    # Refresh player
    $game_player.refresh
  end
end

Then just use....
Code:
Control Variables: [0002: # in party] = Party Members
Conditional Branch: Variable[0002: # in party] > 1
    Script: $game_party.remove_last_actor

Warning!  remove_last_actor will remove the main player if he's the only one left.

Be Well
 

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