|
  |
Attribute System, Version 3.2.1.1 (24th August) |
|
|
|
|
Nov 4 2008, 12:56 PM
|

Waiting for an epiphany

Group: Revolutionary
Posts: 180
Type: Scripter
RM Skill: Advanced

|
To add a new attribute, you can use: CODE $game_actors[actor_id].start_attributes(attribute id) The remove feature is no included yet.
__________________________
|
|
|
|
|
|
|
|
|
Nov 5 2008, 02:07 AM
|
Level 12

Group: Revolutionary
Posts: 213
Type: None
RM Skill: Beginner

|
uhh... it says something about maximum exceeded... i wasnt even donwloading anything... i tried on Internet Explorer... same thing... help, plz?
__________________________
(ALL TEMPORARY PAUSED) Current Project Last Updated on 27th Oct Click to check it out! ^_^
|
|
|
|
|
|
|
|
|
Nov 5 2008, 12:22 PM
|

RRR's little gay boy

Group: Revolutionary
Posts: 3,375
Type: Developer
RM Skill: Advanced

|
Hmm. Hmm... Hmm! Yes! +_+ This is -almost- what I was looking for. ...Almost. T_T;
But I might be able to use this as the basis for coding my own system along these lines; so thank you very much.
__________________________
RRR 2006 Awards: Best Topic Starter, Ultimate Debater, Most Likely To Bail You Out of Jail, and Most Likely To Become Ruler of the World. RRR 2007 Awards: Master Debater, Elite Gamer, and Uber-Nerd RRR 2008 Awards: Former staff member - VG Hub & General maker discussion
|
|
|
|
|
|
|
|
|
Nov 5 2008, 05:05 PM
|


Group: Validating
Posts: 4
Type: Musician
RM Skill: Beginner

|
QUOTE (332211 @ Nov 4 2008, 01:56 PM)  To add a new attribute, you can use: CODE $game_actor[actor_id].start_attributes(attribute id) The remove feature is no included yet. So, I tried this out today, copy-pasted this into the editor and changed the numbers, as you can see in the screen shot.
code.PNG ( 271.2K )
Number of downloads: 68But, when I actually tried it out, I got this error: No Method Error occured while running script. Undefined method '[]' for nil:NilClass
error.PNG ( 313.07K )
Number of downloads: 65I attached a seperate screen shot with the message, as well. Did I put in the script incorrectly, or is there something else that I forgot to do in order to make it work? Thanks again. ^^
|
|
|
|
|
|
|
|
|
Nov 6 2008, 11:38 AM
|

Waiting for an epiphany

Group: Revolutionary
Posts: 180
Type: Scripter
RM Skill: Advanced

|
QUOTE (tomatogal @ Nov 6 2008, 01:05 AM)  QUOTE (332211 @ Nov 4 2008, 01:56 PM)  To add a new attribute, you can use: CODE $game_actor[actor_id].start_attributes(attribute id) The remove feature is no included yet. So, I tried this out today, copy-pasted this into the editor and changed the numbers, as you can see in the screen shot.
code.PNG ( 271.2K )
Number of downloads: 68But, when I actually tried it out, I got this error: No Method Error occured while running script. Undefined method '[]' for nil:NilClass
error.PNG ( 313.07K )
Number of downloads: 65I attached a seperate screen shot with the message, as well. Did I put in the script incorrectly, or is there something else that I forgot to do in order to make it work? Thanks again. ^^ Distracted old me: It's $game_actors instead of $game_actor CODE $game_actors[actor_id].start_attributes(attribute id)
__________________________
|
|
|
|
|
|
|
|
|
Nov 6 2008, 01:42 PM
|


Group: Validating
Posts: 4
Type: Musician
RM Skill: Beginner

|
QUOTE (332211 @ Nov 6 2008, 12:38 PM)  QUOTE (tomatogal @ Nov 6 2008, 01:05 AM)  QUOTE (332211 @ Nov 4 2008, 01:56 PM)  To add a new attribute, you can use: CODE $game_actor[actor_id].start_attributes(attribute id) The remove feature is no included yet. So, I tried this out today, copy-pasted this into the editor and changed the numbers, as you can see in the screen shot.
code.PNG ( 271.2K )
Number of downloads: 68But, when I actually tried it out, I got this error: No Method Error occured while running script. Undefined method '[]' for nil:NilClass
error.PNG ( 313.07K )
Number of downloads: 65I attached a seperate screen shot with the message, as well. Did I put in the script incorrectly, or is there something else that I forgot to do in order to make it work? Thanks again. ^^ Distracted old me: It's $game_actors instead of $game_actor CODE $game_actors[actor_id].start_attributes(attribute id) Just tried it out and it worked like a charm. Thank you so much for all of your help!
|
|
|
|
|
|
|
|
|
Nov 7 2008, 06:49 AM
|
Level 14

