Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Golden Sun Camera Battle System
#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 }


Messages In This Thread
Golden Sun Camera Battle System - by DerVVulfman - 11-18-2012, 08:17 PM
RE: Golden Sun Camera Battle System - by Yin - 11-18-2012, 08:18 PM
RE: Golden Sun Camera Battle System - by Yin - 11-18-2012, 08:29 PM
RE: Golden Sun Camera Battle System - by DerVVulfman - 11-02-2014, 06:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Battle Item Count kyonides 4 852 02-04-2024, 05:49 AM
Last Post: kyonides
   Super Simple Vehicle System - Enhanced DerVVulfman 65 82,885 06-02-2023, 06:16 PM
Last Post: Sujabes467
   Dalissa's Battle Cry DerVVulfman 2 6,629 05-09-2023, 03:07 AM
Last Post: DerVVulfman
   Zenith Tactical Battle System Plus (ZTBS+) DerVVulfman 0 2,014 05-10-2022, 10:42 PM
Last Post: DerVVulfman
   Actor Battle Items DerVVulfman 4 4,924 11-08-2020, 12:36 PM
Last Post: Melana
   FPLE Camera Height DerVVulfman 23 28,149 07-20-2020, 01:41 AM
Last Post: rzrcoon
   Battle Report Raziel 1 6,228 05-29-2020, 02:27 AM
Last Post: Whisper
   Commercial System Package DerVVulfman 11 12,034 01-04-2020, 12:37 AM
Last Post: Pelip
   ZLSL's Battle Portraits DerVVulfman 4 6,465 11-12-2019, 04:10 AM
Last Post: DerVVulfman
   ACBS - Atoa Custom Battle System 3.2 Victor Sant 150 224,160 03-02-2019, 04:47 AM
Last Post: dragonprincess44



Users browsing this thread: