The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Rikkuholic on December 21, 2005, 08:40:12 PM

Title: Advanced side-view battle system (does not require battlers)
Post by: Rikkuholic on December 21, 2005, 08:40:12 PM
This is not really my script, but i have modified it and wanted to show ya!

Here i go:

EDIT: Post was limited, posting in new post.

Edit2: The script is over 5000 lines. Posting a download link for notebook.

EDIT3: http://www.martinsgamegallery.net/cbs.txt

EDIT4: Demo http://www.martinsgamegallery.net/cbs.exe

Instructions: Not needed. just import your characters to the battlers folder and assign heroes or monsters with them. NOTE: Standard RTP does not have too.
Title: Advanced side-view battle system (does not require battlers)
Post by: BPKS0 on December 21, 2005, 08:54:56 PM
:D I like it but they don't look very good they look like there floating =O
Title: Advanced side-view battle system (does not require battlers)
Post by: sepiroth666 on December 21, 2005, 08:56:26 PM
Did you make this? It's perrty good exept when I use with my sprites the way they walk up to enemy and attack don't work they just get stuck and start running in place....other than that gj btw does this work with battle report?I can test it becouse the battle gets stuck with the running.
Title: Advanced side-view battle system (does not require battlers)
Post by: Rikkuholic on December 21, 2005, 08:56:40 PM
Quote from: BPKS0
:D I like it but they don't look very good they look like there floating =O


That can be modified. try making a map solely for battle, and remove the battle scrren in the tilesets in the database. it will make u battle on the map, and the character goes transparent if they are under a tree.

Quote from: sepiroth666
Did you make this? It's perrty good exept when I use with my sprites the way they walk up to enemy and attack don't work they just get stuck and start running in place....other than that gj btw does this work with battle report?I can test it becouse the battle gets stuck with the running.


Not made by me, can't remember. Yes it's compatible, i think and i don't remember the author name! And stuck? I don't see whatcha mean!!!  :whoa:

EDIT: The script is modified by me though.
Title: Advanced side-view battle system (does not require battlers)
Post by: Dalton on December 21, 2005, 09:11:12 PM
Woah! You can have up to 7 people in the battle screen with it being bug free!  I imagine if I just edit the Ring Menu a bit I can get an un bugged 7 party member set for my game!!

Good editing job, even though I haven't tried the animated side battle script XD
Title: Advanced side-view battle system (does not require battlers)
Post by: haloOfTheSun on December 21, 2005, 09:24:09 PM
Quote from: sepiroth666
Did you make this? It's perrty good exept when I use with my sprites the way they walk up to enemy and attack don't work they just get stuck and start running in place....other than that gj btw does this work with battle report?I can test it becouse the battle gets stuck with the running.


He means that in the battle, the sprites don't go anywhere, and the start moving as if they were, and then the battle gets stuck, because they aren't doing anything.
Title: Advanced side-view battle system (does not require battlers)
Post by: Alakazam on December 21, 2005, 11:32:44 PM
Hmm i just tried it out in a new game and it worked fine, i did not like the cbs much though.

Edit: my bad i never tried it in a new game, I played the demo and it ran with no probs, i don't know where my head is today sheesh.
Title: Advanced side-view battle system (does not require battlers)
Post by: Dalton on December 23, 2005, 02:53:18 PM
Quote from: sepiroth666
Did you make this? It's perrty good exept when I use with my sprites the way they walk up to enemy and attack don't work they just get stuck and start running in place....other than that gj btw does this work with battle report?I can test it becouse the battle gets stuck with the running.


Okay, the way to fix that.  The character does actually need an assigned battle graphic, but for all we care it could be a dot!

Anyway to fix this, make sure the battle graphic and the character graphic has the same name like... 001-Fighter01 and 001-Fighter01

using a char gtaphic named DaltonPage and a battle graphic named Page and comparing the facts with the demo is how I found this out.  Also I tried making people without using battle graphics and ones that didnt match and put on ones that do match.  Combine this with the Tactics Menu on www.rmxp.net and you can have up to 7 char parties without any problems as far as I can see.
Title: Advanced side-view battle system (does not require battlers)
Post by: Rikkuholic on December 23, 2005, 03:22:04 PM
Quote from: DeathTrooper
Quote from: sepiroth666
Did you make this? It's perrty good exept when I use with my sprites the way they walk up to enemy and attack don't work they just get stuck and start running in place....other than that gj btw does this work with battle report?I can test it becouse the battle gets stuck with the running.