Group: Revolutionary
Posts: 250
Type: Developer
RM Skill: Skilled

|
Can you add an attribute to a character with a script call (e.g the main character learns darkness skills after a certain story event)? Also, can you make the character learn a skill when he/she reaches a certain level of an attribute?
__________________________
|
|
|
|
|
|
|
|
|
Nov 21 2008, 11:19 AM
|
Level 2

Group: Member
Posts: 17
Type: None
RM Skill: Undisclosed

|
How much does the element boster increase damage of that element by? Also, can this affect healing spells as well? I looked but I couldn't figure this out.
Thanks!
|
|
|
|
|
|
|
|
|
Nov 28 2008, 02:00 PM
|
Level 2

Group: Member
Posts: 18
Type: None
RM Skill: Beginner

|
This is quite an enjoyable script you have. It makes for a good talent tree system. Would it be possible of adding in a feature to allow these skills to be applied to class id instead of actor id? Two problems and an error that I found are: 1) This script creates alot of lag on some computers. On my P4 3.0 with 1gig ram, the FPS drops 89% from 60 to 6-7 fps, but only when actors have stuff to be drawn on the screen, like actor 1 & 2 on your demo. 2) The levels are behind by one in point cost and costing too many points I.E. going from 0 to 1 is free, 1 to 2 only costs 1 point, but lv 2 to 3 costs 4 points while 3 to 4 costed 9 points, etc. Ah, i found the problem to be line 270 in Attr_scene. I changed that line to read the following and now it's working fine. CODE @actor.attr_points -= (1 + ((@actor.attr_levels[attribute_index] ** 2 + @actor.attr_levels[attribute_index])/2)) E1) Script 'Attr_Scene' line 251: TypeError occurred. No implicit conversion from nil to interger. This happened while trying to train skills on those that don't have any, like actors 3 & 4.
This post has been edited by Garge: Nov 28 2008, 08:18 PM
__________________________
|
|
|
|
|
|
|
|
|
Nov 29 2008, 04:13 AM
|

Waiting for an epiphany

Group: Revolutionary
Posts: 180
Type: Scripter
RM Skill: Advanced

|
QUOTE (Garge @ Nov 28 2008, 10:00 PM)  This is quite an enjoyable script you have. It makes for a good talent tree system. Would it be possible of adding in a feature to allow these skills to be applied to class id instead of actor id? Two problems and an error that I found are: 1) This script creates alot of lag on some computers. On my P4 3.0 with 1gig ram, the FPS drops 89% from 60 to 6-7 fps, but only when actors have stuff to be drawn on the screen, like actor 1 & 2 on your demo. 2) The levels are behind by one in point cost and costing too many points I.E. going from 0 to 1 is free, 1 to 2 only costs 1 point, but lv 2 to 3 costs 4 points while 3 to 4 costed 9 points, etc. Ah, i found the problem to be line 270 in Attr_scene. I changed that line to read the following and now it's working fine. CODE @actor.attr_points -= (1 + ((@actor.attr_levels[attribute_index] ** 2 + @actor.attr_levels[attribute_index])/2)) E1) Script 'Attr_Scene' line 251: TypeError occurred. No implicit conversion from nil to interger. This happened while trying to train skills on those that don't have any, like actors 3 & 4. In the first script, in lines 84/85 replace actor_id with @class_id CODE if !Actor_attributes[@class_id].nil? for attr_i in Actor_attributes[@class_id] start_attributes(attr_i) end end 1)Yeah, I've noticed the lag too... I'll let you know if I happen to solve it. 2)I've changed the points formula for the display window and forgot to do the same for the method which removes the points. E1) You need to 'teach' them the attributes with this: CODE $game_actors[actor_id].start_attributes(attribute id) I don't really know what're you doing, but my guess is that you want them to have new attributtes mid-game
__________________________
|
|
|
|
|
|
|
|
|
Nov 29 2008, 07:06 AM
|
Level 2

