Jump to content
Tammsyn

Final Fantasy 7 Materia

Recommended Posts

I have removed every script except latest versions of "Victor Engine" and "Materia", I keep getting error â€˜materia’ line 854: TypeError occured. can’t convert Fixnum into Arrayâ€â€¦ What am I missing? Please help. I tried the rewritten version of the script posted here as well, it was a total nightmare, I have been trying to get this to function for hours. I can equip materia, but at the end of ANY battle, crash with the above error message. I don't know what I am doing wrong, but I am about to give up entirely. I want this to work so bad that I can taste it, but I am afraid that it never will.

Edited by daltval

Share this post


Link to post
Share on other sites

hmmm odd all i can suggest is if i post a demo (which i thought i had) and you just edit that would that be usefull?

Share this post


Link to post
Share on other sites

I'm really sorry for necroposting, but I found and fixed three little bugs in the script dealing with Elemental and Added Effect. I know how busy Victor is, and he probably would take forever to deal with these bugs since these trifling matters are just way much beneath him. :D

 

I found that the effects for these two features always stayed at level 1. Put another way, the effects obtained upon level up for these two materia were ignored. For example, an Elemental materia with a 25% effect for each level would always give a 25% effect regardless of level.

 

But I found a way to fix that with the following code.

 

in method: materia_element_rate around line 1453

 

 

  def materia_element_rate(id)
    paired_materia.inject(0.0) do |r, pair|
      m = pair[:main].effect(:elemental)
      o = pair[:other].elements?(id)
      v = (pair[:type] == :armor && o) ? -m : 0
      r += v * pair[:main].level
      #the code in the previous line before was simply "r += v"
    end
  end

 

in method: materia_state_rate around line 1464

 

 
  def materia_state_rate(id)
    paired_materia.inject(0.0) do |r, pair|
      m = pair[:main].effect(:added_effect)
      o = pair[:other].states?(id)
      v = (pair[:type] == :armor && o) ? -m : 0
      r += v * pair[:main].level
      #previous line was simply "r += v"
    end
  end

 

 

 

aaand in materia_atk_states_rate method around line 1494

 

 

 

  def materia_atk_states_rate(id)
    paired_materia.inject(0.0) do |r, pair|
      m = pair[:main].effect(:added_effect)
      o = pair[:other].states?(id)
      v = (pair[:type] == :weapon && o) ? m : 0
      r += v * pair[:main].level
      #again previous line was just "r += v"
    end
  end

 

 

So basically, just change the line where r is calculated in the materia_element_rate, materia_state_rate and materia_atk_states_rate methods. Thought I would share so people use this awesome script to the best of its capability :D

Edited by joeyjoejoe
  • Like 3

Share this post


Link to post
Share on other sites

Thanks joeyjoejoe for your contribute :)

 

I found another bug.

When you use script call to equip a materia to an actor, this materia is taken from the database i think. But, when the materia level up, also the same type of materia in the shop level up, O.o

Share this post


Link to post
Share on other sites

Yeah I noticed that happening too sometimes, Shido. Thankfully I don't have too many uses for equipping actors using scripts (and when I do use it hasn't given me that issue so far)

Edited by joeyjoejoe

Share this post


Link to post
Share on other sites

I know this is an older post but I jus recently tried out this script and have it workin for the most part.

 

Im not too familiar with scripting, I read thru a lot of tutorials and the instructions in headers of scripts, yet ibcant figure out how to properly script the shop event and where to put it.

 

Can someone please explain how to do it and where I need to put the shop code?

Share this post


Link to post
Share on other sites

Making the Shop is incredibly easy, don't worry.

You make an Event, like a normal shop, but before the Shop you must use a comment line <materia shop> like this screen that I made.

The materia are simply armors, so you must add them normally in the shop of the event.

e0lcb9.jpg

  • Like 1

Share this post


Link to post
Share on other sites

Hello,

I wanted to try this script out, but I cant download it from your site.

It says its disabled because of to much traffic.

Could you maybe reupload it on an other site?

I really want to try your script :).

 

*edit

 

Nvm, I found it on your site x)

Edited by Blackcloud

Share this post


Link to post
Share on other sites

I know this thread has been dormant for a long time but I'm looking to get something like this working in the game I'm making at the moment, could anyone tell me how straight forward it would be to edit this script to customize the actions performed when certain materia is equipped? Like if I wanted to strip it down and overhaul it to have custom weapons with different slots compared to how FFVII originally had them set up and then creating a new library of materia from scratch all new effects and stats etc

Share this post


Link to post
Share on other sites