Okay, the way to fix that.  The character does actually need an assigned battle graphic, but for all we care it could be a dot!

Anyway to fix this, make sure the battle graphic and the character graphic has the same name like... 001-Fighter01 and 001-Fighter01

using a char gtaphic named DaltonPage and a battle graphic named Page and comparing the facts with the demo is how I found this out.  Also I tried making people without using battle graphics and ones that didnt match and put on ones that do match.  Combine this with the Tactics Menu on www.rmxp.net and you can have up to 7 char parties without any problems as far as I can see.


lol, and i was halfway done with combining it with a script that automatically chooses the character in battle. I am halfway done with it, and it could work like this:

Make a name of a hero/monster

Then leave the battler graphic blank, and it will assign the charset into the cbs automatically, but i guess it ain't needed. PS: It would work ONLY FOR THIS CBS!!!

But anyways, this is a replacement for those lazy guys who don't wanna search the net for Cybersam battlers.
Title: Advanced side-view battle system (does not require battlers)
Post by: pallando on January 22, 2006, 05:17:53 AM
Is there any way to make the characters not move when using magic?
Thank you in advance if you can help! :D
Title: Hey!!!
Post by: Knownot on January 22, 2006, 09:15:10 AM
This is F'ing awesome!!! but one thing???? how do you make it so if you have a gunner he dosnt run up to the person to shoot? and same with magic as in above? :?
Title: Advanced side-view battle system (does not require battlers)
Post by: Lavata on January 22, 2006, 02:19:51 PM
i tried it out,and i like it,the only problem is that when i get into a battle with an imported enemy and error comes up stateing that it's not in the character folder,fine,i fixed that but when i tried to battle it again,it worked but it was only a little square of the enemy -.- is there anyway to fix that?
Title: Advanced side-view battle system (does not require battlers)
Post by: ahref on January 22, 2006, 07:55:53 PM
gah! im on another pc ill look at this when im back on my one it sounds great though
Title: Advanced side-view battle system (does not require battlers)
Post by: doggen on January 23, 2006, 05:09:50 PM
This script is awesome!!!

I'm absolutely gonna use this script! :D
Thanks Rikkuholic! And thanks Deathtrooper for solving that problem!

Btw Rikkuholic, do you want credit, or do you know anyone I should credit?
Title: Advanced side-view battle system (does not require battlers)
Post by: ShmooZeroOmega on January 23, 2006, 09:59:14 PM
Okay... I tried it in a test game and it worked like a charm, but when I pasted it into my main game it gets all buggy every time they try to attack. Anyone know what's wrong?

Edit: It only happens when I use original characters. Using the pre-made ones work fine.

Edit2: Sorry for repeating a question.
Title: Advanced side-view battle system (does not require battlers)
Post by: doggen on January 24, 2006, 12:09:03 PM
If you look further up on this topic,
Deathtrooper solved that problem.
Title: Advanced side-view battle system (does not require battlers)
Post by: VampireHSS on January 28, 2006, 12:33:09 PM
Where do I copy that script to?
Title: Advanced side-view battle system (does not require battlers)
Post by: ShmooZeroOmega on January 28, 2006, 09:36:42 PM
Okay, I tried using an original enemy and it causes an error pop-up.
Title: Advanced side-view battle system (does not require battlers)
Post by: Ayden on January 31, 2006, 08:06:48 PM
I know this is an old topic but I just wanted to shaer sumtihn and ask a question. first the question.
Is there a way that you could use battlers that would look just like the charactre on the map exept you make the atk animations like you would for the cyberslams script??? :wink:  just thought it would be kinda kewlish.

And now for wat I wanted to share with you. Its really nuthin cept a simple animation but i think its works well enough. To make it seem like your character is swinging the equiped weapon take the icon and make an animation of it and set it to its desired weapon. I know other ppl coulda done this easily but I thought it was worth sharing. :D
Title: Advanced side-view battle system (does not require battlers)
Post by: Neko on February 02, 2006, 10:28:13 PM
When I try to attack somthing, the people just kinda run in place... XDXD
Title: Advanced side-view battle system (does not require battlers)
Post by: BPKS0 on February 05, 2006, 07:07:36 PM
To solve this as posted before u need to have people with the same names for the charset and battle image example...

035-Mage03 would not work with Mike or 035-mage03
035-Mage03 and Mike are not the same.
035-Mage03 and 035-mage03 are not the same. One has a capital and one doesn't.

Chris     chris   |  Chris   08-Figher8
None of those would work.

Chris and Chris would work. Hope this helps.
Title: Advanced side-view battle system (does not require battlers)
Post by: Neko on February 05, 2006, 09:09:32 PM
Ive tried that and anything else that seemed to make sense to me... It wont work.. it may be a script Im using... Because I trtied it on a new project and it worked fine...
Title: Advanced side-view battle system (does not require battlers)
Post by: BPKS0 on February 05, 2006, 09:12:30 PM
Thats probably it then. If u use a script that edits the battle parts of the normal scripts thats probably it.
Title: Advanced side-view battle system (does not require battlers)
Post by: Neko on February 05, 2006, 09:13:37 PM
If I were to send you a demo with just the scripts in it being used, could you check it for me?
Title: Advanced side-view battle system (does not require battlers)
Post by: BPKS0 on February 05, 2006, 09:15:23 PM
yea sure thing :D
Title: Advanced side-view battle system (does not require battlers)
Post by: Neko on February 05, 2006, 09:24:31 PM
http://www.megaupload.com/?d=XOLLNHFM  I just was screwing around testing stuff. so Nothing done on it yet... If you wanna tweak the scripts to make them look cooler go ahead :-P (I cant afford legal version of XP so its the postality =\ )
Title: Advanced side-view battle system (does not require battlers)
Post by: BPKS0 on February 05, 2006, 09:30:54 PM
Make one in postality my 30 day trial ran out even tho I have paid for it already............ =\
Title: Advanced side-view battle system (does not require battlers)
Post by: Neko on February 05, 2006, 09:32:41 PM
That wasnt postality? thats what I did it all in.
Title: Advanced side-view battle system (does not require battlers)
Post by: BPKS0 on February 05, 2006, 09:34:38 PM
Meh nvm I worked around things so I got it up in postality brb
It works fine for me..... I had to replace the actor data tho....... =\ Are u using diff people? If so u will have to name them.... nvm lemme sho u lol


Ok say u have a char set named bob. Your using him with the battle
035-Mage03 U need to save the tileset in paint as 035-Mage03 and import it into the game and use that 1. That would work =\ No problems with any script.
Title: Advanced side-view battle system (does not require battlers)
Post by: Neko on February 05, 2006, 09:50:40 PM
I dont understand... Its not working XD  Sorry
Title: Advanced side-view battle system (does not require battlers)
Post by: BPKS0 on February 05, 2006, 09:54:09 PM
Quote from: Neko
Name the tileset? Dont you think that gets a smidget annoying? XD I didnt do that and it worked fine...

