Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - littletomdj

1
Over the past three days I've been working on some floor textures & trying to build a fairly comprehensive group of useful tiles. All the tiles in this post are mods. I've edited and compiled them to make a (hopefully) user friendly, compact & intuitive resource base.

Useful information
Spoiler: ShowHide
I like to create large tilesets that I can use throughout the production of my game, without having to create a new set for each map. For that reason, I avoid using autotiles wherever possible & save those slots for animated tiles. Don't worry though, I've made lots of autotiles just for you lazy mappers anyway!  O:)

The tiles in these sets serve all & more of the flexibility of autotiles &, as far as I'm aware, there is no variant that can't be created from these sets. In most instances you needn't draw on the second layer when you're mapping either.
I've also included sets with transparency for added flexibility.

This set will continue be updated for as long as I can be bothered.
It's unlikely that I'll upload many more Autotiles though.


All I ask for is a little appreciation, so just let me know if you like what you see.
These are mods of the VX tileset & Inquisitor's tileset, so make sure you give him a shout & check out his work.
Be sure to download the mini-strips, the sets are virtually unusable without them.

Screenshot
Spoiler: ShowHide


--------- TILESET ---------

Mini-Tile Strips
Spoiler: ShowHide






Tilesets
Spoiler: ShowHide




Spoiler: ShowHide




Spoiler: ShowHide





Negative
Spoiler: ShowHide



--------- AUTOTILES ---------

Asphalt
Spoiler: ShowHide




       


Blue Concrete
Spoiler: ShowHide







             


Grey Concrete
Spoiler: ShowHide







             


Cobbles & Cracked Stone
Spoiler: ShowHide






           


Grass
Spoiler: ShowHide






           


Mud
Spoiler: ShowHide






           


Transparency
Spoiler: ShowHide



     


Notify me if you spot any anomilies!

That's it for now. I hope they help!  :hi:
2
Resources / Re: Help with sidewalk pixel.
July 22, 2012, 12:34:48 pm
You're in luck, I'm just in the process of editing some floor tiles.
Hang on for a few hours & I'll post a little package of treats for ya!
Just have a look in this section for the post called "Floor textures".

EDIT:

O.K sir/madam

There's a whole bunch of asphalt (sidewalk) tiles up in the database. There's more to come tomorrow evening.
They'll get cleaned up a touch too (I spotted a couple of graphical glitches).

http://forum.chaos-project.com/index.php/topic,12153.0.html

Just let me know if you like 'em.

:poke: (no reason... I just like this emoticon!)  :haha:

Please use the "Modify" button instead of double-posting, Thanks. - Zer0
3
Resource Database / Observatory & Telescope
July 22, 2012, 11:19:47 am
Hello again... mr. generous returns with a new feature piece.
Let me know what ya think! Give me a level up & maybe just maybe I'll deliver some more goodies!!???  :naughty:

This is my new observatory, just finished... I hope it comes in useful! (might need a few touch ups)

I've even been kind enough to cut it into it's components for extra flexibility.

Full Graphic
Spoiler: ShowHide

Telescope & Base
Spoiler: ShowHide

Telescope
Spoiler: ShowHide

Base
Spoiler: ShowHide

Building
Spoiler: ShowHide


ENJOY!!!!!  :D

4
Hello there,

I thought I'd drop in and share some stuff I conjured up in the lab today.
Futuristic stuff is always tricky to find & I reckon this might just be useful to those with a modern vibe to their game... So, without further ado, allow me to present these little mods for animated scenery.


Characters.
Spoiler: ShowHide

Spoiler: ShowHide

Spoiler: ShowHide


Tileset.
Spoiler: ShowHide


Sliding Doors - New Addition!
Spoiler: ShowHide


I didn't make the original tiles... I'm not sure if they original came from Enterbrain (VX) or some uber-talented spriter. I just dug them up off the net. It's not difficult to find the complete sets with a little Googling though!

The Tileset I've provided is just the bits relevant to these characters (really cut down).
So have a dig online for the full set!
I should say though, that I've repositioned and modded some of the tiles, so this tileset is worth downloading if you want to use the characters.

Oh & those wierd metalic things on the 3rd character set are helmets attached to the electric chair device thing (it all makes sense if you look at the Tileset).

I'll be testing them all out today, so I'll mod anything that looks glitchy.

Chow 4 Now!




5
Resources / Re: Steam Train Locomotive
May 01, 2012, 02:54:43 am
For Ryex...  :haha:

Ofcourse!!!

I made lipped stations just for the point that I couldn't be bothered to make the wheels on the train go round and round. hehee.

Great minds think ... I wouldn't know?
But, you're right in my oppinion!

Everything you said was spot on & I may well work on those ideas, I've got a whole game to deal with though.
For now I'm content with a moving train.  :)
6
Resources / Re: Steam Train Locomotive
May 01, 2012, 02:42:31 am
Yep yep yep. The edges round the smoke were what I was referring to when I was talking about when I said "it looks a bit glitchy".
They're totally invisible against a real RMXP level background (I'm gonna fix 'em anyway).
It'll look fine against RMVX graphics & Inquisitor's set (I'm using a combination of both). I hate the RMXP tiles they smell bad & hurt children. Deep colours & high contrast for the win!  :haha:

I don't think I'm gonna mod the pipes,  but I think the front light could do with a tweak.
I'm not sure what you mean by aliasing?

p.s. I really wanted to show off that summon you helped me out with, but my motion capture software slowed everything down & it wasn't worthy of an upload. In game it looks sick though; Big evil giant wakes up, rips a boulder out of the ground and hurls it at your enemies = (satisfaction!).

Next up will probably be the "Inquisitor" Gallion. It's already done, but it's not user friendly at all.

Thanks for the feed back & constructive criticisms. I value those more than anything!  
 
7
This is my VERY FIRST UPLOAD! Ta Daaa!! I figured I'd make it something special!  :)

TRAIN SPRITE
Spoiler: ShowHide

As suggested I've edited the smoke tiles, so they're lovely & blurred into the background (no more rough edges. I've tweaked the edges round the train too.

RAILS
Here are the basic rail tiles. (I 'might' make some corners at some point)
Spoiler: ShowHide


RAMBLINGS
This took 3 days work & a final slug that's ended at 6:00 a.m.
In my eagerness to get it uploaded I skipped the final tweaks.  :facepalm:

This is to say thanks to ShadowPierce, Calintz & Mark Hest in particular. They've really helped me out & deserve something in return.

This 'character' fits perfectly on to a 32x32 grid (obviously) & is 'really' designed for use with "Inquisitor's" tilesets (but that's not essential at all).
The bottom is cut off some of the frames so you can put it in a station, with a lip... If that makes sense?

I'm sure people will find this useful.
Let me know if you use it because it makes me feel warm & fuzzy inside.

Oh... But most of all, tell me what ya think!?

...That's me done for now, I think.
- Little Tom






8
So, I think we can officially close this topic.
I just wanted to share a few last words.

Over the past two days I've been working on this summon animation non stop.

I was really dubious about importing 45 pictures to do a 'psuedo animation' but as it turns out, it looks great.
I used Synfig studio which crashed every five mins (I've never used it before and I suggest you don't try it) but, I got there in the end. I've had to do a couple of work arounds to get this to work too.

I really want to share the finished product. This gives me the excuse to find some movie capture software and upload some junk on Youtube. I'm at that point now that I can kinda start to help others out. I've got one or two bits to share already. It's just a matter of time.

 



9
"they're insanely buggy and can cause your game to slow almost to a stop"

I thought as much. The authors themselves seem dubious & attatch warnings to the scripts.

"Does that mean I just made love to Calintz?"

Indeed it does, it was a beautiful thing!  :naughty:
10
Yes, these last too methods are much closer to the method I was thinking of employing.

Calintz suggestion is exactly the way I made my last summon. Although I can't use that method because I can't seem to make animations fully opaque (thus it doesn't look as though I'm cutting away from the scene). I've got the frames of the animation set to Opacity 255 & Normal blending yet the battle scene still shows through. I'm not sure why... I think there's some z-axis settings built into the sideview script I'm using... Headache.  :O.o:

I reckon I'll go with a combination of both of your suggestions. I don't think I'll get the same problem displaying a series of pictures as ShadowPierce suggested.

Neither of you have even entertained the idea of an AVI cutscene (or flash anim,mpg or whatever). I have seen scripts for it though. Are you just unaware of them or do you think they're overly buggy and odd to waste time with? tbh I wasn;t much looking forward to another script migrane anyway.

Well, thanks for the ideas. I'll send you both links to a vid of the finished summon in all it's glory once it's complete (whichever way I do it). That way you can get to feel like proud dads!  :haha:

Thanks again!
11
 :haha:Haha.. I think we're having a major communication breakdown here.

I'm not after an overdrive or limit breaker system at all. I'm not even after any sort of summon system really.
I'm just after a way of implementing a "cutscene" in battle when you cast a spell.

Thanks all the same for the effort. :)
12
Thanks ShadowPierce but, I'm sorry this doesn't SEEM to be what I'm after at all.  :???:

Am I just being stupid & missing something?

This seems to be a quite advanced limit breaker system that allows you to summon monsters which become playable characters.

All I'm trying to do is create a sort of 'cut scene' when I cast certain spells. It's probably best NOT to think of these as "summons" at all.

I saw a guy on Youtube who's managed to accomplish it although he's using VX.

link here (to demonstate).


I doubt the following is particularly relevant but I'm using;
Paradog's ATB 2.61 and Animated battlers - Enhanced 13.7
&
Charlie Fleeds Skills Learning System 2.3
(I think I'm  going to get some compatibility issues whether the Chaos-Rage-Limit System works or not.)




13
Hi,

I've been working with RMXP for a while now & it's going well. But I've got to that point where I'm importing scripts & really trying to make the game my own... So... On to the topic.

I'm trying to make FF7 style summons. (not playable summons like FFX, just big moves).

I can do animations no problem & have already created a fairly sexy looking summon using that method.

What I really want to do is cut away from the battle scene though. Show an animation & return to the battle & display some sort of huge explosion or whatever.

I've seen a couple of scripts that allow for AVI  & flash animations to be played in RMXP. I've not managed to get them to work yet though & they've been described as "buggy" by the uploaders. There's a few queries I have about this. I think I best bullet point them.

* I don't really wan't to use big AVI files, the animations I wan't to use are fairly simple.
* Am I going to get problems calling a script during a move?
* I can create gifs in GIMP no probs, is there any recommend software for converting into .fla format?
* Is there a "go to" script for this. I'm sure it can't be an uncommon request.
* What should I look out for, file size? format? bit-rate? audio? What are the optimal compatible settings?

I'm no good with video, so if somebody has done this before what should I look out for?

Just to reiterate, the goal is to cast a spell, cut away from the scene & play an animation then return to the battle and continue the fight.
 
I bet there's a few different methods, I'm looking for the simplist.

Thanks so much,



14
General Discussion / Re: If only life was perfect... =/
October 13, 2011, 03:38:46 pm
Mark, You're an amazing legend but I'm already there. It won't work for me. If the player's don't "know" who they're fighting against it doesn't matter.

If I could forsee a work around I'm not the type to quit.
But I'm smart enough to know that what I'm after's impossible without reworking the game engine.
*weep

Common events aren't gonna cut it mate. If you convince me otherwise I'll be amazed! Seriously I think it's game over for me and the RMXP world... ... (for now)..  :(
15
General Discussion / If only life was perfect... =/
October 13, 2011, 03:15:38 pm
This post is a bit of a whine & a muse... but maybe something that will inspire some creativity in people more skilled than me (if you bare with me)...

I've not been using RMXP for long and whilst it was fun to get started it's limitations quickly became apparent. It seems that I'm not going to be able to produce the game I wanted with it... even though my standards & expectations of what I was trying to accomplish were pretty low.

I finally got to a hurdle that was unjumpable.
I wanted the system to recognise who's turn it was & who was attacking who.
I'm well put out. :(

It seems that even with a million lines of script I'll still never be able to simulate a conversation between characters & enemies in a battle sequence. My game depended on that. The worst part is that I can see the part in the engine where the option would be and it's simply not there. The most frustrating thing is that it seems like it could have been so easily implemented into the engine (atleast to some degree) by the designers.

In the database, in the troops menu there is a "conditions" pop out menu.

If only it looked less like this.
Spoiler: ShowHide


& more like this..
Spoiler: ShowHide


Take a minute to look at the options on (and figure out) that second pictue & imagine what the implications of having such a thing incorporated into the engine would be.

The green lines represent the drop down menu's from each box.
The yellow & blue lines are simply the options availible depending on the selection. (i.e. depending on which option is selected [one, the other, or both] of the following menu's will be greyed out.

With options like that you could have conversations in battle, display graphical pop ups on a character's turn, counter attacks to specific skills, item drops to specific skills, plot points to your game in the middle of a battle... That jpeg is as eloborate as you could wish for too.

What if????  :O.o: :wacko: 



16
Quote from: JanraeMendoza on October 12, 2011, 06:57:42 pm
you can do this by events, though you have to re-write the skills...maybe you are taking about cut ins, where the character face or battler image shows before he or she attacks :)


Yeah I am talking about cut ins, where the character face or battler image shows before he or she attacks!!

My understanding of how this might work is fuzzy at best. I think what I'm hoping for is for someone to take a look at the script and point out where the "display picture code" should go. Ofcourse I don't actually know what how to write code so this is very borderline script request but at the same time I need to know what's going on.

Here's the sideview battle script & a silly picture which illustrates almost perfectly what I'm getting at... just incase it isn't clear....

Spoiler: ShowHide
  class Bitmap
if not method_defined?('original_draw_text')
alias original_draw_text draw_text
def draw_text(*arg)

   original_color = self.font.color.dup
   self.font.color = Color.new(0, 0, 0, 128)

   if arg[0].is_a?(Rect)
     arg[0].x += 2
     arg[0].y += 2
     self.original_draw_text(*arg)
     arg[0].x -= 2
     arg[0].y -= 2
   else
     arg[0] += 2
     arg[1] += 2
     self.original_draw_text(*arg)
     arg[0] -= 2
     arg[1] -= 2
   end

   self.font.color = original_color
   self.original_draw_text(*arg)

end
end
def gradation_rect(x, y, width, height, color1, color2, align = 0)
if align == 0
   for i in x...x + width
     red   = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
     green = color1.green +
             (color2.green - color1.green) * (i - x) / (width - 1)
     blue  = color1.blue +
             (color2.blue - color1.blue) * (i - x) / (width - 1)
     alpha = color1.alpha +
             (color2.alpha - color1.alpha) * (i - x) / (width - 1)
     color = Color.new(red, green, blue, alpha)
     fill_rect(i, y, 1, height, color)
   end
elsif align == 1
   for i in y...y + height
     red   = color1.red +
             (color2.red - color1.red) * (i - y) / (height - 1)
     green = color1.green +
             (color2.green - color1.green) * (i - y) / (height - 1)
     blue  = color1.blue +
             (color2.blue - color1.blue) * (i - y) / (height - 1)
     alpha = color1.alpha +
             (color2.alpha - color1.alpha) * (i - y) / (height - 1)
     color = Color.new(red, green, blue, alpha)
     fill_rect(x, i, width, 1, color)
   end
elsif align == 2
   for i in x...x + width
     for j in y...y + height
       red   = color1.red + (color2.red - color1.red) *
               ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       green = color1.green + (color2.green - color1.green) *
               ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       blue  = color1.blue + (color2.blue - color1.blue) *
               ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       alpha = color1.alpha + (color2.alpha - color1.alpha) *
               ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       color = Color.new(red, green, blue, alpha)
       set_pixel(i, j, color)
     end
   end
elsif align == 3
   for i in x...x + width
     for j in y...y + height
       red   = color1.red + (color2.red - color1.red) *
             ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       green = color1.green + (color2.green - color1.green) *
             ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       blue  = color1.blue + (color2.blue - color1.blue) *
             ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       alpha = color1.alpha + (color2.alpha - color1.alpha) *
             ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       color = Color.new(red, green, blue, alpha)
       set_pixel(i, j, color)
     end
   end
end
end
end

module RPG
class Sprite < ::Sprite
def damage(value, critical)
   dispose_damage
   if value.is_a?(Numeric)
     damage_string = value.abs.to_s
   else
     damage_string = value.to_s
   end
   bitmap = Bitmap.new(160, 48)
   bitmap.font.name = "Arial Black"
   bitmap.font.size = 32
   bitmap.font.color.set(0, 0, 0)
   bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
   bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
   bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
   bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
   if value.is_a?(Numeric) and value < 0
     bitmap.font.color.set(176, 255, 144)
   else
     bitmap.font.color.set(255, 255, 255)
   end
   bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
   if critical
     bitmap.font.size = 20
     bitmap.font.color.set(0, 0, 0)
     bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
     bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
     bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
     bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
     bitmap.font.color.set(255, 255, 255)
     bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
   end
   @_damage_sprite = ::Sprite.new
   @_damage_sprite.bitmap = bitmap
   @_damage_sprite.ox = 80 + self.viewport.ox
   @_damage_sprite.oy = 20 + self.viewport.oy
   @_damage_sprite.x = self.x + self.viewport.rect.x
   @_damage_sprite.y = self.y - self.oy / 2 + self.viewport.rect.y
   @_damage_sprite.z = 3000
   @_damage_duration = 40
end
def animation(animation, hit)
   dispose_animation
   @_animation = animation
   return if @_animation == nil
   @_animation_hit = hit
   @_animation_duration = @_animation.frame_max
   animation_name = @_animation.animation_name
   animation_hue = @_animation.animation_hue
   bitmap = RPG::Cache.animation(animation_name, animation_hue)
   if @@_reference_count.include?(bitmap)
     @@_reference_count[bitmap] += 1
   else
     @@_reference_count[bitmap] = 1
   end
   @_animation_sprites = []
   if @_animation.position != 3 or not @@_animations.include?(animation)
     for i in 0..15
       sprite = ::Sprite.new
       sprite.bitmap = bitmap
       sprite.visible = false
       @_animation_sprites.push(sprite)
     end
     unless @@_animations.include?(animation)
       @@_animations.push(animation)
     end
   end
   update_animation
end
def loop_animation(animation)
   return if animation == @_loop_animation
   dispose_loop_animation
   @_loop_animation = animation
   return if @_loop_animation == nil
   @_loop_animation_index = 0
   animation_name = @_loop_animation.animation_name
   animation_hue = @_loop_animation.animation_hue
   bitmap = RPG::Cache.animation(animation_name, animation_hue)
   if @@_reference_count.include?(bitmap)
     @@_reference_count[bitmap] += 1
   else
     @@_reference_count[bitmap] = 1
   end
   @_loop_animation_sprites = []
   for i in 0..15
     sprite = ::Sprite.new
     sprite.bitmap = bitmap
     sprite.visible = false
     @_loop_animation_sprites.push(sprite)
   end
   update_loop_animation
end
def animation_set_sprites(sprites, cell_data, position)
   for i in 0..15
     sprite = sprites[i]
     pattern = cell_data[i, 0]
     if sprite == nil or pattern == nil or pattern == -1
       sprite.visible = false if sprite != nil
       next
     end
     sprite.visible = true
     sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)
     if position == 3
       if self.viewport != nil
         sprite.x = self.viewport.rect.width / 2
         sprite.y = self.viewport.rect.height - 160
       else
         sprite.x = 320
         sprite.y = 240
       end
     else
       sprite.x = self.x + self.viewport.rect.x -
                   self.ox + self.src_rect.width / 2
       sprite.y = self.y + self.viewport.rect.y -
                   self.oy + self.src_rect.height / 2
       sprite.y -= self.src_rect.height / 4 if position == 0
       sprite.y += self.src_rect.height / 4 if position == 2
     end
     sprite.x += cell_data[i, 1]
     sprite.y += cell_data[i, 2]
     sprite.z = 2000
     sprite.ox = 96
     sprite.oy = 96
     sprite.zoom_x = cell_data[i, 3] / 100.0
     sprite.zoom_y = cell_data[i, 3] / 100.0
     sprite.angle = cell_data[i, 4]
     sprite.mirror = (cell_data[i, 5] == 1)
     sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
     sprite.blend_type = cell_data[i, 7]
   end
end
end
end

class Game_Actor < Game_Battler
def screen_x
   if self.index != nil
   n_split = [($game_party.actors.length * 0.5).ceil, 4].min
   case n_split
   when 1
     n_index = self.index * 2
   when 2
     if self.index < ($game_party.actors.length - 2)
       n_index = 0.5 + (2 * self.index)
     else
       if $game_party.actors.length == 3 then
         n_index = (self.index * 2) + 2
       elsif $game_party.actors.length == 4 then
         n_index = self.index * 2
       end
     end
   when 3
       n_index = self.index + (0.25 * (self.index + 1))
     if $game_party.actors.length == 5
     if self.index < 2
       n_index = self.index + (0.25 * (self.index + 1))
     else
       n_index = self.index + (0.25 * (self.index + 2)) + 1
     end
     end
   when 4
     n_index = self.index
     if $game_party.actors.length == 7
     if self.index < 3
       n_index = self.index
     else
       n_index = self.index + 1
     end
     end
   end
     return (n_index - ((n_index / 4).floor) * 4) * ((160 / (4)) / 5) + 480 + ((n_index / 4).floor * 60)
   else
     return 0
   end
end
#--------------------------------------------------------------------------
# ? ????? Y ?????
#--------------------------------------------------------------------------
def screen_y
   n_split = [($game_party.actors.length * 0.5).ceil, 4].min
   case n_split
   when 1
     n_index = self.index * 2
   when 2
     if self.index < ($game_party.actors.length - 2)
       n_index = 0.5 + (2 * self.index)
     else
       if $game_party.actors.length == 3 then
         n_index = (self.index * 2) + 2
       elsif $game_party.actors.length == 4 then
         n_index = self.index * 2
       end
     end
   when 3
       n_index = self.index + (0.25 * (self.index + 1))
     if $game_party.actors.length == 5
     if self.index < 2
       n_index = self.index + (0.25 * (self.index + 1))
     else
       n_index = self.index + (0.25 * (self.index + 2)) + 1
     end
     end
   when 4
     n_index = self.index
     if $game_party.actors.length == 7
     if self.index < 3
       n_index = self.index
     else
       n_index = self.index + 1
     end
     end
   end
   return (n_index - ((n_index / 4).floor) * 4) * ((160 / (4)) * 1.6) + 270 - ((n_index / 4).floor * (110 - (4 * 20)))
end
#--------------------------------------------------------------------------
# ? ????? Z ?????
#--------------------------------------------------------------------------
def screen_z
   # ??????????? Z ?????????
   if self.index != nil
     return self.index
   else
     return 0
   end
end
end

class Game_Enemy < Game_Battler
def screen_x
   n_split = [($game_troop.enemies.length * 0.5).ceil, 4].min
   case n_split
   when 1
     n_index = self.index * 2
   when 2
     if self.index < ($game_troop.enemies.length - 2)
       n_index = 0.5 + (2 * self.index)
     else
       if $game_troop.enemies.length == 3 then
         n_index = (self.index * 2) + 2
       elsif $game_troop.enemies.length == 4 then
         n_index = self.index * 2
       end
     end
   when 3
       n_index = self.index + (0.25 * (self.index + 1))
     if $game_troop.enemies.length == 5
     if self.index < 2
       n_index = self.index + (0.25 * (self.index + 1))
     else
       n_index = self.index + (0.25 * (self.index + 2)) + 2
     end
     end
   when 4
     n_index = self.index
     if $game_troop.enemies.length == 7
     if self.index < 3
       n_index = self.index
     else
       n_index = self.index + 1
     end
     end
   end
   return (n_index - ((n_index / 4).floor) * 4) * ((-160 / (4)) / 5) + 160 - ((n_index / 4).floor * 60)
end
#--------------------------------------------------------------------------
# ? ????? Y ?????
#--------------------------------------------------------------------------
def screen_y
   n_split = [($game_troop.enemies.length * 0.5).ceil, 4].min
   case n_split
   when 1
     n_index = self.index * 2
   when 2
     if self.index < ($game_troop.enemies.length - 2)
       n_index = 0.5 + (2 * self.index)
     else
       if $game_troop.enemies.length == 3 then
         n_index = (self.index * 2) + 2
       elsif $game_troop.enemies.length == 4 then
         n_index = self.index * 2
       end
     end
   when 3
       n_index = self.index + (0.25 * (self.index + 1))
     if $game_troop.enemies.length == 5
     if self.index < 2
       n_index = self.index + (0.25 * (self.index + 1))
     else
       n_index = self.index + (0.25 * (self.index + 2)) + 1
     end
     end
   when 4
     n_index = self.index
     if $game_troop.enemies.length == 7
     if self.index < 3
       n_index = self.index
     else
       n_index = self.index + 1
     end
     end
   end
   return (n_index - ((n_index / 4).floor) * 4) * ((160 / (4)) * 1.6) + 270 - ((n_index / 4).floor * (110 - (4 * 20)))
end
#--------------------------------------------------------------------------
# ? ????? Z ?????
#--------------------------------------------------------------------------
def screen_z
   return @member_index + 1
end
end

#==============================================================================
# ¦ Sprite_Battler
#------------------------------------------------------------------------------
#  ????????????????Game_Battler ???????????????
# ????????????????????
#==============================================================================

class Sprite_Battler < RPG::Sprite
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
attr_accessor :battler                  # ????
attr_accessor :moving        # Is the sprite moving?
attr_reader   :index
attr_accessor :target_index
attr_accessor :direction
attr_accessor :pattern
#--------------------------------------------------------------------------
# ? ?????????
#     viewport : ??????
#     battler  : ???? (Game_Battler)
#--------------------------------------------------------------------------
def initialize(viewport, battler = nil)
   super(viewport)
   change
   @old = Graphics.frame_count  # For the delay method
   @goingup = true    # Increasing animation? (if @rm2k_mode is true)
   @once = false      # Is the animation only played once?
   @animated = true   # Used to stop animation when @once is true
   self.opacity = 0
   @index = 0
   @pattern_b = 0
   @counter_b = 0
   @trans_sprite = Sprite.new
   @trans_sprite.opacity = 0
   @bar_hp_sprite = Sprite.new
   @bar_hp_sprite.bitmap = Bitmap.new(64, 10)
   @bar_sp_sprite = Sprite.new
   @bar_sp_sprite.bitmap = Bitmap.new(64, 10)
   @color1 = Color.new(0, 0, 0, 192)
   @color2 = Color.new(255, 255, 192, 192)
   @color3 = Color.new(0, 0, 0, 192)
   @color4 = Color.new(64, 0, 0, 192)
   @old_hp = -1
   @old_sp = -1
   @battler = battler
   @battler_visible = false
   @first = true
   @pattern = 0
   if $target_index == nil
     $target_index = 0
   end
   @battler.is_a?(Game_Enemy) ? enemy_pose(0, 1) : pose(0, 1)
end
#--------------------------------------------------------------------------
# ? ??
#--------------------------------------------------------------------------
def dispose
   if self.bitmap != nil
     self.bitmap.dispose
   end
   if @trans_sprite.bitmap != nil
     @trans_sprite.bitmap.dispose
   end
   @trans_sprite.dispose
   @bar_hp_sprite.bitmap.dispose
   @bar_hp_sprite.dispose
   @bar_sp_sprite.bitmap.dispose
   @bar_sp_sprite.dispose
   super
end

def change(frames = 0, delay = 0, offx = 0, offy = 0, startf = 0, once = false)
   @frames = frames
   @delay = delay
   @offset_x, @offset_y = offx, offy
   @current_frame = startf
   @once = once
   @goingup = true
   @animated = true
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
   bar_check = true if @_damage_duration == 1
   super
   @trans_sprite.blend_type = self.blend_type
   @trans_sprite.color = self.color
   if @_collapse_duration > 0
     @trans_sprite.opacity = self.opacity
   else
     @trans_sprite.opacity = [self.opacity, 160].min
   end
   if (@_damage_duration == 0 and bar_check == true) or @first == true
     @first = false if @first == true
     bar_check = false
     @bar_must_change = true
   end
   @bar_hp_sprite.opacity = self.opacity
   @bar_sp_sprite.opacity = self.opacity
   # ????? nil ???
   if @battler == nil
     self.bitmap = nil
     @trans_sprite.bitmap = nil
     loop_animation(nil)
     return
   end
   # ????????????????????
   if @battler.battler_name != @battler_name or
      @battler.battler_hue != @battler_hue
     # ????????????
     @battler_name = @battler.battler_name
     @battler_hue = @battler.battler_hue
     if @battler.is_a?(Game_Actor)
       @battler_name = @battler.character_name
       @battler_hue = @battler.character_hue
       @direction = 4
     else
       @direction = 6
     end
       self.bitmap = RPG::Cache.character(@battler_name, @battler_hue)
       @width = bitmap.width / 4
       @height = bitmap.height / 4
       @frame_width = @width
       @frame_height = @height
       self.ox = @width / 2
       self.oy = @height
       @pattern = @current_frame
       @direction = @offset_y
       sx = @pattern * @width
       sy = (@direction - 2) / 2 * @height
       self.src_rect.set(sx, sy, @width, @height)
       @current_frame = (@current_frame + 1) unless @frames == 0
       @animated = false if @current_frame == @frames and @once
       @current_frame %= @frames
       @trans_sprite.bitmap = self.bitmap
       @trans_sprite.ox = self.ox
       @trans_sprite.oy = self.oy
       @trans_sprite.src_rect.set(sx, sy, @width, @height)
     # ?????????????????? 0 ???
     if @battler.dead? or @battler.hidden
       self.opacity = 0
       @trans_sprite.opacity = 0
       @bar_hp_sprite.opacity = 0
       @bar_sp_sprite.opacity = 0
     end
   self.x = @battler.screen_x
   self.y = @battler.screen_y
   self.z = @battler.screen_z
end
change_sp_bar if @old_sp != @battler.sp
if delay(@delay) and @animated
     @pattern = @current_frame
     @direction = @offset_y
     sx = @pattern * @width
     sy = (@direction - 2) / 2 * @height
     self.src_rect.set(sx, sy, @width, @height)
     @current_frame = (@current_frame + 1) unless @frames == 0
     @animated = false if @current_frame == @frames and @once
     @current_frame %= @frames
     @trans_sprite.ox = self.ox
     @trans_sprite.oy = self.oy
     @trans_sprite.src_rect.set(sx, sy, @width, @height)
   end
   # ??????? ID ????????????
   if @battler.damage == nil and
      @battler.state_animation_id != @state_animation_id
     @state_animation_id = @battler.state_animation_id
     loop_animation($data_animations[@state_animation_id])
   end
   # ??????????????
   #if @battler.is_a?(Game_Actor) and @battler_visible
     # ???????????????????????
     #if $game_temp.battle_main_phase
       #self.opacity += 3 if self.opacity < 255
     #else
       #self.opacity -= 3 if self.opacity > 207
     #end
   #end
   # ??
   if @battler.blink
     blink_on
   else
     blink_off
   end
   # ??????
   unless @battler_visible
     # ??
     if not @battler.hidden and not @battler.dead? and
        (@battler.damage == nil or @battler.damage_pop)
       appear
       @battler_visible = true
     end
   end
   # ?????
   if @battler_visible
     # ??
     if @battler.hidden
       $game_system.se_play($data_system.escape_se)
       escape
       @trans_sprite.opacity = 0
       @battler_visible = false
     end
     # ??????
     if @battler.white_flash
       whiten
       @battler.white_flash = false
     end
     # ???????
     if @battler.animation_id != 0
       animation = $data_animations[@battler.animation_id]
       animation(animation, @battler.animation_hit)
       @battler.animation_id = 0
     end
     # ????
     if @battler.damage_pop
       damage(@battler.damage, @battler.critical)
       @battler.damage = nil
       @battler.critical = false
       @battler.damage_pop = false
     end
     if @bar_must_change == true
       @bar_must_change = false
       if @old_hp != @battler.hp
         change_hp_bar
       end
       if @battler.damage == nil and @battler.dead?
         if @battler.is_a?(Game_Enemy)
           $game_system.se_play($data_system.enemy_collapse_se)
         else
           $game_system.se_play($data_system.actor_collapse_se)
         end
         collapse
         @battler_visible = false
       end
     end
   end
   # ???????????
   @trans_sprite.x = self.x
   @trans_sprite.y = self.y
   @trans_sprite.z = self.z
   @bar_hp_sprite.x = @battler.screen_x - 32
   @bar_hp_sprite.y = @battler.screen_y - (@height +18) if @height != nil
   @bar_hp_sprite.z = 100
   @bar_sp_sprite.x = @battler.screen_x - 32
   @bar_sp_sprite.y = @battler.screen_y - (@height + 8) if @height != nil
   @bar_sp_sprite.z = 100
end

#--------------------------------------------------------------------------
# - Move the sprite
#   x : X coordinate of the destination point
#   y : Y coordinate of the destination point
#   speed : Speed of movement (0 = delayed, 1+ = faster)
#   delay : Movement delay if speed is at 0
#--------------------------------------------------------------------------
def move(x, y, speed = 1, delay = 0)
   @destx = x
   @desty = y
   @move_speed = speed
   @move_delay = delay
   @move_old = Graphics.frame_count
   @moving = true
end

#--------------------------------------------------------------------------
# - Move sprite to destx and desty
#--------------------------------------------------------------------------
def update_move
   return unless @moving
   movinc = @move_speed == 0 ? 1 : @move_speed
   if Graphics.frame_count - @move_old > @move_delay or @move_speed != 0
     self.x += movinc if self.x < @destx
     self.x -= movinc if self.x > @destx
     self.y += movinc if self.y < @desty
     self.y -= movinc if self.y > @desty
     @move_old = Graphics.frame_count
   end
   if @move_speed > 1  # Check if sprite can't reach that point
     self.x = @destx if (@destx - self.x).abs % @move_speed != 0 and
                        (@destx - self.x).abs <= @move_speed
     self.y = @desty if (@desty - self.y).abs % @move_speed != 0 and
                        (@desty - self.y).abs <= @move_speed
   end
   if self.x == @destx and self.y == @desty
     @moving = false
   end
end

#--------------------------------------------------------------------------
# - Pause animation, but still updates movement
#   frames : Number of frames
#--------------------------------------------------------------------------
def delay(frames)
   update_move
   if (Graphics.frame_count - @old >= frames)
     @old = Graphics.frame_count
     return true
   end
   return false
end

def change_hp_bar
   j = false
  @old_hp = @battler.hp if @old_hp == -1
   i = @old_hp
   loop do
     i -= 10
     if i < @battler.hp
       i = @battler.hp
       j = true
     end
     rate = i.to_f / @battler.maxhp
     @color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
     @color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
     @bar_hp_sprite.bitmap.clear
     @bar_hp_sprite.bitmap.fill_rect(0, 0, 64, 10, @color1)
     @bar_hp_sprite.bitmap.fill_rect(1, 1, 62, 8, @color2)
     @bar_hp_sprite.bitmap.gradation_rect(2, 2, 60, 6, @color3, @color4, 1)
     #@bar_hp_sprite.bitmap.fill_rect(2, 2, 60, 6, @color3)
     @bar_hp_sprite.bitmap.gradation_rect(2, 2, 64 * rate - 4, 6, @color5, @color6, 2)
     #@bar_hp_sprite.bitmap.fill_rect(2, 2, 64 * rate - 4, 6, @color5)
     @bar_hp_sprite.opacity = self.opacity
     Graphics.update
     if j == true
       j = false
       break
     end
   end
   @old_hp = @battler.hp
end

def change_sp_bar
   j = false
  @old_sp = @battler.sp if @old_sp == -1
   i = @old_sp
   loop do
     i -= 10
     if i < @battler.sp
       i = @battler.sp
       j = true
     end
     rate = i.to_f / @battler.maxsp
     @color7 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
     @color8 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
     @bar_sp_sprite.bitmap.clear
     @bar_sp_sprite.bitmap.fill_rect(0, 0, 64, 10, @color1)
     @bar_sp_sprite.bitmap.fill_rect(1, 1, 62, 8, @color2)
     @bar_sp_sprite.bitmap.gradation_rect(2, 2, 60, 6, @color3, @color4, 1)
     #@bar_hp_sprite.bitmap.fill_rect(2, 2, 60, 6, @color3)
     @bar_sp_sprite.bitmap.gradation_rect(2, 2, 64 * rate - 4, 6, @color7, @color8, 0)
     #@bar_hp_sprite.bitmap.fill_rect(2, 2, 64 * rate - 4, 6, @color5)
     @bar_sp_sprite.opacity = self.opacity
     Graphics.update
     if j == true
       j = false
       break
     end
   end
   @old_sp = @battler.sp
end

def enemy                                             #
   $target_index += $game_troop.enemies.size
   $target_index %= $game_troop.enemies.size
   return $game_troop.enemies[$target_index]           #
end                                                   #

def actor                                             #
   $target_index += $game_party.actors.size
   $target_index %= $game_party.actors.size
   return $game_party.actors[$target_index]            #
end

def index=(index)
   @index = index
   update
end

   def pose(number, frames = 4)
   case number
   when 0
     change(frames, 4, 0, 4, 0)
   when 1
     change(frames, 4, 0, 4)
   when 2
     change(frames, 4, 0, 6)
   else
     change(frames, 4, 0, 0, 0)
   end
end

   def enemy_pose(number ,enemy_frames = 4)
   case number
   when 0
     change(enemy_frames, 4, 0, 6, 0)
   when 1
     change(enemy_frames, 4, 0, 4)
   when 2
     change(enemy_frames, 4, 0, 6)
   else
     change(enemy_frames, 4, 0, 0, 0)
   end
end

def default_pose
   pose(0, 1)
end
end

#==============================================================================
# ¦ Spriteset_Battle
#------------------------------------------------------------------------------
#  ???????????????????????????? Scene_Battle ??
# ????????????
#==============================================================================

class Spriteset_Battle
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
attr_reader   :viewport1                # ????????????
attr_reader   :viewport2                # ????????????
attr_accessor :actor_sprites
attr_accessor :enemy_sprites
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def initialize
   # ?????????
   @viewport1 = Viewport.new(0, 0, 640, 480)
   @viewport2 = Viewport.new(0, 0, 640, 480)
   @viewport3 = Viewport.new(0, 0, 640, 480)
   @viewport4 = Viewport.new(0, 0, 640, 480)
   @viewport2.z = 101
   @viewport3.z = 200
   @viewport4.z = 5000
   if $game_temp.battleback_name == ""
   @battleback_sprite = nil
   @tilemap = Tilemap.new(@viewport1)
   @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
   for i in 0..6
     autotile_name = $game_map.autotile_names[i]
     @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
   end
   @tilemap.map_data = $game_map.data
   @tilemap.priorities = $game_map.priorities
   else
   # ??????????????
   @tilemap = nil
   @battleback_sprite = Sprite.new(@viewport1)
   end
   # ????????????
   @enemy_sprites = []
   for enemy in $game_troop.enemies#.reverse
     @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
   end
   # ????????????
   @actor_sprites = []
   for j in 0..7
       # ƒAƒNƒ^[ƒXƒvƒ‰ƒCƒg,ð'ljÁ
       @actor_sprites.push(Sprite_Battler.new(@viewport1, $game_party.actors[j]))
   end
   # ?????
   @weather = RPG::Weather.new(@viewport1)
   # ????????????
   @picture_sprites = []
   for i in 51..100
     @picture_sprites.push(Sprite_Picture.new(@viewport3,
       $game_screen.pictures[i]))
   end
   # ????????????
   @timer_sprite = Sprite_Timer.new
   # ??????
   update
end
#--------------------------------------------------------------------------
# ? ??
#--------------------------------------------------------------------------
def dispose
   if @tilemap != nil
   # ?????????
   @tilemap.tileset.dispose
   for i in 0..6
     @tilemap.autotiles[i].dispose
   end
   @tilemap.dispose
   end
   # ??????????????
   if @battleback_sprite != nil
   # ??????????????????????
   if @battleback_sprite.bitmap != nil
     @battleback_sprite.bitmap.dispose
   end
   @battleback_sprite.dispose
   end
   # ??????????????????????
   for sprite in @enemy_sprites + @actor_sprites
     sprite.dispose
   end
   # ?????
   @weather.dispose
   # ????????????
   for sprite in @picture_sprites
     sprite.dispose
   end
   # ????????????
   @timer_sprite.dispose
   # ?????????
   @viewport1.dispose
   @viewport2.dispose
   @viewport3.dispose
   @viewport4.dispose
end
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
def effect?
   # ??????????????? true ???
   for sprite in @enemy_sprites + @actor_sprites
     return true if sprite.effect?
   end
   return false
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
   # ???????????????????????
   if @battleback_sprite != nil
   if @battleback_name != $game_temp.battleback_name
     @battleback_name = $game_temp.battleback_name
     if @battleback_sprite.bitmap != nil
       @battleback_sprite.bitmap.dispose
     end
     bg_bitmap = RPG::Cache.battleback(@battleback_name)
     bg_bitmap_stretch = Bitmap.new(640, 480)
     bg_bitmap_stretch.stretch_blt(Rect.new(0, 0, 640, 480), bg_bitmap, bg_bitmap.rect)
     @battleback_sprite.bitmap = bg_bitmap_stretch
   end
   end
   if @tilemap != nil
   @tilemap.ox = $game_map.display_x / 4
   @tilemap.oy = $game_map.display_y / 4
   @tilemap.update
   end
   # ????????????
   for sprite in @enemy_sprites + @actor_sprites
     sprite.update
   end
   # ???????????
   @weather.type = $game_screen.weather_type
   @weather.max = $game_screen.weather_max
   @weather.update
   # ????????????
   for sprite in @picture_sprites
     sprite.update
   end
   # ????????????
   @timer_sprite.update
   # ???????????????
   @viewport1.tone = $game_screen.tone
   @viewport1.ox = $game_screen.shake
   # ????????????
   @viewport4.color = $game_screen.flash_color
   # ?????????
   @viewport1.update
   @viewport2.update
   @viewport4.update
end
end

#==============================================================================
# ¦ Window_Command
#------------------------------------------------------------------------------
#  ?????????????????????
#==============================================================================

class Window_Command < Window_Selectable
#--------------------------------------------------------------------------
# ? ?????????
#     width    : ???????
#     commands : ??????????
#--------------------------------------------------------------------------
def initialize(width, commands, column_max = 1, style = 0, inf_scroll = 1)
   # ????????????????????
   super(0, 0, width, (commands.size * 1.0 / column_max).ceil * 32 + 32)
   @inf_scroll = inf_scroll
   @item_max = commands.size
   @commands = commands
   @column_max = column_max
   @style = style
   self.contents = Bitmap.new(width - 32, (@item_max * 1.0 / @column_max).ceil * 32)
   self.contents.font.name = "Tahoma"
   self.contents.font.size = 22
   refresh
   self.index = 0
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
   self.contents.clear
   for i in 0...@item_max
     draw_item(i, normal_color)
   end
end
#--------------------------------------------------------------------------
# ? ?????
#     index : ????
#     color : ???
#--------------------------------------------------------------------------
def draw_item(index, color)
   self.contents.font.color = color
   rect = Rect.new(index%@column_max * (self.width / @column_max) + 4, 32 * (index/@column_max), self.width / @column_max - 40, 32)
   self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
   self.contents.draw_text(rect, @commands[index], @style)
end
#--------------------------------------------------------------------------
# ? ??????
#     index : ????
#--------------------------------------------------------------------------
def disable_item(index)
   draw_item(index, disabled_color)
end

def update_help
   @help_window.set_actor($game_party.actors[$scene.actor_index])
end
end

#==============================================================================
# ¦ Arrow_Enemy
#------------------------------------------------------------------------------
#  ????????????????????????????? Arrow_Base ??
# ????????
#==============================================================================

class Arrow_Enemy < Arrow_Base
#--------------------------------------------------------------------------
# ? ?????????????????
#--------------------------------------------------------------------------
def enemy
   return $game_troop.enemies[@index]
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
   super
   # ???????????????????
   $game_troop.enemies.size.times do
     break if self.enemy.exist?
     @index += 1
     @index %= $game_troop.enemies.size
   end
   # ?????
   if Input.repeat?(Input::DOWN)
     $game_system.se_play($data_system.cursor_se)
     $game_troop.enemies.size.times do
       @index += 1
       @index %= $game_troop.enemies.size
       break if self.enemy.exist?
     end
   end
   # ?????
   if Input.repeat?(Input::UP)
     $game_system.se_play($data_system.cursor_se)
     $game_troop.enemies.size.times do
       @index += $game_troop.enemies.size - 1
       @index %= $game_troop.enemies.size
       break if self.enemy.exist?
     end
   end
   if Input.repeat?(Input::RIGHT)
     $game_system.se_play($data_system.cursor_se)
     $game_troop.enemies.size.times do
       @index += ((($game_troop.enemies.length) * 0.5).ceil)
       @index %= $game_troop.enemies.size
       break if self.enemy.exist?
     end
   end
   if Input.repeat?(Input::LEFT)
     $game_system.se_play($data_system.cursor_se)
     $game_troop.enemies.size.times do
       @index += $game_troop.enemies.size - ((($game_troop.enemies.length) * 0.5).ceil)
       @index %= $game_troop.enemies.size
       break if self.enemy.exist?
     end
   end
   # ???????????
   if self.enemy != nil
     self.x = self.enemy.screen_x + 4
     self.y = self.enemy.screen_y + 36
     self.z = self.enemy.screen_z + 1
   end
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def update_help
   # ????????????????????????
   @help_window.set_enemy(self.enemy)
end
end

#==============================================================================
# ¦ Arrow_Actor
#------------------------------------------------------------------------------
#  ????????????????????????????? Arrow_Base ??
# ????????
#==============================================================================

class Arrow_Actor < Arrow_Base
#--------------------------------------------------------------------------
# ? ?????????????????
#--------------------------------------------------------------------------
def actor
   return $game_party.actors[@index]
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
   super
   # ?????
   if Input.repeat?(Input::DOWN)
     $game_system.se_play($data_system.cursor_se)
     @index += 1
     @index %= $game_party.actors.size
   end
   # ?????
   if Input.repeat?(Input::UP)
     $game_system.se_play($data_system.cursor_se)
     @index += $game_party.actors.size - 1
     @index %= $game_party.actors.size
   end
   if Input.repeat?(Input::RIGHT)
     $game_system.se_play($data_system.cursor_se)
     @index += ($game_party.actors.length * 0.5).ceil
     @index %= $game_party.actors.size
   end
   # ?????
   if Input.repeat?(Input::LEFT)
     $game_system.se_play($data_system.cursor_se)
     @index += $game_party.actors.size - (($game_party.actors.length * 0.5).ceil)
     @index %= $game_party.actors.size
   end
   # ???????????
   if self.actor != nil
     self.x = self.actor.screen_x
     self.y = self.actor.screen_y + 36
     self.z = self.actor.screen_z + 1
   end
end
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def update_help
   # ??????????????????????
   @help_window.set_actor(self.actor)
end
end

class Scene_Battle
attr_accessor :actor_index
def main
   # ???????????????
   $game_temp.in_battle = true
   $game_temp.battle_turn = 0
   $game_temp.battle_event_flags.clear
   $game_temp.battle_abort = false
   $game_temp.battle_main_phase = false
   $game_temp.battleback_name = $game_map.battleback_name
   $game_temp.forcing_battler = nil
   # ??????????????????
   $game_system.battle_interpreter.setup(nil, 0)
   # ???????
   @troop_id = $game_temp.battle_troop_id
   $game_troop.setup(@troop_id)
   # ????????????????
   s1 = $data_system.words.attack

s1 = $data_system.words.attack
   s2 = $data_system.words.skill
   s3 = $data_system.words.guard
   s4 = $data_system.words.item
   @actor_command_window = Window_Command.new(640, [s1, s2, s3, s4], 4)
   @actor_command_window.y = 64
   @actor_command_window.back_opacity = 160
   @actor_command_window.active = false
   @actor_command_window.visible = false
   # ????????????
   @party_command_window = Window_PartyCommand.new
   @help_window = Window_Help.new
   @help_window.back_opacity = 160
   @help_window.visible = false
   #@status_window = Window_BattleStatus.new
   @message_window = Window_Message.new
   # ???????????
   @spriteset = Spriteset_Battle.new
   # ????????????
   @wait_count = 0
   # ?????????
   if $data_system.battle_transition == ""
     Graphics.transition(20)
   else
     Graphics.transition(40, "Graphics/Transitions/" +
       $data_system.battle_transition)
   end
   # ???????????
   start_phase1
   # ??????
   loop do
     # ????????
     Graphics.update
     # ???????
     Input.update
     # ??????
     update
     # ????????????????
     if $scene != self
       break
     end
   end
   # ??????????
$game_map.refresh
   # ?????????
   Graphics.freeze
   # ????????
   @actor_command_window.dispose
   @party_command_window.dispose
   @help_window.dispose
   #@status_window.dispose
   @message_window.dispose
   if @skill_window != nil
     @skill_window.dispose
   end
   if @item_window != nil
     @item_window.dispose
   end
   if @result_window != nil
     @result_window.dispose
   end
   # ???????????
   @spriteset.dispose
   # ???????????????
   if $scene.is_a?(Scene_Title)
     # ??????????
     Graphics.transition
     Graphics.freeze
   end
   # ???????????????????????????
   if $BTEST and not $scene.is_a?(Scene_Gameover)
     $scene = nil
   end
end

def update
   # ?????????????
   if $game_system.battle_interpreter.running?
     # ?????????
     $game_system.battle_interpreter.update
     # ?????????????????????????
     if $game_temp.forcing_battler == nil
       # ?????????????????
       unless $game_system.battle_interpreter.running?
         # ??????????????????????????
         unless judge
           setup_battle_event
         end
       end
       # ????????????????
       if @phase != 5
         # ?????????????????
         #@status_window.refresh
       end
     end
   end
   # ???? (????)??????
   $game_system.update
   $game_screen.update
   # ????? 0 ??????
   if $game_system.timer_working and $game_system.timer == 0
     # ?????
     $game_temp.battle_abort = true
   end
   # ????????
   @help_window.update
   @party_command_window.update
   @actor_command_window.update
   #@status_window.update
   @message_window.update
   # ???????????
   @spriteset.update
   # ?????????????
   if $game_temp.transition_processing
     # ?????????????????
     $game_temp.transition_processing = false
     # ?????????
     if $game_temp.transition_name == ""
       Graphics.transition(20)
     else
       Graphics.transition(40, "Graphics/Transitions/" +
         $game_temp.transition_name)
     end
   end
   # ????????????????
   if $game_temp.message_window_showing
     return
   end
   # ???????????
   if @spriteset.effect?
     return
   end
   # ??????????
   if $game_temp.gameover
     # ??????????????
     $scene = Scene_Gameover.new
     return
   end
   # ???????????
   if $game_temp.to_title
     # ???????????
     $scene = Scene_Title.new
     return
   end
   # ????????
   if $game_temp.battle_abort
     # ??????? BGM ???
     $game_system.bgm_play($game_temp.map_bgm)
     # ?????
     battle_end(1)
     return
   end
   # ????????
   if @wait_count > 0
     # ????????????
     @wait_count -= 1
     return
   end
   
   # this one holds the battle while the player moves
   for actor in @spriteset.actor_sprites
     if actor.moving
       return
     end
   end
   # and this one is for the enemy...
   for enemy in @spriteset.enemy_sprites
     if enemy.moving# and $game_system.animated_enemy
       return
     end
   end
   # ???????????????????????
   # ????????????????
   if $game_temp.forcing_battler == nil and
      $game_system.battle_interpreter.running?
     return
   end
   # ??????????
   case @phase
   when 1  # ?????????
     update_phase1
   when 2  # ????????????
     update_phase2
   when 3  # ????????????
     update_phase3
   when 4  # ???????
     update_phase4
   when 5  # ???????????
     update_phase5
   end
end

def start_phase2
   # ???? 2 ???
   @phase = 2
   # ?????????????
   @actor_index = -1
   @active_battler = nil
   # ?????????????????
   @party_command_window.active = true
   @party_command_window.visible = true
   # ?????????????????
   @actor_command_window.active = false
   @actor_command_window.visible = false
   @help_window.visible = false
   # ??????????????
   $game_temp.battle_main_phase = false
   # ????????????????
   $game_party.clear_actions
   # ????????????
   unless $game_party.inputable?
     # ?????????
     start_phase4
   end
end

def update_phase2_escape
   # ??????????????
   enemies_agi = 0
   enemies_number = 0
   for enemy in $game_troop.enemies
     if enemy.exist?
       enemies_agi += enemy.agi
       enemies_number += 1
     end
   end
   if enemies_number > 0
     enemies_agi /= enemies_number
   end
   # ??????????????
   actors_agi = 0
   actors_number = 0
   for actor in $game_party.actors
     if actor.exist?
       actors_agi += actor.agi
       actors_number += 1
     end
   end
   if actors_number > 0
     actors_agi /= actors_number
   end
   # ??????
   success = rand(100) < 50 * actors_agi / enemies_agi
   # ???????
   if success
     # ?? SE ???
     $game_system.se_play($data_system.escape_se)
       for actor in $game_party.actors
         @spriteset.actor_sprites[actor.index].pose(2)
         @spriteset.actor_sprites[actor.index].move(660, actor.screen_y, 10)
       end
       check = escape_move
     until check == false
       @spriteset.update
       Graphics.update
       check = escape_move
     end
     # ??????? BGM ???
     $game_system.bgm_play($game_temp.map_bgm)
     # ?????
     battle_end(1)
   # ???????
   else
     # ????????????????
     $game_party.clear_actions
     # ?????????
     start_phase4
   end
end

def escape_move
   for actor in @spriteset.actor_sprites
     if actor.moving
       return true
     end
   end
   return false
end

def start_phase5
   # ???? 5 ???
   @phase = 5
   # ????? ME ???
   $game_system.me_play($game_system.battle_end_me)
   # ??????? BGM ???
   $game_system.bgm_play($game_temp.map_bgm)
   # EXP???????????????
   exp = 0
   gold = 0
   treasures = []
   # ???
   for enemy in $game_troop.enemies
     # ??????????????
     unless enemy.hidden
       # ?? EXP????????
       exp += enemy.exp
       gold += enemy.gold
       # ?????????
       if rand(100) < enemy.treasure_prob
         if enemy.item_id > 0
           treasures.push($data_items[enemy.item_id])
         end
         if enemy.weapon_id > 0
           treasures.push($data_weapons[enemy.weapon_id])
         end
         if enemy.armor_id > 0
           treasures.push($data_armors[enemy.armor_id])
         end
       end
     end
   end
   # ???????? 6 ??????
   treasures = treasures[0..5]
   # EXP ??
   for i in 0...$game_party.actors.size
     actor = $game_party.actors[i]
     if actor.cant_get_exp? == false
       last_level = actor.level
       actor.exp += exp
       if actor.level > last_level
         #@status_window.level_up(i)
       end
     end
   end
   # ??????
   $game_party.gain_gold(gold)
   # ???????
   for item in treasures
     case item
     when RPG::Item
       $game_party.gain_item(item.id, 1)
     when RPG::Weapon
       $game_party.gain_weapon(item.id, 1)
     when RPG::Armor
       $game_party.gain_armor(item.id, 1)
     end
   end
   # ???????????????
   @result_window = Window_



17
I downloaded a script for a side view battle system.

& I got it from Youtube at http://www.youtube.com/watch?v=0WNytXPQVkM
which I thought would be useful to include because it shows you what my battle screen looks like... I imagine you might recognise it? (download's in the description if you wan't to take a look.

What I'm hoping to do is...
When the character's turn is active it will display a face graphic of that character somewhere on the screen, (e.g. on the far right or at the bottom)
i.e so if "character A" is selected it will display "battler graphic A" on the screen
iand if "character C" is selected it will display "battler graphic C" on the screen
(the corresponding graphic - by title)

I've scanned through the tutorial about "spites & graphics" found here
http://forum.chaos-project.com/index.php/topic,9428.0.html
I think that is pointing in the right direction...?
But I have no idea what I'm doing with script, beyond cut & paste and changing the odd variable.

I'm very new to this!! p.s. I'm using RMXP 1.02

So basically when that character is selected I want his face graphic will pop up too...

(I hope that makes sense)
... pretty sure I posted in the right place this time.
A tutorial would be amazing or if you can just edit the script & post it because that might be easier for you, just as good (maybe better?).

The following emoticons apply to this request...  :'( :O.o: :roll: :wacko: :???: :o & especially  :facepalm:

Thanks..  :)

Have I broken any forum rules?
18
Damn... That first bit was EASY! Can't believe I missed that! Thanks Game_Guy!!

I'm starting to think the second question could be solved without the need for a script too.
I won't keep asing about this because I'm a way off doin it anyway... but just to sew this topic up.

A good analogy of of what I'm thinking would be Chocobo encounters in final fantasy.

You wander around the map with your "regular map BGM"
You bump into random enemies and get your "regular battle BGM"
But then you randomly bump into a chocobo & you get your "special chocobo battle BGM"
Finally once you've caught your chocobo the map BGM flips to your "Wahey I've caught a chocobo BGM"  :D
19
Dang!! I knew I'd put my question in the wrong place...  :facepalm:
This is the first time I've ever been on a forum/chat site ever too... sooo yeah... please don't hate me.
MarkHest sent me an e-mail which pointed to reasons why you can't pause audio in RMXP.
Thanks a a a again.  :)
I've got half a feeling that I wasn't supposed to respond? Tell me if I did bad!  :facepalm:
He also gave me some answers to questions I'd asked in this topic, but misunderstood a couple of others.
This is the bulk of my response to that.

What I really need is a way to switch how the audio functions from map to map.

So if you're on map A; Map BGM will play through battles & no battle/fanfare BGM will play.
And if you're on map B; Map BGM will cut out & Battle/fanfare BGM will play (as it normally does).

This sounds like such an easy thing to do (if you knew how to script).  :P
Blizzard said that the problem was because the RMXP's audio engine couldn't locate points in a track.
Basically it's skipping & pausing music that's the difficulty. I can live without that!

I doubt it would be that difficult to get the Battle BGM music playing after the encounter has ended or stopping/switching both the Battle BGM & Map BGM after an encounter (or any combination of that)
I've already found a script that changes the BGM half way through a battle if a certain action is selected. I've even seen threads with dead links for script that does just that.

The main thing is that when I said "turn off" battle BGM I didn't mean that I wanted it to stop playback, I meant that I wanted that process to be ignored entirely.

(I feel like I'm being a pest already) repeated  :facepalm:'s
20
Hi, I'm an absolute beginner! (only been using RMXP for a week & only been registered here for 4 hours)
Sorry if this isn't posted in the right place, I'm asking stupid questions or anything else..  :facepalm:

So that been said, here's my questions.

A) I need a script that stops the battle music. (I know you can do this by deleting the following lines in Setup_Map under * Battle Call.)

168 $game_temp.map_bgm = $game_system.playing_bgm
    $game_system.bgm_stop
172 $game_system.bgm_play($game_system.battle_bgm


But that's a permanent effect. I want the rule to apply on some maps, but not others.

B) Also as the music in my game is often long pieces of audio (as opposed to MIDI) I don't want the map music to restart at the end of each battle, I want it to continue from where it left off (or just randomly from any point (just so long as you're not just hearing the first 10 seconds of intro over & over))

