Help - Search - Members - Calendar
Full Version: Attribute System
RPG RPG Revolution Forums > Scripting > Script Submissions > RGSS2-Submissions
Pages: 1, 2, 3, 4, 5
mafisa2
Was this script abandoned by its creator? I still need help with my problem. I can't find a way to fix it, so if anyone have an idea to make it work properly I'll be grateful. If not, I'll just have to find other script to make a custom Growth system for my characters in my game.
Thanks again...(still waiting for help)
Garge
QUOTE (mafisa2 @ Jan 25 2009, 09:19 AM) *
Was this script abandoned by its creator? I still need help with my problem. I can't find a way to fix it, so if anyone have an idea to make it work properly I'll be grateful. If not, I'll just have to find other script to make a custom Growth system for my characters in my game.
Thanks again...(still waiting for help)


If you don't mind giving up something, you can follow this picture.
[Show/Hide] Screenshot


You can either add in what I have circled or just remove that part between the circles entirely. This is just a quick and cheap fix for the problem, and doesn't solve the actual problem of that part not working in the first place. The part removed deals with the status protection part of the module, so if you don't mind losing that part(since it's not working anyhow), go ahead and do what I've posted. Otherwise, you might want to post in the script support section and see if someone would be willing to help with fixing that part of the script, since 332211 hasn't been on for over a month. (whether he's busy with school/life or some other things.)
mafisa2
Thank you very much Garge, it worked for me. And no, I don't really bother of losing that part, I might create equipment such as Ribbons or something else to work as status protectors.
Thanks again!
angelborn
Is there a way to add points to these different skill mastery areas without using points after the fact. I was wondering if the use of certain skills would actually raise your proficiency in those different areas. I still want it to be visible to the player through like a status screen that way they aren't blindly raising their characters stats without knowing what they are doing.
Znikomek
1) if I talk multiple times to npc with skill adding script the skill is show multiple times
2) If i have more skills it can be visible then it show blank place

Garge
QUOTE (Znikomek @ Feb 7 2009, 08:12 AM) *
1) if I talk multiple times to npc with skill adding script the skill is show multiple times
2) If i have more skills it can be visible then it show blank place


1) There's no check in the script to see if they actor already has that attribute, so it allows for the same attribute to be added over and over again.

2) Even though the window does scroll, the area that the window will draw in is only as big as what is initially shown, which is big enough for 7 attributes.

Unfortunately, 332211 hasn't been on since the 23rd of December, leaving the script's future for fixes up in limbo. However, the poster above you, angelborn, had come from a request thread over on rpgmakervx.net, and in that thread, there's was a scripter willing to look this script and seeing what they could do to fix it for them, but it got passed over for a different one of 332211's script, which did get looked at and updated by him.

My suggestion would be to post either here to see if anyone would be willing to lend their time to help with these problems, or go into that request thread over on rpgmakervx.net and see if the person that updated the other script would be willing to take some time and look at this one for you, as well as anyone else that may be using or thinking about using this script.

edit: Here's the request thread*link removed with the return of the 332211 happy.gif *
332211
QUOTE
Lemme just say to start that I LOVE the attribute system, however i am having a few problems customizing it. (I am a very, very, VERY noobie sciptor yes.gif )

1. How do I make one Charater get a certain amout of Attribute points (3) per lvl.

2. How do i make it were attributes given in skills (like 4 attack) every level only get 4 attack. Usually when i get a lvl up, it increases the rate in which i get attack, even though i set it as 4.

Thank you for the help! If I didn't state clear enough what my problem was just tell me so. Sorry for the inconvience. pinch.gif


1.
CODE
Search for this
  #--------------------------------------------------------------------------
  # * Level Up
  #--------------------------------------------------------------------------
  alias attr_level_up level_up
  def level_up
    attr_level_up
    @attr_points += @level
  end

And replace with this:
CODE
  #--------------------------------------------------------------------------
  # * Level Up
  #--------------------------------------------------------------------------
  alias attr_level_up level_up
  def level_up
    attr_level_up
    if @actor_id = *desired actor id*
      @attr_points += *3*
    else
      @attr_points += @level
    end
  end


2.
find this, twice:
CODE
    l = @attr_levels[attribute_id]

and chage it to:
CODE
    l =1

The Wizard 007
Hey 332211! Its great to see you back. Thanks for not completely abandoning this script because it is awesome. Thanks for the scroll and status fix.
Garge
QUOTE (The Wizard 007 @ Mar 23 2009, 03:17 AM) *
Hey 332211! Its great to see you back. Thanks for not completely abandoning this script because it is awesome. Thanks for the scroll and status fix.