Group: Member
Posts: 18
Type: None
RM Skill: Beginner

|
QUOTE (332211 @ Nov 29 2008, 07:13 AM)  In the first script, in lines 84/85 replace actor_id with @class_id CODE if !Actor_attributes[@class_id].nil? for attr_i in Actor_attributes[@class_id] start_attributes(attr_i) end end 1)Yeah, I've noticed the lag too... I'll let you know if I happen to solve it. 2)I've changed the points formula for the display window and forgot to do the same for the method which removes the points. E1) You need to 'teach' them the attributes with this: CODE $game_actors[actor_id].start_attributes(attribute id) I don't really know what're you doing, but my guess is that you want them to have new attributtes mid-game Thanks, works like a charm. For E1, I was just pointing out that if an actor has no attribute to train in, that the script still allows the player to try and level one up, giving an error, instead of just having nothing happen. Edit - When I make new attributes, either in a fresh version or the one I've been playing with, they lose their order and keep chaging placement the more I add, so like instead of Divine Magic being attribute #2, with what I have below, it's coming out as #4, while Flame Mastery becomes attribute #5. Am I adding them in wrong or do I just need to go through each one by one after I complete my list to find their real placement? CODE module Attibute_Def ATTRIBUTES = { # 0 - attribute name => [ "Flame Mastery" => [ #[bonus values: HP, MP, ATK, DEF, SPI, AGI], [6,8,1,0,6,1], # [element_booster], [9], # {level => skill id} {3 => 34, 4 => 45}, # auto_skill id] 59, # desc line 1 "Flame Mastery: affects the user's spirit and damage made", # desc line 2 "by fire skills, may activate Flame kick while attacking.", # picture name "155" ], # 1 - attribute name => [ "Swordsmanship" => [ #[bonus values: HP, MP, ATK, DEF, SPI, AGI], [9,2,7,3,0,1], # [element_booster], [2], # {level => skill id} {3 => 34, 4 => 45}, # auto_skill id] 59, # desc line 1 "Swordsmanship: affects the user's spirit and damage made", # desc line 2 "by fire skills, may activate Flame kick while attacking.", # picture name "154" ], # 2 - attribute name => [ "Divine Magic" => [ #[bonus values: HP, MP, ATK, DEF, SPI, AGI], [2,5,0,3,4,1], # [element_booster], [], # {level => skill id} {}, # auto_skill id] [], # desc line 1 "Divine Magic: affects the user's spirit and healing made", # desc line 2 "by recovery skills.", # picture name "166" ], # 3 - attribute name => [ "Dark Magic" => [ #[bonus values: HP, MP, ATK, DEF, SPI, AGI], [2,5,0,3,4,1], # [element_booster], [], # {level => skill id} {}, # auto_skill id] [], # desc line 1 "Dark Magic: affects the user's spirit and damage made", # desc line 2 "by offensive magic.", # picture name "162" ], # 4 - attribute name => [ "Sword Magic" => [ #[bonus values: HP, MP, ATK, DEF, SPI, AGI], [2,5,0,3,4,1], # [element_booster], [], # {level => skill id} {}, # auto_skill id] [], # desc line 1 "Sword Magic: affects the user's spirit and damage made", # desc line 2 "by offensive magic.", # picture name "165" ], # 5 - attribute name => [ "Strength" => [ #[bonus values: HP, MP, ATK, DEF, SPI, AGI], [2,5,0,3,4,1], # [element_booster], [], # {level => skill id} {}, # auto_skill id] [], # desc line 1 "Strength: Affects the users physcial prowness when using", # desc line 2 "physcial attacks and skills.", # picture name "164" ] # scene desc } # max level any attribute may have MAX_Level = 12 # actor id => [attributes indexes] Actor_attributes = { 1 => [0,1], 2 => [1], 3 => [1,2], 4 => [4,3] }
This post has been edited by Garge: Nov 29 2008, 08:06 AM
__________________________
|
|
|
|
|
|
|
|
|
Dec 1 2008, 11:19 AM
|
Level 2

Group: Member
Posts: 18
Type: None
RM Skill: Beginner

|
Well I'm glad that error got fixed. But now when I try using this: CODE # Case you're having trouble with the Attributes Indexes # instead pf this line ATTRIBUTE_names = ATTRIBUTES.keys # write the attributes names yourself, like this. #~ ATTRIBUTE_names = ["Swordmanship","Flame Mastery"] and change it to like the example you give, I get this: Script 'Attribute System' line 103: NoMethodError occurred undefined method '[]' for nil:NilClass. Edit: Some suggestions for this script would be to show a pop up window showing when a new skill is learned and having the ability to define the max level of individual attributes. Thank you for your time.
This post has been edited by Garge: Dec 1 2008, 02:11 PM
__________________________
|
|
|
|
|
|
|
|
|
Dec 2 2008, 12:06 PM
|

Waiting for an epiphany

Group: Revolutionary
Posts: 180
Type: Scripter
RM Skill: Advanced

|
QUOTE (Garge @ Dec 1 2008, 07:19 PM)  Well I'm glad that error got fixed. But now when I try using this: CODE # Case you're having trouble with the Attributes Indexes # instead pf this line ATTRIBUTE_names = ATTRIBUTES.keys # write the attributes names yourself, like this. #~ ATTRIBUTE_names = ["Swordmanship","Flame Mastery"] and change it to like the example you give, I get this: Script 'Attribute System' line 103: NoMethodError occurred undefined method '[]' for nil:NilClass. Edit: Some suggestions for this script would be to show a pop up window showing when a new skill is learned and having the ability to define the max level of individual attributes. Thank you for your time. Assuming you're trying my demo: That's probably happening out of a spelling error... (made by me :[ It's "Swordsmanship" instead of "Swordmanship") Max level for each... it's doable, but I'm lazy. If you're lucky, it'll be in the next version. As for the Skill Pop up Window, here it his (I had already done this for myself  ) Beware: when you add a character to the party(1st time), if you initialize it, it'll show its skills twice. CODE #================================================================ ============== # ** Window_Line #------------------------------------------------------------------------------ # this class handles a one lined window. #============================================================================== class Window_Line < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(skill_id) super(0, 500, 544, WLH + 32) set_skill_text(skill_id) for i in 1..33 self.y -= 10 Graphics.update end Audio.se_play('Audio/SE/Item2') # Change Sound here Sound.play_use_skill for i in 0..100 Graphics.update end while y > -66 self.y -= 10 Graphics.update end self.dispose end #-------------------------------------------------------------------------- # * Set Skill Text # skill_id : id of the new skill #-------------------------------------------------------------------------- def set_skill_text(skill_id) self.contents.clear self.contents.font.color = normal_color draw_icon($data_skills[skill_id].icon_index, 4, 0) text = sprintf("%s was learnt!", $data_skills[skill_id].name) # Change Message Here self.contents.draw_text(32, 0, self.width - 40, WLH, text) end end
#============================================================================== # ** 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 #-------------------------------------------------------------------------- # * Learn Skill # skill_id : skill ID #-------------------------------------------------------------------------- alias show_learn_skill learn_skill def learn_skill(skill_id) Window_Line.new(skill_id) if !@skills.include?(skill_id) show_learn_skill(skill_id) end end
__________________________
|
|
|
|
|
|
|
|
|
Dec 2 2008, 04:33 PM
|

Level 1

Group: Member
Posts: 6
Type: None
RM Skill: Undisclosed

|
QUOTE (332211 @ Oct 28 2008, 11:08 AM)  QUOTE (dark_prince_razor @ Oct 27 2008, 08:49 PM)  Okay I got it to add some.
But now I'm testing out a sideview battle system but it's giving me an attribute error when the enemy tries to use a Skill. it says "Script 'Attribute System' line 190: NoMethodError occured. undefined method 'attributes' for #<Game_Enemy:0x194fb78"
and remember that 190 is essentially the if !user.attributes.nil? line, I just have my extra attributes making more lines.
Is there no enemy attribute method? That's what it sounds like My bad... try and replace that line with this: CODE if user.is_a?(Game_Actor) and !user.attributes.nil? Well i did that but when i try again i get this message.
Error1.jpg ( 14.63K )
Number of downloads: 31 Me = Newbie and i really need help
|
|
|
|
|
|
|
|
  |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
RPG RPG Revolution is an Privacy
Policy and Legal
|
|