Yeah you're right ... I didnt think about that ... I'm gonna try it when back home .
Thx
Hey Ninkoro , everything works like I want for now ! I set 3 actions , one for calculation , one for zoom in , and the last one for zoom out .
If I'm setting up my variable before battle , everything works . Now I need to do it in the script .
# --------------------------------------------------------------------------- # Calculate Critical # --------------------------------------------------------------------------- "Calculate_Crit" => [ ], # --------------------------------------------------------------------------- # Critical Zoom In # --------------------------------------------------------------------------- "Zoom_In" => [[:camera, 0, [0, -60], 56, 2.50, :smooth],[:force_critical, true], ], # --------------------------------------------------------------------------- # Critical Zoom Out # --------------------------------------------------------------------------- "Zoom_Out" => [[:cam_reset, 20, :smooth],[:force_critical, false], ], I don't know how to put it in the calculate critical for now . I need to set a variable and doing a random count .
I tried a few codes , but nothing seems to work ... I'm probably forgetting something 🙁 . I know how to do in
events but not in scripting .
Hi, I'm getting a bug where my Battleback is black everytime I battle in my game. It does this to the Tankentai VX Ace scripts as well. Idk know whats going on or why it's doing this but I need help! I would appreciate if someone knew the fix to this "bug". Please help!
@Punisher699
Any kind of script command made within the sequence configuration of the TSBS will be run in Game_Actor/Game_Enemy, so you have access to the stats of the actors easily, meaning you can tie the crit formula to a stat easily too.
For example:
"Calculate_Crit" => [ [:if, "cri >= rand(0)", "Zoom_In"] ],This will execute the "Zoom_In" sequence if the actor's crit rate (the real X param) is higher than or equal the random floating point number generated between 0.0 and 1.0 (rand(0) will do that). Since the crit rate is a float number in the engine itself (so, 4% crit rate is actually 0.04 for the engine), the condition check above is perfect for triggering critical hits manually while preserving the original crit rate formula (or even make your own formulas).I am not sure if that is the exact syntax used in the sequence settings for the :if command, but you get the idea, right? 😛
So, call the "Calculate_Crit" sequence before the damage, and call the "Zoom_Out" after the damage (well, whenever you like to).
I worked on some addons for this battle system, which required me to read the code itself.
That's when I saw where the script command is actually executed, and just like any other scripter, I know that class like the back of my... forgot how the saying goes. 😀
Anyway, it's actually pretty easy if you learn a bit of coding in RGSS3, or at least how some classes function.
Examine the Game_BattlerBase, Game_Battler, Game_Actor and Game_Enemy classes. All the methods found in those are available for any kind of script lines used in any kind of sequence configuration. Combine those methods however you like, and you can basically do whatever you want fairly easily.
But note that learning at least a minimal amount of coding is required. That minimal amount can be found in the help files which came with VX Ace.
Just open the help files and you can read about the basic RGSS stuffs there (like operating arrays, hashes, bitmaps, and so on). Once you learn those, you are set to code anything you like and start to learn even more in practical ways.
There are also the "Script call equivalents of event commands" which might not be usable in every case, but it helps greatly in understanding how the engine itself functions.
And there are some great tutorials about learning RGSS, some of them even say something like "learning RGSS easily" but make no mistakes, it won't be easy. 😀
I also wanted to add a comment to my snippet example...
The code I showed does not count in the target's critical evade rate, so that stat is entirely useless now. There should be a way to include that as well in the formula, I just didn't look deeper into that. Will take a look when I get some free time.
I've managed to fix my problem. Well, at least somewhat. The shadows that appear under the enemy in the beginning are due to me having my Yanfly Core Script's screen settings to 640x480. The enemy facing downward briefly at the beginning of a battle is due to a bug in my opinion. As for my characters floating, that's due to my idle pose having conditions. If I don't give either my idle pose or my critical pose conditions then my characters won't glitch out. Same for the enemies. I think these are bugs on the scripter's part. So bottom line I fixed my own problems but I didn't fix the actual bugs.
For your idle pose conditions issue...
If there are times when no idle pose is possible, than your conditions are wrong. You must have a proper idle pose at all the times, or else you will get some visual bugs, of course.
The facing down enemy bug sounds like a wrong note-tag for the enemies, messed up the index number from the sheet maybe? Since it turns to normal pose after automatically, that is pretty possible.
Also re-reading your previous post, it is possible that your image sheets are wrongly set up, or maybe the columns/rows setting is not right.
And if all of the above are surely taken out of possible reasons, than you still got the possibility that you put your scripts in wrong order, or you got one or more compatibility issues with other scripts.
But seeing that you made a new project for testing, improper image configuration seems the most possible to me.
Theo's battle script is working perfectly fine, and the bugs you mentioned are not coming from this script alone, that is for sure. I am 100% sure that there are no graphical bugs regarding the battlers (be it an actor or enemy) unless the user messed something up with their configuration (don't feel bad if you did, most of us did that too when we tried it the first time 😀 ) or another script is causing it to happen.
I have tested and used this script from resolutions of 544x416 to 1280x786, and no graphic bugs happened for me, at all. I used the 1.4 version, don't know about the 1.3 version (and Theo's ED uses the 1.3 version, if I remember right).
If you did not change any configuration, yet used your own sheets which differ from the ones used in Theo's demo, you can NOT expect it to work without issues.
Theo did not design it for "Kaduki sprites mainly". You can use any kind of sprite sheets, no size or columns/rows rules. As long as you set them up properly, it will work.
You must change every pose index to match the directions for your battlers on your image sheet, or else they will face in the wrong direction.