Hello everybody, I'm hoping this is a pretty simple request.
What I'm looking for is - I think - simple. I want to display 4 digits on screen. I have found scripts that display variables, but they use some sort of auto-generated engine font that frankly looks hideous. That's why I made my own Pictures of numbers to display. 0.Png all the way to 9.Png and attempted eventing... until I had ABS troubles.
I want a script that knows which picture to put when appropriate, for all 4 digits. My ammo counter maxes at 1000 carried, so I don't need the 1000s digit to support anything but 1 and 0.
Here is the event, although I imagine this will hurt the eyes more than help:
I'll also include my ammo tally script which I had requested from a user long ago. If you can incorporate the display into this script, bonus points. Simply put, it checks which gun I have equipped, counts the corresponding ammo, and turns it into that variable.
The ability to easily tweak X and Y coordinates of the digits is also a plus! All digits follow the same naming convention x.png which x being the digit. If you need these .pngs to make the script I will gladly send.
Also a very strange need, but as you can see in the above image, the 1 and 0 in the 1000s digit are offset by 2 pixels. I'd like to maintain this but ONLY for the 1000s digit.
If anybody could help it would be greatly appreciated.
Let me preface by saying that I understand this can be evented, in fact I have done so. However I need real-time updating, and unfortunately any parallel common event with anything less than a 60 frame delay clashes with the ABS I'm using. It seems that when scripted, these functions do not clash as I have had other parallels ported over to scripts. For some reason when evented, my ABS becomes unable to use Self Switches to deactivate enemies, leaving them half de-spawned on the screen but never flipping the page over. If I disable the common event, or set it's delay phase anywhere over 60, the problem ceases - but then I lose real-time updating, which is necessary for accurate ammo count.
What I'm looking for is - I think - simple. I want to display 4 digits on screen. I have found scripts that display variables, but they use some sort of auto-generated engine font that frankly looks hideous. That's why I made my own Pictures of numbers to display. 0.Png all the way to 9.Png and attempted eventing... until I had ABS troubles.
I want a script that knows which picture to put when appropriate, for all 4 digits. My ammo counter maxes at 1000 carried, so I don't need the 1000s digit to support anything but 1 and 0.
Here is the event, although I imagine this will hurt the eyes more than help:
I'll also include my ammo tally script which I had requested from a user long ago. If you can incorporate the display into this script, bonus points. Simply put, it checks which gun I have equipped, counts the corresponding ammo, and turns it into that variable.
Code:
# Ammo Updater
# by ???nOBodY???
# Requested By: Revival
AMMO_VARIABLE = 777
AMMOS = {
# weapon_ID => AmmoID
#----------------------------------------------------------------------------------------------------------------#
#Ammo key
#----------------------------------------------------------------------------------------------------------------#
#Standard = 60
#Heavy = 61
#Arrows = 62
#Hunter = 63
#RVN Missiles = 64
#----------------------------------------------------Standard Weapons-------------------------------------#
1 => 60, #Raven#
2 => 60, #Falcon#
3 => 60, #Harbinger#
4 => 60, #GX MG#
5 => 60, #Plasma Shotgun#
6 => 60, #Daniken Shotgun#
7 => 60, #Plaga#
8 => 60, #Vespid#
9 => 60, #Siren#
}
#Frames to wait before updating
UPDATE_DELAY = 0
#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# This class handles maps. It includes event starting determinants and map
# scrolling functions. The instance of this class is referenced by $game_map.
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias ammoGauge_initializer initialize
def initialize
ammoGauge_initializer
@ammoCounter = 0
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias ammoGauge_updater update
def update
ammoGauge_updater
if @ammoCounter >= UPDATE_DELAY
actor = $game_party.members[0]
weapon = actor.weapons[0]
if weapon.nil?
$game_variables[AMMO_VARIABLE] = 0
return
else
a = AMMOS[weapon.id]
if a.nil?
$game_variables[AMMO_VARIABLE] = 0
return
else
$game_variables[AMMO_VARIABLE] = $game_party.item_number($data_items[a])
end
end
@ammoCounter = 0
else
@ammoCounter += 1
end
end
end
The ability to easily tweak X and Y coordinates of the digits is also a plus! All digits follow the same naming convention x.png which x being the digit. If you need these .pngs to make the script I will gladly send.
Also a very strange need, but as you can see in the above image, the 1 and 0 in the 1000s digit are offset by 2 pixels. I'd like to maintain this but ONLY for the 1000s digit.
If anybody could help it would be greatly appreciated.