Need Help With a Major Change to the TP System

Cougarmint

Veteran
Veteran
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?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts



I've been experimenting with improved memory management again, which allowed me to include items to increase player path length. These are both 44 grid spaces long, and stable. :LZSexcite:
I FINALLY DID IT! 5 years making my very first game and I just officially released it on STEAM..... OMG..... I can say I finished a game! The feelings!!!!!
Stream will be live shortly! I am going to be playing some Among Us! Feel free to drop by!
Ami
tv program always get the ratings (it's the reason why drama series has 1000+ episode),also full and nonsense of censorship (weird blur, a scene getting cut because the unconvenient viewer,but it unconvenient to me either. you never see what the original is)

i know the reason is to take cover the viewer from the negative thing,but i just laughing and mocking of them that they're always suck :guffaw:
Star Chart Idea - Just something I am working on.

Forum statistics

Threads
104,460
Messages
1,006,438
Members
135,966
Latest member
Kleik
Top