Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

My Scripts

Status
Not open for further replies.
Tiberian Scripts

I don't feel like posting a ton of topics for these, so I'm just giving a link to my site. It's only temporary, but it'll do for now, lol. Each time I make a new script, I'll post it it there. I can take requests if you follow the link there that says "I take requests" :D

So, enjoy! And I'd like feedback if you have any, lol
 
I was wondering if you could take requests here, becasue I really wouldn't like to sign up at another forum to do so. Becasue am in need of a script that I think you could do.:D :D
 

Kraft

Sponsor

Wow, they are great!

One question though, could you explain a little better how to use the NPC interactions script?
I cant figure it out, and I would really like to use it.

Kraft
 
Ok, thanks. Tell me if if this is possible for you.

I need an ammunition script. I need it so that you have bullets in your inventory, and every time you attack it spends one of those bullets. When you run out of bullets, the Attack option is disabled, and the skills that require bullets are disabled as well. He can then only use skills that are grenades and his knife.

If this is too tough for you, I can try and event most of it except for disabling and what not, so...Thanks so much if you can do it. If you want anything in return, then I can do a couple a things for you, we can decide later.
 
well, to make an event that leads to an npc, call the script "$scene = Scene_NPC.new(npd_ic)" where npc_id is the id (lol). Name the event "NPCX" but replace x with the id of the npc. To make NPCs, follow the template in game_npc. it explains how to make them. you can also make random npcs with rand_npc(level), which im gonna make better soon, right now it's kinda limited... thats also explained in there i tihnk

@everythingisbleeding: I think i can do that, gimme some time, and i'll have it ready in a little while.
 
Hello everyone! How you doin'? Hope OK! :D
Tiberius_XXVII your scripts are BEAUTIFUL!
I must congratulate you for these babies :lol: !
Anyway, I just wanted to know how to change the background in the mining and herb scripts.When I start the minigame, the background is all black, and the windows are in the middle. I don't like that. I want the background to be the map (map as background).

I hope you understand and help me here! I hope you continue with such beautiful scripts! :satan-cheezy:

Love ya'
-FrozenCard
 

Taylor

Sponsor

I like the look of this Bank script, except I'm using a CMS that alters the Load and Save scenes, wouldn't it be better to place all the changes in one script?
 
Frozen Card: ROFL, this was easier than I though! Just add "@spriteset = Spriteset_Map.new" right under "def main" in Scene_Herb, and "@spriteset.dispose" under "@time_window.dispose"

it should work the same way in the mining scene

Jirbytaylor: There are different scripts that had to be modified to get it to work, so you would need to add the lines that it says to add from mine into your new save/load things by looking at the where they are according to the normal code, you should be able to find out where to put them in your scripts. I hope...

Everythingisbleeding: I have it working, with one problem. If you have one ammo, and two people use that ammo, you can tell them both to attack because they will see that there is ammo left, but after one really does attack, there is no ammo left for the other one, so he does nothing. is that okay? if i change it, the script will become a little more complicated

BTW, thx everyone for the feedback, I'm glad that people enjoy my work! :D
 
Man! I LOVE YOU!!!
Those things worked perfectly, now I have your script the way I like it! :D
Thanks a million, you shall be in my credits for sure!!! ;)

I had a question about the mining script...
How do I set up different mining windows?

For example, I want Mining Event #1 to be 12 height, 8 width, a rarity of 5 and a difference of 4. Now, I want Mining Event #2 to be 25 height, 18 width, a rarity of 10 and a difference of 3.

I hope you understand my question, thanx in advance :D


EXTRA[/FONT] = Please keep producing those wonderful and well planned scripts you make. I absolutely love them. Keep making mini games, you're a gem in mini game making! Hope everything goes OK! ;)

Love ya'
-FrozenCard
 

munin

Member

Wow, I really like your scripts Tiberius. I think I'm going to use most, if not all of them. I'll have to test them first, though.
 
whoooa! your minigames are great!!
i am gonna use them all!


edit:---> Lovecraft :the movement speed of the actor in the pong minigame is based on the dexterity points of actor 1
,thats why the tiberian pong is the best!!
 
Everyone: Thanks a ton for your support!

FrozenCard: $scene = Scene_Mining.new(items available, rarity, difficulty, width, hieght)
so $scene = Scene_Mining.new([[1, 1]], 5, 3, 6, 8) makes potions with 5% chance in each block, 3 rock types (difficulty), and is 6 by 8

panchokoster: thx, and thx for answering the question so i dont have to, lol. :D
 
Yeah!

Thanks again Legendary Pyrokinetic Crusader Tiberius_XXVII!

This worked perfectly, as always!

I owe you various :D !
-Love ya'
FrozenCard
 
Here's the ammo script, just make a new script and paste this into it, and if you know anything about how scripts work, you can through the edits and cut and paste the new stuff into the normal ones, saving space...

Code:
#==============================================================================
#     Game_Ammo
#------------------------------------------------------------------------------
#     Stores and gives info on ammunitions.
#==============================================================================

class Game_Ammo
  #--------------------------------------------------------------------------
  #    Initialize
  #--------------------------------------------------------------------------
  def initialize
    #YOU CAN EDIT WHAT IS BELOW
    #For each of the arrays below, you need to fill them with sub arrays in this format:
          #[weapon/skill id, item ammo id]
    #Weapon example: @w_ammo = [[1, 1], [2, 1], [3, 2]] woould make it so weapon 1 (bronze sword)
          #needs item 1 (potions) as its ammo, weapon 2 (iron sword) also uses potions for ammo.
          #weapon 3 (steel sword) uses item 2 (high potions) for ammo.
    #Skill example: @w_ammo = [[1, 1], [2, 1], [3, 2]] woould make it so skill 1 (heal)
          #needs item 1 (potions) as its ammo, skill 2 (heal force) also uses potions for ammo.
          #skill 3 (heal omega) uses item 2 (high potions) for ammo.
    @w_ammo = [[1, 1], [5, 1]] #Weapon Ammo Array
    @s_ammo = [[57, 1]] #Skill Ammo Array
    #STOP EDITING    
    setup
  end
  #--------------------------------------------------------------------------
  #    Weapon Ammo ID
  #--------------------------------------------------------------------------
  def w_ammo_id(weapon_id)
    id = @weapons.index(weapon_id)
    if id == nil
      return 0
    end
    return @w_ammo[id]
  end
  #--------------------------------------------------------------------------
  #    Skill Ammo ID
  #--------------------------------------------------------------------------
  def s_ammo_id(skill_id)
    id = @skills.index(skill_id)
    if id == nil
      return 0
    end
    return @s_ammo[id]
  end
  #--------------------------------------------------------------------------
  #    Set Up
  #--------------------------------------------------------------------------
  def setup
    @weapons = []
    @skills = []
    for i in 0...@w_ammo.size
      @weapons.push(@w_ammo[i][0])
      @w_ammo[i] = @w_ammo[i][1]
    end
    for i in 0...@s_ammo.size
      @skills.push(@s_ammo[i][0])
      @s_ammo[i] = @s_ammo[i][1]
    end
  end
end



#EDITS START HERE

class Game_Actor < Game_Battler
  def skill_can_use?(skill_id)
    if not skill_learn?(skill_id)
      return false
    end
    #NEW
    ammo_id = $game_ammo.s_ammo_id(skill_id)
    if ammo_id > 0
      return false if $game_party.item_number(ammo_id) < 1
    end
    #END NEW
    return super
  end
end

class Scene_Title
  def main
    if $BTEST
      battle_test
      return
    end
    $data_actors        = load_data("Data/Actors.rxdata")
    $data_classes       = load_data("Data/Classes.rxdata")
    $data_skills        = load_data("Data/Skills.rxdata")
    $data_items         = load_data("Data/Items.rxdata")
    $data_weapons       = load_data("Data/Weapons.rxdata")
    $data_armors        = load_data("Data/Armors.rxdata")
    $data_enemies       = load_data("Data/Enemies.rxdata")
    $data_troops        = load_data("Data/Troops.rxdata")
    $data_states        = load_data("Data/States.rxdata")
    $data_animations    = load_data("Data/Animations.rxdata")
    $data_tilesets      = load_data("Data/Tilesets.rxdata")
    $data_common_events = load_data("Data/CommonEvents.rxdata")
    $data_system        = load_data("Data/System.rxdata")
    #NEW
    $game_ammo = Game_Ammo.new
    #END NEW
    $game_system = Game_System.new
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.title($data_system.title_name)
    s1 = "New Game"
    s2 = "Continue"
    s3 = "Exit"
    @command_window = Window_Command.new(192, [s1, s2, s3])
    @command_window.back_opacity = 160
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 288
    @continue_enabled = false
    for i in 0..3
      if FileTest.exist?("Save#{i+1}.sav")
        @continue_enabled = true
      end
    end
    if @continue_enabled
      @command_window.index = 1
    else
      @command_window.disable_item(1)
    end
    $game_system.bgm_play($data_system.title_bgm)
    Audio.me_stop
    Audio.bgs_stop
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @sprite.bitmap.dispose
    @sprite.dispose
  end
end

class Scene_Battle
    def phase3_setup_command_window
    @party_command_window.active = false
    @party_command_window.visible = false
    @actor_command_window.active = true
    @actor_command_window.visible = true
    #NEW
    @actor_command_window.refresh
    ammo_id = $game_ammo.w_ammo_id(@active_battler.weapon_id)
    if ammo_id > 0
      @actor_command_window.disable_item(0) if $game_party.item_number(ammo_id) < 1
    end
    #END NEW
    @actor_command_window.x = @actor_index * 160
    @actor_command_window.index = 0
  end
  def update_phase3_basic_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      phase3_prior_actor
      return
    end
    if Input.trigger?(Input::C)
      case @actor_command_window.index
      when 0
        #NEW
        ammo_id = $game_ammo.w_ammo_id(@active_battler.weapon_id)
        if ammo_id > 0
          if $game_party.item_number(ammo_id) < 1
            $game_system.se_play($data_system.buzzer_se)
            return
          end
        end
        #END NEW
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 0
        start_enemy_select
      when 1
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 1
        start_skill_select
      when 2
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 1
        phase3_next_actor
      when 3
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 2
        start_item_select
      end
      return
    end
  end
  def make_basic_action_result
    if @active_battler.current_action.basic == 0
      @animation1_id = @active_battler.animation1_id
      @animation2_id = @active_battler.animation2_id
      if @active_battler.is_a?(Game_Enemy)
        if @active_battler.restriction == 3
          target = $game_troop.random_target_enemy
        elsif @active_battler.restriction == 2
          target = $game_party.random_target_actor
        else
          index = @active_battler.current_action.target_index
          target = $game_party.smooth_target_actor(index)
        end
      end
      if @active_battler.is_a?(Game_Actor)
        #NEW
        ammo_id = $game_ammo.w_ammo_id(@active_battler.weapon_id)
        if ammo_id > 0
          if $game_party.item_number(ammo_id) > 0
            $game_party.lose_item(ammo_id, 1)
          else
            @help_window.set_text("No ammo! Defending instead...", 1)
            @active_battler.current_action.basic = 1
            return
          end
        end
        #END NEW
        if @active_battler.restriction == 3
          target = $game_party.random_target_actor
        elsif @active_battler.restriction == 2
          target = $game_troop.random_target_enemy
        else
          index = @active_battler.current_action.target_index
          target = $game_troop.smooth_target_enemy(index)
        end
      end
      @target_battlers = [target]
      for target in @target_battlers
        target.attack_effect(@active_battler)
      end
      return
    end
    if @active_battler.current_action.basic == 1
      @help_window.set_text($data_system.words.guard, 1)
      return
    end
    if @active_battler.is_a?(Game_Enemy) and
       @active_battler.current_action.basic == 2
      @help_window.set_text("逃げる", 1)
      @active_battler.escape
      return
    end
    if @active_battler.current_action.basic == 3
      $game_temp.forcing_battler = nil
      @phase4_step = 1
      return
    end
  end
  def make_skill_action_result
    @skill = $data_skills[@active_battler.current_action.skill_id]
    unless @active_battler.current_action.forcing
      unless @active_battler.skill_can_use?(@skill.id)
        $game_temp.forcing_battler = nil
        @phase4_step = 1
        return
      end
    end
    @active_battler.sp -= @skill.sp_cost
    #NEW
    if @active_battler.is_a?(Game_Actor)
      ammo_id = $game_ammo.s_ammo_id(@skill.id)
      if ammo_id > 0
        $game_party.lose_item(ammo_id, 1)
      end
    end
    #END NEW
    @status_window.refresh
    @help_window.set_text(@skill.name, 1)
    @animation1_id = @skill.animation1_id
    @animation2_id = @skill.animation2_id
    @common_event_id = @skill.common_event_id
    set_target_battlers(@skill.scope)
    for target in @target_battlers
      target.skill_effect(@active_battler, @skill)
    end
  end
end
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top