??????????????????? who said nething about naming a tileset... u said it wasnt working and asked if I could help.....
Title: Advanced side-view battle system (does not require battlers)
Post by: Neko on February 05, 2006, 10:04:27 PM
I dont know.. Im so confused XD I renamed the people to Zolandor on battlers and character and it didnt work. Im prob. not understanding you. Im not that good at english =[ Sorry

No help? =[ Sorry for being bad at this
Title: Advanced side-view battle system (does not require battlers)
Post by: Rikkuholic on February 08, 2006, 04:46:57 PM
Quote from: Lavata
i tried it out,and i like it,the only problem is that when i get into a battle with an imported enemy and error comes up stateing that it's not in the character folder,fine,i fixed that but when i tried to battle it again,it worked but it was only a little square of the enemy -.- is there anyway to fix that?


Easy. Import the Spriteset to the battlers folder and assign it to your enemy. Lol, read the first post.
Title: Advanced side-view battle system (does not require battlers)
Post by: TommYJET on February 12, 2006, 04:34:06 AM
Hey very nice script bro!!! Good job !
Title: Advanced side-view battle system (does not require battlers)
Post by: dwarra on February 12, 2006, 10:32:56 PM
Quote from: TommYJET
Hey very nice script bro!!! Good job !


He didnt make it >.>
Title: Advanced side-view battle system (does not require battlers)
Post by: myriadeye on February 19, 2006, 02:50:49 AM
This is really great... just 1 thing. I got the bottom thing that usually shows up in battle (the one that shows your HP, SP, and so on) to go away, but now I want the HP and SP to appear over the characs and/or monsters in NUMBER form as well as bar form... how do I do this?

Sorry if this soundish extremely n00bish.
Title: Here's a stupid question...
Post by: Ammom on February 19, 2006, 08:03:25 PM
Where teh hell does all teh script go?
I am sort of new to entering scripts, and I'd rather not mess this up, so if someone could tell me, I would be most appreciative.
Title: AWSOME!
Post by: sam_9000 on February 19, 2006, 08:05:09 PM
THIS SCRIPT IS EXACTLY WHAT IVE BEEN LOOKING FOR!
IT WORKS FULY WITH ME!
WOOOO
GJ MATE!
could ya pm me/post the script?
Title: Advanced side-view battle system (does not require battlers)
Post by: Abruption on February 26, 2006, 04:00:29 PM
omg leet

Thanks alot just what i was looking for
Title: Re: AWSOME!
Post by: Abruption on February 26, 2006, 04:01:03 PM
Quote from: sam_9000
THIS SCRIPT IS EXACTLY WHAT IVE BEEN LOOKING FOR!
IT WORKS FULY WITH ME!
WOOOO
GJ MATE!
could ya pm me/post the script?


soorry for double post

Dude just open the project on your own RMXP
Title: Advanced side-view battle system (does not require battlers)
Post by: VWarrior on March 02, 2006, 04:42:27 PM
Wow! Thats awesome.

Could someone tell me how to get rid of the default battle screen character status display?  With it onscreen, it blocks the characters toward the bottom of the screen.

EDIT: Well nevermind, problem solved.  Is there any way to control how the characters move when executing a skill?  Like if i'm using a skill that involves a melee attack, is there I way I can make them walk all the way up to an enemy like when doing a normal attack instead of them that just moving foward a tiny bit and stopping?
Title: Advanced side-view battle system (does not require battlers)
Post by: VWarrior on March 04, 2006, 08:32:22 AM
Well I guess i'll bump this to help it get attention.  Does anyone know a way to make it so a normal attack would behave like a skill with this script and the character won't go all the way up to and enemy and attack them?  The reason I ask is because some of my character's basic attacks are shooting guns and I don't want them to walk right up to an enemy and shoot them.
Title: Advanced side-view battle system (does not require battlers)
Post by: kornchik on March 07, 2006, 02:12:08 AM
ok, i know im gunna sound stupid and probably get flamed for this,
but im new at it, i cant seem to get it to work...
i copied and pasted the script, incerted it above 'main',
imported my character as a battler and when i tested it it said there was a problem with line 30...
i know its probably something really stupid and small, but  ihave no idea what to do!
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: DarkAngelX on April 07, 2006, 08:54:56 AM
I saw people saying that it looked like they're floating ..
This is how to make them less-floatingg
Export the characterset of the enemy and edit it with some program ( Keep it simple and use paint :-) )
Cut the sprite of the enemy where he's looking to  the right , then copy it .
Open a new paint , paste it there and save it'on your desktop or wherever u want
then import it in the BATTLERS map ..

Create a new monster and as picture , select the monster u imported
Then create a new MONSTER GROUP and only select the monster u imported =)
then save it ... 
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: :) on October 12, 2006, 01:59:05 PM
any way to make the battle screen behind your hero's facing the monsters?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Arrow on October 12, 2006, 02:31:54 PM
Just use a blank battler. (it should be listed as (none) in the database.)
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: :) on October 12, 2006, 10:32:42 PM
Just use a blank battler. (it should be listed as (none) in the database.)

ahhhh? total noob (yes i kno that name is overused) im asking because i have a cool idea and want to make it but suck with scripting.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: :) on October 12, 2006, 11:18:41 PM
Just use a blank battler. (it should be listed as (none) in the database.)

ahhhh? total noob (yes i kno that name is overused) im asking because i have a cool idea and want to make it but suck with scripting.

i want to show the hero's as well as the people they are fighting just want hte camera to be zoomed out behind the heros showing everything.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Arrow on October 15, 2006, 09:28:06 PM
OH. Well, What I would do is get a battler that faces away from the screen, and then whenever it needed to move, make each frame of your battle animation have a hero disappear event in it, with the moving set up as an animation. Then, it looks like they're moving when they need to be.

NOW I HAVE A QUESTION!

