[RMVX ACE] [SCRIPTING] SMALL TWEAKS TO KHAS "SAPPHIRE ACTION SYSTEM IV"?
Posts
Pages:
1
I'm making a game that will heavily rely on a real-time battle system, and Khas' seems to be perfect, but there are some small things I'd like changed if anyone could help me out.
Nothing big, really, just:
-removing the (nonoptional) pixel movement
-making the weapon animation become a character animation instead
So, say instead of the animation of a swinging sword, it would play the attack animation of the main actor sprite.
Like this:
Other than that, I don't need anything else.
Here's the link to the download of the script:
http://arcthunder.blogspot.com.br/p/rpg-maker.html
Thank you!
-YuZu
Nothing big, really, just:
-removing the (nonoptional) pixel movement
-making the weapon animation become a character animation instead
So, say instead of the animation of a swinging sword, it would play the attack animation of the main actor sprite.
Like this:

Other than that, I don't need anything else.
Here's the link to the download of the script:
http://arcthunder.blogspot.com.br/p/rpg-maker.html
Thank you!
-YuZu
I was looking into this a bit earlier, mostly in regards to disabling the pixel movement. It seems a bit complicated to do at first, but, it's possible my approach is all wrong.
As for the animation reference, I'm really not sure what you mean. Are we talking about using animations from the database?
As for the animation reference, I'm really not sure what you mean. Are we talking about using animations from the database?
Oh, well if disabling the pixel movement is too complicated, that's fine.
*Edit
The only reason I need it is because I have an eight-directional movement script and pixel movement isn't compatible with it.
Haha, no, I was thinking more like the sprite animation for attacks.
How, with Kaduki sprites, they have little attack animations.
Like, with Galv's Character Animations script, how it plays the given idle animation of a sprites sheet.
Basically, the script is made to play an animation of the current weapon you're wielding (like a sword swinging, for example) and I'd like for it to instead play the attack animation of one of my little sprites based on where it's located in the sprites sheet.
*Edit
The only reason I need it is because I have an eight-directional movement script and pixel movement isn't compatible with it.
author=Marrend
As for the animation reference, I'm really not sure what you mean. Are we talking about using animations from the database?
Haha, no, I was thinking more like the sprite animation for attacks.
How, with Kaduki sprites, they have little attack animations.
Like, with Galv's Character Animations script, how it plays the given idle animation of a sprites sheet.
Basically, the script is made to play an animation of the current weapon you're wielding (like a sword swinging, for example) and I'd like for it to instead play the attack animation of one of my little sprites based on where it's located in the sprites sheet.
Since you're mentioning spritesheets, I think what we might be looking for could, possibly, happen with the set_graphic function? I'm not really sure. With the tests I've done so far, either the graphic-switch doesn't appear to occur at all, or the switch of graphics is permanent.
I'm not sure what you mean by "set_graphic function".
Do you mean, like, the "Change Actor Graphic" from the commands?
Sorry, I guess I'm stupid...
...which is why you're helping me, right?
*Edit
Or do you mean that you've already tried the set_graphic function and it doesn't work?
Do you mean, like, the "Change Actor Graphic" from the commands?
Sorry, I guess I'm stupid...
...which is why you're helping me, right?

*Edit
Or do you mean that you've already tried the set_graphic function and it doesn't work?
author=YuZu
Do you mean, like, the "Change Actor Graphic" from the commands?
It would be pretty much this.
Anyway, did a bit more poking around, and noticing a couple things. For one, players can move when the attack action is being performed. I don't know if that's true if weapon graphics are enabled, as part of the request was to disable them. Disabling weapon graphics was actually the easy part: it's a true/false flag right in the beginning of the Sapphire Core module.
As for changing graphics both before and after an attack command is issued, I fear I have not made too much actual progress. In my poking around, I noticed a variable that seems to be a timer involved in regards to movement, and a method that is called that decrements that timer. However, the method that is called to decrement the timer is an "update" method. Which, most probably, means that the method gets called on all movement effects. Such as pressing up on the gamepad/keyboard/whatever or a move-route sub-event-command.
I'm beginning to wonder if I might have better results if I associate the changing of graphics not with the function of attacking, but as a function of the button press that activates the attack action? I'm sorry if I'm not making much sense with this.
author=Marrend
I'm sorry if I'm not making much sense with this.
Oh, no, no! It's alright, I understand.
And you know what? I think I've changed my mind.
The way Khas' has created his script is a bit... lacking.
Believe me, I know I couldn't create a script like that, so I'm definitely not bashing the creator, but it seems like he could've included a bit more options to give the user more customization, like adding an option for pixel movement, for example.
It's just made me drop all interest with it, and now I see it as nothing but a waste of time when I could be working on something more productive.
Thank you very much for your help and I'm truly sorry for wasting your time... and mine.
-YuZu
Yeah, haha!
Bright side, right?
Anyway, maybe there is something much much more simple you could help me with if you're up for it?
By default RPG Maker VX Ace (not sure about the other versions) doesn't darken the sprite when you walk into shadows.
I know that it can be solved by parallaxing, but I can't do that for the particular map I'm working on.
Do you know if there's any way to change the shadows' "Z" level or some other way to make it so that shadows will appear above the sprites?
You seem to know your way around when it comes to scripting in VX Ace, so I assume you would know.
Thank you!
-YuZu
*Edit
I should probably say that I have tried Zeus' shadows script, but it doesn't work for me, so...
Just as a side note.
Bright side, right?

