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.

FFVII Materia System XP/VX - Both versions Fully Translated!

i have that error to:

Script ,,Materia_System" line 2413: NoMethodError Occured
undefined method `return_paired_materia` for #<Game_Enemy:0x15dce78>
 
Ok, so I have a question about this script, and by the way, I have intertwined dargor's party changer, custom commands, and dervvulfman's limit break into this script, and it works fine. I want to call a materia shop so I am able to buy materia. This is how you call the script: "materia_avaliable = [ 1, 2, 3, 4, 5, 6, 11] $scene = Scene_MateriaShop.new(materia_avaliable)" Materia available indicates which materia this shop has, and the numbers inside of the brackets are based on the id number of the materia in the script. Now when I try to change the script to have different materia, such as these: "materia_avaliable = [ 0, 2, 3, 4] $scene = Scene_MateriaShop.new(materia_avaliable)", I get an in-game syntax error and I can't figure out why. I have tried using just this script in a fresh project, with no alterations to the script, and I still get the in-game syntax error. Does anyone know what would cause this error?
 

Atoa

Member

I will soon post an update for this script (both versions). I hope it solve the bugs.
For now all I can ask is some patience, since i'm busy with another script.
 
Ok, So I'm no scripter or anything, but I have been tinkering around with a few scripts. Do you guys remember the victory window from final fantasy 7? Well with a little trial and error, I have successfully managed to merge parts of the materia script with this, allowing you to see what enemy experience you are gaining and how much ap you are gaining, just like in seven! If anyone wants this let me know and I will give it to you. Also, I have found a way around the shop error. If you use this line: "$game_party.gain_materia(ID)
where ID = the ID of materia", You can make a text base shop out of this. It's not as nice as a window shop and it may take more work with the events and stuff, but it functions. I will give you an example of what i set up:
Text: Would you like to buy some materia?
Choices: Yes, No
When Yes show choices: Cure, Fire, Ice, Thunder
When [Cure]
Text: Are you sure you want the cure materia?
Show Choices: Yes, No
When Yes:
Play SE '06-System06'
Script: $game_party.gain_materia(0)
Change gold: -1000

I set it up the same for the fire, ice, and thunder materias. I'm going to explain this just a bit further:

The SE I used is when you purchase the item, it makes a cha-ching sound like a cash register, letting you know you purchased the materia. The part that says Script: $game_party.gain_materia(0) means what materia you are gaining, as the 0 indicates the cure materia in the script. You can set the gain materia to anything you please to make different shops. This part HAS TO, I repeat, HAS TO be in there. The reason is for two things. First, it adds the materia to the materia list on the menu screen, just as if you were to buy it using the materia shop, except my method contains no picture. Second, This is the function I used to make my own little call shop ordeal, since the other one gives a syntax error when you attempt to alter it. I hope you guys find this helpful! By the way, I also had to edit the original materia script so if you guys are interested let me know so i can edit it for you or just send you a copy of mine. Good luck getting this to work if you consider using it!

AlphaAO
 

Atoa

Member

@alphao
the FF7 victory window is an script i wanted for a long time, if you have it unchanged, send me via PM plz.

And maybe i will add the "yes/no" function to shops.
 
@Atoa Ok I will definitely pm it to you. I made some edits to the original materia script as well so I will send you both of them.

Would anyone else like these scripts?
 
Is there a way to show the slots when equiping an item? (At the equip screen)
And also when buying/seling an item.
 

Atoa

Member

@Cyrtii
Only eding de script.

if you using RMXP and want just to show the number of slots (and not the materias on it)
I have an scritp that allows you to use advanced commands ih the window help, such as adding icons and changing text color.

I'm translating it (and other of my scripts) to post.
 
As you say, I want to show the number of slots (without the materias on it)
I am using the VX version. Do you have a script for that one too?
That would be really cool :D

Thank you in advance
 
is there a way to turn off/change some features such as the AP, Window arrangement?

And could 1 weapon ID have multiple materia slots?

Example:
Normal Sword - 3 slots
Normal Sword - 5 slots
 
@Souloux- I don't quite understand what you are saying. I didn't create the original materia script, seph did so you will have to ask him. Are you saying like, you don't want the ap under exp earned or something else? Because I have the orginal, unedited script. By the way, if you don't want the materia or ap stuff in the script, paste it to wordpad and search for anything saying materia or ap, and delete it.

