Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

3 Pages V   1 2 3 >  
Reply to this topicStart new topic
> Equipment Set Bonus 1.4, <3
Lettuce
post Jul 9 2008, 04:34 PM
Post #1


Level 5
Group Icon

Group: Member
Posts: 66
Type: None
RM Skill: Skilled




Equipment Set Bonus
Version 1.4
Author: Lettuce
Release Date: 10 July 2008



Introduction
In games like Flyff (and WoW?) when a player equips a certain combination of armors, they gain some additional stats/hp/mp whatever. This script mimics that <3

Features
-Additional stats when an actor is equipped with armors of the same set
-Set Names : You can see if an item belongs to a set
-If the actor is equipped with equipments from different sets, all the bonus are added up together

Script
HERE

Customization
Instructions at the top of the script

ADDITIONAL SCRIPT:
this will display the bonus in the Status page
[Show/Hide] Bonus Display
CODE
FontSize_Header = 20
FontSize = 12
X_position = 150
Y_position = 285
LineHeight = 15

class Window_Status < Window_Base
alias show_set_bonus_refresh refresh
  def refresh
    show_set_bonus_refresh
    draw_set_bonus(@actor)
  end
  def draw_set_bonus(actor)
    self.contents.font.color = system_color
    self.contents.font.size = FontSize_Header
    self.contents.draw_text(X_position,Y_position,100,WLH,"Set Bonus")
    self.contents.font.color = normal_color
    
    sets = actor.bonus_set #array with the sets listing
    set_pieces = actor.bonus_set_pieces # array with pieces number for each set
    bonus_set = [0,0,0,0,0,0,0,0,0] #different attribute listing
    for i in 0...sets.size
      bonus_array = Set_Bonus[sets[i]] #array with bonus
      pieces = set_pieces[i] #how many pieces
      for j in 0...pieces
        bonus_set[bonus_array[j][0]] += bonus_array[j][1] # [att,amount]
      end
    end
    
    
    
    #bonus_set = Set_Bonus[actor.bonus_set] #array of bonusses
    #bonus_pieces = actor.bonus_set_pieces #number of pieces
    y_pos = Y_position + 6
    self.contents.font.size = FontSize
    for i in 1...bonus_set.size
      y_pos += LineHeight if !(bonus_set[i] <= 0)
      self.contents.draw_text(X_position,y_pos,100,LineHeight,print_set_bonus([i,bonus_set[i]])) if !(bonus_set[i] <= 0)
    end    
  end
  def print_set_bonus(bonus_set)
    case bonus_set[0]
    when 1 then word = Vocab::atk
    when 2 then word = Vocab::def
    when 3 then word = Vocab::spi
    when 4 then word = Vocab::agi
    when 5 then word = Vocab::hp
    when 6 then word = Vocab::mp
    when 7 then word = "Critical"
    when 8 then word = "Evasion"
    end
    return word + " " + bonus_set[1].to_s + "%"
  end
end


Compatibility
This script rewrites def change_equip(equip_type, item, test = false).
If you have any other script that does something with def change_equip (alias or rewrite), just add this right before the "end" of that method

CODE
@bonus_set = []
    for i in 1..Sets.size
      weapons = [nil,Sets[i][0]]
      armors = [Sets[i][1],Sets[i][2],Sets[i][3],Sets[i][4]]
      if Sets[i].include?(@weapon_id)
        @bonus_set.push(i) if !@bonus_set.include?(i)
      end
      if Sets[i].include?(@armor4_id)
        @bonus_set.push(i) if !@bonus_set.include?(i)
      end
      if Sets[i].include?(@armor3_id)
        @bonus_set.push(i) if !@bonus_set.include?(i)
      end
      if Sets[i].include?(@armor2_id)
        @bonus_set.push(i) if !@bonus_set.include?(i)
      end
      if Sets[i].include?(@armor1_id)
        @bonus_set.push(i) if !@bonus_set.include?(i)
      end
    end
    @bonus_set_pieces = []
    for i in 0...@bonus_set.size
      @bonus_set_pieces.push(0)
    end
    if !@bonus_set.empty?
      for i in 0...@bonus_set.size
        weapons = [nil,Sets[@bonus_set[i]][0]]
        armors = [Sets[@bonus_set[i]][1],Sets[@bonus_set[i]][2],
                  Sets[@bonus_set[i]][3],Sets[@bonus_set[i]][4]]
        @bonus_set_pieces[i] += weapons.include?(@weapon_id) ? 1 : 0
        @bonus_set_pieces[i] += armors.include?(@armor1_id) ? 1 : 0
        @bonus_set_pieces[i] += armors.include?(@armor2_id) ? 1 : 0
        @bonus_set_pieces[i] += armors.include?(@armor3_id) ? 1 : 0
        @bonus_set_pieces[i] += armors.include?(@armor4_id) ? 1 : 0
      end
    end