If I want to make people use skills without taking that extra little step forward, what do I do to the script?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: darkelementwars on October 18, 2006, 04:54:25 PM
side view for xp?  well, there goes my one reason to still use 2003.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Arrow on October 18, 2006, 04:56:21 PM
Yeah, I've got some really cool animations started up. I'm making this resource pack right? Well I have animations and shit set up for it and everything. I just need it so they don't take that step forward before using a skill.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: darkelementwars on October 18, 2006, 08:11:34 PM
okie out of curiousity, this uses charsets for the battle system, right?  so does it have to be the defualt charset for the character or can we have a custom one of battles?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Arrow on October 18, 2006, 08:16:57 PM
I used a custom by changing the set just before the battle begins. I have an example of this in the resource pack I'm making for Mega Man X, which should hopefully be finished before the end of this month.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: darkelementwars on October 18, 2006, 08:27:05 PM
good idea.  thanks ^^
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Tayitor on October 27, 2006, 07:32:15 PM
 ???I get an error can someone help???

Can someone help???????

I get the error in battle!

Please Fix it and return!

http://www.megaupload.com/?d=ISGMAWIM
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: coolkid25344 on November 05, 2006, 01:09:30 AM
Great job im totally using this in my game!, and yes you will be either in the opening credits or the ending credits!
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: coolkid25344 on November 05, 2006, 01:17:48 AM
okie out of curiousity, this uses charsets for the battle system, right?  so does it have to be the defualt charset for the character or can we have a custom one of battles?
Sorry for double post but I wanted to answer your question, yes, take the custom charecter and make a battler that has the same name you dont have to make a new battler just use the charecter as in the box set for the charecter as the battler as long as it has the same name as the charecter it will use the custom charecter, make sense lol?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: darkelementwars on December 01, 2006, 07:34:56 PM
is it possible to edit this script so it notifies the player when a character when they level up?  it doesn't have to be anything fancy, just informing the player that a level up has occurred.  maybe informing the user if a new spell is learned as well.  as of now this script only tells exp and money gained and not levels.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: darkelementwars on December 05, 2006, 05:16:30 PM
i take it the lack of response means no...
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: HowlingWinds on December 18, 2006, 01:09:44 AM
I was woundering if there is a way to make it so the battle sprites are different from the normal walking around sprites. I've been wanting to use this character in battle but I don't want her to be walking around in battle stance all the time.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi69.photobucket.com%2Falbums%2Fi43%2FArlins_pics%2F001-Fighter01.png&hash=058799fc9501607747f71ebc5c7b1d7be1bfeb94)

Or does that require a different script?

EDIT: I tried doing the whole "Change Hero graphic" thing but it just makes her bug up during battle :/ It will work if her walking sprite is the battle sprite, but if I change anything she bugs up.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Me™ on December 18, 2006, 10:50:37 AM
@darkelementwars, yes this is possible. I can not assure you I will do this, but when Ive got some spare time I will.

@HowlingWinds, Minkoff from hbgames.org made a special animation script for those sprites. Also, ccoa's sidevieuw battle system, which is superior to the one posted here, also handles those sprites.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: HowlingWinds on December 19, 2006, 11:39:02 PM
Well this script was work yesterday but now I keep getting this ><

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi69.photobucket.com%2Falbums%2Fi43%2FArlins_pics%2Fumm.jpg&hash=9d50e7bd9880bab7e184cf7b782d85adc7825c35)

On that line of the script it says: "for i in x...x + width"
How do I fix this?  ???
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Irgna on January 02, 2007, 03:42:02 AM
Well this script was work yesterday but now I keep getting this ><

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi69.photobucket.com%2Falbums%2Fi43%2FArlins_pics%2Fumm.jpg&hash=9d50e7bd9880bab7e184cf7b782d85adc7825c35)

On that line of the script it says: "for i in x...x + width"
How do I fix this?  ???
I'm working on two projects right now, and the one that uses mostly RTP graphics gets that same error, but the one I'm working on with mostly custom graphics doesn't. It's driving me crazy because the one that gets the error is the one that I've put more work into and am closer to being done (1.5 hours of gameplay down, 75+ left to go). The one that works perfectly fine is one I just started on five minutes ago.

EDIT: I figured out how to fix this problem by accident: base MP cannot be zero. Make sure all allies and enemies have a BASE MP of at LEAST 1.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Irock on January 16, 2007, 08:48:51 PM
Okay... I tried it in a test game and it worked like a charm, but when I pasted it into my main game it gets all buggy every time they try to attack. Anyone know what's wrong?

Edit: It only happens when I use original characters. Using the pre-made ones work fine.

Edit2: Sorry for repeating a question.

