Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Monster Arena V3.1

Status
Not open for further replies.
Monster Arena
Version: 3.1


Introduction

This script/minigame allows you to have monster fights, and bet on the outcome of the battle. This script also generates the rates (winning rates) of each bet and also keeps track of them. The script also updates itself and changes battlers every (n) seconds.


Screenshots







Demo

http://www.rmxp.org/forums/downloads.php?do=file&id=330

Instructions

Copy all of the Scripts and add them to your project

Note: This script is not Plug and Play. It is Plug, Setup, and Play

Level(n)Battlers

Code:
 

#--------------------------------------------------------------------------

  # * Enemy Id Battler Levels Syntax: Level(n)Battlers = enemy_ids

  #--------------------------------------------------------------------------

  Level0Battlers = 34,35,36,37,38

  Level1Battlers = 39,40,41,42,43

 
This is the most important part of the setup, here is where you setup the enemies that will fight and which level they are part of. If you need more levels just create the constant and set its battlers so if I wanted level 2 to have battlers 1-5 I would add this

Code:
 Level2Battlers = 1,2,3,4,5
Add as many as you want as long as you do not skip a number (if you do then it will not detect anything after the skipped number)

Elements

Code:
 

#--------------------------------------------------------------------------

  # * Elements - Set this to the real elements in your game

  #-------------------------------------------------------------------------

  Elements = 1,2,3,4,5,6,7,8

 
Set this value to the real elements in your game, failure to do so will result in the rate calculations being alot less accurate.

Beginning Stats

Code:
   #--------------------------------------------------------------------------

  # * Beginning Stats - syntax enemy_id => [wins, losses, battles, begin_rate]

  #--------------------------------------------------------------------------

  Stats = {

  }

 
This constant allows you to set the beginning stats of a battler at the stat of a game It allows you to set the beginning number of wins, losses, battles and beginning rate (which influences their rate calculation) Here is an example

Code:
Stats = {34 => [10, 20, 60, 2.5}
Which means according to my demo: The Battler Ghoul starts out with 10 wins, 20 losses, has battled 60 times, and has a 5:2 rate influence (convert decimals to get a ratio)

Stats Default

Code:
 

  #--------------------------------------------------------------------------

  # * Default Stats syntax [def wins, def losses, def battles, def begin_rate]

  #--------------------------------------------------------------------------

  Stats.default = [0,0,0,2.0]

 
The Default if the battler wasn't defined in the Stats hash.

the rest of this part of the setup is a do not touch section, and messing with it will affect the scripts execution. all it is doing though is collecting all battlers defined in the Level(n)Battlers array


Update Rate
Code:
 

  #--------------------------------------------------------------------------

  # * Rates Update Rate (In Seconds)

  #--------------------------------------------------------------------------

  Update_Rate = 60

 
This is the amount of second it takes before the battle is done and new battlers are chosen, right now It only updates the last arena visited but I'm planning on changing this on the next update

Starting Setup

Code:
 

  #--------------------------------------------------------------------------

  # * Starting Setup syntax min level, max level, min enemy, max enemy, mixing

  #--------------------------------------------------------------------------

  Starting_Setup = 0,1,3,6,true

 
Another important constant that needs to be configured correctly. It setups the starting battlers for the arena

Draw Type

Code:
   #--------------------------------------------------------------------------

  # * Draw Enemy Battlers, 0: Stretch to Fit 1: Crop to Fit

  #--------------------------------------------------------------------------

  Draw_Type = 1

 
Draw Type, this options tells how are we drawing the enemies in the Scene. When you are selecting a battler in the first part the dimensions are 96 by 96, when creating the ticket the dimensions are 160 by 160

Cropping

Code:
 

  #--------------------------------------------------------------------------

  # * If Cropping the crop position of each battler

  #   0 1 2

  #   3 4 5

  #   6 7 8

  #   syntax: enemy_id => crop_id

  #--------------------------------------------------------------------------

  Crop = {39 => 7, 42 => 4, 43 => 7}

 
Ignore this if you are using the zoom option. This option allows you to crop a portion of the enemy's picture. You decide where to crop the picture exactly. The numbers are as follows: 0 - Top Left, 1 - Top Center, 2 - Top Right, 3 - Left Middle, 4 -Center, 5 - Right Middle, 6 - Bottom Left, 7 - Bottom Center, 8 - Bottom Right

Default Cropping

Code:
 

  #--------------------------------------------------------------------------

  # * Default Cropping (Top Center)

  #--------------------------------------------------------------------------

  Crop.default = 1

 
The Default Cropping (see Cropping)

Not Enough Color

Code:
 

#--------------------------------------------------------------------------

  # * Ticket Not Enough Money Color

  #--------------------------------------------------------------------------

  Not_Enough = Color.new(160,0,0)

 
Color Used with you can not buy ticket

Winning Ticket Color

Code:
 

  #--------------------------------------------------------------------------

  # * Winning Ticket Color

  #--------------------------------------------------------------------------

  Winning = Color.new(224, 192, 32)

 
Color used with a winning ticket

Ticket Icon File

Code:
 

  #--------------------------------------------------------------------------

  # * Ticket Icon File

  #--------------------------------------------------------------------------

  Icon = '040-Item09'

 
Fight Text

Code:
 

  #--------------------------------------------------------------------------

  # * Fight Text

  #--------------------------------------------------------------------------

  Fight_Text = "[size] Monsters are ready to fight"

 
The Fight Text Used

End Battle ME's

Code:
 

  #--------------------------------------------------------------------------

  # * End Battle ME's

  #--------------------------------------------------------------------------

  Heavy_Loss = RPG::AudioFile.new("016-Shock01")

  Small_Loss = RPG::AudioFile.new("013-Gag02")

  Small_Win  = RPG::AudioFile.new("007-Fanfare01")

  Medium_Win = RPG::AudioFile.new("008-Fanfare02")

  Large_Win  = RPG::AudioFile.new("009-Fanfare03")

 
To call this Scene

In a call script event command use this code
Code:
$scene = Scene_Arena.new
To modify the ticket cost use
Code:
$game_system.ticket_rate = amount
where amount is the cost of the ticket

To modify the maximum bet use
Code:
$game_system.max_bet = amount
where amount is the maximum bet

FAQ
Q) Why does the input window only go up by one?
A) If you have to ask this then you didn't speak to the NPC that explains the system, but press the buttons defined for R and L (Page Up and Page Down by default) to change the amount inputted


