Golden Sun Camera Battle System
#1
* Posted with Permission given by Shockwave
* No longer supported


Rotimikid's (ShockWave's)
Camera Battle System v1.2

Author: Rotimikid

Version: 1.2


This is Rotimikid's/ShockWave's Camera Battle System. This system plays out pretty much like the Golden Sun games in the way the battle screen rotates. Can also be combined with the golden sun battle system for compatibility.

Demo: Camera Battle System only
Demo: Demo with Golden Sun Battle System
Demo: Animated Battlers Version (older version of Animated Battlers no longer supported by author)
Demo: AnimBat Version

Features:
- Camera rotates around
- Battlers, Items, Skills, and Weapons can have predefined angles
- Battle screen size and rotation speed can be adjusted
- Battle screen can rotate randomly

Screenshots:
screenshots

This isn't much but it still took me two days to script. This is a script i wanted done 2 years ago, but couldn't find it nor could i make it, so i'm glad to have finally finished it. Please comment.

Also, please give credit if you use this script and don't use in commercial games without contacting me first

***
btw, I know it doesn't look as great right now since the characters just stand there and don't move to the locations where they are attacking. I am working on adding that in and later probably making it compatible with the Animated Battlers.
***
*** June 15 2009
Animated battlers version added.
***

*** Version History ***
1.0
-Camera rotating ability, sprite zooming, basics
1.05
-Animated battlers compatable
1.06
-Fixed error that occured when an actor attacked with no weapon in hand.
1.16
fixed some bugs
1.2
fixed a bug with the number of actors in a party and actors joining a party or leaving a party
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#2
Did he make a recent update??? Or are you continuing progress on this?
Reply }
#3
I asked if it could be posted here. He said I could bring it over. Nothing has been done since his last upgrade. But it's pretty cool. I even tested it with Charlie Fleed's and had a blast. Happy
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#4
Awww, it would have been nice if it was updated. I used to use this WAAAAAAAAAAAAAAAAAY back. I'm pretty sure it still works great though.
Reply }
#5
Hmm, weird, when I set [0] in actor's name, that actor won't move when attacking, it worked right, but instead of that, when I set RAND_ATTACK = false and ATTACK = 0, all actors still move random when attacking.
By the way, DerVVulfman, do you have a plan for making a revised version for this system in near future ?, because I have some ideas :D
Reply }
#6
Ah, you meant that when you set the [0] in the actor's name, the camera did not rotate... not that he didn't move. I was kinda wondering what you meant. Yep, the [0] set the hero's camera rotation to zilch as it should have.

Now.... BE READY FOR A LECTURE.
(It took me 3 minutes to examine... and a bit more to write down.)


I see your issue with the system when you attempted to turn 'Random Angles' off. You did, in fact, properly set RAND_ATTACK and ATTACK values as you should have. The issue belongs to the 'camera_set' method within the Scene_Battle class. Or, more accordingly, the issue belongs to the code which he added into the 'make_battle_action_result' method that uses the 'camera_set' method.

The camera_set method receives two arguments, the camera angle value (val), and a random dispersion flag (disp). Obviously, the camera angle value is the flat rate value of the camera... 0, 90, 180, etc. The random dispersion flag is a true/false switch that sees if a little extra bump is added to the camera angle, giving a little randomness to the rotation. Normally, this value is 'false'. But if it is true, you get a little waver in the camera rotation. DO NOT EDIT OR TOUCH THIS METHOD. IT IS WORKING FINE!

It is within the 'make_basic_action_result' method where you would find your issue.

From lines 518 to 529 where you'll find an if...end[i] block that will change the actual camera angle. And within there, you'll find another [i]if...end block from lines 519 to 525. This inner block is the one that is controlled by the RAND_ATTACK switch. If the random attack switch is on, the system will run the 'camera_rand' method, otherwise it runs the 'camera_set' method... on line 524

Take a look at the 'camera_set' method on line 524. camera_set(GS::ATTACK, disp = true) Uh, oh! According to this, he set the random dispersion flag to 'true' so the battlers have a little extra randomness to their camera angles, even IF you have a fixed value angle! If you want that taken out, just set the line to read as: camera_set(GS::ATTACK). And there you go!

NOTE: You would also have the same issues with both skill and item flat rates, but the fix is the same by merely removing the disp = true code from the 'camera_set' calls. That would be on lines 548 for the RAND_SKILL system, and 572 for the RAND_ITEM system.



Also, this script may crash due to the dreaded F12 bug.... a situation where some scripts attempt to alias (re-attach/rename) code to methods already aliased. This results in what is called a stack error, a type of infinite loop issue.

For an example, run the program and begin a fight with one of the events. You don't need to go any farther than just entering the battlesystem itself. Hit the F12 key. Now with the system reset, go back to that event and start a battle again.

BOOM! Script 'RCBS Script' line 285: SystemStackError occured!!!

The 'screen_y' method was asked to re-include code and rename itself yet again (and would repeat for quite some time). The fix to this is easy. Look at the alias statement that reads thus:
Code:
alias rtmkd_camera_screen_y screen_y
Change the code to resemble this!
Code:
if @holylightstack_fix_screen_y.nil?
    alias rtmkd_camera_screen_y screen_y
    @holylightstack_fix_screen_y = true
  end
And guess what? THAT fixes the stack error with screen_y!!!

Confused Now why does it work? When you first begin running your project, there is no actual data in the @holylightstack_fix_screen_y value. It is empty and nil. But when you run your game, it performs the alias and attaches your code, and then sets this (long) variable to a value of 'true'. This value remains set, even if you hit F12. So when you DO hit F12, it will see that this method already had run and won't attempt to attach new code again.

It has to be an instance variable (one with the @ in the name), so it will be retained when you hit F12.

Personally, I try to group up all my 'alias' calls in one group per class. Makes it easier to handle.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   The Wanderers: The Customizable Encounters System DerVVulfman 0 234 08-24-2024, 07:12 PM
Last Post: DerVVulfman
   Battle Item Count kyonides 4 2,122 02-04-2024, 05:49 AM
Last Post: kyonides
   Super Simple Vehicle System - Enhanced DerVVulfman 65 93,603 06-02-2023, 06:16 PM
Last Post: Sujabes467
   Dalissa's Battle Cry DerVVulfman 2 7,380 05-09-2023, 03:07 AM
Last Post: DerVVulfman
   Zenith Tactical Battle System Plus (ZTBS+) DerVVulfman 0 2,794 05-10-2022, 10:42 PM
Last Post: DerVVulfman
   Actor Battle Items DerVVulfman 4 6,014 11-08-2020, 12:36 PM
Last Post: Mel
   FPLE Camera Height DerVVulfman 23 32,884 07-20-2020, 01:41 AM
Last Post: rzrcoon
   Battle Report Raziel 1 6,921 05-29-2020, 02:27 AM
Last Post: Whisper
   Commercial System Package DerVVulfman 11 14,195 01-04-2020, 12:37 AM
Last Post: Pelip
   ZLSL's Battle Portraits DerVVulfman 4 7,447 11-12-2019, 04:10 AM
Last Post: DerVVulfman



Users browsing this thread: 2 Guest(s)