Ok. First.
Don't edit the default code. I know I said it before but it's really important to get that concept. Otherwise I have to spend time digging your code out from the original code. It's a lot less fun than it sounds. So create a new project. Or copy the Scripts.rxdata from unaltered game directory and paste it into this one. If you want to stick with your current project. You need to replace the classes you messed with for me to help. Those classes are as far as I know,
Window_Status, and
Game_Actor. Second. You need to realize there isn't a database entry for coin throwing built into the game. That just means that when you open your project and the database there's no Coin Throwing statistic. In your code you seem to suggest the opposite. For example you have a method in Game_Actor:
#--------------------------------------------------------------------------
# * Get Basic Maximum KHT
#--------------------------------------------------------------------------
def base_maxkht
return $data_actors[@actor_id].parameters[0, @level]
end
This code will get you the actor's hp.
That's not what you want. So the real question is how to include an extra stat. There's a couple ways to do this but I'm going to take you down lazy lane and use the $game_variables. You are responsible for their upkeep and modifications. But it's simple and easy to understand. We will need a couple of these in a row. One for each actor in your database. You just need to know which index you want to start at. For example let's say kht values begin at index 30. With a default project that means 8 actors so from index 30 to 38 will be your kht values. $game_variables[31] will give you the kht of actor 2. Insert an empty section above Main in the script listing and paste in this code:
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Constant Variables
#--------------------------------------------------------------------------
START_KHT_INDEX = 30
#--------------------------------------------------------------------------
# * Get KHT
#--------------------------------------------------------------------------
def base_kht
return [[$game_variables[START_KHT_INDEX + (@actor_id - 1)], 0].max, 99].min
end
end
That code above will append onto the class
Game_Actor an additional method called base_kht. See we don't need to edit the original code to do it either.
Next is
Window_Status. Again we don't need to override the original code we can actually alias the refresh method. Aliasing preserves the old code so that we don't destroy it when we redefine the method. You can paste this code right below the Game_Actor code I gave you above or create another empty section above Main and paste in the code.
#==============================================================================
# ** Window_Status
#------------------------------------------------------------------------------
# This window displays full status specs on the status screen.
#==============================================================================
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# * Alias Methods
#--------------------------------------------------------------------------
alias helo_cointhrowing_window_status_refresh refresh
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
helo_cointhrowing_window_status_refresh
self.contents.font.color = system_color
self.contents.draw_text(320, 16, 80, 32, "Kolikon Heitto Taito:")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 80, 16, 84, 32, @actor.base_kht.to_s, 2)
end
end
If you are still confused about script installation refer to the FAQ. If you have any others questions let me know. Don't forget that the responsibility of manipulating the KHT values is on your shoulders. So use the "Control Variables" event command wisely.
Good luck with it Helomaa! :thumb: