Golden Sun Camera Battle System - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Material Development (https://www.save-point.org/forum-8.html) +--- Forum: Scripts Database (https://www.save-point.org/forum-39.html) +---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html) +---- Thread: Golden Sun Camera Battle System (/thread-4446.html) |
Golden Sun Camera Battle System - DerVVulfman - 11-18-2012 * 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 RE: Golden Sun Camera Battle System - Yin - 11-18-2012 Did he make a recent update??? Or are you continuing progress on this? RE: Golden Sun Camera Battle System - DerVVulfman - 11-18-2012 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. RE: Golden Sun Camera Battle System - Yin - 11-18-2012 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. RE: Golden Sun Camera Battle System - finalholylight - 11-02-2014 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 RE: Golden Sun Camera Battle System - DerVVulfman - 11-02-2014 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 Code: if @holylightstack_fix_screen_y.nil? 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. |