How to create your own text-based game?
Creating interactive text-based games is easy if you have a good imagination and The Dark Eye basics rulebook. You don’t have to know HTML or any programming languages. The easiest way to publish your adventure on this website is simply typing it into a text file (PDF, DOC, RTF, TXT, etc.) and uploading it to our games section. If your adventure is compatible with the 5th edition of The Dark Eye rules, we turn it into an interactive adventure. If not – it will still be available for downloading and playing as a traditional solo-adventure in a text file.
If you know some HTML you can do the coding by yourself. The game phases must be divided into <div>
blocks. Each <div>
block should contain a unique id
attribute and at least one action option. Examples:
You are in the kitchen. It’s filled with empty jars and a stack of dirty dished awaiting for cleaning. “Not now”, you sigh wearily.
- Go to the bedroom.
- Go to the toilet.
The bed looks comfortable and welcoming, but you don’t want to sleep now.
- Go to the kitchen.
- Go to the toilet.
The smell here is so awful that you shut the door and gasp for air.
- Go to the bedroom.
- Go to the kitchen.
The first block should have “start” as an id
value. The other blocks are invisible by default. The id=""
attributes should never start with numbers.
With jQuery functions $().show()
and $().hide()
you can easily switch between locations. So if your game is a simple text-based adventure, this is all you need.
However, if your game contains attribute and/or talent tests, there are some more functions you can use.
function d1(modifier, difficulty, ‘success_location’, ‘failure_location’, adventure points);
and
function d3(modifier, attribute 1, attribute 2, attribute 3, difficulty, ‘success_location’, ‘failure_location’, adventure points);
The first function d1()
simulates the 1-dice test and the second one d3()
simulates the 3-dice test. Here are the descriptions of their variables.
- modifier — is replaced with a variable of an attribute or a skill name;
- attibute1/2/3 — is replaced with a variable of a corresponding attribute of the talent or spell;
- difficulty – the difficulty of the test is an integer number between -19 and 19;
- success_location — is a text string that matches the id value of the
<div>
you want show if the test succeeds; - failure_location — is a text string that matches the id value of the
<div>
you want to show if the test fails; - adventure points — is an integer number of AP the hero receives if the test succeeds.
Example:
Let’s take a ‘carouse’ talent as an example. It indicates how much alcohol a hero can handle before he gets drunk. Each talent is tested against three attributes. In case of ‘carouse’ it’s Intuition (IN
), Constitution (CN
) and Strength (ST
). The difficulty can depend on the drink’s alcohol content. A light beer is easy to handle, so we assign 0 as test’s difficulty and 1 as adventure points. But schnapps is way stronger, so we assign 5 as test’s difficulty and 3 as adventure points.
You walk into the tavern, look around and take a seat at the nearest table. The barmaid notices you and comes over to take your order. “What would you like tonight? ‘Ferdok Pale Ale’, ‘Kosh Water’ or maybe something to eat?”
- A mug of ‘Pale Ale’, please.
- I’ll have some ‘Kosh Water’.
- Nothing, I’d better go.
It doesn’t take long before the barmaid returns and hands over a mug.
“If you’d like something else, let me know”, she smiles and goes to check on other customers.
It’s early afternoon, so the tavern is not too crowded. The silent buzz of the customers is occasionally interrupted by dwarves’ cheering and mug clinking. The barmaid yawns stealthily into her hand. She smiles at you apologetically as she meets your gaze. You raise your eyebrows, lift your mug as a toast to say cheers and drink its contents in one gulp. The barmaid looks impressed and approaches you slowly.
“Should I repeat your order?” she asks with a seductive smile.
“If you keep me a company”, you smile back at her.
The girl glances at the bartender near the counter, then bends down and whispers: “Meet me upstairs in ten minutes.”
It doesn’t take long before the barmaid returns and hands over a mug.
“If you’d like something else, let me know”, she smiles and goes to check on other customers.
It’s early afternoon, so the tavern is not too crowded. The silent buzz of the customers is occasionally interrupted by dwarves’ cheering and mug clinking. The barmaid yawns stealthily into her hand. She smiles at you apologetically as she meets your gaze. You raise your eyebrows, lift your mug as a toast to say cheers and accidently knock over a jug of water. You catch it clumsily before it entirely poured out and take another sip from your mug as if nothing had happened. The bartender gives you an appraising look.
“I think you need some fresh air!” he suggests.
“Oh no, I’m fine”, you reply with a loud hiccup.
“I insist”, he says threateningly.
You don’t want any trouble, so you leave your money on the counter and leave the tavern.
It doesn’t take long before the barmaid returns and hands over a mug.
“If you’d like something else, let me know”, she smiles and goes to check on other customers.
It’s early afternoon, so the tavern is not too crowded. The silent buzz of the customers is occasionally interrupted by dwarves’ cheering and mug clinking. The barmaid yawns stealthily into her hand. She smiles at you apologetically as she meets your gaze. You raise your eyebrows, lift your mug as a toast to say cheers and accidently knock over a jug of water. The water pours out entirely before you even realize what happened. The bartender looks at you in disgust.
“Hey, you! Pay your bill and get out!”
“Are you talking to me?” you ask with a loud hiccup.
“Rahjane!” he addressed the barmaid. “Help this fellow out to the fresh air.”
The girl approaches you and wrinkles her nose as she sees your wet pants. Then she helps you up to your feet and walks with you outside.
“What a swine”, she mutters and closes the door.
If the binary result is not enough you can also perform a 3D20 check with Quality Levels. To do this use
d3ql(modifier, attribute1, attribute2, attribute3, difficulty, ‘critical_success_location’, ‘success_ql6_location’, ‘success_ql5_location’, ‘success_ql4_location’, ‘success_ql3_location’, ‘success_ql2_location’, ‘success_ql1_location’, ‘failure_location’, ‘critical_failure_location’, adventure points)
where:
- modifier — is replaced with a variable of an attribute or a skill name;
- attibute1/2/3 — is replaced with a variable of a corresponding attribute of the talent or spell;
- difficulty – the difficulty of the test is an integer number between -19 and 19;
- critical_success_location — is a text string that matches the id value of the
<div>
you want show if the player rolls two ones; - success_ql6_location — is a text string that matches the id value of the
<div>
you want show if the test succeeds and 16 or more skill points remain; - success_ql5_location — is a text string that matches the id value of the
<div>
you want show if the test succeeds and 13-15 skill points remain; - success_ql4_location — is a text string that matches the id value of the
<div>
you want show if the test succeeds and 10-12 skill points remain; - success_ql3_location — is a text string that matches the id value of the
<div>
you want show if the test succeeds and 7-9 skill points remain; - success_ql2_location — is a text string that matches the id value of the
<div>
you want show if the test succeeds and 4-6 skill points remain; - success_ql1_location — is a text string that matches the id value of the
<div>
you want show if the test succeeds and 0-3 skill points remain; - failure_location — is a text string that matches the id value of the
<div>
you want to show if the test fails; - critical_failure_location — is a text string that matches the id value of the
<div>
you want to show if the player rolls two twenties; - adventure points — is an integer number of AP the hero receives if the test succeeds.
Example
Our hero picked the locked and escaped from his cell. Now he wants to sneak behind the guard’s back and get out of the prison unnoticed. He has to perform a stealth check.
The guard is sitting hunched up on a wooden chair. Listening to his wheezy snoring you can tell that he is deeply asleep.
Would you try to escape?
There are some more supplemental functions you can use.
resethero();
— after good night’s sleep hero’s life, astral and karma points regenerate back to normal.
location.reload();
— reset all values and restart the game. This applies if a hero dies or fails the quest.
endgame(AP);
— the last option in your game must include this function. This applies to successful game ends only.
Variables
List of defined variables you can use for tests.
Attributes:CR
— CourageCL
— ClevernessIN
— IntuitionCH
— CharismaDX
— DexterityAG
— AgilityCN
— ConstitutionST
— Strength
AP
— Adventure Pointsmoney
— money in Hellers (1 Ducat = 10 Thalers = 100 Hellers)LE
— Life EnergyAE
— Astral EnergyKE
— Karma EnergyMR
— Magic ResistanceINI
— Initiativespeed
— speedATAG
— Attack for brawl, daggers and fencing weaponsPAAG
— Parade for brawl, daggers and fencing weaponsATST
— Attack for other melee weaponsPAST
— Parade for other melee weaponsranged
— Attack for ranged weapons
daggers
— fight with daggersfencing
— fight with fencing weaponsaxes
— fight with axes and maceschain
— fight with chain barsbrawl
— brawl and fight without weaponsswords
— fight with swords and sabersstaves
— fight with staves and spearsaxes2
— fight with two-handed axes and macesswords2
— fight with two-handed swordscrossbows
— shoot crossbowsbows
— shoot bowsthrowing
— throw weaponsdodge
— dodgeshields
— fight with shieldblowgun
— shoot blowgun (ranged weapon)chainbars
— fight with chain barslances
— fight with lancesnets
— throw netswhips
— fight with whipsslingshots
— shoot slingshots (ranged weapons)
fly
(CR/IN/AG) — control a flying object like a witch’s broom or a magic carpettrickery
(CR/CH/DX) — juggle, hide items, perform tricksclimb
(CR/AG/ST) — climb mountains, walls, trees e.t.c.body_control
(IN/AG/ST) — run, jump, untie ropes, balance, acrobatics e.t.c.power
(CN,ST,ST) — kick doors open, lift weights, blend, smash, pull heavy objectsride
(IN/AG/ST) — control mount animalsswim
(AG/CN/ST) — swim, fight inside waterself_control
(CR/CR/CN) — withstand pain, ignore physical distractionssing
(IN/CH/CN) — singperception
(CL/IN/IN) — use five physical sensesdance
(CH/AG/AG) — dance, remember dance stepspickpocket
(CR/IN/DX) — steal items without getting noticedhide
(CR/IN/AG) — sneak and hidecarouse
(IN/CN/ST) — resist alcohol or drug intoxication
convert
(CR/IN/CH) — convert and convinceseduce
(CR/CH/CH) — flirt, charmintimidate
(CR/IN/CH) — threaten, blackmailetiquette
(CL/IN/CH) — show good mannersstreetwise
(CR/IN/CH) — know best people for useful info and places to get rare stuffhuman_nature
(CL/IN/CH) — understand reasons behind other intelligent creature’s behaviorpersuade
(CR/IN/CH) — sweet-talk, beg, manipulatedisguise
(IN/CH/AG) — pretend being someone elsewillpower
(CR/IN/CH) — withstand itimidation or manipulation, resist seduction, ignore mental distractions
track
(CL/IN/IN) — find and understand tracksbind
(CL/DX/ST) — bind complicated knotsfishing
(IN/DX/CN) — catch edible sea creaturesorientation
(CL/IN/IN) — find best routes outdoorsherb_lore
(CL/IN/DX) — know useful plantsanimal_lore
(CR/CR/CH) — know animalssurvival
(IN/AG/CN) — survive in wilderness
gamble
(CL/CL/IN) — play games of chancegeography
(CL/CL/IN) — cartography, know placeschronicle
(CL/CL/IN) — know historytheology
(CL/CL/IN) — theology, religious cultswarfare
(CR/CL/IN) — lead battle, war tacticsarcane lore
(CL/CL/IN) — know magic in theorymechanics
(CL/CL/DX) — understand mechanismscalculate
(CL/CL/IN) — calculatejurisprudence
(CL/CL/IN) — know justice systemlegend_lore
(CL/CL/IN) — know fairytales and legendssphere_lore
(CL/IN/CH) — know the 7 spheresastronomy
(CL/CL/IN) — stars, time measuring, astrology
alchemy
(CR/CL/DX) — brew elixiers and poisonsdrive
(IN/CH/DX) — control vehiclestrade
(CL/IN/CH) — evaluate, buy and sell things for a good priceheal_poison
(CR/CL/IN) — identify and neutralize poisonheal_disease
(CR/CL/IN) — identify and heal diseaseheal_panic
(CL/IN/CH) — suppress fears, treat mental problemsheal_wounds
(CL/DX/DX) — take care of woundswoodcraft
(CL/DX/ST) — make things out of woodcook
(CL/IN/DX) — cookleather_craft
(CL/DX/DX) — make leather goodspaint
(CL/IN/DX) — draw and paintsmithery
(CL/DX/ST) — make things out of metalmusic
(IN/CH/DX) — play musical instrumentslocks
(IN/DX/DX) — open locks without keysseafaring
(DX/AG/ST) — travel by water, control a vesselstone_craft
(DX/DX/ST) — make things out of stonetailoring
(CL/DX/DX) — produce clothing
empathy
(CR/IN/IN) —danger_sense
(CL/IN/IN) —magic_sense
(IN/IN/CH) —predict
(IN/IN/CH) —supersensory
(IN/IN/DX) —dwarf_nose
(IN/IN/DX) —
eagles_eye
(CL/IN/DX) —eagles_wing
(IN/DX/CN) —armatrutz
(CL/IN/DX) —auris_nasus
(CL/IN/DX) () —axxeleratus
(CL/IN/DX) —balsam_salabunde
(CL/IN/DX) —bannbaladin
(CL/IN/CH) —mind_glance
(CL/IN/DX) —lightning
(CL/IN/CH) — Lightning Find You!corpofesso
(IN/DX/CN) —duplicatus
(CL/IN/DX) —hawkeye
(CL/IN/DX) —flim_flam
(CR/IN/CH) —fulminictus
(IN/DX/CN) —gardianum
(CR/IN/CH) —great_need
(CL/IN/CH) —camouflage
(CL/IN/DX) —witch_bile
(IN/DX/CN) —witch_claws
(IN/DX/CN) —horriphobus
(CL/IN/CH) —ignifaxius
(CR/IN/CH) —invocatio_minima
(CR/IN/CH) —cats_eyes
(CL/IN/DX) —frogs_leap
(CL/IN/DX) —manifesto
(CR/IN/CH) —motoricus
(AG/DX/ST) —smokescreen
(CR/IN/CH) —odem_arcanum
(CL/IN/DX) —paralysis
(IN/DX/CN) —penetrizzel
(CL/IN/DX) —psychostabilis
(CR/CL/IN) —terror_broom
(AG/DX/ST) —respondami
(CR/IN/CH) —salander
(IN/DX/CN) —meekness
(CR/CH/CH) —satuarias_glory
(CL/IN/DX) —silentium
(AG/DX/ST) —somnigravis
(CL/IN/CH) —spider_run
(IN/DX/CN) —without trace
(IN/DX/CN) —transversalis
(CL/IN/CN) —visibili
(CR/IN/CH) —oceans_floor
(IN/DX/CN) —
arcanovi
(CL/IN/DX) —summon_jinn
(CR/IN/CH) —summon_elemental
(CR/IN/CH) —summon_elementmaster
(CR/IN/CH) —invocatio_minor
(CH/CH/AG) —invocatio_maior
(CH/CH/AG) —invocatio_maxima
(CH/CH/AG) —magic_blade
(CL/IN/DX) —
honor_duel
(CR/CR/IN) —encouragement
(CR/CR/IN) —banish_poison
(CR/CL/IN) —divine_sign
(IN/IN/CH) —heal_blessing
(IN/CH/CH) —holy_order
(CR/CH/CH) —banish_disease
(CR/CL/IN) —prophecy
(CR/IN/IN) —storm
(CR/IN/IN) —weapon_devotee
(IN/IN/CH) —wound_treatment
(CL/IN/CH) —
You can define your own local variables, just make sure that they don’t match the ones that were already defined.