Notice: fwrite(): Write of 59 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96

Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
[AVAILABLE] Accessories that grant elemental attack.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

[AVAILABLE] Accessories that grant elemental attack.

Started by Erk64, December 14, 2007, 07:17:10 AM

0 Members and 2 Guests are viewing this topic.

Erk64

Modern Algebra suggested that I move my request to this board, so here it is.

My original post:
Quote from: Erk64I was trying to create a series of items that could be equipped as armor accessories, and each one would grant a different element to the player's attack. But just as I was about to put them into the game, I realized that armors don't seem capable of bestowing an elemental attack...only an elemental defense. Is there any way of doing this? I don't want to make these items into weapons. Thanks in advance.

Modern Algebra's post:
Quote from: modern algebraWell, you could do it with a script easily. I don't know if it is possible through the database though. It doesn't really make sense to have armor give attack bonuses though, and since it is not generally applicable, I don't think I will make it. However, post a request in the Scripts Request section. It is an easy script and maybe someone will make it for you.

I understand that it's an unusual request, but I would really appreciate it if someone could lend me a hand.
[spoiler=My Game Recommendations] 1) Demon Gate --- A great game with a terrific character-relationship system, an engaging story, and plenty of secrets and options for players who wish to be good/evil.
http://www.raizap.com/demongate/

2) Midnight --- A survival-horror game created with RPG Maker XP. Combat plays out in the smoothest running real-time battle system I have seen yet.
http://rmrk.net/index.php/topic,23239.0.html

3) The Healer --- A charming game with beautiful mapping and a fun battle system. One of the few games to use a healer as a main character, and so far it's pulled off well.
http://rmrk.net/index.php/topic,23524.0.html[/spoiler]

Kitten

Too back you up, Kitten would Also like this, if you would make it modern, I'd send you some cookies?

modern algebra

Quote from: Kitten on December 14, 2007, 10:08:03 AM
Too back you up, Kitten would Also like this, if you would make it modern, I'd send you some cookies?

I don't believe you will follow through with that promise.

Erk64

So.... If anyone can help me with this, I could still really use the help. It's kind of holding me back.
[spoiler=My Game Recommendations] 1) Demon Gate --- A great game with a terrific character-relationship system, an engaging story, and plenty of secrets and options for players who wish to be good/evil.
http://www.raizap.com/demongate/

2) Midnight --- A survival-horror game created with RPG Maker XP. Combat plays out in the smoothest running real-time battle system I have seen yet.
http://rmrk.net/index.php/topic,23239.0.html

3) The Healer --- A charming game with beautiful mapping and a fun battle system. One of the few games to use a healer as a main character, and so far it's pulled off well.
http://rmrk.net/index.php/topic,23524.0.html[/spoiler]

Leon_Westbrooke

Here you go.  The instructions are in with the script at the top.  Just follow those and it should work.

[spoiler=code]
#===============================================================================
#  Elemental Attack Accessories v. 1.0
#    by Leon_Westbrooke
#-------------------------------------------------------------------------------
#  Allows accessories to give elemental attack(s).
#
#  Instruction:
#    -Place above main, but below any scripts that alter the method 'element_set'.
#    -In the method, where it says Elemental_Acc, below that, follow the example
#      in the comments.
#
#  Notes:
#    -Allows a crossover for Guillaume777's Multislot script.  To use it, set
#      Multislot_Script equal to true.
#
#  Compatability:
#    -It is compatible with any script that does NOT alter the method element_set
#     for the Game_Actor class.
#===============================================================================
module EAtk_Acc
  #-----------------------------------------------------------------------------
  #  Elemental_Acc = {
  #    accessory_id1 => [element_id, element_id],
  #    accessory_id2 => [element_id], etc
  #-----------------------------------------------------------------------------
  Elemental_Acc = {
  25 => [4, 7],
  26 => [5]
  }
 
  Multislot_Script = false
end


class Game_Actor
  def element_set
    ea = EAtk_Acc
    new_element_set = []
    if ea::Multislot_Script == false
      weapon = $data_weapons[@weapon_id]
      if weapon != nil
        new_element_set = weapon.element_set
      end
      if @armor4_id != nil
        if ea::Elemental_Acc.keys.include?(@armor4_id)
          for i in 0...ea::Elemental_Acc[@armor4_id].size
            unless new_element_set.include?(ea::Elemental_Acc[@armor4_id][i])
              new_element_set.push(ea::Elemental_Acc[@armor4_id][i])
            end
          end
        end
      end
    else
      weapon = self.get_weapon_data
      if weapon != nil
        new_element_set = weapon.element_set
      end
      for h in 0...armor_ids[3]
        if @armor_ids[3][h] != nil
          if ea::Elemental_Acc.keys.include?(@armor_ids[3][h])
            for i in 0...ea::Elemental_Acc[@armor_ids[3][h]].size
              unless new_element_set.include?(ea::Elemental_Acc[@armor_ids[3][h]][i])
                new_element_set.push(ea::Elemental_Acc[@armor_ids[3][h]][i])
              end
            end
          end
        end
      end
    end
    return new_element_set
  end
end
[/spoiler]