Really sorry for necroposting! I'm trying to figure out how to create "Master Materia" that gives multiple abilities on a single materia level (e.g. all magic, all commands, etc.) but no matter what I try, I can't get it to function that way!

  • I've tried setting all the skills to the first materia level, but that just causes the materia to only give the last abilities on the list.
  • I've tried setting each one to a different level while only giving the materia a maximum of 1 level, but surprise surprise, only the first level ability was granted.
  • I've tried setting each one to a different level, and making each level take 0 AP to reach, but it stayed at Level 1 at the first level, then mastered and bred after the first battle.

Is it just not possible to create Master Materia with this system? That was one of the things that drew me to the Materia system in FF7, and I was eager to recreate that sense of pure, blissful OPness in my own game.

If not, I would like to propose a couple of edits to this plugin:

  1. Either:
    1. allow arrays of skills to be assigned to each level, or
    2. allow multiple skill entries to share the same level
  2. Add a notetag entry to disable breeding of specific materia even if Materia Breeding is enabled.

EDIT: I found out how to create a Master Materia: by adding the skills via the armor effects. Even so, it would be nice to be able to assign multiple skills per level, in case you still want some abilities to be locked behind levels.

Edited by Nate McCloud
Found the answer to my issue, and am sharing it with others.

Share this post


Link to post
Share on other sites

You should be able to block breeding with a simple change like this.

Line 737, then use notetag <no breed> (not case sensitive)

  def gain_ap(n, growth)
    old_level = level
    @ap += (n * growth).to_i
    breedoff = note =~ /<NO BREED>/i ? true : false
    if Materia_Breeding && old_level < max_level && level == max_level
      $game_party.gain_materia($data_armors[@id]) unless breedoff == true
    end
  end

For the multiple skills at one level you should just be able to do a note tag like this

<skills: 5: 9, 5: 12, 5: 15, 5: 22> etc

Glad you figured out the master materia. True it doesn't have a note tag to say give me all commands or all magics or all skills. You have to set it up manually.

  • Like 1

Share this post


Link to post
Share on other sites
47 minutes ago, roninator2 said:

You should be able to block breeding with a simple change like this.

Line 737, then use notetag <no breed> (not case sensitive)


  def gain_ap(n, growth)
    old_level = level
    @ap += (n * growth).to_i
    breedoff = note =~ /<NO BREED>/i ? true : false
    if Materia_Breeding && old_level < max_level && level == max_level
      $game_party.gain_materia($data_armors[@id]) unless breedoff == true
    end
  end

For the multiple skills at one level you should just be able to do a note tag like this


<skills: 5: 9, 5: 12, 5: 15, 5: 22> etc

Glad you figured out the master materia. True it doesn't have a note tag to say give me all commands or all magics or all skills. You have to set it up manually.

I'll have to give that first thing a try!

As for the multiple skills at one level, that was the first thing I tried. The result: only the last skill of that level was given to me.

Share this post


Link to post
Share on other sites

This works

# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Materia Skill Level Array    ║  Version: 1.00     ║
# ║ Author: Roninator2                  ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║ Adds no breed option / Skill Array  ║    24 Jan 2022     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Use <no breed> to not have a materia duplicate           ║
# ║ when mastered.                                           ║
# ║                                                          ║
# ║ Added option to Have skills learned at the same level    ║
# ║ Using notetag <skills: 5: 10, 7: 12> is the default way  ║
# ║   With this addon you can specify the levels to be the   ║
# ║   same for several skills                                ║
# ║   <skills: 5: 8, 5: 10, 5: 12, 6: 15>                    ║
# ║   Skills 8, 10, & 12 will be learned at level 5          ║
# ║                                                          ║
# ║ Not compatible with scripts that modify skills learned   ║
# ║ e.g. Fomar - Skill Replace                               ║
# ╚══════════════════════════════════════════════════════════╝
# ╔═════════════════════════════════════╗
# ║ Terms of use:                       ║
# ║ Free for all uses in RPG Maker      ║
# ╚═════════════════════════════════════╝

class RPG::Armor < RPG::EquipItem
  def setup_skills
    @skills = {}
    values  = note =~ /<SKILLS:\s([\d\s\:,;]+)>/i ? $1.dup : ""
    values.scan(/(\d+):\s*(\d+)/i).each {|x, y| 
    @skills[x.to_i] ||= [] 
    @skills[x.to_i] << y.to_i }
  end
  def gain_ap(n, growth)
    old_level = level
    @ap += (n * growth).to_i
    breedoff = note =~ /<NO BREED>/i ? true : false
    if Materia_Breeding && old_level < max_level && level == max_level
      $game_party.gain_materia($data_armors[@id]) unless breedoff == true
    end
  end