Screenshot
Can't really take one XD

DEMO
HERE~

Installation
Place this script before Main

FAQ
-none for now-

Terms and Conditions
Gimme credit, damnit :{}

This post has been edited by Lettuce: Feb 11 2009, 12:03 PM
Go to the top of the page
 
+Quote Post
   
Netto
post Jul 9 2008, 04:35 PM
Post #2


芸術家
Group Icon

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled




Wow, that was fast laugh.gif , Thanks.
Edit: I only see [armor1, armor2, armor3, armor4], what if I want to add a weapon to the set, or an accessory. Could you make the capacity higher?
Also, is it possible to see if an item is a set piece from the info box when you hover over it?


__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting
Current Project[VX]: Obsidian Trilogy just started 08/12/2008
Current Project[XP&RM2K3]: none
Go to the top of the page
 
+Quote Post
   
Lettuce
post Jul 9 2008, 04:55 PM
Post #3


Level 5
Group Icon

Group: Member
Posts: 66
Type: None
RM Skill: Skilled




Updated to Version 1.1
Now weapon is included.
Setup like this:
Sets = { SetID => [Weapon,Armor1,Armor2,Armor3,Armor4] , ....}

PS:weapon must come first biggrin.gif
Go to the top of the page
 
+Quote Post
   
Netto
post Jul 9 2008, 09:27 PM
Post #4


芸術家
Group Icon

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled




QUOTE (Lettuce @ Jul 9 2008, 05:09 PM) *
Updated to Version 1.1
Now weapon is included.
Setup like this:
Sets = { SetID => [Weapon,Armor1,Armor2,Armor3,Armor4] , ....}

PS:weapon must come first biggrin.gif

Great, thanks, now I can finally continue my game laugh.gif


__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting
Current Project[VX]: Obsidian Trilogy just started 08/12/2008
Current Project[XP&RM2K3]: none
Go to the top of the page
 
+Quote Post
   
Adrien.
post Jul 9 2008, 10:43 PM
Post #5


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




I'm not understanding this...whatare the sets, like what do you mean by Sets = { SetID => [Weapon,Armor1,Armor2,Armor3,Armor4] , ....} ?

