Mystic Software Forums

Mystic Software => General Discussion => Topic started by: Tough Dragon on July 23, 2005, 01:27:41 PM

Title: (no subject)
Post by: Tough Dragon on July 23, 2005, 01:27:41 PM
How do I make it so I can press a button and I fight or run or use a item.  This is what I did so far.   Sad
#Bitmap("testbkg.jpg")
#Put(8, 10, "Pictures.tst001")
#Put(7, 10, "Pictures.tst002")
#Put(9, 10, "Pictures.tst002")
#Put(8, 11, "Pictures.tst003")

I don't know what I'm doing.
Title: (no subject)
Post by: Aminaga on July 23, 2005, 02:34:51 PM
That is probably the best battle system I've ever seen.  Smile
Title: (no subject)
Post by: Tough Dragon on July 25, 2005, 12:54:43 PM
Now this

#Bitmap("testbkg.jpg")
#Put(15, 5, "char.tst005")
#Put(1, 5, "char.tst015")
#Mwin(1 - Fight)
#MWin(2 - Special Moves)
#MWin(3 - Item)
#MWin(4 - Run)
#Wait()
******************************
#if(4)
#Send("start.brd", 8, 11, 1)
*******************************
Title: (no subject)
Post by: Dude Man on July 25, 2005, 01:04:02 PM
No no no no. That won't work.

It should be this...

#Bitmap("testbkg.jpg")
#Put(15, 5, "char.tst005")
#Put(1, 5, "char.tst015")
#Mwin(1 - Fight)
#MWin(2 - Special Moves)
#MWin(3 - Item)
#MWin(4 - Run)
#Wait(a$)
******************************
#if (a$=="4")
#Send("start.brd", 8, 11, 1)
******************************
Title: (no subject)
Post by: Xorlak on July 25, 2005, 01:14:45 PM
Code: [Select]
#Bitmap("testbkg.jpg")
#Put(15, 5, "char.tst005")
#Put(1, 5, "char.tst015")
#battledone!=0
#while(battledone! == 0)
{
  #mwincls
  #Mwin(1 - Fight)
  #MWin(2 - Special Moves)
  #MWin(3 - Item)
  #MWin(4 - Run)
  #Wait(a$)
  ******************************
  #if (a$=="4")
  {
     #battledone! = 1
     #Send("start.brd", 8, 11, 1)
  }
  ******************************
}


Heh, now someone else.  Let's all add a piece.
Title: (no subject)
Post by: Aminaga on July 25, 2005, 01:46:13 PM
Well, I remember matt72186 giving me some tips about a BS one time:

Quote
I suggest you put everything in arrays
an array for each character/character stats
an array for each item
an array for each move in the game
an array for each enemy/enemy stats

it's up to you what variables you want to store for every game, for example

character[0]["name"]$ = "bob"
character[0]["health"]! = 100

item[0]["title"]$ = "sword"

specialmove["level"]$ = "fierce"
specialmove["power"]! = 100

Then when you go in your battle system it's all a matter of loading the data and deciding what you want to do with it, like for an attack you can do
damage! = character[cnum!]["attack"]! - enemy[enum!]["defense"]!
enemy[enum!]["health"] -= damage!

For implementing it you have a program, call it something like "battle.prg" and make it a thread, what it should do is generate a random number over and over again, and depending on your chance of getting in a battle, it may or may not run the battle() command (that you make)

chance! = Random(1000)
if(chance! <= 50)
{
// Do battle
}

So if chance is 1-50 you get into a battle, but if it's 51-1000 it does nothing
Title: (no subject)
Post by: Tough Dragon on July 25, 2005, 03:10:12 PM
Aminaga how do you use your programs give an example of what you just showed?
Title: (no subject)
Post by: Aminaga on July 25, 2005, 03:19:13 PM
Okay. Hang on one second...

EDIT: Done.

