[RMVX ACE] GUN-BASED COMBAT SYSTEM (WW1)

Posts

Pages: 1
I'm still waiting on grid paper, but I decided to get started on my combat system in the meantime. I created three characters and slapped a few enemies onto a sample map.

I need it so attacking consumes ammo. I thought of two versions:
a) Attacking uses up MP (MP would be renamed to something else) and this would represent ammunition
b) Attacking consumes ammo in the form of items.

B seems more favorable at the moment, so I created an item called "Rifle round" and created a treasure chest with 99 of them. I gave the item the animation 36: Bodyslam which does a pretty good job at representing a gunshot. (unfortunately, I haven't yet seen any other animations that are good for this. This may be a problem if I decide to have a variety of weapons)

I gave the item this damage formula:
a.atk * 4 - b.def * 2

Right now though my question is: How to change the order of the commands in battle? I want it so Items appear first.

I also need to get rid of the option to attack. In other words I want Item to replace Attack.
Isn't changing the order of battle commands a simple part of the database like it is with RM2K/3? If not then there's probably a script edit you can make that'll do it for you. For example, a quick Google search brought up this Yanfly script (https://yanflychannel.wordpress.com/rmvxa/battle-scripts/battle-command-list/) that does what you're asking but I'm not sure if you need to have the rest of Yanfly's battle-engine to use it. I'm sure someone more knowledgeable with RGSS will know.

What I did want to say is that if you're planning on making heavy use of firearms in your game then you should check out Freesound (https://www.freesound.org/) for some realistic sound-effects.
This script rules! It lets me make it so specific items show up as regular commands!

But is there a way to rename them? I could just rename the item to Attack but that would seem odd.
But maybe I should just do that. The player would go to shops and purchase "Attacks" but w/e. It sort of make sense, since that's pretty much all the bullets are for.

The great thing about removing the normal attack option is it lets me design various rifles as weapons, and they'll ALL require 1 bullet to use all because there will be no way to attack with them.

One downfall with this idea is that Attacks will still show up in Items. One way to avoid this is by making it so all battle show up in the main command window, or can only be used outside of battle.
One of the notes within the code says this:
# <command name: string>
# If this item is being used as a command, it will use "string" to replace the
# item's name in the command list window.
I don't know RGSS, but what I gather from this is that you need to put <command name: Attack> into the item notebox in the database. That should solve your problem.

To solve the problem of ammunition being usable from the normal item window during battle, couldn't you simply set them so that they can't be used during battles? Since I don't use VXA, I have no idea whether or not they'd still show up in the item window if you do this, but it would probably be good if your player could check how much ammunition they have left during battle..?
To solve the problem of ammunition being usable from the normal item window during battle, couldn't you simply set them so that they can't be used during battles?

I gave it a try just now, but the item just ends up being grayed out.
I thought that might happen. For me, it kinda makes sense for them to be there in a greyed-out fashion; they can't be used in battle on their own as they have to be used in conjunction with a gun, but they're still something that you're carrying and so should be on the list.
I don't know of any way to make the game know whether you are equipping a gun and preventing you from using a bullet if you aren't.

I can't force the player to equip guns either. One solution is to make the base attack of the player 0, and all attack stats are added by the gun. So if the player attempts to use the bullet on its own, it does 0 damage. (or automatically misses)

EDIT: freesounds.org has great gun sounds but I don't know how to use them in battles. The sound effects for weapons are currently tied to animations so what I basically need are new animations that would work for guns.

Having a wilhelm scream would be a great though, I have MANY ideas for that.
The script allows you to only have a command appear if a switch is turned on. You can manipulate this so that the command will only appear when a specific item is equipped.

Create a Common Event -> Parallel Process that checks each characters equipment. Have it turn on a switch if they have a gun equipped and turn off a switch if they do not. The command won't appear if they don't have a gun equipped.

The code for the Common Event would be similar to this: http://rpgmaker.net/tutorials/129/

EDIT:

There is probably a more nuanced, direct way of doing this using RGSS. Like I've said, I don't really know RGSS so I can't help you if you want a script-based method.
Today I tried the opposite approach: Using MP as ammo. However I ran into a few problems, namely the fact there is seemingly no way to rename "Magic" to something like "Weapon". Well, there are a slew of other issues, but I guess it being called Magic is the dealbreaker. I can't have using a gun to be called "Magic".

I also found out about a script called Asagi's Gun License so I installed it. Will be giving it an attempt.
EDIT: I have no idea how to use this script.

Wait, I have an idea. What if I make it so rifle grants the use of items?
But this is impossible...

EDIT: Voila!
http://cobbtocs.co.uk/wp/?p=423
It's all coming together!

I also made a really sweet rifle sound effect and animation in the animations tab!
Pages: 1