I'm sure script like this has been posted in the past, I've found dead links & the following script for VX.. (I thought I'd paste it just incase it's easy for someone to mod it to work for XP.)
 
Spoiler: ShowHide
#==============================================================================
# ** Make BGM unchange 1.01 by ERZENGEL <erzvx@live.de>
#==============================================================================

DURING = 9  # if the switch with ID 9 is on the BGM won't change at the battle

#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs the map screen processing.
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # * Switch to Battle Screen
  #--------------------------------------------------------------------------
  def call_battle
    unless $game_switches[DURING]
      @spriteset.update
      Graphics.update
      $game_player.make_encounter_count
      $game_player.straighten
      $game_temp.map_bgm = RPG::BGM.last
      $game_temp.map_bgs = RPG::BGS.last
      RPG::BGM.stop
      RPG::BGS.stop
      Sound.play_battle_start
      $game_system.battle_bgm.play
      $game_temp.next_scene = nil
      $scene = Scene_Battle.new
    else
      @spriteset.update
      Graphics.update
      $game_player.make_encounter_count
      $game_player.straighten
      Sound.play_battle_start
      $game_temp.next_scene = nil
      $scene = Scene_Battle.new
    end
  end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * End Battle
  #     result : Results (0: win, 1: escape, 2:lose)
  #--------------------------------------------------------------------------
  def battle_end(result)
    if result == 2 and not $game_troop.can_lose
      call_gameover
    else
      $game_party.clear_actions
      $game_party.remove_states_battle
      $game_troop.clear
      if $game_temp.battle_proc != nil
        $game_temp.battle_proc.call(result)
        $game_temp.battle_proc = nil
      end
      unless $BTEST
        unless $game_switches[DURING]
          $game_temp.map_bgm.play
          $game_temp.map_bgs.play
        end
      end
      $scene = Scene_Map.new
      @message_window.clear
      Graphics.fadeout(30)
    end
    $game_temp.in_battle = false
  end
  #--------------------------------------------------------------------------
  # * Victory Processing
  #--------------------------------------------------------------------------
  def process_victory
    unless $game_switches[DURING]
      @info_viewport.visible = false
      @message_window.visible = true
      RPG::BGM.stop
      $game_system.battle_end_me.play
      unless $BTEST
        $game_temp.map_bgm.play
        $game_temp.map_bgs.play
      end
      display_exp_and_gold
      display_drop_items
      display_level_up
      battle_end(0)
    else
      @info_viewport.visible = false
      @message_window.visible = true
      display_exp_and_gold
      display_drop_items
      display_level_up
      battle_end(0)
    end
  end
end


I'd be really greatful for some help on this!  :)

...oh and sorry if I double posted (I got an error last time??)  :???: