Hello!
I was working on a script for my project but my knowledge about rgss3 is kinda approximate.
I tried searching around to find a similar script already working but couldn't find anything in the net.
Here's what I'm trying to do with the script:
"Class & Mark Talents".
- In my game, every character have a Class and a Mark: there are 3 Classes (Attack, Defense, Support) and 3 Marks (Forgotten, Nameless, Eternal)
- The player can increase the Class and Mark Talents by spending items as value. The Talents are basically the same stats used in VXAce (max hp, max mp, attack, etc.), but leveling Class Talents and Mark Talents increasing the stat for all the character of that Class/Mark.
The "Class & Mark Talents" menu should allow the player to choose between Class Talents and Mark Talents and in the same way, the "Class Talents Menu" or "Mark Talents Menu" should allow the player to choose which Class or Mark wants to level up.
- The item used are different for every class and mark (example: Attack Rune, Support Rune, Forgotten Tome, Nameless Tome). Leveling a stat uses an amount equals to the stat level multiplied by 5.
Example:
-> Class Talent (I choose Class Talent Menu)
->-> Attack (I choose Attack Class)
Class Talent: Attack
HP Lv. 2/50 (+100 MAX HP)
MP Lv. 0/50 (+0 MAX MP)
ATK Lv. 5/50 (+5 ATK)
DEF Lv. 2/50 (+2 DEF)
MAT Lv. 1/50 (+1 MAT)
MDF Lv. 0/50 (+0 MDF)
AGI Lv. 1/50 (+1 AGI)
LUK Lv. 0/50 (+0 LUK)
Like I said, I tried to create the script myself but I don't know if it can be used as base.
Thank you all in advance for reading so far.
I know I'm asking a lot, and I don't pretend anything like a complete solution. Even just some advice is very welcome.
I was working on a script for my project but my knowledge about rgss3 is kinda approximate.
I tried searching around to find a similar script already working but couldn't find anything in the net.
Here's what I'm trying to do with the script:
"Class & Mark Talents".
- In my game, every character have a Class and a Mark: there are 3 Classes (Attack, Defense, Support) and 3 Marks (Forgotten, Nameless, Eternal)
- The player can increase the Class and Mark Talents by spending items as value. The Talents are basically the same stats used in VXAce (max hp, max mp, attack, etc.), but leveling Class Talents and Mark Talents increasing the stat for all the character of that Class/Mark.
The "Class & Mark Talents" menu should allow the player to choose between Class Talents and Mark Talents and in the same way, the "Class Talents Menu" or "Mark Talents Menu" should allow the player to choose which Class or Mark wants to level up.
- The item used are different for every class and mark (example: Attack Rune, Support Rune, Forgotten Tome, Nameless Tome). Leveling a stat uses an amount equals to the stat level multiplied by 5.
Example:
-> Class Talent (I choose Class Talent Menu)
->-> Attack (I choose Attack Class)
Class Talent: Attack
HP Lv. 2/50 (+100 MAX HP)
MP Lv. 0/50 (+0 MAX MP)
ATK Lv. 5/50 (+5 ATK)
DEF Lv. 2/50 (+2 DEF)
MAT Lv. 1/50 (+1 MAT)
MDF Lv. 0/50 (+0 MDF)
AGI Lv. 1/50 (+1 AGI)
LUK Lv. 0/50 (+0 LUK)
Like I said, I tried to create the script myself but I don't know if it can be used as base.
Ruby:
class Game_Interpreter
def initialize
@attack_talents = ClassTalents.new("Attack")
@defense_talents = ClassTalents.new("Defense")
@support_talents = ClassTalents.new("Support")
end
def call_class_talent_menu(class_type)
case class_type
when "Attack"
@attack_talents.display_menu
when "Defense"
@defense_talents.display_menu
when "Support"
@support_talents.display_menu
else
# Handle invalid class type
end
end
end
class ClassTalents
MAX_LEVEL = 50
POINTS_PER_LEVEL = 10
attr_reader :class_type
def initialize(class_type)
@class_type = class_type
@talents = {
"HP" => { current: 0, max: 100, cost: 5 },
"MP" => { current: 0, max: 50, cost: 5 },
"ATK" => { current: 0, max: 50, cost: 5 },
"DEF" => { current: 0, max: 50, cost: 5 },
"MAT" => { current: 0, max: 50, cost: 5 },
"MDF" => { current: 0, max: 50, cost: 5 },
"AGI" => { current: 0, max: 50, cost: 5 },
"LUK" => { current: 0, max: 50, cost: 5 }
}
end
def display_menu
puts "Class Talent: #{@class_type}"
@talents.each do |stat, data|
puts "#{stat} Lv. #{data[:current]}/#{MAX_LEVEL} (+#{data[:max]} #{stat})"
end
puts "Items required"
# Implement displaying quantity of the item needed in possession
# Implement user interaction to choose stat to level up and confirm
end
def level_up(stat)
return if @talents[stat][:current] >= MAX_LEVEL
@talents[stat][:current] += 1
@talents[stat][:max] += 10 if @talents[stat][:current] % POINTS_PER_LEVEL == 0
# Deduct item from player's possession
# Update player's stats accordingly
end
end
Thank you all in advance for reading so far.
I know I'm asking a lot, and I don't pretend anything like a complete solution. Even just some advice is very welcome.