@Kylebot2000- Websites often crash so if you want the script post here letting me know and I will pm you the script. That way, you don't have to worry about bad download links and such. I will post the script here if it fits.

The script-

#==============================================================================
# ** Battle Report v 1.6 by Illustrationism
# * Posted & Edited by Raziel
# * Further edited and then reposted by Alphaao
#==============================================================================
# A script that shows the battle result like in the Final Fantasy games.
#
# Features
# * Scrolling down Exp
#
# Edits:
# * Exp Bars filling up
# * Possible displaying of Facesets instead of Charactersets
# * Exp scrolling down faster, depending on how much exp you gain after battle.
# * Play a ME as long as you want in the result window.
#==============================================================================

class Game_Actor < Game_Battler
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1

# NEW - David
$d_new_skill = nil

for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)

# NEW - David
skill = $data_skills[j.skill_id]
$d_new_skill = skill.name

end
end
end
while @exp < @exp_list[@level]
@level -= 1
end
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end

def ap
return @ap == nil ? 0 : @ap
end
#--------------------------------------------------------------------------
def ap=(ap)
@ap = ap
for materia in @weapon_materia + @armor1_materia + @armor2_materia + @armor3_materia + @armor4_materia
unless materia.nil?
initial_level = materia.level
materia.experience += @ap
final_level = materia.level
if initial_level < (materia.exp_levels.size + 1) and final_level == (materia.exp_levels.size + 1)
$game_party.gain_materia(materia.id)
end
end
end
@ap = 0
end


#--------------------------------------------------------------------------
# * Get the current EXP
#--------------------------------------------------------------------------
def now_exp
return @exp - @exp_list[@level]
end



#--------------------------------------------------------------------------
# * Get the next level's EXP
#--------------------------------------------------------------------------
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end

end

class Window_LevelUp < Window_Base

#----------------------------------------------------------------
def initialize(actor, pos)
#change this to false to show the actor's graphic
@face = false
@actor = actor
y = (pos * 120)
super(280, y, 360, 120)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 255
if $d_dum == false
refresh
end
end

#----------------------------------------------------------------
def dispose
super
end

#----------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 18
if @face == true
draw_actor_face(@actor, 4, 0)
else
draw_actor_graphic(@actor, 50, 80)
end
draw_actor_name(@actor, 111, 0)
draw_actor_level(@actor, 186, 0)
show_next_exp = @actor.level == 99 ? "---" : "#{@actor.next_exp}"
min_bar = @actor.level == 99 ? 1 : @actor.now_exp
max_bar = @actor.level == 99 ? 1 : @actor.next_exp
draw_slant_bar(115, 80, min_bar, max_bar, 190, 6, bar_color = Color.new(0, 100, 0, 255), end_color = Color.new(0, 255, 0, 255))
self.contents.draw_text(115, 24, 300, 32, "Exp:#{@actor.now_exp}")
self.contents.draw_text(115, 48, 300, 32, "Level Up:" + show_next_exp)
self.contents.draw_text(70, 24, 300, 32, "AP:#{@actor.ap}")
end


#----------------------------------------------------------------
def level_up
self.contents.font.color = system_color
self.contents.draw_text(230, 48, 80, 32, "LEVEL UP!")
end
#-----------------------------------------------------------------
def learn_skill(skill)
self.contents.font.color = normal_color
unless $d_new_skill == nil
Audio.se_play("Audio/SE/105-Heal01")
self.contents.draw_text(186, 24, 80, 32, "Learned:")
self.contents.font.color = system_color
self.contents.draw_text(261, 24, 90, 32, skill)
end
end


#----------------------------------------------------------------
def update
super
end

end # of Window_LevelUp

#=================================
#Window_EXP
# Written by: David Schooley
#=================================

class Window_EXP < Window_Base

#----------------------------------------------------------------
def initialize(exp)
super(0, 0, 280, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 255
refresh(exp)
end





#----------------------------------------------------------------

def dispose
super
end



#----------------------------------------------------------------
def refresh(exp)
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 180, 32, "Exp Earned:")
self.contents.font.color = normal_color
self.contents.draw_text(150, 0, 70, 32, exp.to_s)

end





def update
super
end

end # of Window_EXP


class Window_AP < Window_Base

def initialize(ap)
super(0, 0, 280, 90)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 255
refresh(ap)
end


def dispose
super
end

def refresh(ap)
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 230, 70, "AP Earned:")
self.contents.font.color = normal_color
self.contents.draw_text(150, 0, 70, 64, ap.to_s)

end


