Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

11 Pages V  < 1 2 3 4 > »   
Reply to this topicStart new topic
> Attribute System, Version 3.2.1.1 (24th August)
tomatogal
post Nov 4 2008, 09:23 AM
Post #21



Group Icon

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




Hello!

First, just wanted to say that I love the script. It was just what I had been looking for!

But, I have one quick question. Is it possible to add or remove certain attributes during in the course of the game? For example, if one character is taught how to use another type of magic, would I be able to add another attribute, or would that attribute (of the new magic) have to be there from the start of the game?

Please let me know if that didn't make sense. >_< I'll do my best to clarify.

Thanks in advance. ^^

Go to the top of the page
 
+Quote Post
   
332211
post Nov 4 2008, 12:56 PM
Post #22


Waiting for an epiphany
Group Icon

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.


__________________________
Go to the top of the page
 
+Quote Post
   
Znikomek
post Nov 5 2008, 12:59 AM
Post #23


Level 3
Group Icon

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




link to version 1.3 is broken.
Go to the top of the page
 
+Quote Post
   
RuGeaR1277
post Nov 5 2008, 02:07 AM
Post #24


Level 12
Group Icon

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? smile.gif


__________________________
(ALL TEMPORARY PAUSED)

Current Project


Last Updated on 27th Oct


Click to check it out! ^_^

Go to the top of the page
 
+Quote Post
   
332211
post Nov 5 2008, 06:38 AM
Post #25


Waiting for an epiphany
Group Icon

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




I didn't know that Rapidhsare had a limited number of downloads.
Reuploaded the demo with zshare.


__________________________
Go to the top of the page
 
+Quote Post
   
Garlyle
post Nov 5 2008, 12:22 PM
Post #26


RRR's little gay boy
Group Icon

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
Go to the top of the page
 
+Quote Post
   
tomatogal
post Nov 5 2008, 05:05 PM
Post #27



Group Icon

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.
[Show/Hide] Screen Shot of Script
Attached File  code.PNG ( 271.2K ) Number of downloads: 68


But, when I actually tried it out, I got this error:
No Method Error occured while running script.

Undefined method '[]' for nil:NilClass
Attached File  error.PNG ( 313.07K ) Number of downloads: 65


I 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. ^^

Go to the top of the page
 
+Quote Post
   
332211
post Nov 6 2008, 11:38 AM
Post #28


Waiting for an epiphany
Group Icon

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.
[Show/Hide] Screen Shot of Script
Attached File  code.PNG ( 271.2K ) Number of downloads: 68


But, when I actually tried it out, I got this error:
No Method Error occured while running script.

Undefined method '[]' for nil:NilClass
Attached File  error.PNG ( 313.07K ) Number of downloads: 65


I 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)



__________________________
Go to the top of the page
 
+Quote Post
   
tomatogal
post Nov 6 2008, 01:42 PM
Post #29



Group Icon

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.
[Show/Hide] Screen Shot of Script
Attached File  code.PNG ( 271.2K ) Number of downloads: 68


But, when I actually tried it out, I got this error:
No Method Error occured while running script.

Undefined method '[]' for nil:NilClass
Attached File  error.PNG ( 313.07K ) Number of downloads: 65


I 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! happy.gif
Go to the top of the page
 
+Quote Post
   
Naridar
post Nov 7 2008, 06:49 AM
Post #30


Level 14
Group Icon

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?


__________________________
Go to the top of the page
 
+Quote Post
   
scottso06
post Nov 21 2008, 11:19 AM
Post #31


Level 2
Group Icon

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!
Go to the top of the page
 
+Quote Post
   
332211
post Nov 22 2008, 12:31 PM
Post #32


Waiting for an epiphany
Group Icon

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




Each level of an attribute increases damage by 10%. This also applies to healing.

Note: If a skills has to elements to be 'boosted' it will be boosted twice.
Example: Meteor (Fire + Earth)
Fire Mastery - level 4
Earth Mastery - level 7
skill damage = damage * 140 % * 170 %


__________________________
Go to the top of the page
 
+Quote Post
   
Garge
post Nov 28 2008, 02:00 PM
Post #33


Level 2
Group Icon

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


__________________________
Go to the top of the page
 
+Quote Post
   
332211
post Nov 29 2008, 04:13 AM
Post #34


Waiting for an epiphany
Group Icon

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


__________________________
Go to the top of the page
 
+Quote Post
   
Garge
post Nov 29 2008, 07:06 AM
Post #35


Level 2
Group Icon

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?

[Show/Hide] Attributes
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


__________________________
Go to the top of the page
 
+Quote Post
   
dark_prince_razo...
post Nov 29 2008, 02:07 PM
Post #36


Level 1
Group Icon

Group: Member
Posts: 7
Type: Event Designer
RM Skill: Skilled




I've noticed that if I put a new attributed Below my last one, it becomes place 0 in the array. Thus I've been putting my new attributes first and it isn't changing the ones I already had in the script.
Go to the top of the page
 
+Quote Post
   
Garge
post Dec 1 2008, 11:19 AM
Post #37


Level 2
Group Icon

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


__________________________
Go to the top of the page
 
+Quote Post
   
332211
post Dec 2 2008, 12:06 PM
Post #38


Waiting for an epiphany
Group Icon

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 biggrin.gif)
Beware: when you add a character to the party(1st time), if you initialize it, it'll show its skills twice.
[Show/Hide] Show New Skill (applies to ALL skills)
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


__________________________
Go to the top of the page
 
+Quote Post
   
Garge
post Dec 2 2008, 01:10 PM
Post #39


Level 2
Group Icon

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




Good stuff. I like the pop up skill window, even if it works on all skills learnt, no matter the scene. Keep up the good work! biggrin.gif Hope you can get to the root of the lag issue.

This post has been edited by Garge: Dec 2 2008, 01:56 PM


__________________________
Go to the top of the page
 
+Quote Post
   
sprx11
post Dec 2 2008, 04:33 PM
Post #40


Level 1
Group Icon

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. Attached File  Error1.jpg ( 14.63K ) Number of downloads: 31

Me = Newbie and i really need help ohmy.gif
Go to the top of the page
 
+Quote Post
   

11 Pages V  < 1 2 3 4 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd May 2013 - 05:51 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker