EDIT: Wrong section >< Sorry. Needs to be in script troubleshooting. Any mods mind moving it? Plzkthx
Hiya.
I've just installed Sephirothspawn's materia system, and removed the SDK check. Yes, this is allowed, XD. It works fine now, tested it and everything in its demo. HOWEVER, when I moved the script over to my game, I get "Error line 74. UndefinedMethodError nil;nilclass"
I would LOVE if someone would make it compatible for me, but that's not what I expect. All I want is for anyone who can help to PM me, and I'll send you a link to DL my game up to this point. Then you can play it and see the error yourself, along with all of my current configuration. All I want is a diagnosis- which script is it incompatible with, and why? How can I get it fixed? Where should I go TO get it fixed?
Please and thank you....i REALLY want this to work. Anyone to help me goes in credits and gets powered up...it's all I can offer ><
post a demo with all your game's scripts here, and I'll see what I can do.
http://www.megaupload.com/?d=YLZ9M34W
Whoa, this may take awhile. That CBS has a lot of compatibility issues. I'll send you a version of the demo with a slightly recoded version of the battle system (for compatibility), and edits done to the materia system (if they're needed). I think even my class change system might conflict with that battle system. (and I took every pains to keep compatibility at a maximum)
Ok, wait a second. I found a more compatible materia script. HERE: http://www.rmxp.org/forums/viewtopic.php?f=11&t=59972 It works perfectly, except for two things that I need.
Both problems are with the materia script, not the CBS, so it'll be MUCH easier on you.
Ok, firstly, and most importantly, I have a custom damage formula script. DEX is used for accuracy, damage, and a million other things. It's the most important stat in the game. In the materia script, the scripter made DEX into VIT, which reduces damage. THat's BAD. Can you please find a way to remove that feature? Shouldn't be too hard.
Also, materia allow you to increase certain stats, but evasion isn't in there. How hard would it be to add evasion?
Please consider helping me out here- should be MUCH easier this time.
to change whether or not dexterity, vitality, or a mixture of the two systems is used, go to the "SBS COnfig - XP", and find "DAMAGE_ALOGARITHM_TYPE". Setting that to 1 will leave the dexterity attribute how it is. (which it is by default, and in the project file you sent me)
And I'll work on that EVA thing. I have a test in a few mins, so I can't work on figuring out how that Materia system works until tomorrow. And yes, this is MUCH easier than reworking an entire script, XD
Your solution for the vitality issue won't work. Yes, tankentai has a vitality system, but my formula had no problem killing it. However, my formula WON'T override the materia system's vitality system. Point being, I've already turned off tankentai's VIT system, but the materia system uses its own, TOO!
Good luck on your test.
Thank you ^_^
oh, gottcha. I'll hunt down the use of the vitality system then. (from my preliminary search, all it does is replace the word DEX with VIT, couldn't find any battle algorithm edits. You sure it doesn't work the same? I'll keep looking though)
positive. Enemies which used to do 1 damage to me with my equipped armor are now one hitting me, and my damage isn't increasing as a result of accuracy anymore.
EDIT: Correct me if I'm wrong, but I believe THIS is our culprit:
#==============================================================================
# ** Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
def skill_effect(user, skill)
self.critical = false
if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
return false
end
effective = false
effective |= skill.common_event_id > 0
hit = skill.hit
if skill.atk_f > 0
hit *= user.hit / 100
end
hit_result = (rand(100) < hit)
effective |= hit < 100
if hit_result == true
power = skill.power + ((user.atk + 20) * skill.atk_f / 100)
if power > 0
power -= self.pdef * skill.pdef_f / 200
power -= self.mdef * skill.mdef_f / 200
power = [power, 0].max
end
rate = 50
rate -= (self.dex / 2 * skill.pdef_f / 200)
rate -= ((self.dex + self.int)/ 4 * skill.mdef_f / 200)
rate += (user.str * skill.str_f / 100)
rate += (user.dex * skill.dex_f / 100)
rate += (user.agi * skill.agi_f / 100)
rate += (user.int * skill.int_f / 100)
self.damage = power * rate / 20
self.damage *= elements_correct(skill.element_set)
self.damage /= 100
if self.damage > 0
if self.guarding?
self.damage /= 2
end
end
if self.damage == 0
dmg1 = (rand(100) < 40)
self.damage = 1 if dmg1
end
if skill.variance > 0 and self.damage.abs > 0
amp = [self.damage.abs * skill.variance / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
eva = 8 * self.agi / user.agi + self.eva
hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
effective |= hit < 100
end
if hit_result == true
if user.is_a?(Game_Actor)
for materia in user.weapon_materia + user.armor1_materia + user.armor2_materia + user.armor3_materia + user.armor4_materia
unless materia.nil?
self.damage += (self.damage * materia.level * 0.2).to_i if self.damage != 0 and materia.type == 'Summon'
end
end
materia_set = user.return_paired_materia
for paired_set in materia_set
materia = paired_set[2]
other_materia = paired_set[3]
if materia.special_effect == 'MP Turbo'
for skill_id in other_materia.skills
unless skill_id == 0
m_skill = $data_skills[skill_id]
if skill == m_skill
unless skill.element_set.include?(Materia_Config::Negate_Turbo_ID)
self.damage += (self.damage * materia.level * 0.2).to_i if self.damage != 0
end
end
end
end
end
if materia.special_effect =='Absorb HP'
for skill_id in other_materia.skills
unless skill_id == 0
m_skill = $data_skills[skill_id]
if skill == m_skill and $game_temp.in_battle
unless skill.element_set.include?(Materia_Config::Negate_Absorb_ID)
if self.damage > 0
dreno = materia.level * 2
hp = (self.damage * dreno / 100).to_i
user.hp += [hp, user.maxhp - hp].min
end
end
end
end
end
end
if materia.special_effect =='Absorb MP'
for skill_id in other_materia.skills
unless skill_id == 0
m_skill = $data_skills[skill_id]
if skill == m_skill and $game_temp.in_battle
unless skill.element_set.include?(Materia_Config::Negate_Absorb_ID)
if self.damage > 0
dreno = materia.level
sp = (self.damage * dreno / 100).to_i
user.sp += [sp, user.maxsp - sp].min
end
end
end
end
end
end
end
end
if skill.power != 0 and skill.atk_f > 0
remove_states_shock
effective = true
end
last_hp = self.hp
self.hp -= self.damage
effective |= self.hp != last_hp
@state_changed = false
effective |= states_plus(skill.plus_state_set)
effective |= states_minus(skill.minus_state_set)
if skill.power == 0
self.damage = ""
unless @state_changed
self.damage = "Miss"
end
end
else
self.damage = "Miss"
end
unless $game_temp.in_battle
self.damage = nil
end
return effective
end
#--------------------------------------------------------------------------
def attack_effect(attacker)
self.critical = false
hit_result = (rand(100) < attacker.hit)
if hit_result == true
atk = [20 + attacker.atk - self.pdef / 2, 1].max
str = [40 + attacker.str - self.dex / 2, 1].max
self.damage = atk * str / 20
self.damage *= elements_correct(attacker.element_set)
self.damage /= 100
if self.damage == 0
dmg1 = (rand(100) < 40)
self.damage = 1 if dmg1
end
if self.damage > 0
if rand(100) < ((4 * attacker.agi / self.agi) + attacker.critrateplus)
self.damage += ((self.damage * (100 + attacker.critdmgplus)) / 100)
self.critical = true
end
if self.guarding?
self.damage /= 2
end
end
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
eva = 8 * self.agi / attacker.agi + self.eva
hit = self.damage < 0 ? 100 : 100 - eva
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
end
if hit_result == true
remove_states_shock
self.hp -= self.damage
@state_changed = false
states_plus(attacker.plus_state_set)
states_minus(attacker.minus_state_set)
else
self.damage = "Miss"
self.critical = false
end
return true
end
#--------------------------------------------------------------------------
def skill_can_use?(skill_id)
skill = $data_skills[skill_id]
return false if calc_sp_cost(self, skill) > self.sp
return false if dead?
return false if skill.atk_f == 0 and self.restriction == 1
occasion = skill.occasion
return (occasion == 0 or occasion == 1) if $game_temp.in_battle
return (occasion == 0 or occasion == 2)
end
#--------------------------------------------------------------------------
def calc_sp_cost(user, skill)
cost = skill.sp_cost
if user.is_a?(Game_Actor)
materia_set = user.return_paired_materia
for paired_set in materia_set
materia = paired_set[2]
other_materia = paired_set[3]
if materia.special_effect == 'MP Turbo'
for skill_id in other_materia.skills
unless skill_id == 0
m_skill = $data_skills[skill_id]
if skill == m_skill and !skill.element_set.include?(Materia_Config::Negate_Turbo_ID)
cost = (cost + (cost * materia.level * 0.2)).to_i
end
end
end
end
if materia.special_effect == 'Reduce Cost'
for skill_id in other_materia.skills
unless skill_id == 0
m_skill = $data_skills[skill_id]
if skill == m_skill
cost = (cost - (cost * materia.level * 0.1)).to_i
end
end
end
end
end
end
return cost
end
#--------------------------------------------------------------------------
def consum_skill_cost(skill)
return false unless skill_can_use?(skill.id)
cost = calc_sp_cost(self, skill)
return self.sp -= cost
end
end
Do a CTRL+ALT+F in the materia system and you'll find it. Even WITH my MINISCULE knowledge of Ruby, it looks like it rewrites the damage formula. I just want it to STFU and let my script which is made for the damage formula do the work.
Annnnd, I think I just fixed it. I just deleted that entire section- it runs fine, and it SEEMS to be working as normal, but with the attachment system as well. W00t.
Now i'd just like to add the ability to change the evasion stat by a given amount. There's an effect in there called "Evasion plus", but the effect is VERY low.
I'd also like to add the ability to make it so that you can't equip more than one of the same attachment, or, for that matter, any attachment with the same "classification". For instance, you can't equip two attachments which are classified as a scope.
And, building on that, I'd like to set certain attachments for weapons only, and certain for armor only. No silencers for helmets >.> Or rifle plates for guns. Any ideas?
>< sorry for the flood. I'm just very enthused. ^_^
EDIT AGAIN:
Ok, just read the bit that I deleted. If it IS deleted, half of the materia have no effect, but give no error. So. I'm looking for a way to take out the damage formula part up there, which means VIT and anything else in there...I think it tells AGI to reduce crit rate- that would be included. In essence, I need to fix the formula so that it lets my other script function, and leave everything else alone(IE materia effects). Little help?
Please and thank you ^_^
oh sorry, I was resting this weekend. After two finals in one day, I was worn out. I'll get this done as soon as possible.
You don't have to apologize; you're helping me ^_^
Don't worry; take your time, and thanks a ton!