def update
super
end

end # of Window_AP

#=================================
#Window_Money_Items
# Written by: David Schooley
#=================================

class Window_Money_Items < Window_Base

#----------------------------------------------------------------



def initialize(money, treasures)
@treasures = treasures
super(0, 60, 280, 420)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 255
refresh(money)
end


#----------------------------------------------------------------
def dispose
super
end

#----------------------------------------------------------------
def refresh(money)
@money = money
self.contents.clear

self.contents.font.color = system_color
self.contents.draw_text(4, 4, 100, 32, "Items Found:")
self.contents.font.color = normal_color

y = 32
for item in @treasures
draw_item_name(item, 4, y)
y += 32
end

cx = contents.text_size($data_system.words.gold).width
self.contents.font.color = normal_color
self.contents.draw_text(4, 340, 220-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(4, 300, 220-cx-2, 32, "+ " + @money.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(124-cx, 340, cx + 100, 32, $data_system.words.gold, 2)
end

def update
super
end

end # of Window_Money_Items

class Game_Enemy < Game_Battler
#------------------------------------------------------------------------------
attr_accessor :ap
#------------------------------------------------------------------------------
alias old_initialize initialize
def initialize(troop_id, member_index)
old_initialize(troop_id, member_index)
@enemy = $data_enemies[@enemy_id]
@ap = get_ap
end
#------------------------------------------------------------------------------
def get_ap
for i in 0...Materia_Config::ENEMY_AP.size
ap = Materia_Config::ENEMY_AP if @enemy_id == i
end
return ap == nil ? (@enemy.exp / 10).to_i : ap
end
#------------------------------------------------------------------------------
def ap
return @ap == nil ? (@enemy.exp / 10).to_i : @ap
end
#------------------------------------------------------------------------------
def critrateplus
return 0
end
#--------------------------------------------------------------------------
def critdmgplus
return 0
end
end



class Scene_Battle
alias raz_battle_report_main main
alias raz_battle_report_be battle_end

def main
# NEW - David
#$battle_end = false
@lvup_window = []
@show_dummies = true # Show dummy windows or not?
raz_battle_report_main
# NEW - David
@lvup_window = nil
@level_up = nil
@ch_stats = nil
@ch_compare_stats = nil
Audio.me_stop
end

def battle_end(result)
raz_battle_report_be(result)
# NEW - David
@status_window.visible = false
@spriteset.dispose
@actor_command_window.dispose


# Added for RTAB Patch version
@party_command_window.dispose
@help_window.dispose
@status_window.dispose
@message_window.dispose
# End of RTAB Patch Version

Graphics.transition
if result == 0
display_lv_up(@exp, @gold, @treasures, @ap)
loop do
Graphics.update
Input.update
if Input.trigger?(Input::C)
break
end
end
trash_lv_up
end

end

def start_phase5
@phase = 5
$game_system.me_play($game_system.battle_end_me)
$game_system.bgm_play($game_temp.map_bgm)
ap = 0
exp = 0
gold = 0
treasures = []
for enemy in $game_troop.enemies
unless enemy.hidden
exp += enemy.exp
gold += enemy.gold
ap += enemy.ap
if rand(100) < enemy.treasure_prob
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
end
end
end
treasures = treasures[0..5]

# NEW - David
@treasures = treasures
@exp = exp
@gold = gold
@ap = ap


for item in treasures
case item
when RPG::Item
$game_party.gain_item(item.id, 1)
when RPG::Weapon
$game_party.gain_weapon(item.id, 1)
when RPG::Armor
$game_party.gain_armor(item.id, 1)
end
end
@phase5_wait_count = 10
end

def update_phase5
if @phase5_wait_count > 0
@phase5_wait_count -= 1
if @phase5_wait_count == 0

# NEW - David
$game_temp.battle_main_phase = false
end
return
end

# NEW - David
battle_end(0)

end

def display_lv_up(exp, gold, treasures, ap)

$d_dum = false
d_extra = 0
i = 0
for actor in $game_party.actors
# Fill up the Lv up windows
@lvup_window = Window_LevelUp.new($game_party.actors, i)
i += 1
end

# Make Dummies
if @show_dummies == true
$d_dum = true
for m in i..3
@lvup_window[m] = Window_LevelUp.new(m, m)
end
end

@exp_window = Window_EXP.new(exp)
@m_i_window = Window_Money_Items.new(gold, treasures)
@ap_window = Window_AP.new(ap)
@press_enter = nil
gainedexp = exp
gainedap = ap
@level_up = [0, 0, 0, 0]
@d_new_skill = ["", "", "", ""]
@d_breakout = false
@m_i_window.refresh(gold)
wait_for_OK

@d_remember = $game_system.bgs_memorize
Audio.bgs_play("Audio/SE/032-Switch01", 100, 300)

# NEW - David
max_exp = exp
value = 28
if exp < value
value = exp
end
if value == 0
value = 1
end
for n in 0..gainedexp - (max_exp / value)
exp -= (max_exp / value)
if @d_breakout == false
Input.update
end

for i in 0...$game_party.actors.size
actor = $game_party.actors
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp += (max_exp / value)
# Fill up the Lv up windows
if @d_breakout == false
@lvup_window.refresh
@exp_window.refresh(exp)
@ap_window.refresh(ap)
end

if actor.level > last_level
@level_up = 5
Audio.se_play("Audio/SE/056-Right02.ogg", 70, 150)
if $d_new_skill
@d_new_skill = $d_new_skill
end
end

if @level_up == 0
@d_new_skill = ""
end

if @level_up > 0
@lvup_window.level_up
if @d_new_skill != ""
@lvup_window.learn_skill(@d_new_skill)
end
end

if Input.trigger?(Input::C) or exp <= 0
@d_breakout = true
end
end

if @d_breakout == false
if @level_up >0
@level_up -= 1
end
Graphics.update
end
end

if @d_breakout == true
for i in 0...$game_party.actors.size
actor = $game_party.actors
if actor.cant_get_exp? == false
actor.exp += exp
actor.ap += ap
end
end
exp = 0
break
end
end
Audio.bgs_stop
@d_remember = $game_system.bgs_restore

for i in 0...$game_party.actors.size
@lvup_window.refresh
end
@exp_window.refresh(exp)
Audio.se_play("Audio/SE/006-System06.ogg", 70, 150)
@ap_window.refresh(ap)
Audio.se_play("Audio/SE/006-System06.ogg", 70, 150)
$game_party.gain_gold(gold)
@m_i_window.refresh(0)
Graphics.update
end

def trash_lv_up
# NEW - David
i=0

for i in 0 ... 4
@lvup_window.visible = false
end
@exp_window.visible = false
@ap_window.visible = false
@m_i_window.visible = false
@lvup_window = nil
@exp_window = nil
@ap_window = nil
@m_i_window = nil
end

# Wait until OK key is pressed
def wait_for_OK
loop do
Input.update
Graphics.update
if Input.trigger?(Input::C)
break
end
end
end

end

class Window_Base < Window
def draw_actor_face(actor, x, y)
bitmap = RPG::Cache.picture("Faces/" + actor.character_name)
self.contents.blt(x, y, bitmap, Rect.new(0,0,96,96))
end

#--------------------------------------------------------------------------
# * Draw Slant Bar(by SephirothSpawn)
#--------------------------------------------------------------------------
def draw_slant_bar(x, y, min, max, width = 152, height = 6,
bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
# Draw Border
for i in 0..height
self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
end
# Draw Background
for i in 1..(height - 1)
r = 100 * (height - i) / height + 0 * i / height
g = 100 * (height - i) / height + 0 * i / height
b = 100 * (height - i) / height + 0 * i / height
a = 255 * (height - i) / height + 255 * i / height
self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
end
# Draws Bar
for i in 1..( (min / max.to_f) * width - 1)
for j in 1..(height - 1)
r = bar_color.red * (width - i) / width + end_color.red * i / width
g = bar_color.green * (width - i) / width + end_color.green * i / width
b = bar_color.blue * (width - i) / width + end_color.blue * i / width
a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
end
end
end
end

I'm not sure if you guys are talking to me but i have a small understanding of the materia script, so I'll try to help if I can.
 

Atoa

Member

@Souloux
About the AP, only editing the script would do that

about the weapons, just create two weapons in the database with the same name and status, and add different slots to them.

@Kylebot2000
The link is there and fully funcional.
Maybe the problem is with your browser.
 
I get this error in the demo itself when the enemies are defeated, i think i have the latest version:
Script 'Materia System' line 1879: TypeError occured. no implicit conversion from nil to integer

any help?
 
Hey, I was checking this out, and it's awesome, but when I win a fight I get this error

Script 'Materia System' line 1879: TypeError Occurred
no implicit conversion from nil to integer

What do I do to fix this?
 

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