Likewise. Welcome back 332211 from your long break away.
The Wizard 007
Sorry to say but the scroll bug is not fixed. Everything else seems to be working fine. I think it has something to do with the refresh or draw_text but I can't say for sure. Used your demo 2.2 as a base and just added a few attributes and I'm still getting the invisible text scrolling bug.
332211
Third's the time... sure hope it stays working now!
I'm very open to suggestions for this script.
The Wizard 007
It works great now! Excellent work. Thank you. As a suggestion is there maybe a way to make the "Skill learned" pop up window only effective in the Attribute Screen and not the rest of the game?
Gravitypool
Magnificent script. I'm at the moment using this for a skill system for a TRPG (Using Gubid's script) i will like to know if it's possible to select at which level the character has access to the attribute.

Lets say I create a defender attribute for an infantryman that he can upgrade from lvl 1 but i also want this same attribute for another character, but it will only be available to him from lvl 10 onwards. (similar to rondo of swords skills)

Is it possible?
Gravitypool
Some changes I did to the script that may be useful, anyone is free to use it.

Search for this and replace

Attribute points per missing levels

CODE

#--------------------------------------------------------------------------
# * Setup
# actor_id : actor ID
#--------------------------------------------------------------------------
alias attributes_setup setup
def setup(actor_id)
attributes_setup(actor_id)
@attributes = []
@attr_levels = []
@attr_points = @level*2
Class_Based_Attr ? based_on = @class_id : based_on = actor_id
if !Actor_attributes[based_on].nil?
for attr_i in Actor_attributes[based_on]
start_attributes(attr_i)
end
end
end


This will make any character joining the party further in the game have the available skill points according to their level. (The settings in my game are 2 per level, but you can chang the number if you want more skillpoints per level).

Default attribute level = 0

CODE

#--------------------------------------------------------------------------
# * Attributes
# attribute : attribute name
# new_level : attribute level
#--------------------------------------------------------------------------
def start_attributes(attribute)
unless self.attributes.include?(attribute)
attr = ATTRIBUTES[attribute]
# attr_bonus = attr[1]
# if !attr_bonus.nil?
# @maxhp_plus += attr_bonus[0]
# @maxmp_plus += attr_bonus[1]
# @atk_plus += attr_bonus[2]
# @def_plus += attr_bonus[3]
# @spi_plus += attr_bonus[4]
# @agi_plus += attr_bonus[5]
# end
attr_skills = attr[3][0]
learn_skill(attr_skills) if !attr_skills.nil?
@attributes.push(attribute)
@attributes.sort!
@attr_levels[attribute] = 0
end
end
def remove_attribute(attribute_id)
while @attr_levels[attribute_id] >= 0
attribute_down(attribute_id)
end
end


This will make the default initial level for attributes 0, this means that you wont get those annoying skill popups at the menu and you wont see your characters missing life/mp at the start of the game. I didn't want to bother more with this but a full recovery for the characters after getting and attribute level could be a good implementation in order to refill their gauges affter attribute lvl up.

I didn't bother to erase the original parts of the code cause i maybe use it later, but of course anything beyond # can be erased.

Hope it's useful for anyone.
kaimonkey
Is there a way I can add a certain attribute option to a class or actor (Im using dynamiclly based classes), so for example, mid-game, Ralph can learn fire spells!
wolfman1983
Hey guys,

332211, I have been using your attribute script for a bit now, and I enjoyed it up to a point where it has now completely stopped any progress I can do in testing my game.

I found on this forum that you mentioned to someone to change a few values in their system so that they would be able to customize the amount of points they recieved per level instead of being handed their level in points...

When I made that change, I am not faced with this error EVERY time I level, or every time I start my troop battle test:

Script'Attribute System 2.2.3'line 157: NoMethodError occured.

undefined method '(box)' for nil:Class


When I delete your script and I mean (everything having to do with your script) from my game.... I still get that same error (that baffles me the most)

I replaced all the changed code that I made, to the original (that came with the demo)... , with your original code. And I am still getting the error. And I completely removed and re-added all the contents of the code as it was originally unaltered. Still the same error.

Here is the code that I have right now that started the entire problem when I made the one change to the points per level up.
CODE
#======================================================================
=========
# Version 2.2.3
# Author: 332211 / uresk
# Date: 5th April 2009
#===============================================================================
# Start Configuration
#===============================================================================
module Attibute_Def
ATTRIBUTES = [
# Attribute 0
[
# Name: "Name"
"2-Wpn Fighting",
# Bonus Values: [HP, MP, ATK, DEF, SPI, AGI],
[0,0,1,1,0,1], # each new level grants more bonus * level
# Eg: 6HP - Level 1: +6; Level 2: +12; Level 3: +18
# Damage Boost: [element id(s)],
[1], # base damage is multiplied by attribute level/12
# Teaches skills: {attribute level => skill id}
nil,
# May activate skill skill id (none = nil)
51, # Chance of activating the skill = 2 * attribute level
# Description: " text here "
"Two-Weapon Fighting: Displays a small combat bonus to
a harvester that is using two weapons. May grant a
cross strike while attacking.",
# Satus Protection: [status id(s)],
nil, # Decreases the probability of a certain status
# Icon Index: being inflicted by twice the attribute level
4,
# Max Level:
4
],

# Attribute 1
[
# Name: "Name"
"Craft Prof.",
# Bonus Values: [HP, MP, ATK, DEF, SPI, AGI],
[0,0,1,1,1,1],
# Damage Boost: [element id(s)],
nil,
# Teaches skills: {attribute level => skill id}
{6 => 6},
# May activate skill skill id (none = nil)
nil,
# Description (line 1):
"Crafting Proficiency: Trains your mind and body to be better suited
for crafting materials.",
# Satus Protection: [status id(s)],
nil, # Decreases the probability of a certain status
# Icon Index: being inflicted by twice the attribute level
4,
# Max Level:
10,
],

# Attribute 2
[
# Name: "Name"
"Hunters Cunning",
# Bonus Values: [HP, MP, ATK, DEF, SPI, AGI],
[2,1,1,0,1,2],
# Damage Boost: [element id(s)],
nil,
# Teaches skills: {attribute level => skill id}
{5 => 11},
# May activate skill skill id (none = nil)
nil,
# Description (line 1):
"Hunters Cunning: Focuses on developing the combat prowse of the hunter.",
# Icon Index:
4,
# Max Level:
8
]

]

Class_Based_Attr = true
# true : actor's attributes depend on their class
# false: actor's attributes depend on their Id

Actor_attributes =
{
# Actor/Class Id 1
1 => {
# level => [attribite ids...]
2 => [0],
5 => [2],
8 => [1]
}
# Actor/Class Id 2

# Actor/Class Id 3

}
# Upgrade Cost Formula
def cost?(level)
cost = (level * level + level)/2
return cost
end
end
imported = {} if imported.nil?
imported["Attributes"] = true
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
include Attibute_Def
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :attributes # attributes
attr_accessor :attr_levels # attribute levels
attr_accessor :attr_points # points
#--------------------------------------------------------------------------
# * Setup
# actor_id : actor ID
#--------------------------------------------------------------------------
alias attributes_setup setup
def setup(actor_id)
attributes_setup(actor_id)
@attributes = []
@attr_levels = []
@attr_points = 0
Class_Based_Attr ? based_on = @class_id : based_on = actor_id
for a in 1..@level
@attr_points += a
if !Actor_attributes[based_on].nil? and !Actor_attributes[based_on][a].nil?
for attr_i in Actor_attributes[based_on][a]
start_attributes(attr_i)
end
end
end
end
#--------------------------------------------------------------------------
# * Attributes
# attribute : attribute name
# new_level : attribute level
#--------------------------------------------------------------------------
def start_attributes(attribute)
unless self.attributes.include?(attribute)
attr = ATTRIBUTES[attribute]
attr_bonus = attr[1]
if !attr_bonus.nil?
@maxhp_plus += attr_bonus[0]
@maxmp_plus += attr_bonus[1]
@atk_plus += attr_bonus[2]
@def_plus += attr_bonus[3]
@spi_plus += attr_bonus[4]
@agi_plus += attr_bonus[5]
end
attr_skills = attr[3][0]
learn_skill(attr_skills) if !attr_skills.nil?
@attributes.push(attribute)
@attributes.sort!
@attr_levels[attribute] = 0
end
end

def remove_attribute(attribute_id)
while @attr_levels[attribute_id] > 0
attribute_down(attribute_id)
end
end

def attribute_up(attribute_id)
@attr_levels[attribute_id] += 1
l = @attr_levels[attribute_id]
attr = ATTRIBUTES[attribute_id]
attr_bonus = attr[1]
if !attr_bonus.nil?
@maxhp_plus += attr_bonus[0] * l
@maxmp_plus += attr_bonus[1] * l
@atk_plus += attr_bonus[2] * l
@def_plus += attr_bonus[3] * l
@spi_plus += attr_bonus[4] * l
@agi_plus += attr_bonus[5] * l
end
attr_skills = attr[3][@attr_levels[attribute_id]]
learn_skill(attr_skills) if !attr_skills.nil?
end

def attribute_down(attribute_id)
l = @attr_levels[attribute_id]
@attr_levels[attribute_id] -= 1
attr = ATTRIBUTES[attribute_id]
attr_bonus = attr[1]
if !attr_bonus.nil?
@maxhp_plus -= attr_bonus[0] * l
@maxmp_plus -= attr_bonus[1] * l
@atk_plus -= attr_bonus[2] * l
@def_plus -= attr_bonus[3] * l
@spi_plus -= attr_bonus[4] * l
@agi_plus -= attr_bonus[5] * l
end
attr_skills = attr[3][@attr_levels[attribute_id]+1]
forget_skill(attr_skills) if !attr_skills.nil?
if l == 0
@attributes.delete(attribute_id)
@attributes.sort!
end
end
#--------------------------------------------------------------------------
# * Level Up
#--------------------------------------------------------------------------
alias attr_level_up level_up
def level_up
attr_level_up
@attr_points += 2
Class_Based_Attr ? based_on = @class_id : based_on = @actor_id
if !Actor_attributes[based_on].nil? and !Actor_attributes[based_on][@level].nil?
for attr_i in Actor_attributes[based_on][@level]
start_attributes(attr_i)
end
end
end
#--------------------------------------------------------------------------
# * Level Down
#--------------------------------------------------------------------------
alias attr_level_down level_down
def level_down
attr_level_down
Class_Based_Attr ? based_on = @class_id : based_on = @actor_id
if !Actor_attributes[based_on].nil? and !Actor_attributes[based_on][@level].nil?
for attr_i in Actor_attributes[based_on][@level]
remove_attribute(attr_i)
end
end
@attr_points -= @level
@attr_points = 0 if @attr_points < 0
end

#--------------------------------------------------------------------------
# * Upgrade Attribute
#--------------------------------------------------------------------------
def upgrade_attr(attribute_index)
level = attr_levels[attribute_index]
cost = cost?(level)
self.attr_points -= cost
attribute_up(attribute_index)
end

#--------------------------------------------------------------------------
# * Get Added State Success Rate
# state_id : state ID
#--------------------------------------------------------------------------
def state_probability(state_id)
if $data_states[state_id].nonresistance
return 100
else
rank = self.class.state_ranks[state_id]
probability = [0,100,80,60,40,20,0][rank]
for attr_id in @attributes
next if ATTRIBUTES[attr_id][6].nil?
if ATTRIBUTES[attr_id][6].include?(state_id)
probability -= @attr_levels[attr_id] * 2
end
end
end
return probability
end

end

#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
# This class deals with battlers. It's used as a superclass of the Game_Actor
# and Game_Enemy classes.
#==============================================================================

class Game_Battler
include Attibute_Def
#--------------------------------------------------------------------------
# * Calculation of Damage Caused by Skills or Items
# user : User of skill or item
# obj : Skill or item (for normal attacks, this is nil)
# The results are substituted for @hp_damage or @mp_damage.
#--------------------------------------------------------------------------
alias attr_make_obj_damage_value make_obj_damage_value
def make_obj_damage_value(user, obj)
if user.is_a?(Game_Actor) and !user.attributes.nil?
mult = 1
for element_id in obj.element_set
for attr in user.attributes
next if ATTRIBUTES[attr][2].nil?
for element_boost in ATTRIBUTES[attr][2]
mult += user.attr_levels[attr] / 12 if element_boost == element_id
end
end
end
obj.base_damage *= mult
end
attr_make_obj_damage_value(user, obj)
end
end

#==============================================================================
# ** Game_BattleAction
#------------------------------------------------------------------------------
# This class handles battle actions. This class is used within the
# Game_Battler class.
#==============================================================================

class Game_BattleAction
include Attibute_Def
#--------------------------------------------------------------------------
# * Set Normal Attack
#--------------------------------------------------------------------------
alias attr_set_attack set_attack
def set_attack
activated_special_skill = false
if !battler.attributes.nil?
for attr in battler.attributes
auto_skill_id = ATTRIBUTES[attr][4]
if rand(48) < battler.attr_levels[attr] and !auto_skill_id.nil?
set_skill(auto_skill_id)
battler.last_skill_id = auto_skill_id
battler.action.forcing = true
activated_special_skill = true
break
end
end
end
if activated_special_skill
activated_special_skill = false
else
attr_set_attack
end
end
end

#==============================================================================
# ** Game_Enemy
#------------------------------------------------------------------------------
# This class handles enemy characters. It's used within the Game_Troop class
# ($game_troop).
#==============================================================================

class Game_Enemy < Game_Battler
def attributes
return nil
end
end


Hope you (332211) or someone else who might understand script better than me, can help me figure out what the heck went wrong and how to fix it.... Cause as I said.... I can't battle test, and when I try to test my game by walking around I am greeted with the exact same error.

Many thanks.
Znikomek
How I can make the boost wepon to x1.1 per atribute lv?
BTW Can you make boost to weapons too?

and where I can change the chance to active skill after attack?
Can you explain this:
CODE
#--------------------------------------------------------------------------
  # * Get Added State Success Rate
  #     state_id : state ID
  #--------------------------------------------------------------------------
  def state_probability(state_id)
    if $data_states[state_id].nonresistance
      return 100
    else
      rank = self.class.state_ranks[state_id]
      probability = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0][rank]   //I don't get it  :?  it's prpbablity to cast skill on attack?
      for attr_id in @attributes
        next if ATTRIBUTES[attr_id][6].nil?
        if ATTRIBUTES[attr_id][6].include?(state_id)
          probability -= @attr_levels[attr_id] * 10   //I think it give 10% resistance per lvl
        end
      end
    end
    return probability
  end

end


Additional I change attribute lv has started from lv 0:
CODE
@attr_levels[attribute] = 0

but it still rise stats even on lv 0 :/ but it must rise from lv 1 and above
332211
@wolfman1983

CODE
# Teaches skills: {attribute level => skill id}
nil,

should be
CODE
# Teaches skills: {attribute level => skill id}
{},


@Znikomek
check the newest version
wolfman1983
Thanks a bunch 332211.
I was thinking about that..... The problem was that I changed something else in the program earlier that ended up crashing it.. and that removed it from my thoughts...

I knew it was something simple.. thank you so much for the solution biggrin.gif
wolfman1983
new issue with a puzzler...

I am getting the error of this:

Script'Attr_Scene'line 319: ArgumentError occurred. comparison of Fixnum with nil failed


ok thats the error. here is the issue as far as I identified it... All of the script works just fine with the fix you gave me... and I have several skills, but only two of them cause this error... here are the two in code.

CODE
#Attribute 3 (General Attribute)
[
# Name: "Name"
"Crafting Prof.",
# Bonus Values: [HP, MP, ATK, DEF, SPI, AGI],
[0,0,2,2,2,2],
# Damage Boost: [element id(s)],
nil,
# Teaches skills: {attribute level => skill id}
{},
# May activate skill skill id (none = nil)
nil,
# Description (line 1):
"Crafting Proficiency: Trains mind and body to suite it to crafting needs.",
# Description (line 2):
# Icon Index:
110,
# Max Level:
5
],
#Attribute 4 (General Combat Attribute)
[
# Name: "Name"
"2-wpn Prof.",
# Bonus Values: [HP, MP, ATK, DEF, SPI, AGI],
[0,0,4,1,0,0],
# Damage Boost: [element id(s)],
nil,
# Teaches skills: {attribute level => skill id}
{},
# May activate skill skill id (none = nil)
nil,
# Description (line 1):
"Two Weapon Proficiency: Focus more on fighting with two weapons.
(hands included).",
# Description (line 2):
# Icon Index:
110,
# Max Level:
4
],


ok thats the skills when I select them in my menu, (to level the skills up) I get the error above.

All the skills show up just fine, and the test I am doing is leveling up to 99 so that I can get an accurate measurement of how many levels should be applied to each one.

these skills show up, they give the stat boosts and everything... but soon as I level them up... they crash the program with the error above.

