Was there not a resource in the doc about Pokemon? I can't seem to find it.
Create a textadventure named markusmon
Create room2
On room object, select exit tab, create north path to room2
at room2, create an object named "marpikachu"
untick visible checkbox to make marpikachu invisible
at room, script tab, enter room, code the following
if (RandomChance(50)) {
MakeObjectVisible (marpikachu)
}
This means the player will be rewarded for repeatedly exploring your game rooms, just like the original game intended
At marpikachu object, select verbs tab, add in a new verb called "catch"
In the catch verb, code:
if (RandomChance(50)) {
AddToInventory (marpikachu)
msg ("You have successfully caught the pokemon")
}
else {
MakeObjectInvisible (marpikachu)
msg ("Unfortunately, the pokemon have ranaway")
}
Why play a monster catcher game if you can't catch them,
so definitely add the catch verb in
There are two ways the player can catch marpikachu
But most people dun understand parser commands,
so create a help object in room and add the description:
type parser command "catch marpikachu" to catch pokemons
Of course, you can add other helpful advice like if the player explores the game,
they can discover more previously hiding pokemons
FAQ: But, there is no benefit in catching monsters?
Well, we can make it easier to catch pokemons if we have more pokemons
In player object, select attributes tab, add in "power" attribute and assign it from string to int "0"
Go back to the catch verb and upgrade it to
if (RandomChance(50+player.power)) {
AddToInventory (marpikachu)
msg ("You have successfully caught the pokemon")
player.power = player.power+1
msg ("This pokemon gives you +1 power")
}
else {
MakeObjectInvisible (marpikachu)
msg ("Unfortunately, the pokemon have ranaway")
}
So, after catching marpikachu, the player now have 51% chance to catch the other pokemons,
so, this is the benefit for catching monsters,
but eventually, the player will become too powerful,
so you will have to change the code of the first line to
if (RandomChance(20+player.power)) {
This is 21% catch rate
But this code is written only on powerful monsters like marmewtwo,
so that the whole game makes sense,
and you do not have to edit previous codes that you have already written
FAQ: But the game is too easy, just catch more monsters and hoard them in your inventory to become stronger
Create a turn script and name it energy,
tick the checkbox of "Enabled when the game begins"
code the following:
firsttime {
player.energy = 100
}
player.energy = player.energy-player.power
msg ("Energy: "+player.energy)
if (player.energy<1) {
MoveObject (game.pov, room)
msg ("The player have too little energy and fainted")
msg ("You are sent back to the starting area")
player.energy = 100
}
The first time code sets the player to have energy, similar to how we setup player's power
Every time the player does something, he loses energy equals to his power equals to the number of pokemons he have,
therefore, he is encouraged to have lesser pokemons, rather than more
So, go back to marpikachu, at inventory tab,
at "after dropping the object", code:
player.power = player.power-1
msg ("You have released this pokemon and lost 1 power")
Now the player can strategize what pokemons to keep and what to skip,
make sure to have some pokemons to have higher power than the others
The gameplay is too linear, there is only 1 attribute "power",
the player doesn't really have any choices to formulate strategy
In player object, select attributes tab, add in "sight" attribute and assign it from string to int "0"
Change the very first code that we learned, how to make monsters visible on enter room to:
if (RandomChance(50+player.sight)) {
MakeObjectVisible (marpikachu)
}
So for harder monsters like marzapdos whom is hiding above the clouds,
make them harder to be spotted
if (RandomChance(20+player.sight)) {
MakeObjectVisible (marzapdos)
}
So to spot marzapdos, we only have 20% chance of seeing it every time we enter the room,
but if we change our strategy to have more "sight" than "power",
we can find more monsters easier
Make sure to start adding monsters that gives sight rather than power,
or perhaps, even a hybrid one, why not?
But I want to see my monsters fight
In player object, select attributes tab,
add in "monster" attribute and assign it as a string
add in "skill" attribute and assign it as a string
Go back to catch verb and upgrade it
if (RandomChance(50+player.power)) {
AddToInventory (marpikachu)
msg ("You have successfully caught the pokemon")
player.power = player.power+1
msg ("This pokemon gives you +1 power")
player.monster = "marpikachu"
player.skill = "Pika zap zap zap"
}
else {
MakeObjectInvisible (marpikachu)
msg ("Unfortunately, the pokemon have ranaway")
}
So, every time a player catches a new monster,
his monster choice and skill description changes too
Create "ash trainer" object and create "battle" verb for it,
in it, code:
msg ("Player summoned "+player.monster)
msg (""+player.skill)
msg ("Ash summoned margengar")
msg ("Margengar casts slime, it is super effective!")
SetTimeout (3) {
playerscore = GetRandomInt(1,player.power*player.sight)
enemyscore = 10
if (playerscore>enemyscore) {
msg ("You have won the battle")
msg ("You have unlocked a nearby locked exit")
}
else {
MoveObject (game.pov, room)
msg ("The enemy is too strong, you have lost the battle")
msg ("You are sent back to the starting area")
}
}
The wait 3 seconds adds in some suspense,
The playerscore is randomized between 1 to his power times sight,
this is to cast doubt on his strategy so he might mistake unlucky as being under powered,
making the game more challenging in a fun and strategic way
FAQ: That seems like it, I can't digest anymore
Well, not really, this is just the start of your full game,
the unique factor about this gameplay is the energy system,
because the player have 100 energy, he can only travel a limited number of rooms,
he needs to strategize on how to reach further areas before he runs out of energy
Possible solutions include shops that sells items
Also, power and sight to determine a battle outcome is quite simplistic,
it will be more fun to add in speed and ultimate as well,
speed can increase your minimum playerscore,
while ultimate can increase your maximum playerscore
Variations in strategy
In the beginning, hoarding monsters with high power is great,
because the player does not need to travel far and needs to catch more pokemons
In mid game, sight monsters are more valuable, because there are more and more elusive monsters,
also at mid range distance rooms, energy is valuable, players need to spot monsters as fast as possible
In end game, speed and ultimate are valuable even though they dun help with discovering or catching monsters,
they do help with defeating trainers, which unlocks various game elements like secret doors, secret shops and secret npcs,
perhaps even a new town where the player can choose to respawn there instead