Compatibility

Will not recognize any battle addons as the scene is not Scene_Batle.

This script should work in combination with other scripts, not making any promises though.

SDK compliant

Requires Method and Class Library V1.5 or greater

Credits and Thanks

People who betatested, I forgot everyone's name who helped.

Author's Notes

Do not ask me to change the type of battle system used, thanks.
 
Geez. you must have been tired when you made this demo, there's a lot of mistakes in the typing. The script is perfect though...

Cmon guys, how did we miss this one? It's been up for two days and no-one has posted? Ah well. Someone has to be first.

This would be excellent for a betting game, or just a way to get the hero some extra money (reminiceses about FFCC...)
 
I don't understand either how no one's posted to this one. But I really love the concept! Very good idea Trickster, and I like the way it looks.
 
samboy;109342 said:
Geez. you must have been tired when you made this demo, there's a lot of mistakes in the typing. The script is perfect though...

Cmon guys, how did we miss this one? It's been up for two days and no-one has posted? Ah well. Someone has to be first.

This would be excellent for a betting game, or just a way to get the hero some extra money (reminiceses about FFCC...)

Hehe, I probably was since I get most of the scripting work done at night, thanks for the reply Samboy

Ammom;111959 said:
I don't understand either how no one's posted to this one. But I really love the concept! Very good idea Trickster, and I like the way it looks.

Thanks, glad you like the design usually BlueScope finds one thing and complains about it. I won't be surprised if he finds something he doesn't like about it *wink* *wink*
 
Well...I'm using this. Great job Trickster! Just one question, and you've probably answered it in the first post or the script somewhere, but, is it possible to have seperate Arenas that house different monsters. Like, having some monsters that only appear in one place and not another. I'm guessing it has something to do with the Enemy Id Battler Levels in the script, but I don't know how. >_>

Sorry if it was already answered, and once again, great script.
 
Well it's good to see this script back up again after the hack problem.
As always very good scripting trickster.
@Samboy: You might be thinking of the Dragon Warrior games were they have monster arenas in most towns, were you can bet on monsters.
 
Ahh Sorry about that spudalesca