end
class Game_Actor < Game_Battler
  def gain_materia_skill(m, i)
    if m.enemy_skill? 
      m.learn.values[i] 
      learn_skill(id)
      @materia_skills.push(id)
    else
      m.skills[i + 1].each do |l|
        learn_skill(l)
        @materia_skills.push(l)
      end
    end
    @materia_skills.compact!
  end
end
class Window_MateriaInfo < Window_Base
  def draw_materia_abilities
    y = @materia.skills.keys.size
    z = @shop ? 120 : 88
    change_color(normal_color, true)
    list = @materia.effects.keys.collect {|effect| effect }
    list.each_with_index do |effect, i|
      if @materia.effect_name
        contents.draw_text(12, z + (@sl + i + y) * 18, 172, 24, @materia.effect_name)
        break
      elsif @materia.effects[effect].numeric?
        name  = make_string(effect).capitalize
        value = @materia.effects[effect] * 100
        draw_effect_value(effect, i + y, name, value)
      else
        name = make_string(effect).capitalize
        contents.draw_text(12, z + (i + y) * 18, 172, 24, name)
      end
    end
  end
  def draw_materia_skills
    draw_materia_price if @shop
    change_color(system_color)
    y = @shop ? 120 : 88
    @sl = 0
    contents.draw_text(4, y - 20, 172, 24, "Ability list")
    change_color(normal_color)
    @materia.skills.keys.sort.each_with_index do |key, i|
      @materia.skills[key].each_with_index do |k, j|
      name = $data_skills[k].name
      @sl += 1 if j >= 1
      change_color(normal_color, key <= @materia.level)
      contents.draw_text(12, y + (@sl + i) * 18, 172, 24, name)
      end
    end
  end
end

I just need to figure out how to get the lines to draw properly. Currently it doubles up when there are more than one entry for a skill level.

Figured it out. I was missing the effect name drawn at the bottom, which was in another method.

This mod makes the materia system not compatible with other scripts that adjust skills learned.

Edited by roninator2
  • Eyes 1

Share this post


Link to post
Share on other sites

No problem. This helped me discover an issue I had with my materia script. (I modified VE - Materia to fit my game) I have it set up in my game to show materia in the items menu. But not be there if equipped. Problem was when unequipping you got two of that materia. This helped me find that I had a second gain_item line in the code.

Plus now I've adapted this for my game and now I can specify no breeding as well. So thanks for that.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, roninator2 said:

No problem. This helped me discover an issue I had with my materia script. (I modified VE - Materia to fit my game) I have it set up in my game to show materia in the items menu. But not be there if equipped. Problem was when unequipping you got two of that materia. This helped me find that I had a second gain_item line in the code.

Plus now I've adapted this for my game and now I can specify no breeding as well. So thanks for that.

Wonderful! :D I'm glad you stood to gain from it, as well!

Also, I made some edits to the documentation of your script mod so that it would show up in the appropriate places in the RMMV plugin window...as well as edits to the documentation of the original plugin. Now the parameters under the header parameters are shown as children of those headers, most of the parameters that take numbers are now actual number parameters, the Materia Display Type parameter is a dropdown list, and the two true/false parameters are now actual boolean parameters.

image.png.1126bb03d946d23e5f09d839e1d31813.png

image.png.d39bfd1fc7ada745254377aad79442d3.png

image.png.13345f633e3384330fa630da7bf237f3.png

image.png.6c78c477ac2d82dd5a3c7a7da7e206c2.png

Additionally, I did have one more problem I've run into: Sure, I've figured out how to create a Master Materia, but what I don't know is how to make it require mastered component materias to make.

Edited by Nate McCloud
Showing edits made to the documentation of the original plugin

Share this post


Link to post
Share on other sites
10 hours ago, Nate McCloud said:

the appropriate places in the RMMV plugin window.

Well now there is 1 BIG problem.

You posted this request in the RPG Maker VX Ace script thread. My patch is for RPG Maker VX Ace. I have never used  RPG Maker MV or know Javascript.

You needed to make your request here

https://www.rpgmakercentral.com/topic/37252-ve-materia-system/?tab=comments#comment-260675

 

Edited by roninator2

Share this post


Link to post
Share on other sites
11 hours ago, roninator2 said:

Well now there is 1 BIG problem.

You posted this request in the RPG Maker VX Ace script thread. My patch is for RPG Maker VX Ace. I have never used  RPG Maker MV or know Javascript.

You needed to make your request here

https://www.rpgmakercentral.com/topic/37252-ve-materia-system/?tab=comments#comment-260675

 

...Crap.
Crap.
Crap.

I don't know how I missed that...but thank you for pointing me in the right direction. 😅

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted