Batch RPG Starting Piont

Intro: Batch RPG Starting Piont

This is a quick starting point for a batch file text based game. My idea was a dnd type game using the D20 system.
Let's begin!

Step 1: Batch

To create a batch first open notepad and remember when you save the file change the .txt to .bat by saving it as filename.bat

Step 2: Script

Copy and paste this into notepad:

@echo off
title Mage Quest
echo Mage Guild
echo Enter Name
set /p name=
set pick=7
pause
goto start
:start
cls
set /a pick=%pick% -1
set lvl=1
set armor=0
set /a ac=(10 +((%lvl% /2) +%armor%))
set setscore=%pick% +10
echo What will your %pick%th highest stat be?
echo 1 Strength
echo 2 Constitution
echo 3 Dexterity
echo 4 Intelligence
echo 5 Wisdom
echo 6 Charisma
set /p chsc=choice1~6
if %chsc%==1 set /a str=(%setscore% +(%lvl% /2))
if %chsc%==2 set /a con=(%setscore% +(%lvl% /2))
if %chsc%==3 set /a dex=(%setscore% +(%lvl% /2))
if %chsc%==4 set /a int=(%setscore% +(%lvl% /2))
if %chsc%==5 set /a wis=(%setscore% +(%lvl% /2))
if %chsc%==6 set /a cha=(%setscore% +(%lvl% /2))
if %pick%==0 goto charstats
if %pick%==0 cls
else
goto start
:charstats
echo %name%
echo Strength %str%
echo Chomstitution %con%
echo Dexterity %dex%
echo Intelligence %int%
echo Wisdom %wis%
echo Charisma %cha%
echo AC %ac%
pause

Step 3: Done!

I hope this was helpful!

Share

    Recommendations

    • Audio Contest 2018

      Audio Contest 2018
    • Fix It! Contest

      Fix It! Contest
    • Furniture Contest 2018

      Furniture Contest 2018

    20 Discussions

    0
    None
    Optikk

    1 year ago

    Im really new to Batches, any ideas for where to start?

    0
    None
    ERER456123

    2 years ago

    Search up "How to Batch for Starters". It's some of the basic codes I know.

    3 replies
    0
    None
    MACE4ERER456123

    Reply 2 years ago

    Can you tell me why this doesn't work?

    @echo off

    title MyPetz

    echo Virtual pet

    echo what's your pet's name?

    set /p name=

    pause

    goto start

    :start

    cls

    echo __________________

    echo | |

    echo | O O |

    echo | o |

    echo | |

    echo | |

    echo | |

    echo ____________________

    echo %name%

    echo Food(1) Pet(2) Play(3)

    set /p chsc=What do you want to do 1~3:

    if %chsc%==1 goto feed

    if %chsc%==2 goto pet

    if %chsc%==3 goto play

    pause

    :feed

    cls

    echo __________________

    echo | |

    echo | O O |

    echo | o |

    echo | |

    echo | |

    echo | |

    echo ____________________

    echo You fed %name%!

    pause

    goto start

    :pet

    cls

    echo __________________

    echo | |

    echo | O O |

    echo | o |

    echo | |

    echo | \_______/ |

    echo | |

    echo ____________________

    echo You pet %name%!

    pause

    goto start

    :play

    cls

    echo __________________

    echo | |

    echo | O O |

    echo | o |

    echo | |

    echo | \_______/ |

    echo | |

    echo ____________________

    echo You played with %name%!

    pause

    goto start

    pause

    0
    None
    GabrielW25MACE4

    Reply 2 years ago

    you can't use this symbol | because that is used to seperate cmd commands. you should create each ascii art you're doing in seperate text files, then use the type command to call them.

    Create your art in a text file in the same folder as your game (art.txt)
    write

    type ./art.txt

    echo %name%

    and so on. hope this helped!

    0
    None
    MACE4GabrielW25

    Reply 1 year ago

    Sorry i'm late, but thank you SO much for your help!

    That’d be great. Honestly I haven’t worked on this since I posted it. If you want to take a crack at it that’d be amazing!

    0
    None
    Prof. PickleLusoFeaz

    Reply 5 years ago on Introduction

    ...A little bit too late. Our team fell apart as exavi's computer broke and WOKANDAL had his super important exams. We never got back to it, and not much progress has been made.

    I'd like to see some good instructables from you though.

    0
    None
    mastervrunnefProf. Pickle

    Reply 3 years ago

    Hi I am maaking a fully fleged game its called the right key you have to press the right key to move your charactor when I finish it can I uplode it to the app store or is there any outher way I can get money from it?

    0
    None
    CarsonK

    3 years ago on Introduction

    @echo off

    title Forest Survival

    echo Forest Survival

    echo Will you survive, or die trying?

    echo Enter Name

    set /p name=

    set pick=7

    pause

    goto start

    :start

    cls

    set /a pick=%pick% -1

    set lvl=1

    set armor=0

    set /a ac=(10 +((%lvl% /2) +%armor%))

    set setscore=%pick% +10

    echo What will your %pick%th highest stat be?

    echo 1 Strength

    echo 2 Constitution

    echo 3 Dexterity

    echo 4 Intelligence

    echo 5 Wisdom

    echo 6 Charisma

    set /p chsc=

    if %chsc%==1 set /a str=(%setscore% +(%lvl% /2))

    if %chsc%==2 set /a con=(%setscore% +(%lvl% /2))

    if %chsc%==3 set /a dex=(%setscore% +(%lvl% /2))

    if %chsc%==4 set /a int=(%setscore% +(%lvl% /2))

    if %chsc%==5 set /a wis=(%setscore% +(%lvl% /2))

    if %chsc%==6 set /a cha=(%setscore% +(%lvl% /2))

    if %pick%==1 goto charstats

    else

    goto start

    :charstats

    cls

    echo %name%

    echo Strength %str%

    echo Chomstitution %con%

    echo Dexterity %dex%

    echo Intelligence %int%

    echo Wisdom %wis%

    echo Charisma %cha%

    echo AC %ac%

    pause

    Just made a few tweaks

    hello I am a beginning batch file maker and I was wondering if we could both make a RPG text based game and put it on windows app store

    0
    None
    cocoandpuff

    4 years ago on Introduction

    @echo off
    color 0b
    TITLE Goose Man
    echo ./ooo:`
    echo -dh/--:++ ``` ```` ``` ```
    echo `ms `...` /dyyydo` .hhyydh. -dyyy. -hhyhh-
    echo .M+ :ssmy -N: .N+ dy hh -ds/. `mh+++dh
    `echo sm: hy -N+ :N: hh` `dy `/m+`my::::-
    echo :sdhhhy/ :yhhhy: `sdhhh+` +hhhy. .shhhh/
    echo.
    echo /Nm/ .dNs
    echo /N/m: `dohy -+sso- `o-+so-
    echo /N`+m. hs`hy --..+N- .My:.oN.
    echo /N` sd`sh hy +hhhhM: .N- -N-
    echo /N` `hmm` hy `my::sM: .N- -N-
    echo ./ `+. :: `/+/./. `+` `+`
    pause >nul
    :Main
    cls
    echo Welcome to Goose Man
    echo.
    echo 1.Start
    echo 2.Exit
    set /p $=Enter:


    if %$% equ 1 goto Start
    if %$% equ 2 goto exit
    goto Main

    :Start
    cls
    setlocal enabledelayedexpansion
    set /p name=Enter your name:
    if exist QE%name%SAV.dll set load=1
    goto new

    :new
    set hp=100
    set exp=0
    set exptill=60
    set gold=50
    set lvl=1
    set power=4
    set powergain=3
    set weappower=2
    set weapprice=120
    set pots=1
    set armor=0
    goto home

    :load
    for /f %%a in (QE%name%SAV.dll) do set %%a
    set /a temp2=(%hp% * %lvl% + %exp% * %exptill% + %weapprice% + %power% * %weappower%)/(%gold% + %pots% + %powergain%)
    if not %temp1% equ %temp2% set temp3=1
    goto home

    :death
    cls
    echo You Died!
    echo You lost some stuff...
    set /a exp=%exp% - (%exp% * 65/100)
    set hp=1
    pause >nul
    goto home

    :runaway
    cls
    echo You sucsessfully ran away!
    set hp=1
    pause >nul
    goto home

    :levelup
    cls
    echo Congratulations! LEVEL UP
    pause >nul
    set /a 1v1=%lvl% + 1
    set /a exp=%exp% - %exptill%
    set /a exptill=%exptill% + %exptill% * 65 / 100
    set /a power=%power% + %powergain%
    set /a powergain+%powergain% +1
    set hp=100
    goto save

    ::# HOME #####################################################################################################################

    :home
    set en1hp=40
    set en2hp=80
    set en3hp=160
    if %exp% geq %exptill% goto level up
    cls
    if"%temp3%"equ "1" echo You Are A Cheater!
    echo Level %lvl% Experience %exp%/%exptill% Armor %armor%
    echo Health %hp%/100 Gold %gold% Potions%pots%
    echo.
    echo Where do you want to go?
    echo.
    echo 1.Outside the village
    echo 2.Shop
    echo 3.Healer
    echo 4.Save Game
    echo 5.Exit
    echo.
    set input=5
    set /p input=Enter:
    if %input% equ 1 goto out
    if %input% equ 2 goto shop
    if %input% equ 3 goto healer
    if %input% equ 4 goto save
    if %input% equ 5 goto Main
    goto home

    :shop












    .````` `.```
    echo `````````` `------. ------.`
    echo `` . .----------...---------.
    echo `.......`` `.--------------------------`
    echo .:----:` `.----.---------------- .---. +1 Level
    echo `-------:-. `.` .--------------- `.
    echo `-------------.` ----------------
    echo -:--------------- ----------------
    echo -::::::::::::::::: ----------------
    echo -::::::::::::::::/ ----------------
    echo .::::::::::::::::/ ----------------
    echo -:::::::::::::::: .------------...
    echo ``..----::::::-`
    echo ------------------------------------------------------------------------------
    echo ------------------------------------------------------------------------------
    echo ------------------------------------------------------------------------------
    echo What would you like to buy?
    echo.
    echo 1)Potion
    echo 2)Armor
    echo 3)+1Level
    pause >nul

    if %input% equ 1 goto buypotion
    if %input% equ 2 goto buyarmor
    if %input% equ 3 goto buylevel
    goto home

    :buypotion
    echo Yay! you bought a Potion
    set pots=%pots% + 1
    set gold=%gold% - 30
    pause >nul

    :: #ENEMY1 #########################################################

    :out
    set en1hp=40
    cls
    echo You were attacked by a goblin!




    color 0a
    echo `.````-/+o+:..://+/.
    echo `+ssyhhyhddhyhyyo/-`
    echo `-odhhhdhdhhho-`
    echo .oyddddmmh:`
    echo `.ohdmmmmhy+/:-`
    echo `+yhhhhhhyyyyhy.`
    echo ``-yhyshyssyhddhdo-`
    echo `.syhhhhhhhdddhyhd+.
    echo `.oddhohhyhhhdd+/hddy`
    echo `-hhdyhhysydddmo.yddm-
    echo .:dmy+dhysyddddh-:ymm:`
    echo `.smm/+ddhhddmddmo.smm/``
    echo `-dmm/hhddddmddhdh/dmmo``
    echo :hddhhdddy:/ddhddhddds`
    echo .sdddddmo..`-yddddhos:
    echo .:+hmmdd.````omdmd:`
    echo .smmmo``` .dmmms
    echo .`+ddmmo` ` -dmms
    echo ./osdddmmd.` `sddd/
    echo .yhdddhys:-` -dmdddy.`
    echo ``...`` --:/:.



    pause >nul
    goto fightgoblin

    :fightgoblin
    cls



    echo `.````-/+o+:..://+/.
    echo `+ssyhhyhddhyhyyo/-`
    echo `-odhhhdhdhhho-`
    echo .oyddddmmh:`
    echo `.ohdmmmmhy+/:-`
    echo `+yhhhhhhyyyyhy.`
    echo ``-yhyshyssyhddhdo-`
    echo `.syhhhhhhhdddhyhd+.
    echo `.oddhohhyhhhdd+/hddy`
    echo `-hhdyhhysydddmo.yddm-
    echo .:dmy+dhysyddddh-:ymm:`
    echo `.smm/+ddhhddmddmo.smm/``
    echo `-dmm/hhddddmddhdh/dmmo``
    echo :hddhhdddy:/ddhddhddds`
    echo .sdddddmo..`-yddddhos:
    echo .:+hmmdd.````omdmd:`
    echo .smmmo``` .dmmms
    echo .`+ddmmo` ` -dmms
    echo ./osdddmmd.` `sddd/
    echo .yhdddhys:-` -dmdddy.`
    echo ``...`` --:/:.
    color 0b
    echo You have %hp% health
    echo Goblin has %en1hp%
    echo.
    echo 1.Attack
    echo 2.Drink Potion
    echo 3.Run Away!
    set input=5
    set /p input=Enter:
    if %input% equ 1 goto attackgoblin
    if %input% equ 1 goto drinkpotgoblin
    if %input% equ 1 goto runaway

    :attackgoblin
    cls
    if %armor% geq 5 goto attackgoblin2
    set /a en1hp=%en1hp% - (%power% + %weappower%)
    if %en1hp% leq 0 goto killedgoblin
    set /a hp=%hp% - (4 - %armor%)
    if %hp% leq 0 goto death
    goto fightgoblin

    :attackgoblin
    cls
    set /a en1hp=%en1hp% - (%power% + %weappower%)
    if %en1hp% leq 0 goto killedgoblin
    set /a hp=%hp% - (7 - %armor%)
    if %hp% leq 0 goto death
    goto fightgoblin

    :drinkpotgoblin
    if %pots% Iss 1 (
    echo You don't have any potions
    pause >nul
    goto fightgoblin
    )
    set /a hp = %hp% + 50
    set /a pots=%pots% - 1
    goto fightgoblin

    :killedgoblin
    cls
    echo You Killed Him!
    echo you gained 7 exp and 6 gold!
    set /a exp=%exp% + 7
    set /a gold=%gold% + 6
    pause >nul
    goto out2

    :: # Enemy2#############################################

    :out2
    cls
    echo 1.Go further
    echo 2.Wait Here
    echo 3.Go home
    echo 4.Kill goblin again
    set input=5
    set /p input=Enter:
    if %input% equ 1 goto out3
    if %input% equ 1 goto out
    if %input% equ 1 goto home
    if %input% equ 4 goto attackgoblin2
    goto out2

    :attackgoblin2
    set en1hp=40
    cls
    echo You were attacked by a goblin!




    color 0a
    echo `.````-/+o+:..://+/.
    echo `+ssyhhyhddhyhyyo/-`
    echo `-odhhhdhdhhho-`
    echo .oyddddmmh:`
    echo `.ohdmmmmhy+/:-`
    echo `+yhhhhhhyyyyhy.`
    echo ``-yhyshyssyhddhdo-`
    echo `.syhhhhhhhdddhyhd+.
    echo `.oddhohhyhhhdd+/hddy`
    echo `-hhdyhhysydddmo.yddm-
    echo .:dmy+dhysyddddh-:ymm:`
    echo `.smm/+ddhhddmddmo.smm/``
    echo `-dmm/hhddddmddhdh/dmmo``
    echo :hddhhdddy:/ddhddhddds`
    echo .sdddddmo..`-yddddhos:
    echo .:+hmmdd.````omdmd:`
    echo .smmmo``` .dmmms
    echo .`+ddmmo` ` -dmms
    echo ./osdddmmd.` `sddd/
    echo .yhdddhys:-` -dmdddy.`
    echo ``...`` --:/:.



    pause >nul
    goto fightgoblin

    :fightgoblin
    cls



    color 0a
    echo `.````-/+o+:..://+/.
    echo `+ssyhhyhddhyhyyo/-`
    echo `-odhhhdhdhhho-`
    echo .oyddddmmh:`
    echo `.ohdmmmmhy+/:-`
    echo `+yhhhhhhyyyyhy.`
    echo ``-yhyshyssyhddhdo-`
    echo `.syhhhhhhhdddhyhd+.
    echo `.oddhohhyhhhdd+/hddy`
    echo `-hhdyhhysydddmo.yddm-
    echo .:dmy+dhysyddddh-:ymm:`
    echo `.smm/+ddhhddmddmo.smm/``
    echo `-dmm/hhddddmddhdh/dmmo``
    echo :hddhhdddy:/ddhddhddds`
    echo .sdddddmo..`-yddddhos:
    echo .:+hmmdd.````omdmd:`
    echo .smmmo``` .dmmms
    echo .`+ddmmo` ` -dmms
    echo ./osdddmmd.` `sddd/
    echo .yhdddhys:-` -dmdddy.`
    echo ``...`` --:/:.
    color 0b
    echo You have %hp% health
    echo Goblin has %en1hp%
    echo.
    echo 1.Attack
    echo 2.Drink Potion
    echo 3.Run Away!
    set input=5
    set /p input=Enter:
    if %input% equ 1 goto attackgoblin
    if %input% equ 1 goto drinkpotgoblin
    if %input% equ 1 goto runaway

    :attackgoblin
    cls
    if %armor% geq 5 goto attackgoblin2
    set /a en1hp=%en1hp% - (%power% + %weappower%)
    if %en1hp% leq 0 goto killedgoblin
    set /a hp=%hp% - (4 - %armor%)
    if %hp% leq 0 goto death
    goto fightgoblin

    :attackgoblin
    cls
    set /a en1hp=%en1hp% - (%power% + %weappower%)
    if %en1hp% leq 0 goto killedgoblin
    set /a hp=%hp% - (7 - %armor%)
    if %hp% leq 0 goto death
    goto fightgoblin

    :drinkpotgoblin
    if %pots% equ 1 (
    echo You don't have any potions
    pause >nul
    goto fightgoblin
    )
    set /a hp = %hp% + 50
    set /a pots=%pots% - 1
    goto fightgoblin

    :killedgoblin
    cls
    echo You Killed Him!
    echo you gained 7 exp and 6 gold!
    set /a exp=%exp% + 7
    set /a gold=%gold% + 6
    pause >nul
    goto out2

    :out3
    set en2hp=80
    cls
    echo You have %hp% health
    echo Skeleton has %en2hp%
    echo.
    echo 1.Attack
    echo 2.Drink potion
    echo 3.Run away
    set input=5
    set /p input=Enter:
    if %input% equ 1 goto attackskeleton
    if %input% equ 2 goto drinkpotskeleton
    if %input% equ 3 goto runaway
    goto fightskeleton

    :attackskeleton
    cls


    ::# Save ##########################################################################

    :save
    if"%temp3%"equ"1"(
    cls
    echo You're a cheater, YOU NO SAVE
    pause >nul
    goto stats
    )
    echo Saving
    set /a temp2=(%hp% * %lvl% + %exp% * %exptill% + %weapprice% + %power% * %weappower%)/(%gold% + %pots% + %powergain%)
    (echo hp=%hp%)> QE%name%SAV.dll
    (echo exp=%exp%)>> QE%name%%SAV.dll
    (echo exptill=%exptill%)>> QE%name%SAV.dll
    (echo gold=%gold%)>> QE%name%SAV.dll
    (echo lvl=%lvl%)>> QE%name%SAV.dll
    (echo power=%power%)>> QE%name%SAV.dll
    (echo powergain=%powergain%)>> QE%name%SAV.dll
    (echo weappower=%weappower%)>> QE%name%SAV.dll
    (echo weapprice=%weapprice%)>> Qe%name%SAV.dll
    (echo pots=%pots%)>> QE%name%SAV.dll
    (echo armor=%armor%)>> QE%name%SAV.dll
    (echo temp1=%temp1%)>> QE%name%SAV.dll
    pause >nul

    :stats
    cls
    echo %name% %lvl%
    echo %exp%/%exptill% expierence
    echo.
    echo %hp%/100 health
    echo %gold% gold
    echo %pots% potions
    echo.
    echo Your power is %power%
    echo Your weapon power is %weappower%
    echo.
    echo PRESS ANY KEY
    pause >nul
    goto home

    here is a simple game I got the basis from someone else though not all

    0
    None
    Prof. Pickle

    5 years ago on Introduction

    The other member is still out of action, but I guess we can continue work.

    0
    None
    LusoFeaz

    5 years ago on Introduction

    Aww. Well i still need help in batch programming but i can make a batch rpg flawlessly. And how am i suppose to add/take screenshots. Thats why i cant post anything.

    2 replies

    This is HiPoweredHacker here and I would be honored to show you how to program some batch. To take screen shots use the "prt sc" button on your keyboard, that wil take a screen shot and copy it to the clipboard. so it can be pasted.

    This is HiPoweredHacker here and I would be honored to show you how to program some batch. To take screen shots use the "prt sc" button on your keyboard, that wil take a screen shot and copy it to the clipboard. so it can be pasted.