Gw Temp

Menu

Tutorial - 'Chocobo Betting System' by serados x

An item about RPGMaker 2000 posted on

Blurb

How to create a betting system in your game. Not just limited to chocobos!

Body

So you want to have a chocobo betting system. Well, this system is not just confined to chocobo betting. you can use this for any type of race betting. This is an easy tutorial that involves 2 racers. You can add more if you want to. This involves knowledge of variables and forks.

First, you need to set up the choices and the starting message. The code would look something like:

Msg: Do you want to bet on chocobos? Each bet costs 200 coins.
Show Choice: Yes/No
[Yes] Case
Change gold held: Remove 200 coins.
[No] case
<>

That is just the giving of the money and speech now, assign two variables each to the racers, one for it's winning chance and one for its speed. We'll use a minimum speed of 100 for easy reference. We'll take the racer's names as Jack and Jill. First we must set the speeds.

Change varbl: [0001: Jack speed], set, random 100-120
Change varbl: [0002: Jill speed], set, random. 100-120

You could set their speed ranges differently.
Now we must tell the player what their speeds are,

Show msg: Jack's speed is \v[0001]
Show msg: Jill's speed is \v[0002]
Show msg: Choose chocobo to place bet on.
Show choice: Jack/Jill

Now, here's a lot of coding. This determines your racer's winning chances.

[Jack] Case
If varble [0001:Jack's speed] above 100(No else case)
Change Varble: [0003: Jack win chance] +1

Now start a new line of code:

If varble [0001: Jack's speed] above 110
Change varble: [0003: Jack win chance] +2

Another new line:

If varble [0001: Jack's speed] above 120
Change varble: [0003: Jack win chance] +3

Now this time you compare the winning chances of Jack and Jill. This fork must have an else case.

If varble [0003: Jack win chance] above v[0004: Jill win chance]
Show msg: Jack won the race!
Show msg: Choose Prize
Show choice: Any prize and add those items in their cases respectively.
ELSE CASE:
Show msg: Jack lost...

Now do the same for Jill, except change the variables and names to Jill's. There you have it, a working chocobo betting system. You can have higher ranges of speed and stamina if you know how to do it. You can also have classes, which I am doing. You can add racers etc. too. Just remember to increase the winning chance after a regular amount of speed and ou should be fine. Also, if you have more than two racers, always try to compare the racer with the slowest average speed before those who have higher averages. You should be all right with this but this takes only the speed of the racer. You can make it better to make it more luck based