RPG Maker Forums

Hello everyone --

I had an idea pop into my head about converting the existing TP system in RPG Maker to an Ammo system, where the max ammo you can have is based on the type of gun you are carrying in addition to a melee weapon. In effect, I'm replacing the "shields" with a ranged weapon, which upon equip comes with its own skill set + unique abilities related to that ranged weapon (ie single shots, barrages, etc) and the normal weapon slot is repurposed for a melee weapon (knife, baton, whip, broom handle, whatever). Although the TP itself is a neat little system, I want to do something a little different and yet, not let the TP go to waste, as it were.

Here's what code I have so far, but unfortunately, I did not account for the fact that enemies can use TP too, so it's causing my "break me" project to crash when loading battles; honestly, I don't think I'm doing this right at all.

def max_tp
if $game_actors[1]
if $game_actors[1].equips[1] && left_hand.id.name.eql?("Pistol")
return 12
elsif $game_actors[1].equips[1] && left_hand.id.name.eql?("Rifle")
return 50
elsif $game_actors[1].equips[1] && left_hand.id.name.eql?("Machine Gun")
return 100
end
else
return 100
end
end

My goals for this system will be this, eventually:

The TP will be regenerated via a skill called Reload, which will cause the character to essentially lose a turn while they do so via a Reload debuff. The TP will be restored to the maximum the gun will allow (12, 50, or 100 respectively). At this time, due to the complexity, I'm going to leave the ammo unlimited, but I would eventually like for the system to check an outside variable to see if ammo is available and to refill the TP accordingly. As far as enemies, like all normal shooters, they'll have max Ammo, and in developing my Rpgs I never create abilities that cost the enemy to use TP anyway.

Is such a thing even possible, and if so, what scripts to I have to change in addition to the one listed above?

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top