Author Topic: Developing RPG Mini Game  (Read 10199 times)

0 Members and 1 Guest are viewing this topic.

WasabiIceCream

  • Youngling
  • *
  • Posts: 21
  • Karma: +2/-0
    • View Profile
    • Gameoverse
  • Twitch Name: Gameoverse
Developing RPG Mini Game
« on: March 26, 2016, 05:27:42 AM »
DEEPBOT RPG

So, I've been working on this thing for a bit, and it's just not working the way it needs to be.
Honestly, I'm not a great programmer, and my code solutions are totally unoptimized, but works, however unstable in its current form.
I'll post everything I've got so far, and explain it all, and hopefully we can make this a community effort, or something.
What I've got is pretty messy, but I can explain it all. Here's a .zip of the folder and file structure: https://www.dropbox.com/s/w7ysqki8jx1frw4/RPG.zip?dl=0
And, here's a .zip all the individual command code in .txt, for ease of use: https://www.dropbox.com/s/ff6jehmryfgrclq/RPG%20Code.zip?dl=0
Also, if you just want to see this in action, I've got it running on my Twitch channel.



This all starts by creating the folders in the Custom Logs:

RPG
 - Adjectives (These are used to randomly generate a unique monster name, by combining an adjective in front of the normal monster name.)
 - Classes (Users can choose 1 of 5 classes. Only difference is starting stats right now.)
 - Enemies (Enemy names are stored in here. I just took most of them from the MMORPG Ragnarok Online.)
 - - log (User combat logs are stored here, with the current enemy name, enemy stats, and rewards for killing the enemy.)
 - Levels (Does nothing. Not required. Not sure what I was planning with this. Maybe like, Town or Quest locations, or something.)
 - Users (User logs are stored here. Tracks whether they've initiated an RPG character, and tracks all their stats.)
 - Weapons (Does nothing. Not required. I was planning a whole equipment thing, but I couldn't figure out a good way to do it.)



Then, comes the actual code, and this'll get a bit thick and heavy.

Initialization:
Every user will initialize an RPG character by using the !rpg command:
Code: [Select]
@if@[@readfile@[RPG\Users\@user@.txt]||1||!rpg2||@if@[@target@||Assassin||!rpginitass||@if@[@target@||Barbarian||!rpginitbar||@if@[@target@||Cleric||!rpginitcle||@if@[@target@||Templar||!rpginittem||@if@[@target@||Wizard||!rpginitwiz||@user@, you must choose a class. (Assassin, Barbarian, Cleric, Templar, or Wizard)]]]]]]
The code will check if the user already has an RPG character, (if "RPG\Users\@user@.txt" exists, and contains a "1"), and if so, will run !rpg2, which will show basic stats.
If the user does not have a character, one will be created based on the class provided with @target@. The classes are all Case-Sensitive. Users will be told to choose a class if they screw it up.
It's at this point where all of the .txt files are created for the user, as well. Their stats will be tracked in the "Users" folder, with their Username prefixing each stat.
Concerning stats, most of them are not taken into account yet, but were planned to be used later. I'll explain more in the Combat section.

!rpg2
Code: [Select]
@user@, you are a Level @readfile@[RPG\Users\@user@Level.txt] @readfile@[RPG\Classes\@readfile@[RPG\Users\@user@Class.txt].txt]. Use !stats to check your Stats.Settings: Hide From Command List

!rpginitass
Code: [Select]
@savefile@[RPG\Users\@user@.txt,1]@savefile@[RPG\Users\@user@Level.txt,1]@savefile@[RPG\Users\@user@Class.txt,1]@savefile@[RPG\Users\@user@Vit.txt,10]@savefile@[RPG\Users\@user@End.txt,12]@savefile@[RPG\Users\@user@Str.txt,10]@savefile@[RPG\Users\@user@Dex.txt,18]@savefile@[RPG\Users\@user@Int.txt,10]@savefile@[RPG\Users\@user@Wis.txt,15]@savefile@[RPG\Users\@user@Luc.txt,16]@savefile@[RPG\Users\@user@MaxHealth.txt,250]@savefile@[RPG\Users\@user@CurrentHealth.txt,250]@savefile@[RPG\Users\@user@Exp.txt,0]@savefile@[RPG\Users\@user@ExpToLevel.txt,25]Settings: Hide From Command List and Command Chain !rpginit3

!rpginitbar
Code: [Select]
@savefile@[RPG\Users\@user@.txt,1]@savefile@[RPG\Users\@user@Level.txt,1]@savefile@[RPG\Users\@user@Class.txt,2]@savefile@[RPG\Users\@user@Vit.txt,18]@savefile@[RPG\Users\@user@End.txt,16]@savefile@[RPG\Users\@user@Str.txt,18]@savefile@[RPG\Users\@user@Dex.txt,10]@savefile@[RPG\Users\@user@Int.txt,10]@savefile@[RPG\Users\@user@Wis.txt,11]@savefile@[RPG\Users\@user@Luc.txt,11]@savefile@[RPG\Users\@user@MaxHealth.txt,450]@savefile@[RPG\Users\@user@CurrentHealth.txt,450]@savefile@[RPG\Users\@user@Exp.txt,0]@savefile@[RPG\Users\@user@ExpToLevel.txt,25]Settings: Hide From Command List and Command Chain !rpginit3

!rpginitcle
Code: [Select]
@savefile@[RPG\Users\@user@.txt,1]@savefile@[RPG\Users\@user@Level.txt,1]@savefile@[RPG\Users\@user@Class.txt,3]@savefile@[RPG\Users\@user@Vit.txt,12]@savefile@[RPG\Users\@user@End.txt,16]@savefile@[RPG\Users\@user@Str.txt,16]@savefile@[RPG\Users\@user@Dex.txt,10]@savefile@[RPG\Users\@user@Int.txt,10]@savefile@[RPG\Users\@user@Wis.txt,18]@savefile@[RPG\Users\@user@Luc.txt,12]@savefile@[RPG\Users\@user@MaxHealth.txt,300]@savefile@[RPG\Users\@user@CurrentHealth.txt,300]@savefile@[RPG\Users\@user@Exp.txt,0]@savefile@[RPG\Users\@user@ExpToLevel.txt,25]Settings: Hide From Command List and Command Chain !rpginit3

!rpginittem
Code: [Select]
@savefile@[RPG\Users\@user@.txt,1]@savefile@[RPG\Users\@user@Level.txt,1]@savefile@[RPG\Users\@user@Class.txt,4]@savefile@[RPG\Users\@user@Vit.txt,20]@savefile@[RPG\Users\@user@End.txt,16]@savefile@[RPG\Users\@user@Str.txt,15]@savefile@[RPG\Users\@user@Dex.txt,10]@savefile@[RPG\Users\@user@Int.txt,10]@savefile@[RPG\Users\@user@Wis.txt,11]@savefile@[RPG\Users\@user@Luc.txt,8]@savefile@[RPG\Users\@user@MaxHealth.txt,500]@savefile@[RPG\Users\@user@CurrentHealth.txt,500]@savefile@[RPG\Users\@user@Exp.txt,0]@savefile@[RPG\Users\@user@ExpToLevel.txt,25]Settings: Hide From Command List and Command Chain !rpginit3

!rpginitwiz
Code: [Select]
@savefile@[RPG\Users\@user@.txt,1]@savefile@[RPG\Users\@user@Level.txt,1]@savefile@[RPG\Users\@user@Class.txt,5]@savefile@[RPG\Users\@user@Vit.txt,8]@savefile@[RPG\Users\@user@End.txt,10]@savefile@[RPG\Users\@user@Str.txt,7]@savefile@[RPG\Users\@user@Dex.txt,13]@savefile@[RPG\Users\@user@Int.txt,20]@savefile@[RPG\Users\@user@Wis.txt,15]@savefile@[RPG\Users\@user@Luc.txt,12]@savefile@[RPG\Users\@user@MaxHealth.txt,200]@savefile@[RPG\Users\@user@CurrentHealth.txt,200]@savefile@[RPG\Users\@user@Exp.txt,0]@savefile@[RPG\Users\@user@ExpToLevel.txt,25]Settings: Hide From Command List and Command Chain !rpginit3

!rpginit3
Code: [Select]
@user@ is now a Level @readfile@[RPG\Users\@user@Level.txt] @readfile@[RPG\Classes\@readfile@[RPG\Users\@user@Class.txt].txt]!This just announces in chat that someone has created a new character.
Settings: Hide From Command List

!stats
Code: [Select]
@if@[@readfile@[RPG\Users\@user@.txt]||1||@user@, Level @readfile@[RPG\Users\@user@Level.txt] @readfile@[RPG\Classes\@readfile@[RPG\Users\@user@Class.txt].txt], Vitality: @readfile@[RPG\Users\@user@Vit.txt], Endurance: @readfile@[RPG\Users\@user@End.txt], Strength: @readfile@[RPG\Users\@user@Str.txt], Dexterity: @readfile@[RPG\Users\@user@Dex.txt], Intelligence: @readfile@[RPG\Users\@user@Int.txt], Wisdom: @readfile@[RPG\Users\@user@Wis.txt], Luck: @readfile@[RPG\Users\@user@Luc.txt], Experience: @readfile@[RPG\Users\@user@Exp.txt]/@readfile@[RPG\Users\@user@ExpToLevel.txt], Health: @readfile@[RPG\Users\@user@CurrentHealth.txt]/@readfile@[RPG\Users\@user@MaxHealth.txt]||@user@, you must create a character first. Use the !rpg command.]Note: This command, as well as any other main commands, will (should) always check if the user has created an RPG character first. Bad things happen otherwise.



Combat:
Now, this is where things either start falling apart, or flaws in the previous code are broken even further.
In my testing, I found it's not a good idea to use @savefile@ and @readfile@ to manipulate and display the same value in the same command.
So, for 1 fight to happen, I had to split the code across several commands. Usually one that manipulates the value, and another that either displays it, or manipulates it further.
However, this still isn't very clean, and I'll explain what's broken as we go. There is a fatal flaw that I will also point out where I think this may be occurring.

!fight
Code: [Select]
@if@[@readfile@[RPG\Users\@user@.txt]||1||!fightencounter||@user@, you must create a character first. Use the !rpg command.]There's the user character check.

!fightencounter
Code: [Select]
@savefile@[RPG\Enemies\log\@user@CurrentMonster.txt,@readfile@[RPG\Adjectives\@rand@[1|70].txt] @readfile@[RPG\Enemies\@rand@[1|50].txt]] @savefile@[RPG\Enemies\log\@user@CurrentMonsterLevel.txt,@calc@[+|@rand@[0|5]|@readfile@[RPG\Users\@user@Level.txt]]] @savefile@[RPG\Enemies\log\@user@CurrentMonsterHP.txt,@calc@[-|@readfile@[RPG\Users\@user@MaxHealth.txt]|@rand@[0|50]]] @savefile@[RPG\Enemies\log\@user@PointPot.txt,@calc@[+|@rand@[0|@readfile@[RPG\Enemies\log\@user@CurrentMonsterLevel.txt]]|@rand@[0|@readfile@[RPG\Users\@user@Level.txt]]]] @savefile@[RPG\Enemies\log\@user@ExpPot.txt,@calc@[+|@readfile@[RPG\Enemies\log\@user@CurrentMonsterLevel.txt]|@readfile@[RPG\Users\@user@Level.txt]]]This will create an enemy for the user to fight, with a funny name that is randomly generated. Each user has their own enemy, with their username prefixed to the monster logs.
User stats are taken into account here. Enemy level, Point reward, and EXP reward are based on User's level. Enemy health is based on User's max health.
Settings: Hide From Command List and Command Chain !fightencounter2

!fightencounter2
Code: [Select]
@user@ encounters a Level @readfile@[RPG\Enemies\log\@user@CurrentMonsterLevel.txt] @readfile@[RPG\Enemies\log\@user@CurrentMonster.txt], with @readfile@[RPG\Enemies\log\@user@CurrentMonsterHP.txt]HP.This just announces in chat that a fight has began.
Settings: Hide From Command List and Command Chain !fight2

!fight2
Code: [Select]
@savefile@[RPG\Enemies\log\@user@Roll.txt,@rand@[0|@readfile@[RPG\Users\@user@Dex.txt]]] @if@[>=||@readfile@[RPG\Enemies\log\@user@Roll.txt]||@calc@[/|@readfile@[RPG\Users\@user@Dex.txt]|2]||@savefile@[RPG\Enemies\log\@user@Turn.txt,1]||@savefile@[RPG\Enemies\log\@user@Turn.txt,2]]Note: This command may contain an endless loop, forcing DeepBot (And possibly, your entire system) into extreme lag. Force-close the application if this happens.
User stats are taken into account here. A roll takes place, based on User Dexterity. User must roll equal or greater than half of their Dexterity to attack, else the monster gets the attack.
Settings: Hide From Command List and Command Chain !fight3

!fight3
Code: [Select]
@if@[@readfile@[RPG\Enemies\log\@user@Turn.txt]||1||!fightdealtdamage||!fighttookdamage]A value of "1" in the file "RPG\Enemies\log\@user@Turn.txt" indicates Player's attack. Else, a value of "2" indicates monster's attack
Settings: Hide From Command List

!fightdealtdamage
Code: [Select]
@savefile@[RPG\Enemies\log\@user@CurrentMonsterHP.txt,@calc@[-|@readfile@[RPG\Enemies\log\@user@CurrentMonsterHP.txt]|@readfile@[RPG\Enemies\log\@user@DamageDealt.txt]]]The player deals damage to the monster.
Settings: Hide From Command List and Command Chain !checkmonsterhealth

!fighttookdamage
Code: [Select]
@savefile@[RPG\Users\@user@CurrentHealth.txt,@calc@[-|@readfile@[RPG\Users\@user@CurrentHealth.txt]|@readfile@[RPG\Enemies\log\@user@DamageTaken.txt]]]The monster deals damage to the player.
Settings: Hide From Command List and Command Chain !checkplayerhealth

!checkmonsterhealth
Code: [Select]
@if@[<=||@readfile@[RPG\Enemies\log\@user@CurrentMonsterHP.txt]||0||!monsterdied||!fight2]Checks if the monster is dead. (If they have equal or less than 0 HP)
If the monster is still alive, we loop back into !fight2, where we roll again to see who gets the next attack.
Settings: Hide From Command List

!checkplayerhealth
Code: [Select]
@if@[<=||@readfile@[RPG\Users\@user@CurrentHealth.txt]||0||!playerdied||!fight2]Checks if the player is dead. (If they have equal or less than 0 HP)
If the player is still alive, we loop back into !fight2, where we roll again to see who gets the next attack.
Settings: Hide From Command List

!monsterdied
Code: [Select]
@user@ has slain the @readfile@[RPG\Enemies\log\@user@CurrentMonster.txt], and gained @readfile@[RPG\Enemies\log\@user@PointPot.txt]GP and @readfile@[RPG\Enemies\log\@user@ExpPot.txt]Exp! @editpoints@[@user@|@readfile@[RPG\Enemies\log\@user@PointPot.txt]] @savefile@[RPG\Users\@user@Exp.txt,@calc@[+|@readfile@[RPG\Users\@user@Exp.txt]|@readfile@[RPG\Enemies\log\@user@ExpPot.txt]]]If the monster dies, then the player is awarded the Point pot, and the EXP pot. They don't get any health back. That's intentional.
The !fight2 loop ends here.
Settings: Hide From Command List and Command Chain !checklevel

!playerdied
Code: [Select]
@user@ has been slain by @readfile@[RPG\Enemies\log\@user@CurrentMonster.txt], and lost @readfile@[RPG\Enemies\log\@user@PointPot.txt]GP... @editpoints@[@user@|-@readfile@[RPG\Enemies\log\@user@PointPot.txt]] @savefile@[RPG\Users\@user@CurrentHealth.txt,@readfile@[RPG\Users\@user@MaxHealth.txt]]If the player dies, they lose some Points, and get their health back.
Settings: Hide From Command List

!checklevel
Code: [Select]
@if@[>=||@readfile@[RPG\Users\@user@Exp.txt]||@readfile@[RPG\Users\@user@ExpToLevel.txt]||!levelup||]When the player wins an encounter, they gain EXP. This is ran after a win to check whether they've gained enough EXP to level up.
Settings: Hide From Command List

!levelup
Code: [Select]
@savefile@[RPG\Users\@user@Level.txt,@calc@[+|@readfile@[RPG\Users\@user@Level.txt]|1]] @savefile@[RPG\Users\@user@Vit.txt,@calc@[+|@readfile@[RPG\Users\@user@Vit.txt]|@rand@[0|3]]] @savefile@[RPG\Users\@user@End.txt,@calc@[+|@readfile@[RPG\Users\@user@End.txt]|@rand@[0|3]]] @savefile@[RPG\Users\@user@Str.txt,@calc@[+|@readfile@[RPG\Users\@user@Str.txt]|@rand@[0|3]]] @savefile@[RPG\Users\@user@Dex.txt,@calc@[+|@readfile@[RPG\Users\@user@Dex.txt]|@rand@[0|3]]] @savefile@[RPG\Users\@user@Int.txt,@calc@[+|@readfile@[RPG\Users\@user@Int.txt]|@rand@[0|3]]] @savefile@[RPG\Users\@user@Wis.txt,@calc@[+|@readfile@[RPG\Users\@user@Wis.txt]|@rand@[0|3]]] @savefile@[RPG\Users\@user@Luc.txt,@calc@[+|@readfile@[RPG\Users\@user@Luc.txt]|@rand@[0|3]]] @savefile@[RPG\Users\@user@ExpToLevel.txt,@calc@[*|@readfile@[RPG\Users\@user@ExpToLevel.txt]|1.5]] @savefile@[RPG\Users\@user@Exp.txt,0]Note: This command works, but not as completely intended.
Is the player has enough EXP to level up, this command will do that. It should be noted that this command does not work as intended.
What's supposed to happen is, each stat is set to increase a random amount between 0 and 3.
What really happens is, the random calculation is performed only once, and each stat is increased the same amount, between 0 and 3.
Settings: Hide From Command List



So, as of right now, that's all I've got.
The main issue revolves around the !fight2 loop, and I've banged my head on several walls trying to figure what's exactly causing issue there.
I'm sharing this because I think it's really cool, even though it's slightly broken. I'm hoping the community here can expand on this, and help make it much better.
« Last Edit: March 26, 2016, 05:45:19 AM by WasabiIceCream »

WasabiIceCream

  • Youngling
  • *
  • Posts: 21
  • Karma: +2/-0
    • View Profile
    • Gameoverse
  • Twitch Name: Gameoverse
Re: Developing RPG Mini Game
« Reply #1 on: April 02, 2016, 05:04:47 PM »
Problem seems to lie in the !fightdealtdamage and !fighttookdamage commands.
The commands are executed, but never deduct health from the monster, or player.
This causes the health checks in the following commands to always fail, causing an endless loop back into !fight2.

Looking into a fix.

EDIT: Okay, so here's the fix.
I'm an idiot, and forgot to add in the damage calculations, so here they are.

First, edit !fight3 with this:
Code: [Select]
@if@[@readfile@[RPG\Enemies\log\@user@Turn.txt]||1||!playerturn||!monsterturn]
And add, !playerturn
Code: [Select]
@savefile@[RPG\Enemies\log\@user@DamageDealt.txt,@rand@[0|@calc@[+|@readfile@[RPG\Users\@user@Str.txt]|@readfile@[RPG\Users\@user@Int.txt]]]]The player deals a random amount of damage, between 0 (a miss), and their Strength (Physical Damage) plus their Intelligence (Magical Damage).
Settings: Hide From Command List and Command Chain !fightdealtdamage

!monsterturn
Code: [Select]
@savefile@[RPG\Enemies\log\@user@DamageTaken.txt,@rand@[0|@calc@[*|@readfile@[RPG\Enemies\log\@user@CurrentMonsterLevel.txt]|5]]]The monster deals a random amount of damage, between 0 (a miss), and five times their level.
Settings: Hide From Command List and Command Chain !fighttookdamage


The damage calculation could probably (definitely) be done better, but this gets the job done.
This gives a small bias to the monster for damage power, but the player has a slight bias when it comes to getting the attack.

The only thing that needs tweaking are the stat increases when leveling up.
Everything else from this point, will just be tweaking and adding onto what's here.
« Last Edit: April 02, 2016, 05:53:44 PM by WasabiIceCream »

WasabiIceCream

  • Youngling
  • *
  • Posts: 21
  • Karma: +2/-0
    • View Profile
    • Gameoverse
  • Twitch Name: Gameoverse
Re: Developing RPG Mini Game
« Reply #2 on: April 05, 2016, 06:42:16 AM »
Thinking of adding 1 or 2 unique skills for each class.
Like, Assassins can steal points from other players.
Or, Clerics can heal and buff themselves or other players.
If anyone else has any ideas for this, let me know.

KennyGString

  • Youngling
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
  • Twitch Name: KennyGString
Re: Developing RPG Mini Game
« Reply #3 on: April 14, 2016, 11:55:43 PM »
I just found this post, and is exactly what I was looking for. I will implement this and keep you updated on results.

KennyGString

  • Youngling
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
  • Twitch Name: KennyGString
Re: Developing RPG Mini Game
« Reply #4 on: April 15, 2016, 12:27:45 AM »
I put in all the commands and it seems to work as intended. However, after each fight I get an Access Denied message at the end.

 ~KennyGString: !fight
 @^illumiboti: kennygstring encounters a Level 2 Globetrotting Vadon, with 154HP.
 @^illumiboti: kennygstring has slain the Globetrotting Vadon, and gained 0GP and 3Exp! Access denied

 ~KennyGString: !fight
 @^illumiboti: kennygstring encounters a Level 2 Gangster Familiar, with 167HP.
 @^illumiboti: kennygstring has been slain by Gangster Familiar, and lost 2GP... Access denied


Any ideas on that?

EDIT: You have run monsterdied and playerdied as elevated to stop getting the access denied message
« Last Edit: April 15, 2016, 12:52:06 AM by KennyGString »

KennyGString

  • Youngling
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
  • Twitch Name: KennyGString
Re: Developing RPG Mini Game
« Reply #5 on: April 15, 2016, 12:08:00 PM »
I noticed whenever you lost a fight, you would lose GP. I also noticed its not keeping track of GP (at least I can't find where it's doing it), so I found this to be useless. I changed it to take away exp. It will go past 0 into the negatives, which I couldn't figure out how to stop. It doesn't seem to like adding positive numbers to negative numbers very well, but its a start, and not useless like taking GP was. Here's how I did it...


!playerdied
Code: [Select]
@user@ has been slain by a @readfile@[RPG\Enemies\log\@user@CurrentMonster.txt], and lost @readfile@[RPG\Enemies\log\@user@ExpPot.txt]Exp... @editpoints@[@user@|@readfile@[RPG\Enemies\log\@user@PointPot.txt]] @savefile@[RPG\Users\@user@Exp.txt,@calc@[-|@readfile@[RPG\Users\@user@Exp.txt]|@readfile@[RPG\Enemies\log\@user@ExpPot.txt] @savefile@[RPG\Users\@user@CurrentHealth.txt,@readfile@[RPG\Users\@user@MaxHealth.txt]]]]
I also added a cooldown, here's how I did it...

!fight
Code: [Select]
@if@[@readfile@[Cooldown/@user@.txt]||||!fightpass||!fightmath]I changed your original fight command to this, run elevated.

!fight1
Code: [Select]
@if@[@readfile@[RPG\Users\@user@.txt]||1||!fightencounter||@user@, you must create a character first. Use the !rpg command.]
This is/was your original !fight command. The reason I did this was because I couldn't figure out how to get it to run !fightencounter after successfully passing the cooldown. So to make the code shorter, I just sepearted it into two parts. It'll make more sense later.

!fightmath

Code: [Select]
@if@[>=||@calc@[-|@unixtime@|@readfile@[Cooldown/@user@.txt]]||@readfile@[Cooldown/limit.txt]||!fightpass||!fightfail @calc@[-|@unixtime@|@readfile@[Cooldown/@user@.txt]]]
!fightpass
Code: [Select]
@savefile@[Cooldown/@user@.txt,@unixtime@]!fight1So here's where I couldn't get it to trigger !fightencounter, and check to see if they've chose a class or not. So to make it easier I just make it into a different command.

!fightfail
Code: [Select]
I'm sorry @user@ but you can only fight every @readfile@[Cooldown/limit.txt] seconds. Prepare yourself and return in @calc@[-|@readfile@[Cooldown/limit.txt]|@target@] seconds.

I have lots more ideas if you would like to PM me. Thanks  8)

WasabiIceCream

  • Youngling
  • *
  • Posts: 21
  • Karma: +2/-0
    • View Profile
    • Gameoverse
  • Twitch Name: Gameoverse
Re: Developing RPG Mini Game
« Reply #6 on: April 18, 2016, 06:45:18 PM »
I noticed whenever you lost a fight, you would lose GP. I also noticed its not keeping track of GP (at least I can't find where it's doing it), so I found this to be useless. I changed it to take away exp. It will go past 0 into the negatives, which I couldn't figure out how to stop. It doesn't seem to like adding positive numbers to negative numbers very well, but its a start, and not useless like taking GP was. Here's how I did it...

My bad, I meant to change that to @pointsname@, but I can't edit the post here after a certain amount of time.
Our points were called GP, so they would just lose a bit of those points.
At the low levels, the point gains/losses are pretty insignificant, but the pot is generated based on their level, so as a user levels up, they gain/lose more points.

A cooldown is a great idea. I can't edit the old posts, like I said, so this thread may get a bit messy as we continue to add/edit things.

KennyGString

  • Youngling
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
  • Twitch Name: KennyGString
Re: Developing RPG Mini Game
« Reply #7 on: April 19, 2016, 04:26:38 AM »
I've been working and tweaking this for a couple days now. I've added:

The option to be able to heal for the cost of channel currency with small, medium, large, and full heal being options. The heal checks to see if the player has made a character and if they have enough currency to purchase it.
Visual things like showing how much XP you need to level and how much HP you have remaining after a fight.
I've integrated mostly all messages into whispers except one that would be interesting to know, such as level ups will be announced in chat.
I did some balancing to it as well. Such as lowering the level chance encounter to 3 instead of 5. Being level 1 and encountering a level 5 and 6 wasn't really fun.

The next thing I'm working on is trying to get the values of each level up to be random. I see what you're saying how it just chooses a random value once, and then applies it to all of the @rand@ commands. I've talked to a couple DeepBot support guys and they didn't really know why either. One said that he has a command with a bunch of @rand@ commands in it, but its not consecutive like it is ours. They said that theirs had @if@ commands before it and it worked fine.

I planned on adding a store with weapons and armor as well. I've already made the initial !store and got it to work. But you can't buy anything just yet. I want to figure out why the @rand@ isn't picking a random value for each one before I implement it. It's doing the same thing as the level up. Do you have steam? It might be a lot easier to stay in contact through that if you're interested.

KennyGString

  • Youngling
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
  • Twitch Name: KennyGString
Re: Developing RPG Mini Game
« Reply #8 on: April 19, 2016, 11:07:54 AM »
UPDATE: So I talked with a support guy today and he mentioned that in our @rand@ problem will be fixed in the next update. We'll have to change the commands from:

@rand@[1|10]

to

@rand@[1|10|unique]

If you add the unique tag at the end, it tells the bot to do what we want. If you don't have it, all the @rand@ values will be the same. So looking forward to that.

WasabiIceCream

  • Youngling
  • *
  • Posts: 21
  • Karma: +2/-0
    • View Profile
    • Gameoverse
  • Twitch Name: Gameoverse
Re: Developing RPG Mini Game
« Reply #9 on: April 19, 2016, 02:40:41 PM »
Good stuff. That update should solve the last of the issues.
Would just be adding/tweaking/updating from there.

I'm Wasabi Ice Cream on Steam, or
you can jump in our Discord server: https://discord.gg/0hT9PgQRD9Ua2mfE

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Developing RPG Mini Game
« Reply #10 on: April 20, 2016, 01:49:06 AM »
To show how the @rand@ works, here is example:



Command in action:

Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

KennyGString

  • Youngling
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
  • Twitch Name: KennyGString
Re: Developing RPG Mini Game
« Reply #11 on: April 20, 2016, 05:14:56 AM »
Thanks so much for clearing it up and looking into it for us.

WasabiIceCream

  • Youngling
  • *
  • Posts: 21
  • Karma: +2/-0
    • View Profile
    • Gameoverse
  • Twitch Name: Gameoverse
Re: Developing RPG Mini Game
« Reply #12 on: May 16, 2016, 02:03:27 PM »
The latest update is causing the !fight command to crash now.
Can anyone else confirm?

KennyGString

  • Youngling
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
  • Twitch Name: KennyGString
Re: Developing RPG Mini Game
« Reply #13 on: May 19, 2016, 07:07:53 AM »
Yeah it just happened in my stream today. Working on it tonight to see whats up

Here's the crash log:

16 May 20:51:27,354 - Error -Unable to log stream info.
Version : 0.9.1.0
Message : Unable to connect to the remote server
Stack Trace :
   at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)
   at System.Net.WebClient.UploadValues(String address, NameValueCollection data)
   at DeepBot.DeepBotAPI.DeepBotStreamInfo.#lgb.#hlb(Object )