When you say set Id do you mean like say (according to the crafting script 1 for weapons, so:) 1206 (206 being say a sword of some sort

Like how do i set up sets?


__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   
Netto
post Jul 9 2008, 11:15 PM
Post #6


芸術家
Group Icon

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled




QUOTE (Adrien. @ Jul 9 2008, 10:57 PM) *
I'm not understanding this...whatare the sets, like what do you mean by Sets = { SetID => [Weapon,Armor1,Armor2,Armor3,Armor4] , ....} ?

When you say set Id do you mean like say (according to the crafting script 1 for weapons, so:) 1206 (206 being say a sword of some sort

Like how do i set up sets?

This has nothing to do with the ACS,
Sets are like
SetID => [weaponID, armor1ID, armor2ID, armor3ID, armor4ID]
Sets = {
1 => [1,2,9,15,24],
2 => [1,1,7,14,23],
3 => []}
the first number is the set number, the numbers in the brackets goes with the corresponding database number.


__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting
Current Project[VX]: Obsidian Trilogy just started 08/12/2008
Current Project[XP&RM2K3]: none
Go to the top of the page
 
+Quote Post
   
Adrien.
post Jul 10 2008, 06:51 AM
Post #7


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




oh.....OHHHH


wait so.... the numbers are the last or last two digits of the database number? so like 1=> [1]

would be like 1=>[001]?

thats what i am getting when you say that they go with the corasponding database number


__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   
Netto
post Jul 10 2008, 10:22 AM
Post #8


芸術家
Group Icon

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled




QUOTE (Adrien. @ Jul 10 2008, 07:05 AM) *
oh.....OHHHH


wait so.... the numbers are the last or last two digits of the database number? so like 1=> [1]

would be like 1=>[001]?

thats what i am getting when you say that they go with the corasponding database number

Precisely


__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting
Current Project[VX]: Obsidian Trilogy just started 08/12/2008
Current Project[XP&RM2K3]: none
Go to the top of the page
 
+Quote Post
   
Adrien.
post Jul 10 2008, 02:06 PM
Post #9


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




Sweet thank you


__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   
Netto
post Jul 10 2008, 02:30 PM
Post #10


芸術家
Group Icon

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled




I was wondering is it possible to have something like this(image), that would show the stats gain/loss from the set equipped.


__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting
Current Project[VX]: Obsidian Trilogy just started 08/12/2008
Current Project[XP&RM2K3]: none
Go to the top of the page
 
+Quote Post
   
Lettuce
post Jul 10 2008, 02:34 PM
Post #11


Level 5
Group Icon

Group: Member
Posts: 66
Type: None
RM Skill: Skilled




yep, gimme a moment <3
Go to the top of the page
 
+Quote Post
   
Netto
post Jul 10 2008, 02:38 PM
Post #12


芸術家
Group Icon

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled




QUOTE (Lettuce @ Jul 10 2008, 02:48 PM) *
yep, gimme a moment <3

Thanks, your a really great scripter.


__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting
Current Project[VX]: Obsidian Trilogy just started 08/12/2008
Current Project[XP&RM2K3]: none
Go to the top of the page
 
+Quote Post
   
Lettuce
post Jul 10 2008, 03:09 PM
Post #13


Level 5
Group Icon

Group: Member
Posts: 66
Type: None
RM Skill: Skilled




here <3
[Show/Hide] Here be teh script~
CODE
FontSize_Header = 20
FontSize = 12
X_position = 150
Y_position = 285
LineHeight = 15

class Window_Status < Window_Base
alias show_set_bonus_refresh refresh
  def refresh
    show_set_bonus_refresh
    draw_set_bonus(@actor)
  end
  def draw_set_bonus(actor)
    self.contents.font.color = system_color
    self.contents.font.size = FontSize_Header
    self.contents.draw_text(X_position,Y_position,100,WLH,"Set Bonus")
    self.contents.font.color = normal_color
    bonus_set = Set_Bonus[actor.bonus_set] #array of bonusses
    bonus_pieces = actor.bonus_set_pieces #number of pieces
    y_pos = Y_position + 6
    self.contents.font.size = FontSize
    for i in 0...bonus_pieces
      y_pos += LineHeight if !bonus_set[i].empty?
      self.contents.draw_text(X_position,y_pos,100,LineHeight,print_set_bonus(bonus_set[i])) if !bonus_set[i].empty?
    end    
  end
  def print_set_bonus(bonus_set)
    case bonus_set[0]
    when 1 then word = Vocab::atk
    when 2 then word = Vocab::def
    when 3 then word = Vocab::spi
    when 4 then word = Vocab::agi
    when 5 then word = Vocab::hp
    when 6 then word = Vocab::mp
    when 7 then word = Vocab::cri
    when 8 then word = Vocab::eva
    end
    return word + " " + bonus_set[1].to_s + "%"
  end
end

place it above main ;P
Go to the top of the page
 
+Quote Post
   
Netto
post Jul 10 2008, 04:20 PM
Post #14


芸術家
Group Icon

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled




QUOTE (Lettuce @ Jul 10 2008, 03:23 PM) *
here <3
[Show/Hide] Here be teh script~
CODE
FontSize_Header = 20
FontSize = 12
X_position = 150
Y_position = 285
LineHeight = 15

class Window_Status < Window_Base
alias show_set_bonus_refresh refresh
  def refresh
    show_set_bonus_refresh
    draw_set_bonus(@actor)
  end
  def draw_set_bonus(actor)
    self.contents.font.color = system_color
    self.contents.font.size = FontSize_Header
    self.contents.draw_text(X_position,Y_position,100,WLH,"Set Bonus")
    self.contents.font.color = normal_color
    bonus_set = Set_Bonus[actor.bonus_set] #array of bonusses
    bonus_pieces = actor.bonus_set_pieces #number of pieces
    y_pos = Y_position + 6
    self.contents.font.size = FontSize
    for i in 0...bonus_pieces
      y_pos += LineHeight if !bonus_set[i].empty?
      self.contents.draw_text(X_position,y_pos,100,LineHeight,print_set_bonus(bonus_set[i])) if !bonus_set[i].empty?
    end    
  end
  def print_set_bonus(bonus_set)
    case bonus_set[0]
    when 1 then word = Vocab::atk
    when 2 then word = Vocab::def
    when 3 then word = Vocab::spi
    when 4 then word = Vocab::agi
    when 5 then word = Vocab::hp
    when 6 then word = Vocab::mp
    when 7 then word = Vocab::cri
    when 8 then word = Vocab::eva
    end
    return word + " " + bonus_set[1].to_s + "%"
  end
end

place it above main ;P

Thanks!, works great.


__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting
Current Project[VX]: Obsidian Trilogy just started 08/12/2008
Current Project[XP&RM2K3]: none
Go to the top of the page
 
+Quote Post
   
nnboy611
post Jul 10 2008, 07:49 PM
Post #15


Level 3
Group Icon

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




you should add more functions, like adds special status when equiped.
Go to the top of the page
 
+Quote Post
   
Hanmac
post Jul 10 2008, 10:51 PM
Post #16


Level 8
Group Icon

Group: Revolutionary
Posts: 121
Type: Scripter
RM Skill: Skilled




WARNING!!! ... WARNING!!!... this os a Bio-Hazard.Alert!!!
there is a very ugly BUG!!!

It do that you can only have the boni from ONE set if you equp more.
Go to the top of the page
 
+Quote Post
   
Netto
post Jul 10 2008, 11:05 PM
Post #17


芸術家
Group Icon

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled




QUOTE (Hanmac @ Jul 10 2008, 11:05 PM) *
WARNING!!! ... WARNING!!!... this os a Bio-Hazard.Alert!!!
there is a very ugly BUG!!!

It do that you can only have the boni from ONE set if you equp more.

I have no idea what you just said, and no you can have more than one bonus in one set, a set is not 1 piece its more than one.


__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting
Current Project[VX]: Obsidian Trilogy just started 08/12/2008
Current Project[XP&RM2K3]: none
Go to the top of the page
 
+Quote Post
   
Hanmac
post Jul 10 2008, 11:23 PM
Post #18


Level 8
Group Icon

Group: Revolutionary
Posts: 121
Type: Scripter
RM Skill: Skilled




i mean that if you equip more then one set, you can only get the boni of the set with the higher Number.

This post has been edited by Hanmac: Jul 10 2008, 11:24 PM
Go to the top of the page
 
+Quote Post
   
Netto
post Jul 10 2008, 11:43 PM
Post #19


芸術家
Group Icon

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled




QUOTE (Hanmac @ Jul 10 2008, 11:37 PM) *
i mean that if you equip more then one set, you can only get the boni of the set with the higher Number.

Ah, okay. That would be a problem.
---
Can you make it so when you have 2 or 3 different sets, the bonuses add up from the other sets?


__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting
Current Project[VX]: Obsidian Trilogy just started 08/12/2008
Current Project[XP&RM2K3]: none
Go to the top of the page
 
+Quote Post
   
Lettuce
post Jul 11 2008, 07:15 AM
Post #20


Level 5
Group Icon

Group: Member
Posts: 66
Type: None
RM Skill: Skilled




I did found this problem shortly after I release the script, and I'm already on it

~(` _ ` )~

EDIT: It is done!

This post has been edited by Lettuce: Jul 11 2008, 08:42 AM
Go to the top of the page
 
+Quote Post
   

3 Pages V   1 2 3 >
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: 18th May 2013 - 11:58 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker