The BRPG

by SAOarmy in Circuits > Microsoft

499 Views, 1 Favorites, 0 Comments

The BRPG

New YT Logo.png

I have always been interested in programming, And using batch programming has opened new windows for me. Today, I'll be showing you how to make a fully operational batch programmed RPG.

Getting the Requierments

Requirements

  • A Windows 10, 8, or 7 computer with notepad.exe and cmd.exe installed
  • A decent amount of time
  • Some batch coding experience

Open Notepad

new-win-logo.gif

Set Up the Code

Screenshot (11).png

In Notepad, type in the following(*=changeable)

@echo off

title *BRPG

color *F0

this will be the heading of your code.

Set Up the Stats

Screenshot (12).png

The next thing you need to do set the starting stats (HP, MP, AP, Armor, Weapons, Items). Add the following to your code(*=changeable)

goto startup

:startup

set HP=20

set MP=40

set AP=6

set inv_armor=0,0,0,0

set inv_weapon=1,0,0,0

set inv_item=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

set money_cellions=\c\40,000

set money_gold=\g\6,000

set money_dollars=$100,000

set game_lvl=1

set game_exp=0

set game_act=0

set game_enemies-defeated=0

set /p name=What is your name?

echo Welcome %name%, choose your class.

echo.

echo *Ninja

echo *Assassin

echo *Warrior

echo *Mage

set /p class= Type option

if "%class%"=="*Ninja" goto act_1_ninja

if "%class%"=="*Assassin" goto act_1_assassin

if "%class%"=="*Warrior" goto act_1_warrior

if "%class%"=="*Mage" goto act_1_mage

if not "%class%"=="*Ninja" goto err

if not "%class%"=="*Assassin" goto err

if not "%class%"=="*Warrior" goto err

if not "%class%"=="*Mage" goto err

Set Up the Acts for Your Story

Screenshot (13).png

Next you need to set up your story. For each act you make use the following base code. Repeat if needed.(*=changeable)

:act_*1_*ninja

cls

echo *insert act text here

echo *enter choice

echo *enter choice

set /p *action=Type option

if "%*action%"=="*choice" goto act_*1-1_*ninja

(Optional)Set Up the GameOver Screen

If you feel like setting up a battle mechanic, then you'll need a GameOver screen. Here is a base code for one. 99% of it is changeable

:gameover

echo GAME OVER

echo _____

echo | x x |

echo | _ |

echo |____|

pause

goto act_1_ninja

remember, all of this is changeable and optional.

Saving Your Game

Screenshot (14).png

Name your file what ever you want, but make sure to add .bat at the end and set the file type to "All Files" so that it doesn't save as a .txt document (.txt=text document). Viola! You have Batch RPG that is only playable on Windows computers. Thank you for viewing this Instructable. If you have any questions, feel free to e-mail me at saoarmy06@gmail.com. See Ya Next Time!