Same thing happens here. He keeps running in place.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Arthur Phoenix on January 17, 2007, 12:23:02 AM
this is a really awesome script, but is there a way to slow down the charaters a bit? They look like they're flying across the map.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: jblair on January 17, 2007, 04:53:31 AM
Hey Craig^ sup*
Well i agree it is an awesome script but is is a lil fast... I'm sure if i felt like looking through the code I could figure out how to make it slower, but seeing as I'm pretty new to Ruby, though from what I've been reading and learning from the tuts, its not that different from javascript, but I don't really want to take the time, maybe someone else can figure it out. But yea, an awesome script! Oh, and is possible to use custom sprites with this script, I really cant tell from the previous pages but I looked.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Arrow on January 17, 2007, 05:52:08 AM
Yes, but you have to do a small amount of eventing before/during/after battles. Not that difficult actually.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: jblair on January 17, 2007, 03:04:03 PM
Yes, but you have to do a small amount of eventing before/during/after battles. Not that difficult actually.

is that for the custom sprites, or slowing it down?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Arrow on January 19, 2007, 12:09:35 AM
Customs, sorry, should have said.

If you find out how to slow them down/speed up life decreasing, lemme know.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: ferret522 on January 19, 2007, 01:26:28 AM
omg seriously i may be new at this so i do not know wat is  good or not but i love this script

edit: waaaah  please tell wat events to put becuase i really want to use my mario battle sprites
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: jblair on January 19, 2007, 05:27:10 AM
don't you just have to put the sprite sheet with the same name as the the character sprite sheet into the battlers folder?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: bulls84 on February 17, 2007, 02:18:12 AM
I need help, my characters aren't moving in the battle. I'm using the pre-made default sprites.

Help me!!!
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: lorehunter on February 17, 2007, 02:27:41 AM
Awesome job mate. I am using this in my game for sure. Full credit to you.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: JoelCMJ on February 22, 2007, 02:36:06 PM
Ok i looked at every post and there dont seem to be an answer for how to stop the monsters and characters moving when using a bow or magic etc? how do you do it.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Sion_Barzad on February 28, 2007, 04:19:40 AM
Thats an awesome script. I will use it in a future project. Don't worry, I will credit you.  :)
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: JoelCMJ on March 06, 2007, 01:38:54 PM
Holy crap! The link aint working cuz the dude has left! Someone please send me the script if they still have it! I need it desprately
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Irgna on March 07, 2007, 12:32:02 PM
I have it, but can't send it to you right now. I might be able to send it to you tonight or tomorrow, is that ok? Also, I'm making custom battle backs for it if anyone's interested.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Slayer on March 26, 2007, 12:44:11 AM
I need this script as well.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: bulls84 on March 26, 2007, 01:00:40 AM
I have it, but can't send it to you right now. I might be able to send it to you tonight or tomorrow, is that ok? Also, I'm making custom battle backs for it if anyone's interested.

Nice, i need some battle backs for this script
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Irgna on March 26, 2007, 01:35:30 AM
Here are the backdrops (attached). I cannot find the script, sorry.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: bulls84 on March 26, 2007, 01:39:21 AM
Spoiler for:
[code]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
      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, 0)
      #@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
      @tilemap.autotiles = 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))
    end
    # ????????????
    @timer_sprite = Sprite_Timer.new
    # ??????
    update
  end
  #--------------------------------------------------------------------------
  # ? ??
  #--------------------------------------------------------------------------
  def dispose
    if @tilemap != nil
    # ?????????
    @tilemap.tileset.dispose
    for i in 0..6
      @tilemap.autotiles.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
    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)
    &nbs
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WhiteKnight on April 04, 2007, 06:41:00 PM
Ran into a little problem, hope someone can help.

I put the script in and it work fine. I tried to change the battle back to something that looks right with the side veiw and I got an error message. I tried to change it back...Same error... Took out the whole script again and guess what? Same error. Below is the error message screenie

http://img.photobucket.com/albums/v200/travskoot/Gah.jpg

=\

EDIT: I think that might be mostly I started in a saved game. I added the batteback again, started a new game and got a new error

Its a syntax error on line 1909 =(
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WhiteKnight on April 05, 2007, 08:57:15 PM
Hate to do this but I really need this solved. *Bumpp*
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WcW on April 08, 2007, 11:23:48 PM
This unfortunately happens every time this script is added into a game, and as far as I know it can't be fixed, so my advice is just to not use this script at all until you make a new game.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Kokowam on April 08, 2007, 11:25:08 PM
He really does need this solved... Lots of maps already made...
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WcW on April 08, 2007, 11:40:59 PM
Well, actually, I might have a way.  Give me a sec to figure this out.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WcW on April 09, 2007, 12:08:25 AM
Yes, I might be on to something.  Create a new game, change all the battlebacks, then install the script.  The use the materialbase to upload anything you don't already have in the game.  The next part will require manual re-formating.

Open the game folder for your original game, go to the data folder.  To the same with the new game.  MAKE SURE NOT TO GET THESE TWO CONFUSED, OR ELSE YOU WILL PAY. Copy the following files from the original and replace the ones in the new game with them:
Everything BUT scripts.  Do this with all the files you have in the other two folders, and it should work.  I'll test it right quick to make sure.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Irgna on April 09, 2007, 12:22:37 AM
Wierd, I never used to have that problem...
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WhiteKnight on April 09, 2007, 03:22:27 AM
I get a "Bad Value For Range" error when I get into battle now.

Did all you said.

I tried it out in a new game and it work fine other then the fact that did battleback didn't change. I had it set to one of the ones downloaded from this thread.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Irgna on April 09, 2007, 12:26:56 PM
I don't know what's wrong, I never had those kinds of problems with this script...
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WcW on April 09, 2007, 02:39:33 PM
I looked into it, there's no way to solve it.  You'll have to get someone good at scripting to take a look at it, I guess.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Irgna on April 09, 2007, 02:43:28 PM
*cough*Blizzard*cough*
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WhiteKnight on April 09, 2007, 06:31:31 PM
*sigh* Hopfully Blizz see's this... Should I just PM him?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WcW on April 09, 2007, 08:39:55 PM
Hmm... Strange how I was coughing the word Blizz in my head at the same time Irgna was coughing it aloud... :lol:
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WhiteKnight on April 09, 2007, 09:37:26 PM
I have been on this site for all of three days and that was the first thing that came to my head **Blizzard**

Haha, look for 5 mins in this section and you can tell he's the man when it comes to scripts.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Decadent Sympozium on April 11, 2007, 08:12:45 AM
USUALLY when ABS don't work for me I delete the lone SDK script and the problems vanish.

...

Just a thought.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WcW on April 11, 2007, 08:40:39 PM
This, however, is NOT an ABS.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Irgna on April 11, 2007, 08:42:52 PM
Correct, it's a SVBS (Side-View Battle System).
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Kokowam on April 11, 2007, 08:52:34 PM
An advanced SVBS. ;) Also, if my game/script doesn't get helped with, then I'm going to make a new project and use this :P Maybe I'll use this anyways.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WhiteKnight on April 12, 2007, 01:51:23 AM
So just to clarify, i'm not the only one getting this error/getting bugs?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WhiteKnight on April 23, 2007, 01:12:50 PM
Can anyone take a look at this script? I really need it =(
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Apocalypse on May 04, 2007, 03:11:16 PM
is it really gone? can someone re-upload it?

or maybe it was something like this:
http://www.sendspace.com/file/as7tyw
?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: venn177 on August 09, 2007, 11:10:20 PM
I know this is unnecessary to reply in, and it's probably a complete necro, but I really would like this script, does anyone else have this script that they could host somewhere?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: hero_kenshi on August 13, 2007, 11:07:42 AM
yeah i would like the scipt too  :bean:

i have this other one... but i have tomake all the battlers AND I TRIED AND DONE VRY BADLLY  ;9
what program are you supposed to use??
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Kokowam on August 13, 2007, 11:24:59 AM
This should be it. I attached the script to this post.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: venn177 on August 19, 2007, 07:07:53 AM
I opened it with notepad and only like half the characters showed up:/
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: WcW on August 21, 2007, 12:46:32 AM
The script is bugged up, nothing we can do about it, though maybe Lord Blizzard will look at it eventually.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: modern algebra on August 21, 2007, 01:58:17 AM
I would suggest you use Minkoff's or Ccoa's. You do need to make battlers, but there are quite a few out there now, including dollmage's, which are awesome. Try hbgames.org to find those scripts.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: apc0243 on October 20, 2007, 02:48:45 PM
I was really hoping that you could re-upload this script and demo. I'm really interested using it. Thank you!
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: kabilaking on March 04, 2008, 11:36:17 AM
i am having problems with this script the half of any battler is missing for some reason can anyone help me out ????
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: bulls84 on March 10, 2008, 09:01:19 PM
Spoiler for:
[code]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
      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, 0)
      #@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
      @tilemap.autotiles = 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))
    end
    # ????????????
    @timer_sprite = Sprite_Timer.new
    # ??????
    update
  end
  #--------------------------------------------------------------------------
  # ? ??
  #--------------------------------------------------------------------------
  def dispose
    if @tilemap != nil
    # ?????????
    @tilemap.tileset.dispose
    for i in 0..6
      @tilemap.autotiles.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
    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)
   
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: modern algebra on March 11, 2008, 01:40:34 AM
Mm, your quote is broken bulls

