Jump to content
LucidK

Extensive Magic System -- Paying if Needed

Recommended Posts

One billion dollars! Though we don't always get what we want :P

I've been spending quite a lot of time on this and it's coming along nicely, the scene and equipping shards is working.

 

I'm currently trying to think of a good way to check for combo skills and a nice way for the user to set up the combo skills in the script. If anyone has any ideas, please let me know :)

I have one idea which should work but might be messy... haha.

Share this post


Link to post
Share on other sites

I'd use notetags for setting up the combo types, I can't be too sure on how set up an active combo list (not knowing how Materia works AT ALL), but this is what I think I'd do.

 

 

Use an Array Notetag to give unlimited attributes to skill if desired

 

23102403514d74b331a14.png

 

 

 

And this code for how to get it and use it

 

#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles system data. It saves the disable state of saving and
# menus. Instances of this class are referenced by $game_system.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader :skills_hash        # Collection of Skills and their Attributes
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias galv_gamesystem_init                initialize
  #--------------------------------------------------------------------------
  def initialize
    @skills_hash = {}
    for i in 1..($data_skills.size - 1)
      skill = $data_skills[i]
      skill.note[/\\AttributeType\[\s*(.+?)\]/im]
      @skills_hash[skill.id] = $1.scan(/\d+/).collect {|i| i.to_i } if $1
    end
    
    galv_gamesystem_init # Call Original Method
  end
end



 # Eventually it will end up looking like
  skills_hash =
  {
    # Skill 26: Heal ~~~ Has an Elemental Attribute of 9: Holy
    26 => [ 9, ],
    # Skill 45: Curse Weapon ~~~ Has an Elemental Attribute of 1, 9 & 10: Physical, Holy & Dark
    45 => [ 1, 9, 10, ],
    # Skill 49: Life Drain ~~~ Has an Elemental Attribute of 2 & 10: Absorb & Dark
    49 => [ 2, 10, ],
  }
  # But it only needs to be done once, so that's why it's in the initialize method

 
#======================================
# Get Available Combos
#======================================
def get_available_combos
  current_shard_inspection = [ 3, 7 ] # Just an Example
 
  available_skills = []
  $game_system.skills_hash.each do |skill|
    available = false
    current_shard_inspection.each do |attribute|
      available = skill[1].include?(attribute)    # Skill[1] is an Array, 2D Array
      break unless available                      # If not included, don't bother checking the rest
    end
    # Skill[0] is the ID of the Skill, so we're just adding on to the available skill array
    # with Skill IDs if they are available for a combo
    available_skills[available_skills.size] = skill[0] if available
  end
 
  # Now 'available_skills' has an array full of Skill IDs that can be used in a combo
end
Edited by DP3

Share this post


Link to post
Share on other sites

Thanks DP3 - The shard system I am doing will be based off of items giving you the skills so not just based off of having the skills themselves.

I learned a lot from this and can probably use it to what I'm after better than originally planned. Will see how I go.

 

 

Maybe us calling them "combo skills" isn't helpful as my interpretation was you gain a new skill depending on which item shards are touching each other.

Edited by Galv
  • Like 1

Share this post


Link to post
Share on other sites

Yes, gaining a new skill based on adjacency is ideal. I mean, whether it's a "combo skill" or an entirely new skill, in the end it's essentially the same thing anyway.

 

I do wonder, Galv, are you intending to have this be a new selection on the menu, or under the equipment slot? It does not matter, I am merely curious. :D 

 

This is suddenly coming along incredibly quickly... here's hoping! I have faith in you Galv!

Share this post


Link to post
Share on other sites

I've made it a separate scene, equipping shards is different to equipping weapons/armor.

 

You can use items, weapons or armors as shards. They can be displayed as items or key items (even if you use equips for a shard) or you can choose not to display them in normal inventory at all.

If you make an item a shard, you can use it as a normal item or equip it to your orb. A notetag can be used to have it add a skill while equipped.

If you use armor or weapons as a shard, it will add features to the actor equipped it just like if it was equipped as armor or weapon. (Just features, none of the weapon/armor stat bonuses) which will let you make equipping a shard add more than just skills.

 

Actor gaining skills dependent on shard adjacency is also working. Each shard is given a number that can be used to set up what combo skill is learned when shards of certain numbers are next to each other.

 

All I have to do now is the 'view skills' window and setup the notification of what skills are learned whenever you equip/unequip, then you can test it out for bugs.

 

EDIT: I got lazy and didn't do the notification of learning new skills when equipping.

But... when you're ready, test this out and see if it does what you are after and let me know if you find any bugs:

EDIT: Removed link, you can find script here:

http://www.rpgmakervxace.net/topic/13787-magic-shards/

 

 

magic-shards_zpsfbfec8f9.jpg

 

Edited by Galv

Share this post


Link to post
Share on other sites

This...is...AMAZING. This is completely what I was looking for...

The only thing I noticed is certain skills don't combine when placed next to each other, like fire+earth, but fire+water=steam. I'm sure this was only done because you did a couple of them, then stopped because there's no sense in doing it all if it's not even right. 

Regardless, dude, this is.... spectacular. Is it safe to assume I can possibly control who can use what shards, or not? I mean, if I restrict the fire skill to only be able to be used by the mage class, and a fighter equips a fire shard, he theoretically wouldn't be able to use the fire skill anyway, right? 

 

Just speculating. :D

 

BTW I love the custom image ideas (K-9 Tooth). That's pretty cool.

Edited by LucidK

Share this post


Link to post
Share on other sites

I only set a couple up... you gotta do that hard work yourself :P

 

If you use weapons or armor for your shards, they can be given a weapon type or armor type. If your actors have the ability to equip that type they can equip the shards, if not they cannot equip it. So yes, you can choose who can equip which shards. Or you could let the fighter equip the fire shard and it teaches him fire magic but doesn't have the magic skill type so he can't see/use that skill... but still gets any other feature bonuses you add to it.

 

If you use an item for a shard, you cannot restrict it. (You can use both in the same game).

 

I'll release the script and then you pretty much have to learn how to use it as it's not just plug and play. I wrote a lot of instructions in the script. :)

 

EDIT: Find the script here:

http://www.rpgmakervxace.net/topic/13787-magic-shards/

Edited by Galv

Share this post


Link to post
Share on other sites

Freaking awesome... I'll take a look through it and figure it out.  You are officially the freaking coolest! 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted