- Joined
- Sep 19, 2017
- Messages
- 35
- Reaction score
- 14
- First Language
- English
- Primarily Uses
- RMVXA
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?
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?