Anyway, maybe there is something much much more simple you could help me with if you're up for it?
By default RPG Maker VX Ace (not sure about the other versions) doesn't darken the sprite when you walk into shadows.
I know that it can be solved by parallaxing, but I can't do that for the particular map I'm working on.
Do you know if there's any way to change the shadows' "Z" level or some other way to make it so that shadows will appear above the sprites?
You seem to know your way around when it comes to scripting in VX Ace, so I assume you would know.
Thank you!
-YuZu
*Edit
I should probably say that I have tried Zeus' shadows script, but it doesn't work for me, so...
Just as a side note.
I definitely remember something about removing auto-shadows. Though, that could be in reference to a different RPG Maker. Possibly VX?
Anyway, if a Z coordinate for shadows exists, my guess is that it might be a property (or function) of the Game_Map class. Or, possibly, RPG::Map? I'm really hoping it's one of those!
Anyway, if a Z coordinate for shadows exists, my guess is that it might be a property (or function) of the Game_Map class. Or, possibly, RPG::Map? I'm really hoping it's one of those!
With a bit of cross-referencing to Zues' Light and Shadow script, I was able to remove shadows alltogether. Whither or not this will lead to having shadows "over" various tiles/objects is yet to be discovered/seen.
Ohh, I see.
Well, I checked Game_Map and I didn't see anything that had to do with shadows over sprites.
I also checked Spriteset_Map and I didn't see anything, although I did see "create_shadow" under "initialize" at the top. I don't think that has anything to do with the shadows on the map, though.
I dunno, I probably didn't look well enough, or maybe I just didn't know exactly what to look for, so I wouldn't be surprised if I passed it up.
How about you? Any luck?
Well, I checked Game_Map and I didn't see anything that had to do with shadows over sprites.
I also checked Spriteset_Map and I didn't see anything, although I did see "create_shadow" under "initialize" at the top. I don't think that has anything to do with the shadows on the map, though.
I dunno, I probably didn't look well enough, or maybe I just didn't know exactly what to look for, so I wouldn't be surprised if I passed it up.
How about you? Any luck?
The "create_shadow" function in Spriteset_Map is actually a reference to the shadow created by the airship while it's in flight. It has nothing to do with shadows made (or automatically generated) in the map editor.
Anyway, I must confess that I've been a bit distracted from this request! I'll show what I have so far, but keep in mind this isn't what was requested.
Anyway, I must confess that I've been a bit distracted from this request! I'll show what I have so far, but keep in mind this isn't what was requested.
class Game_Map attr_reader :auto_shadows def setup(map_id) @map_id = map_id @map = load_data(sprintf("Data/Map%03d.rvdata2", @map_id)) @tileset_id = @map.tileset_id @display_x = 0 @display_y = 0 referesh_vehicles setup_events setup_scroll setup_parallax setup_battleback init_auto_shadows @need_refresh = false end def init_auto_shadows @auto_shadows ||= [] @auto_shadows.clear data.xsize.times do |x| data.ysize.times do |y| shadow_id = data[x, y, 3] & 0b1111 data[x, y, 3] -= shadow_id next if shadow_id == 0 case shadow_id when 3; @auto_shadows << [x*32, y*32, 32, 16] when 5; @auto_shadows << [x*32, y*32, 16, 32] when 10; @auto_shadows << [x*32+16, y*32, 16, 32] when 12; @auto_shadows << [x*32, y*32+16, 32, 16] when 15; @auto_shadows << [x*32, y*32, 32, 32] else 4.times do |i| if shadow_id[i] == 1 @auto_shadows << [x*32 + i%2*16, y*32 + i/2*16, 16, 16] end end end end end end end
Concerning the animation thingie, I got this from rpgmakerweb (answer by MasterTaffer)
-----------------------------------------------------------------------------------
Place this under the line that says "@recover = @max_recover" (it's line 1451 for me, but may be different for you):
$game_switches = true
From there, set a switch that activates a common event set to autorun, and you can set up your own attack animation there using conditional branches to check which way the player is facing, and movement routes to play the animation. Just be sure to turn the switch off after the animation.
-----------------------------------------------------------------------------------
About the pixel movement, it's such an intergral part of the ABS that removing it would take incredible amounts of work so I wouldn't reccomend it...
As for the 8-dir movement, you can just take it appart and combine it with the SaS script. Just make sure you only take over the aesthetic part since @direction is used in to determine many factor in the script.
-----------------------------------------------------------------------------------
Place this under the line that says "@recover = @max_recover" (it's line 1451 for me, but may be different for you):
$game_switches = true
From there, set a switch that activates a common event set to autorun, and you can set up your own attack animation there using conditional branches to check which way the player is facing, and movement routes to play the animation. Just be sure to turn the switch off after the animation.
-----------------------------------------------------------------------------------
About the pixel movement, it's such an intergral part of the ABS that removing it would take incredible amounts of work so I wouldn't reccomend it...
As for the 8-dir movement, you can just take it appart and combine it with the SaS script. Just make sure you only take over the aesthetic part since @direction is used in to determine many factor in the script.
Pages:
1