Code: [Select]
#Bitmap("testbkg.jpg")
#Put(15, 5, "char.tst005")
#Put(1, 5, "char.tst015")
#battledone!=0
#while(battledone! == 0)
{
 #mwincls
character[0]["name"]$ = "bob"
character[0]["health"]! = 100
 #Mwin(1 - Fight)
 #MWin(2 - Special Moves)
 #MWin(3 - Item)
 #MWin(4 - Run)
 #Wait(a$)
 ******************************
 #if (a$=="1")
 {
damage! = character[cnum!]["attack"]! - enemy[enum!]["defense"]!
enemy[enum!]["health"] -= damage!

 }
 ******************************
 ******************************
 #if (a$=="2")
 {
 More text goes here.
 }
 ******************************
 ******************************
 #if (a$=="3")
 {

 More text goes here.
 }
 ******************************
 ******************************
 #if (a$=="4")
 {
    #battledone! = 1
    #Send("start.brd", 8, 11, 1)
 }
 ******************************

Please keep in mind all of this is un-tested, and you may have to change some of the stuff.
Title: (no subject)
Post by: Number Eight on July 25, 2005, 04:24:41 PM
Tough Dragon, are you using RPGToolkit 2 or 3?
Title: (no subject)
Post by: Tough Dragon on July 26, 2005, 11:23:03 AM
Quote from: "Number Eight"
Tough Dragon, are you using RPGToolkit 2 or 3?

Toolkit 2.
Title: (no subject)
Post by: Number Eight on July 26, 2005, 01:24:58 PM
Fixed the fight command. It's untested, but I think that should work better than Aminaga's. Wink
Code: [Select]
#Bitmap("testbkg.jpg")
#Put(15, 5, "char.tst005")
#Put(1, 5, "char.tst015")
#battledone!=0
#while(battledone! == 0)
{
#mwincls
character0[name]$ = "Bobbert"
character0[health]! = 100
#Mwin(1 - Fight)
#MWin(2 - Special Moves)
#MWin(3 - Item)
#MWin(4 - Run)
#Wait(a$)
******************************
#if (a$=="1")
{
#castlit(cnum!,cnum$)
#castlit(enum!,enum$)
#code$="#damage! = character"+cnum$+"[attack]! - enemy"+enum$+"[defense]!"
#rpgcode(code$)
#code$="#enemy"+enum$+"[health]!=enemy"+enum$+"[health]!-damage!"
#rpgcode(code$)

}
******************************
******************************
#if (a$=="2")
{
More text goes here.
}
******************************
******************************
#if (a$=="3")
{

More text goes here.
}
******************************
******************************
#if (a$=="4")
{
   #battledone! = 1
   #Send("start.brd", 8, 11, 1)
}
******************************
}
Title: (no subject)
Post by: Aminaga on July 26, 2005, 02:19:43 PM
Quote from: "Number Eight"
but I think that should work better than Aminaga's.


Why thank you, Number Eight. Now, let's see if we can get some more variables into this Battle System we have.

Code: [Select]
#Bitmap("testbkg.jpg")
#Put(15, 5, "char.tst005")
#Put(1, 5, "char.tst015")
#battledone!=0
#while(battledone! == 0)
{
#mwincls
#mediaplay("music.mid")
character0[name]$ = "Bobbert"
character0[health]! = 100
character0[attack]! = 25
character0[defense]! = 10
enemy0[name]$ = "Your Mom"
enemy0[health]! = 100
enemy0[attack]! = 25
enemy0[defense]! = 10
specialmove["level"]$ = "fierce"
specialmove["power"]! = 100
#Mwin(1 - Fight)
#MWin(2 - Special Moves)
#MWin(3 - Item)
#MWin(4 - Run)
#Wait(a$)
******************************
#if (a$=="1")
{
#castlit(cnum!,cnum$)
#castlit(enum!,enum$)
#code$="#damage! = character"+cnum$+"[attack]! - enemy"+enum$+"[defense]!"
#rpgcode(code$)
#code$="#enemy"+enum$+"[health]!=enemy"+enum$+"[health]!-damage!"
#rpgcode(code$)

}
******************************
******************************
#if (a$=="2")
{
More text goes here.
}
******************************
******************************
#if (a$=="3")
{
More text goes here.
}
******************************
******************************
#if (a$=="4")
{
  #battledone! = 1
  #Send("start.brd", 8, 11, 1)
}
******************************
}

Also, I tested the BS, and Number Eight's fight code didn't work.
Title: (no subject)
Post by: Tough Dragon on July 26, 2005, 08:06:02 PM
So the battle system should look something like this.

#Bitmap("testbkg.jpg")
#Put(15, 5, "char.tst005")
#Put(1, 5, "char.tst015")
#battledone!=0
#while(battledone! == 0)
{
 #mwincls
#mediaplay("music.mid")
#character1[name]$ = "Bobbert"
#character1[health]! = 100
#character1[attack]! = 25
#character1[defense]! = 10
#enemy1[name]$ = "Your Mom"
#enemy1[health]! = 100
#enemy1[attack]! = 25
#enemy1[defense]! = 100
#specialmove["level"]$ = "fierce"
#specialmove["power"]! = 100


{

 #Mwin(1 - Fight)
 #MWin(2 - Special Move)
 #MWin(3 - Run)
 #Wait(a$)
 *************************************
 #if (a$=="3")
 {
    #battledone! = 1
    #Send("start.brd", 8, 11, 1)
 *****************************************  
 }
 
 #if (a$=="1")
(
damage! = character[cnum!]["attack"]! - enemy[enum!]["defense"]!
enemy[enum!]["health"] -= damage!
 


{
Title: (no subject)
Post by: Aminaga on July 26, 2005, 08:25:53 PM
No, no, and no.
Title: (no subject)
Post by: Number Eight on July 26, 2005, 10:27:45 PM
Quote from: "Aminaga"
Why thank you, Number Eight. Now, let's see if we can get some more variables into this Battle System we have.

Code: [Select]
#Bitmap("testbkg.jpg")
#Put(15, 5, "char.tst005")
#Put(1, 5, "char.tst015")
#battledone!=0
#while(battledone! == 0)
{
#mwincls
#mediaplay("music.mid")
character0[name]$ = "Bobbert"
character0[health]! = 100
character0[attack]! = 25
character0[defense]! = 10
enemy0[name]$ = "Your Mom"
enemy0[health]! = 100
enemy0[attack]! = 25
enemy0[defense]! = 10
specialmove["level"]$ = "fierce"
specialmove["power"]! = 100
#Mwin(1 - Fight)
#MWin(2 - Special Moves)
#MWin(3 - Item)
#MWin(4 - Run)
#Wait(a$)
******************************
#if (a$=="1")
{
#castlit(cnum!,cnum$)
#castlit(enum!,enum$)
#code$="#damage! = character"+cnum$+"[attack]! - enemy"+enum$+"[defense]!"
#rpgcode(code$)
#code$="#enemy"+enum$+"[health]!=enemy"+enum$+"[health]!-damage!"
#rpgcode(code$)

}
******************************
******************************
#if (a$=="2")
{
More text goes here.
}
******************************
******************************
#if (a$=="3")
{
More text goes here.
}
******************************
******************************
#if (a$=="4")
{
  #battledone! = 1
  #Send("start.brd", 8, 11, 1)
}
******************************
}

Also, I tested the BS, and Number Eight's fight code didn't work.

 Make enum! and cnum! equal zero first. Otherwise, it may be something weird with the rpgcode command. That happens. Or maybe I made a mistake, but I don't think I did...