Save-Point

Full Version: Save-Point
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Board Message
Sorry, you do not have permission to access this resource.
Save-Point - one screen ammo counter for multiple ammo types

Save-Point

Full Version: one screen ammo counter for multiple ammo types
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was hoping to have different types of ammo in my fps rpg like shotgun shells, bullets, rockets and plasma I already have a working ammo system made by someone called Syn but what I would like is the ability to show my different amounts of ammo on screen so a script which shows how many of each item at all time including battle
here is a screenshot of my game I would prefer the text to the side just under the E counter
http://i229.photobucket.com/albums/ee233...f3a8aa.jpg

EDIT
this is what i would love I just did this in photoshop quickly
http://i229.photobucket.com/albums/ee233...20db94.jpg

EDIT AGAIN
ok here is the ammo script it just uses normal items from your inventory as ammo


#============================================================================# Syn's Ammo Requirements #----------------------------------------------------------------------------# Written by Synthesize# Version 1.00# August 15, 2007# Tested with SDK 2.1#============================================================================#----------------------------------------------------------------------------# Customization Section#----------------------------------------------------------------------------moduleAmmo# Format = {weapon_id => Ammo_cost}Range_weapons_id={33=>1,34=>3,35=>3,36=>2,37=>1,38=>1}# Format = {weapon_id => Item_idRange_ammo_id={33=>48,34=>50,35=>50,36=>48,37=>50,38=>50}# Format = {skill_id => Ammo_cost}Skill_ammo={92=>1,93=>1}# Note on Skills: When using Skills the Current Ammo for the equipped# weapon will be used. So if Skill 73 is used and Weapon 17 is equipped# then Ammo #33 will be used.end#----------------------------------------------------------------------------# Begin Scene_Battle#----------------------------------------------------------------------------classScene_Battle# Alias Methodsalias syn_scene_battle_range make_basic_action_result
alias syn_scene_battle_skill make_skill_action_result
#----------------------------------------------------# Alias the Attacking method#----------------------------------------------------def make_basic_action_result
# Gather the current Ammo Cost
gather_ammo_cost =Ammo::Range_weapons_id[@active_battler.weapon_id]# Gather the Current Ammo
gather_ammo =Ammo::Range_ammo_id[@active_battler.weapon_id]# Check if the Active Battler is attacking and if they are using a ranged weaponif@active_battler.current_action.basic ==0andAmmo::Range_weapons_id.has_key?(@active_battler.weapon_id)# Check the Ammo Countif $game_party.item_number(gather_ammo)>= gather_ammo_cost
# Sufficient Ammo, remove item
$game_party.lose_item(gather_ammo,gather_ammo_cost)
syn_scene_battle_range
else# Insufficient Ammo@help_window.set_text("#{@active_battler.name} cannot attack due to insufficient Ammo",1)end# Call Default Codeelse
syn_scene_battle_range
endend#----------------------------------------------------# Alias the Skill method#----------------------------------------------------def make_skill_action_result
# Gather the current Ammo Cost
gather_ammo_cost =Ammo::Skill_ammo[@active_battler.current_action.skill_id]# Gather Ammo
gather_ammo =Ammo::Range_ammo_id[@active_battler.weapon_id]# Check if the Actor is using a defiend skillifAmmo::Skill_ammo.has_key?(@active_battler.current_action.skill_id)# Check if Ammo is presentif $game_party.item_number(gather_ammo)>= gather_ammo_cost
# Sufficient Ammo, remove item
$game_party.lose_item(gather_ammo,gather_ammo_cost)# Call Default Code
syn_scene_battle_skill
else# Set Window; Do Nothing@help_window.set_text("#{@active_battler.name} cannot attack due to insufficient Ammo",1)end# Otherwise SKip the check and call default codeelse
syn_scene_battle_skill
endendend#============================================================================# Written by Synthesize# Special Thanks: ~Emo~ for the request#----------------------------------------------------------------------------# Ammo Requirements#============================================================================