------------------------------

18 May 09:20:30,087 - 0.9.1.0: Crashed Illegal characters in path.
18 May 09:20:30,105 - 0.9.1.0: Crashed    at System.Runtime.CompilerServices.AsyncServices.<ThrowAsync>b__0(Object state)
18 May 09:21:22,980 - 0.9.1.0: Crashed Illegal characters in path.
18 May 09:21:22,980 - 0.9.1.0: Crashed    at System.Runtime.CompilerServices.AsyncServices.<ThrowAsync>b__0(Object state)
18 May 09:21:49,697 - 0.9.1.0: Crashed Illegal characters in path.
18 May 09:21:49,697 - 0.9.1.0: Crashed    at System.Runtime.CompilerServices.AsyncServices.<ThrowAsync>b__0(Object state)
18 May 09:22:06,256 - 0.9.1.0: Crashed Illegal characters in path.
18 May 09:22:06,256 - 0.9.1.0: Crashed    at System.Runtime.CompilerServices.AsyncServices.<ThrowAsync>b__0(Object state)
18 May 19:14:24,643 - 0.9.1.0: Crashed Illegal characters in path.
18 May 19:14:24,643 - 0.9.1.0: Crashed    at System.Runtime.CompilerServices.AsyncServices.<ThrowAsync>b__0(Object state)
« Last Edit: May 19, 2016, 07:15:21 AM by KennyGString »

KennyGString

  • Youngling
  • *
  • Posts: 16
  • Karma: +1/-0
    • View Profile
  • Twitch Name: KennyGString
Re: Developing RPG Mini Game
« Reply #14 on: May 19, 2016, 07:19:55 AM »
From the small amount of testing I can do since the main !fight command causes a crash, I've noticed that...

@readfile@[RPG\Classes\@readfile@[RPG\Users\@user@Class.txt].txt]

No longer works. I'm not sure why, but it won't actually read the txt file. It just shows up as blank. For example:

@^illumiboti: kennygstring, you are a Level 1 . Use !stats to check your Stats. Use !fight to get started

It should say Barbarian after Level 1, but it doesn't.