This is the section of code that it refers me to:
CODE
#--------------------------------------------------------------------------
# * Update Attribute Selection
#--------------------------------------------------------------------------
def update_attr_selection
if Input.trigger?(Input::cool.gif
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
elsif Input.trigger?(Input::C)
if @attr_window.on_attribute.nil?
Sound.play_buzzer
else
attr_i = @attr_window.on_attribute
level = @actor.attr_levels[attr_i]
up = cost?(level)
points = @actor.attr_points
if points >= up and level < ATTRIBUTES[attr_i][8]
Sound.play_decision
@actor.upgrade_attr(attr_i)
@attr_window.contents.clear
@attr_window.refresh
@status_window.refresh
@status2_window.refresh
else
Sound.play_buzzer
end
end
end
end
end


the line in specific is "if points >= up and level < ATTRIBUTES[attr_i][8]"

Any ideas on what the problem is? I have been doing comparisons... far as I can tell the comma's are in the right places.... I can add other things... and I really don't know why these are the only two out of 8 talents thus far that are giving me problems.
Znikomek
good job
but even if I change to start atribute from lv 0 i still have bonuses from lv 1 :/
332211
QUOTE (wolfman1983 @ Apr 13 2009, 08:36 PM) *
new issue with a puzzler...

I am getting the error of this:

Script'Attr_Scene'line 319: ArgumentError occurred. comparison of Fixnum with nil failed


ok thats the error. here is the issue as far as I identified it... All of the script works just fine with the fix you gave me... and I have several skills, but only two of them cause this error... here are the two in code.

CODE
#Attribute 3 (General Attribute)
[
# Name: "Name"
"Crafting Prof.",
# Bonus Values: [HP, MP, ATK, DEF, SPI, AGI],
[0,0,2,2,2,2],
# Damage Boost: [element id(s)],
nil,
# Teaches skills: {attribute level => skill id}
{},
# May activate skill skill id (none = nil)
nil,
# Description (line 1):
"Crafting Proficiency: Trains mind and body to suite it to crafting needs.",
# Description (line 2):
# Icon Index:
110,
# Max Level:
5
],
#Attribute 4 (General Combat Attribute)
[
# Name: "Name"
"2-wpn Prof.",
# Bonus Values: [HP, MP, ATK, DEF, SPI, AGI],
[0,0,4,1,0,0],
# Damage Boost: [element id(s)],
nil,
# Teaches skills: {attribute level => skill id}
{},
# May activate skill skill id (none = nil)
nil,
# Description (line 1):
"Two Weapon Proficiency: Focus more on fighting with two weapons.
(hands included).",
# Description (line 2):
# Icon Index:
110,
# Max Level:
4
],


ok thats the skills when I select them in my menu, (to level the skills up) I get the error above.

All the skills show up just fine, and the test I am doing is leveling up to 99 so that I can get an accurate measurement of how many levels should be applied to each one.

these skills show up, they give the stat boosts and everything... but soon as I level them up... they crash the program with the error above.

This is the section of code that it refers me to:
CODE
#--------------------------------------------------------------------------
# * Update Attribute Selection
#--------------------------------------------------------------------------
def update_attr_selection
if Input.trigger?(Input::cool.gif
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
elsif Input.trigger?(Input::C)
if @attr_window.on_attribute.nil?
Sound.play_buzzer
else
attr_i = @attr_window.on_attribute
level = @actor.attr_levels[attr_i]
up = cost?(level)
points = @actor.attr_points
if points >= up and level < ATTRIBUTES[attr_i][8]
Sound.play_decision
@actor.upgrade_attr(attr_i)
@attr_window.contents.clear
@attr_window.refresh
@status_window.refresh
@status2_window.refresh
else
Sound.play_buzzer
end
end
end
end
end


the line in specific is "if points >= up and level < ATTRIBUTES[attr_i][8]"

Any ideas on what the problem is? I have been doing comparisons... far as I can tell the comma's are in the right places.... I can add other things... and I really don't know why these are the only two out of 8 talents thus far that are giving me problems.

In those attributes you lack the status protection line:
CODE
# Attribute 0
    [
    # Name:                   "Name"
    "Crafting Prof.",  
    # "" => no name
    
    # Bonus Values:           [HP, MP, ATK, DEF, SPI, AGI],
    [0,0,2,2,2,2],            
    # each new level grants more bonus * level
    # Eg: 6HP - Level 1: +6; Level 2: +12; Level 3: +18
    # [0,0,0,0,0,0] => no effect
    
    # Damage Boost:           [element id(s)],
    [],                      
    # Base damage formula: Base Damage * (1 + attribute level * Damage_Boost)
    # [] => no effect
    
    # Teaches skills:         {attribute level => skill id}
    {},
    # {} => no effect
    
    # May activate skill      skill id
    nil,                      
    # Chance of activating the skill: Action_Chance * attribute level
    # nil => no effect
    
    # Description:            " text here "
    "Crafting Proficiency: Trains mind and body to suite it to crafting needs.",
    # "" => no text
    
    # Satus Protection:       [status id(s)],
    [],  # <-- this was missing!!                      
    # Decreases the probability of a certain status
    # being inflicted by: Immunity_Rate * attribute level
    # [] => no effect
    
    # Icon Index:           <icon index>
    110,
    # 0 => no icon
    
    # Max Level:
    5


@Znikomek
try changing it to -1
wolfman1983
*SLAP* wacko.gif

I think its time I take a break from this stuff for a day or so.... lol been looking at this code stuff for too long and I am missing EASY fixes...

thanks again.

You are awsome for providing support on your system.
kaimonkey
QUOTE (kaimonkey @ Apr 2 2009, 07:00 PM) *
Is there a way I can add a certain attribute option to a class or actor (Im using dynamiclly based classes), so for example, mid-game, Ralph can learn fire spells!


Ehem, can I please repeat this question! Thx
2319
This script is actually very good!
It would be better if we can earn bonus points from enemy.
Znikomek
QUOTE
try changing it to -1


i trying earliel and now and it still doesn't work :/
now on lv 0 not learns spells but still give states (HP,STR ,INT, etc.)

the chance to activation skill is ussless becouse when have 100% to activation character can't attack.

332211
kaimonkey
QUOTE
QUOTE (kaimonkey @ Apr 2 2009, 07:00 PM) *
Is there a way I can add a certain attribute option to a class or actor (Im using dynamiclly based classes), so for example, mid-game, Ralph can learn fire spells!


Ehem, can I please repeat this question! Thx


It is a hard question... because atributtes can be based on class and can be added manually through script call.
But I don't know what class changing system you're using or how does it work, or if you want the old attributes to stay...

2319
QUOTE
This script is actually very good!
It would be better if we can earn bonus points from enemy.

I might do that.

Znikomek
QUOTE
QUOTE
try changing it to -1


i trying earliel and now and it still doesn't work :/
now on lv 0 not learns spells but still give states (HP,STR ,INT, etc.)

I was refering to the latest version.

QUOTE
the chance to activation skill is ussless becouse when have 100% to activation character can't attack.

I will not comment because it's useless.
kaimonkey
Well all im asking to do is know how to add somthing to the hash that is Attibute_Def::Actor_attributes[1][1]. Im using my own dynamically created class script so messing up other classes isn't a problem!

The Wizard 007
Znikomek, find the attribute section in the first script and replace the old with this...

CODE
#--------------------------------------------------------------------------
# * Attributes
# attribute : attribute name
# new_level : attribute level
#--------------------------------------------------------------------------
def start_attributes(attribute)
unless self.attributes.include?(attribute)
attr = ATTRIBUTES[attribute]
#attr_bonus = attr[1]
#if !attr_bonus.nil?
#@maxhp_plus += attr_bonus[0]
#@maxmp_plus += attr_bonus[1]
#@atk_plus += attr_bonus[2]
#@def_plus += attr_bonus[3]
#@spi_plus += attr_bonus[4]
#@agi_plus += attr_bonus[5]
#@res_plus += attr_bonus[6]
#@lck_plus += attr_bonus[7]
#@hit_plus += attr_bonus[8]
#@eva_plus += attr_bonus[9]
#@cri_plus += attr_bonus[10]
#end
attr_skills = attr[3][0]
learn_skill(attr_skills) if !attr_skills.nil?
@attributes.push(attribute)
@attributes.sort!
@attr_levels[attribute] = 0
end
end


That'll take care of the bonus recieved even when its level 0. Hope that helps.
Everdred
Quick question...
When a skill is activated from attacking, can you make it cost 0MP (the skill costs 0 only when activated through attacking, of course).
332211
Nope, but you can create a copy of the skill which costs 0Mp and use it instead.
Example:
Holy Smite (costs 5MP): shows up on the skill list and ect.
Holy Smite (costs 0MP): for auto-activation only
MadlyPlinge
Is there a way to make skills cost money instead of Points when a character lvls up?
332211
QUOTE (MadlyPlinge @ Apr 20 2009, 01:06 AM) *
Is there a way to make skills cost money instead of Points when a character lvls up?


I have no idea of what you're saying. So no, they can't.
Try the skill shop script thingy instead.
Phoenix Flame

Something wrong. When I config no icon (icon index = 0), it is fine.
332211
QUOTE (Phoenix Flame @ Apr 21 2009, 06:01 AM) *

Something wrong. When I config no icon (icon index = 0), it is fine.


That's is *unsolvable*, you really need to pick an icon. If you don't want one, the pick an empty icon (index).
BloodOrchid
Hey there,

i am thoroughly enjoying your script. it makes it alot easier to have a player customize what exactly they want their character to do.

I had a quick question though.

Is it possible to have an item allow 1 actor to start learning the attribute? I would like to have an item "Blood Book" allow someone to learn the atributes "Impulse Magic" and "Blood Rain".

Also, is there an easy way to use this with the multi-class script? the script is simple, but surprisingly powerful...

http://www.rpgrevolution.com/forums/index....showtopic=29153 (this would be the link to the script im talking about)

Id like to set the attributes to be learned with each class, but i cant seem to figure out how to make your script recognize that it has a new class on it...

An example would be making the attributes the "Paladin" class can learn as well as attributes the "Mage" class has avaliable on 1 actor.

(sorry if this reply is a bit hard to read, if you need a more in depth explination ill try harder)
MadlyPlinge
QUOTE (332211 @ Apr 20 2009, 11:32 AM) *
QUOTE (MadlyPlinge @ Apr 20 2009, 01:06 AM) *
Is there a way to make skills cost money instead of Points when a character lvls up?


I have no idea of what you're saying. So no, they can't.
Try the skill shop script thingy instead.

When you level up, you use skill points to get "Flame Mastery" up. Instead of using Skill Points, can use lets say 500 gold to get "Flame mastery" up.
Phoenix Flame
QUOTE
That's is *unsolvable*, you really need to pick an icon. If you don't want one, the pick an empty icon (index).

I mean the script work fine when I set not to show icon. But when I set to show it, the error message appears.
~Sorry for bad english~
332211
Updated!
BloodOrchid and MadlyPlinge, you should check the demo.

@Phoenix Flame
Have no idea of what's happening
Keep in mind that icon index doesn't need []
If it still doesn't work, pm your project cause i'm completelly lost out here...
Xaver_Entropia
nice script!

just 1 quick question, how can i make atrivutes level to lvl 99 for example?

even when i configured them to max lvl=99 it will only allow me to lvl them to 29.
332211
QUOTE (Xaver_Entropia @ Apr 26 2009, 02:48 PM) *
nice script!

just 1 quick question, how can i make atrivutes level to lvl 99 for example?

even when i configured them to max lvl=99 it will only allow me to lvl them to 29.

tried it and didn't happen, I was able to reach level 99 (though only 12 icons appear)
BloodOrchid
Awesome! That solves alot of my problems. for now i can just make it so that when you choose two classes, it gives you a book to learn the skills from for each class...

I would still like to be able to just set them at character creation, so that when I want to be an Archer, i get "Aim" as well as if i choose Grand Shield i get "Phalanx" or if i wanted to choose Scarlet Mage i would get "Infernal Magic"

This is what id like to be able to do, but i can do it just fine with your latest update with Item Learning, thank you very much^^
332211
QUOTE (BloodOrchid @ Apr 27 2009, 09:36 PM) *
I would still like to be able to just set them at character creation, so that when I want to be an Archer, i get "Aim" as well as if i choose Grand Shield i get "Phalanx" or if i wanted to choose Scarlet Mage i would get "Infernal Magic"

This is what id like to be able to do, but i can do it just fine with your latest update with Item Learning, thank you very much^^


Customize this
CODE
  # class based
  Class_attributes =
  {
  # Class Id 2  (Warrior)
  2 => {
    1 => [0],     # (learns attribute 0 from level 1)
    2 => [2]      # (learns attribute 2 from level 2)
    }
  }

and if the attributes don't update automatically call this script
CODE
$game_party.members.each{ |actor|
  actor.update_attributes
}
louistoba
I absolutely love this script... But, is there a way to have more than 7 Attributes by characters.
I have version 2.5 and I can't have more than 7 attributes.
In my game one of my character has 9 attributes but it only shows the first 7 and the 2 others can't be found.
Can you help me please?
Thank you... smile.gif
332211
QUOTE (louistoba @ Apr 28 2009, 07:48 PM) *
I absolutely love this script... But, is there a way to have more than 7 Attributes by characters.
I have version 2.5 and I can't have more than 7 attributes.
In my game one of my character has 9 attributes but it only shows the first 7 and the 2 others can't be found.
Can you help me please?
Thank you... smile.gif

I don't know what's causing the problem since everything is fine for my version. So you'll have to pm your list of scripts.
louistoba
oww it's all good I found the problem.
It's because I gave 3 attributes to begin with but it actually gave only one... I guess because I placed this:

# Actor Id 6 Léon (Red Mage)
6 => {
1 => [8],
1 => [3],
1 => [1],
30 => [10],
35 => [13],
40 => [11],
50 => [0],
60 => [12],
70 => [14]

I didn't realize that I was missing the first 2 attributes.
What I did was:

# Actor Id 6 Léon (Red Mage)
6 => {
1 => [8],
2 => [3],
3 => [1],
30 => [10],
35 => [13],
40 => [11],
50 => [0],
60 => [12],
70 => [14]

It makes the exact thing I wanted for that character since he joins my party at level 25 tongue.gif

Thanks for your help smile.gif
332211
QUOTE (louistoba @ Apr 28 2009, 08:36 PM) *
oww it's all good I found the problem.
It's because I gave 3 attributes to begin with but it actually gave only one... I guess because I placed this:

# Actor Id 6 Léon (Red Mage)
6 => {
1 => [8],
1 => [3],
1 => [1],
30 => [10],
35 => [13],
40 => [11],
50 => [0],
60 => [12],
70 => [14]

I didn't realize that I was missing the first 2 attributes.
What I did was:

# Actor Id 6 Léon (Red Mage)
6 => {
1 => [8],
2 => [3],
3 => [1],
30 => [10],
35 => [13],
40 => [11],
50 => [0],
60 => [12],
70 => [14]

It makes the exact thing I wanted for that character since he joins my party at level 25 tongue.gif

Thanks for your help smile.gif



It would also work with:
CODE
# Actor Id 6 Léon (Red Mage)
  6 => {
    1 => [8,3,1], # all inside [] splited by commas
    30 => [10],
    35 => [13],
    40 => [11],
    50 => [0],
    60 => [12],
    70 => [14]
louistoba
Hey me again... Now when an enemy casts a skill on me I get the error below.

I tried again without your script and the game played fine...
Any help again tongue.gif


332211
QUOTE (louistoba @ Apr 29 2009, 03:37 AM) *
Hey me again... Now when an enemy casts a skill on me I get the error below.

I tried again without your script and the game played fine...
Any help again tongue.gif

Fixed on 2.5.2; no demo uploaded
louistoba
Hey thanks alot!
Just a heads up I found 2 places in the script 2.5.2 where instead of if Input.trigger?(Input::cool.gif it actually was if Input.trigger?(Input::cool.gif

Thought I'd let you know.
Good work by the way smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.