at the part of the script were it says Format = {weapon_id => Item_id

Range_ammo_id = {33 => 48, 34 => 50, 35 => 50, 36 => 48, 37 => 50, 38 => 50}

what that is doing is saying what gun uses what ammo so weapon 33 is
shotgun it uses 48 item which is shotgun shell so my items are

48 shotgun shells

50 bullets

55 plasma

56 rockets



if you could create a script which constantly shows those item amounts on screen i would be forever in your debt





#============================================================================# Syn's Ammo Requirements #----------------------------------------------------------------------------# Written by Synthesize# Version 1.00# August 15, 2007# Tested with SDK 2.1#============================================================================#----------------------------------------------------------------------------# Customization Section#----------------------------------------------------------------------------moduleAmmo# Format = {weapon_id => Ammo_cost}Range_weapons_id={33=>1,34=>3,35=>3,36=>2,37=>1,38=>1}# Format = {weapon_id => Item_idRange_ammo_id={33=>48,34=>50,35=>50,36=>48,37=>50,38=>50}# Format = {skill_id => Ammo_cost}Skill_ammo={92=>1,93=>1}# Note on Skills: When using Skills the Current Ammo for the equipped# weapon will be used. So if Skill 73 is used and Weapon 17 is equipped# then Ammo #33 will be used.end#----------------------------------------------------------------------------# Begin Scene_Battle#----------------------------------------------------------------------------classScene_Battle# Alias Methodsalias syn_scene_battle_range make_basic_action_result
alias syn_scene_battle_skill make_skill_action_result
#----------------------------------------------------# Alias the Attacking method#----------------------------------------------------def make_basic_action_result
# Gather the current Ammo Cost
gather_ammo_cost =Ammo::Range_weapons_id[@active_battler.weapon_id]# Gather the Current Ammo
gather_ammo =Ammo::Range_ammo_id[@active_battler.weapon_id]# Check if the Active Battler is attacking and if they are using a ranged weaponif@active_battler.current_action.basic ==0andAmmo::Range_weapons_id.has_key?(@active_battler.weapon_id)# Check the Ammo Countif $game_party.item_number(gather_ammo)>= gather_ammo_cost
# Sufficient Ammo, remove item
$game_party.lose_item(gather_ammo,gather_ammo_cost)
syn_scene_battle_range
else# Insufficient Ammo@help_window.set_text("#{@active_battler.name} cannot attack due to insufficient Ammo",1)end# Call Default Codeelse
syn_scene_battle_range
endend#----------------------------------------------------# Alias the Skill method#----------------------------------------------------def make_skill_action_result
# Gather the current Ammo Cost
gather_ammo_cost =Ammo::Skill_ammo[@active_battler.current_action.skill_id]# Gather Ammo
gather_ammo =Ammo::Range_ammo_id[@active_battler.weapon_id]# Check if the Actor is using a defiend skillifAmmo::Skill_ammo.has_key?(@active_battler.current_action.skill_id)# Check if Ammo is presentif $game_party.item_number(gather_ammo)>= gather_ammo_cost
# Sufficient Ammo, remove item
$game_party.lose_item(gather_ammo,gather_ammo_cost)# Call Default Code
syn_scene_battle_skill
else# Set Window; Do Nothing@help_window.set_text("#{@active_battler.name} cannot attack due to insufficient Ammo",1)end# Otherwise SKip the check and call default codeelse
syn_scene_battle_skill
endendend#============================================================================# Written by Synthesize# Special Thanks: ~Emo~ for the request#----------------------------------------------------------------------------# Ammo Requirements#============================================================================

at the part of the script were it says Format = {weapon_id => Item_id

Range_ammo_id = {33 => 48, 34 => 50, 35 => 50, 36 => 48, 37 => 50, 38 => 50}

what that is doing is saying what gun uses what ammo so weapon 33 is
shotgun it uses 48 item which is shotgun shell so my items are

48 shotgun shells

50 bullets

55 plasma

56 rockets



if you could create a script which constantly shows those item amounts on screen i would be forever in your debt






also I have been using a hud
script which shows health magic and experience on the map it might be
helpful to you and again super sorry about not posting this before






classWindow_YourHUD<Window_Basedef initialize
super(0,0,640,64)self.opacity =0self.contents =Bitmap.new(640-32,64-32)
refresh
enddef refresh
self.contents.clear
reset_variables
returnif!@actor
draw_actor_hp(@actor,0,0)
draw_actor_sp(@actor,300,0)
draw_actor_exp(@actor,500,0)enddef reset_variables
@actor= $game_party.actors[0]@old_hp=@actor?@actor.hp :0@old_maxhp=@actor?@actor.maxhp :0@old_sp=@actor?@actor.sp :0@old_maxsp=@actor?@actor.maxsp :0enddef update
super
refresh if(@actor= $game_party.actors[0]or@old_hp=@actor?@actor.hp :0or@old_maxhp=@actor?@actor.maxhp :0or@old_sp=@actor?@actor.sp :0or@old_maxsp=@actor?@actor.maxsp :0)endendclassScene_Mapalias yourhud_main main
alias yourhud_update update
def main
@yourhud=Window_YourHUD.new
yourhud_main
@yourhud.dispose
enddef update
@yourhud.update
yourhud_update
endend