If you want to switch monsters call this code in a call script
Code:
Game_Rate.set_battlers([I]levelmin[/I], [I]levelmax[/I], [I]min_num[/I], [I]max_num[/I] [B][[/B], [I]mixing[/I][B]][/B])

Where

levelmin - is the minimum level
levelmax - is the maximum level
min_num - is the minimum number of battlers (2 or greater)
max_num - is the maximum number of battlers (8 or less)
mixing - is optional set it to true allows mixing of levels, and false does the opposite. The Default is true.

@Choas Prime - Thanks, Yes I did got the idea from the dragon warrior games, I improved upon it quite a bit
 
@$anta you don't have to be a noob, I am and once you look over scripts created by other people, you'll start grasping the finner aspects of scripting.
And you can then edit or modify there own scripts to suit your needs but also remember keep a copy of the original script handy as a just in case you mess up you can always go back on-to the backup.
 
$anta;113048":2zyrvklc said:
Wow I love that script, you are amazing.
If only I wasn't a noob at setting these kind of things up lol..

Chaos_Prime;113056":2zyrvklc said:
@$anta you don't have to be a noob, I am and once you look over scripts created by other people, you'll start grasping the finner aspects of scripting.
And you can then edit or modify there own scripts to suit your needs but also remember keep a copy of the original script handy as a just in case you mess up you can always go back on-to the backup.

Look at the First Post I have given full directions on each option, and a few examples

Mike Portnoy;113123":2zyrvklc said:
I was wondering... could it work with RTAB?
(please don't hit me for this...)

Ok, Mike, Didn't we already have a discussion about this in a PM, and yet you go and bring this up again, like I said if it works it works if not then oh well. Its not my problem and I don't have to make any of my scripts compatible with another system if I don't want to, learn to script and do it yourself.

And if you just took the time to read the compatibility section

Compatibilty":2zyrvklc said:
This script should work in combination with other scripts, not making any promises though.

So again try and if it doesn't work, its not my problem get a better coded script. (Just be lucky you didn't trigger my wrath)
 
okay okay please don't throw me a rock for this... it's just a question and anyways i asked you when it still wasn't complete... anyways i'll try but i don't think it can... i'll check and tell here (for all passionate of RTAB like me)

EDIT: I tryed... incredible! It doesn't crash! But it doesn't happen anything, anyways nice job, i never saw something about battle that didn't crash on RTAB XD.
 
Mr.Mo;113252":3dpf6qy2 said:
Very nice script. Just like the other AI ones. :)

thanks, Mr. Mo. what other AI ones?

Let me point something out before anyone else posts

Compatibility":3dpf6qy2 said:
A.) Will not recognize any battle addons as the scene is not Scene_Batle.

B.)This script should work in combination with other scripts, not making any promises though.

A) I made this script standalone, The Scene used is not Scene_Battle (if it was then It this script would have been harder to code and compatibility would have been much lower than it is now). This also means that other battle addons (ex. modifications to the damage formula) will not be recognized by the script

However, if you want to add stuff like that in you will have to edit the scripts version of Scene_Battle (named Scene_ArenaBattle) and/or Game_Battler/Game_Enemy (named Game_ArenaEnemy). If you change the damage formula you must also edit Game_Rate#(attack|skill)_effect, because a version of those is used in calculating the rate.

B) Since this script is standalone, it will probably work with any script, though I am not making any promises since A) there might be a class name conflict with other scripts (although that is very very rare), B) there are some edits to the default classes that are needed. If you find this script to be incompatible then, make a request for the two scripts to be merged in the Script Requests Forum not here. Thank you.
 
Sorry, I is stoopid. Figured out what I was doing wrong. A) I was too dumb to figure out the tcket system and B) This script doesn't apper to be SDK 2.2 compatible. Durnit.

(Ummmm, is there any chance at all this script could with any ease be made SDK 2.2 friendly? I really like it a lot, and it would go great with the monster raising/battling side game I'm including in my project. If it's not that simple, no problem. But it would be appreciated if it's not a lot of trouble. Thanks.)
 
This would make me pants-wettingly happy.

I will thank you, my launderer will curse you. You can't please everyone.

Thanks Trickster!
 
I don't mean to speak for Trickster, Chaos, but it should work with pretty much any battle system because it doesn't use the battle system. It has its own scene, and doesn't rely on scene_battle at all, as far as I can tell.
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top