|
| [ASK] Skill Point pada Armor | |
| | Pengirim | Message |
---|
imamhadii Newbie
Posts : 16 Thanked : 0 Engine : RMXP Skill : Very Beginner Type : Developer
| Subyek: [ASK] Skill Point pada Armor 2012-04-29, 19:19 | |
| Agan2 RMID yang baik, ada gak skrip skill point yang kayak Monster Hunter, jadi tiap piece armor punya sejumlah skill point, nanti kalo skill point-nya ditotalin dan udah nyampe 10 atau lebih, skill bisa aktif, contoh Armor beserta skill-nya Armor Head Fast Heal + 2 Critical +1
Armor Body Fast Heal + 2 Critical +1
Armor Legs Fast Heal + 2 Critical + 1
Armor Hand Fast Heal + 2 Critical + 1
Armor Tasset Fast Heal + 2 Critical + 1
Kalo ditotatlin kan Fast Heal jadi + 10, nah berarti skill Fast Heal bakalan jadi Aktif, kalo Critical ditotalin cuman jadi + 5, nah, berarti belum bisa diaktifin. Maap banget kalo pertanyaannya susah | |
| | | LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Trophies
Awards: | Subyek: Re: [ASK] Skill Point pada Armor 2012-04-29, 19:39 | |
| hmm, mirip2 equap skillnya blizzard kyknya bisa deh ngedit2 skrip bikinan dia biar jadi yg kk maksud sayangnya gw lagi ga mood nyentuh RGSS, jadi tunggu yg lain dulu - equap:
- Code:
-
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # EQUAP Skills by Blizzard # Version: 4.3b # Type: Skill System # Date: 28.05.2006 # Date v2.0: 13.6.2006 # Date v2.02b: 16.1.2007 # Date v3.0b: 19.2.2007 # Date v3.02b: 7.3.2007 # Date v4.0b: 13.7.2008 # Date v4.1b: 19.10.2008 # Date v4.2b: 22.10.2009 # Date v4.3b: 4.6.2009 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # # Explanation: # # This add-on will allow you to bound skills to equipment. Equip it and you # learn the skill, unequip it and you will forget it. The AP system allows to # gain AP for skills and learn the permanently if the max AP for the skill # are gathered. (This system is a very similar one to FF9's AP Skill System.) # # # v2.0: # - fixed bug, that appeared, when more equipment parts had the same skill # - new multi-skill support # # v2.02b: # - improved coding a little bit # # v3.0b: # - completely overworked and added optional AP system (similar to FF9) # (I want to mention here I made this especially for blazinhandle =) ) # # v3.02b: # - fixed bugs # # v4.0b: # - fixed a critical bug # - no more EQUAP element # - skills that have less than 0 max AP cannot be learned # - compatible with Guilamme777's Multi-Slot Equipment System # - works more convenient # - better coding # # v4.1b: # - fixed problems with gaining AP # # v4.2b: # - added functionality to prevent some characters from learning certain # skills # # v4.3b: # - fixed a problem with the configuration # - now AP values are defined by enemy and not be troop anymore # # # Compatibility: # # 99% compatible with SDK v1.x. 60% compatible with SDK v2.x. WILL cause # incompatibility with custom equipment scripts but there are instructions # how to configure the script. Compatible with Guilamme777's Multi-Slot # Equipment System. Please note, that this script depends on the layout of # your Equip Screen and needs to be put UNDER a CMS script if you are using # one. WILL corrupt your old savegames. Might not work with some CMS-es. # # # Instructions: # # - Configuration: # # Press CRTL+SHIFT+F and type into the window one of the following: # # Start EQ Database # Start MAXAP Database # Start GAINAP Database # # You can jump now to the database directly. There are more instructions. # # - Merge with a Custom Equipment System: # # To make this system work with any custom equipment script, you need to # edit the method "prepare_equap" which fetches all current weapon IDs and # armor IDs. # # # NOTE: # # DO NOT USE EQUAP SKILLS AS NORMAL SKILLS! THE SYSTEM WORKS WITH TEMPORARY # LEARNING AND FORGETTING THE EQUAP SKILL. IF YOU LET YOUR CHARACTER LEARN AN # EQUAP SKILL BY NORMAL MEANS, HE WILL FORGET IT AFTER HE UNEQUIPS THE # APPROPRIATE EQUIPMENT! # # # If you find any bugs, please report them here: # http://forum.chaos-project.com/ #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # Start EQUAP General Configuration #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
DISPLAY_AP_GAIN = true # uses a modified Battle Result to display gained AP DISPLAY_AP_REQ = true # shows CURRENT_AP/NEEDED_AP in the skill's name DISPLAY_AP_ZERO = true # shows 0/0 if the skill can't be learned GAIN_DEAD = false # dead actor also gain AP, no matter what
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # End EQUAP General Configuration #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#============================================================================== # module BlizzCFG #==============================================================================
module BlizzCFG def self.maxap(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # Start of MAXAP Database # # Here you can define the APs needed to learn a skill. If you add no skills # here the AP system is automatically disabled. Configure it like this # template: # # when SKILL_ID then return MAXAP # # SKILL_ID - the ID of the skill that will be learned with AP # MAXAP - how many AP are required to learn the skill # # If you give a skill negative max AP, the skill will be completely bound to # the equipment part and will be forgotten when it is unequipped. # # Note: # # Don't forget to assign your AP skills to equipment in the EQ Database # below. Every skill with 0 AP (default) is a normal skill. #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return -1 when 2 then return 10 #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # End of MAXAP Database #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: end return 0 end def self.gainap(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # Start of GAINAP Database # # Here you can define how many AP you will get from enemy troops. Configure # it like this template: # # when ENEMY_ID then return GAINAP # # ENEMY_ID - the ID of the enemy # GAINAP - how many AP will the player get from this enemy. # # Note: # # This will automatically be disabled if there are no AP skills. #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return 2 #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # End of MAXAP Database #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: end return 0 end def self.eq_database(id, weapon = true) skill_ids = [] #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # Start of EQ Database # # This is your equipment database. To add one or more new EQUAP skills to a # weapon is very simple. Add another "when"-branch in the script snipplet # below (they have comments next to it). Configure it like this template: # # when WEAPON_ID # @skill_ids.push(EQUAP_SKILL_ID1) # @skill_ids.push(EQUAP_SKILL_ID2) # # The same works for armors: # # when ARMOR_ID # @skill_ids.push(EQUAP_SKILL_ID1) # @skill_ids.push(EQUAP_SKILL_ID2) # # The lines are commented below so you should have no problems with the script. #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: if weapon case id when 1 # weapon ID skill_ids.push(10) # EQUAP skill ID skill_ids.push(11) # EQUAP skill ID when 5 skill_ids.push(8) skill_ids.push(12) when 9 skill_ids.push(1) skill_ids.push(3) end else case id when 1 # armor ID skill_ids.push(1) # EQUAP skill ID skill_ids.push(25) # EQUAP skill ID when 3 skill_ids.push(7) skill_ids.push(4) when 5 skill_ids.push(15) when 8 skill_ids.push(32) skill_ids.push(29) when 13 skill_ids.push(2) skill_ids.push(25) when 18 skill_ids.push(27) when 19 skill_ids.push(25) when 29 skill_ids.push(10) end #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # End of EQ Database #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: end return skill_ids end def self.equap_nonlearnable_skills(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # Start of NONLEARNABLE SKILLS Database # # Here you can define skills that can't be learned by certain actors at all. # Configure it like this template: # # when ACTOR_ID then return [SKILL_ID1, SKILL_ID2, ...] # # ACTOR_ID - the ID of the enemy troop # SKILL_ID - the ID of the skill this actor can't learn through EQUAP #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return [59, 60] #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # End of NONLEARNABLE SKILLS Database #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: end return [] end end #============================================================================== # Game_Actor #==============================================================================
class Game_Actor alias setup_equap_later setup def setup(id) @ap = {} setup_equap_later(id) test_equap end alias equip_equap_later equip def equip(equip_type, id) equip_equap_later(equip_type, id) test_equap end def add_ap(val) @skills.each {|id| @ap[id] = 0 if @ap[id] == nil} @ap.each_key {|id| @ap[id] = self.ap(id) + val @ap[id] = 0 if self.ap(id) < 0 maxap = BlizzCFG.maxap(id) @ap[id] = maxap if self.ap(id) > maxap} end def ap(id) return (@ap[id] == nil ? 0 : @ap[id]) end def prepare_equap ### edit this method for custom equipment support # Guilamme777 compatibility switch return self.weapon_ids, self.armor_ids if defined?(G7_MS_MOD) weapons = [@weapon_id] armors = [@armor1_id, @armor2_id, @armor3_id, @armor4_id] return weapons, armors end def test_equap non_learnable = BlizzCFG.equap_nonlearnable_skills(self.id) (@skills - non_learnable).each {|id| maxap = BlizzCFG.maxap(id) forget_skill(id) if maxap < 0 || self.ap(id) < maxap} weapons, armors = prepare_equap skill_ids = [] weapons.each {|id| skill_ids += BlizzCFG.eq_database(id, true)} armors.each {|id| skill_ids += BlizzCFG.eq_database(id, false)} (skill_ids - non_learnable).each {|id| learn_skill(id)} end end
#============================================================================== # Game_Troop #==============================================================================
class Game_Troop attr_reader :id alias setup_equap_later setup def setup(troop_id) setup_equap_later(troop_id) @id = troop_id end end
#============================================================================== # Window_BattleResult #==============================================================================
class Window_BattleResult def refresh_extra(aps) self.contents.fill_rect(0, 0, self.width, 32, Color.new(0, 0, 0, 0)) x = 4 self.contents.font.color = normal_color cx = contents.text_size(@exp.to_s).width self.contents.draw_text(x, 0, cx, 32, @exp.to_s) x += cx + 4 self.contents.font.color = system_color cx = contents.text_size('EXP').width self.contents.draw_text(x, 0, 64, 32, 'EXP') x += cx + 16 self.contents.font.color = normal_color cx = contents.text_size(@gold.to_s).width self.contents.draw_text(x, 0, cx, 32, @gold.to_s) x += cx + 4 self.contents.font.color = system_color cx = contents.text_size($data_system.words.gold).width self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold) x += cx + 16 self.contents.font.color = normal_color cx = contents.text_size(aps.to_s).width self.contents.draw_text(x, 0, cx, 32, aps.to_s) x += cx + 4 self.contents.font.color = system_color self.contents.draw_text(x, 0, 128, 32, 'AP') end
end
#============================================================================== # Window_Skill #==============================================================================
class Window_Skill alias draw_item_equap_later draw_item def draw_item(index) skill = @data[index] aps = BlizzCFG.maxap(skill.id) if DISPLAY_AP_REQ && !$scene.is_a?(Scene_Battle) && (aps > 0 || aps != 0 && DISPLAY_AP_ZERO) if @actor.skill_can_use?(skill.id) self.contents.font.color = normal_color else self.contents.font.color = disabled_color end x, y = 4+index%2*320, index/2*32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(skill.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) text = skill.name if aps > 0 text += " (#{@actor.ap(skill.id)}/#{aps})" elsif DISPLAY_AP_ZERO text += ' (0/0)' end self.contents.draw_text(x + 28, y, 204, 32, text, 0) self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2) else draw_item_equap_later(index) end end end
#============================================================================== # Scene_Battle #==============================================================================
class Scene_Battle alias start_phase5_equap_later start_phase5 def start_phase5 start_phase5_equap_later aps = 0 $game_troop.enemies.each {|enemy| aps += BlizzCFG.gainap(enemy.id)} @result_window.refresh_extra(aps) if DISPLAY_AP_GAIN $game_party.actors.each {|a| a.add_ap(aps) if !a.dead? || GAIN_DEAD} end end
| |
| | | imamhadii Newbie
Posts : 16 Thanked : 0 Engine : RMXP Skill : Very Beginner Type : Developer
| Subyek: Re: [ASK] Skill Point pada Armor 2012-04-29, 19:47 | |
| Om Drago, kalo boleh tau, emang Script Equap itu aslinya untuk apa? | |
| | | LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Trophies
Awards: | Subyek: Re: [ASK] Skill Point pada Armor 2012-04-29, 20:12 | |
| kalo ngequip weapon / armor, karakter bakal dapet skill terus kalo dilepas, skillnya bakal ilang
nanti ada point2nya tersendiri (AP), kalo AP dari skill nyampe ke angka yg diset di config, skillnya jadi permanent, walaupun equipnya dilepas, skillnya ga ilang | |
| | | imamhadii Newbie
Posts : 16 Thanked : 0 Engine : RMXP Skill : Very Beginner Type : Developer
| Subyek: Re: [ASK] Skill Point pada Armor 2012-04-29, 20:14 | |
| hmm, kalo skill-nya gak permanen jadi pas ama yang ane butuhin tuh, moga2 ada yang mau bantu bikin biar gak permanen | |
| | | LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Trophies
Awards: | Subyek: Re: [ASK] Skill Point pada Armor 2012-04-29, 20:24 | |
| - Code:
-
def self.equap_nonlearnable_skills(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # Start of NONLEARNABLE SKILLS Database # # Here you can define skills that can't be learned by certain actors at all. # Configure it like this template: # # when ACTOR_ID then return [SKILL_ID1, SKILL_ID2, ...] # # ACTOR_ID - the ID of the enemy troop # SKILL_ID - the ID of the skill this actor can't learn through EQUAP #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return [59, 60] #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # End of NONLEARNABLE SKILLS Database #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: end return [] end di bagian situ masukin aja semua skill ID nya nanti yg dimasukin jadi ga bisa permanent | |
| | | imamhadii Newbie
Posts : 16 Thanked : 0 Engine : RMXP Skill : Very Beginner Type : Developer
| Subyek: Re: [ASK] Skill Point pada Armor 2012-04-29, 20:26 | |
| wiih, Makasih banget om Drago | |
| | | LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Trophies
Awards: | Subyek: Re: [ASK] Skill Point pada Armor 2012-04-29, 20:27 | |
| sama-sama, btw dah solved kan? | |
| | | imamhadii Newbie
Posts : 16 Thanked : 0 Engine : RMXP Skill : Very Beginner Type : Developer
| Subyek: Re: [ASK] Skill Point pada Armor 2012-04-29, 21:44 | |
| udah, kalo mau di Locked silahkan aja | |
| | | Sponsored content
| Subyek: Re: [ASK] Skill Point pada Armor | |
| |
| | | | [ASK] Skill Point pada Armor | |
|
Similar topics | |
|
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
| Latest topics | » [Web Novel] Gloria Infidelis by LightNightKnight 2016-11-17, 21:27
» [Announcement] Forum baru untuk RMID by TheoAllen 2016-08-25, 16:39
» Where I'm Wrong ? by ReydVires 2016-07-24, 16:10
» flakeheartnet's Resources part III by flakeheartnet 2016-07-08, 14:30
» Keira's Art Warehouse by KeiraBlaze 2016-06-28, 19:27
» Theo Core Time System + Bingung by Lockin 2016-06-27, 16:24
» Error Script, Maybe ? by Lockin 2016-06-27, 16:20
» Nusaimoe @ RMID Lounge by Jihad Bagas 2016-06-21, 05:02
» Call Random Battle by Lockin 2016-06-15, 17:04
» Flakeheartnet Resources Part II [come back gift] by flakeheartnet 2016-06-07, 15:51
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|