If you guys want the script though, just click on the link that is in bulls' quote (http://rmrk.net/index.php/topic,511.msg182900.html#msg182900). The code there is not broken, as far as I can tell
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: DMesterWoW on March 12, 2008, 04:07:12 PM
download link is down :o plz can you make a new one!!! :blizj:
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: modern algebra on March 12, 2008, 04:13:48 PM
Rikkuholic is no longer a member. Bulls reposted the script here: http://rmrk.net/index.php/topic,511.msg182900.html#msg182900
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: epson777341 on April 18, 2008, 12:22:57 AM
I don't care if this is necro posting but, I tried to use Bulls' original script post from March 25th, 2007, I got an syntax error on line 809, I checked the line but the only thing there is "end". I tried to remove the end but it caused problems further down the line. Does anyone have any ideas what might be wrong? 
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: modern algebra on April 18, 2008, 03:49:14 AM
How odd. It looks like the code got itself broken from the last time I looked at it. That code is now unuseable, unfortunately. You'll have to wait for somebody to repost the script. And in case anyone is generous enough to do so, my suggestion is to paste it into a text document and attach it directly to RMRK
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Innerdarkness14620 on May 13, 2008, 12:05:33 AM
What are the Links to CCoa's Battle Systems and Minkhoff's?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: modern algebra on May 20, 2008, 08:01:12 PM
I don't have them. But, they shouldn't be hard to find - just go to rpgrevolution for ccoa's and creationasylum for Minkoff's (I think).
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: ShellShocked on January 01, 2009, 04:23:00 PM
Du-du-du! My first post (in a LONG time) will be a necro...But! It's all good, I have the code!

-Ryan
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Knight Rider on January 01, 2009, 04:48:00 PM
Nice.  ;8

But there's a problem.

When I attack, the character would move to the enemy right? well it gets stuck when it start to move. Even if I use skills. But let me check if my other scripts is interfiering.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: ShellShocked on January 01, 2009, 04:50:33 PM
...Uh, well, crap. I had this problem too. Give me a second, let me try something.

EDIT
----

Right;

- Battler must be a normal character-set;
- Characterset and Battler MUST have the same name;
- There must be a battler (There was my problem, yes, I fail)
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Knight Rider on January 01, 2009, 04:56:03 PM
Well i just remove one of my scripts that lets the map scroll like on a Zelda game (only one I was using) and now it works!

Very nice finding it ShellShocked.
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: freakishfae on January 20, 2009, 04:15:45 AM
Looks like a nice script.
I'm having a problem, though; in battle, I can't move the cursor in the skills menu, and every time a character does anything, the battle freezes....

Because no one else seems to have mentioned it, I'm guessing it's a script compatibility issue, but any one have any other ideas?
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: Scalfittura on May 27, 2009, 01:38:51 PM
Bumping newbie here:

I have really no idea how to make a Sideview Battle System work..
I have tried it from RPG Palace, hbgames.org, and now I ended up here..
Can anyone please help me with it??
The same error keeps occuring, the only monsters I can put into battle are Ghosts, Soldiers and Aluxes.. Does anyone knows how I have to solve this problem??
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: tSwitch on May 27, 2009, 03:06:59 PM
Bumping newbie here:

I have really no idea how to make a Sideview Battle System work..
I have tried it from RPG Palace, hbgames.org, and now I ended up here..
Can anyone please help me with it??
The same error keeps occuring, the only monsters I can put into battle are Ghosts, Soldiers and Aluxes.. Does anyone knows how I have to solve this problem??

...Uh, well, crap. I had this problem too. Give me a second, let me try something.

EDIT
----

Right;

- Battler must be a normal character-set;
- Characterset and Battler MUST have the same name;
- There must be a battler (There was my problem, yes, I fail)
Title: Re: Advanced side-view battle system (does not require battlers)
Post by: femdragonz on August 06, 2009, 06:12:24 PM
My charas would stop moving during battle so i changed the battler name things to match with the charas it works for some and not others and i made sure i spelt everything rite  :D