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 >  
Closed TopicStart new topic
> Skill Requirement System 1.1
icecold49
post Mar 30 2008, 10:37 AM
Post #21


My rmvx project is taking longer than I expected...
Group Icon

Group: Revolutionary
Posts: 116
Type: Developer
RM Skill: Advanced




I have to say that this is one solid script here. Very nice. Yes, this will definitely come useful in my game. Thanks Queen. smile.gif


__________________________
Go to the top of the page
 
+Quote Post
   
luciddose
post Mar 30 2008, 12:33 PM
Post #22



Group Icon

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




I was wondering how you can make this work with Fomar0153 Blue mage script, after implimenting this script which works fine, my characters no longer learn any skills from enemies.
Go to the top of the page
 
+Quote Post
   
Queex
post Mar 30 2008, 01:47 PM
Post #23


Level 6
Group Icon

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




We both change Scene_Battle.execute_action_skill for different reasons. I'm not entirely up to speed with aliases yet.

Try this and let me know if it fixes it:

CODE
#####################################
# Check for requirements for skills #
#####################################
class Game_Actor < Game_Battler

def hands_free
if weapons[0]==nil
if @armor1_id[0]==0
return 2
elsif weapons.length==2
if weapons[1].two_handed
return 0
else
return 1
end
else
return 1
end
elsif weapons[0].two_handed or @armor1_id!=0
return 0
else
return 1
end
end

def skill_can_use?(skill)
#Usual checks
return false unless skill_learn?(skill)
return false unless skill.is_a?(RPG::Skill)
return false unless movable?
return false if silent? and skill.spi_f > 0
return false if calc_mp_cost(skill) > mp

if skill.id != 0
skill_note=$data_skills[skill.id].note
#Check for weapon type
skill_needs = getTag(skill_note,"weapon_type") #weapon type string
if skill_needs != nil
return false unless @weapon_id!=0
return false unless hasTagValue($data_weapons[@weapon_id].note,"weapon_type",skill_needs)
end

#Check for item presence
skill_needs = getTag(skill_note,"item_present") #item id
if skill_needs != nil
return false unless $game_party.has_item?($data_items[skill_needs.to_i],true)
end

#Check for item consumption
skill_needs = getTag(skill_note,"item_consume") #item id
if skill_needs !=nil
skill_needs_num = getTagAdditionalValue(skill_note,"item_consume",2) #number
if skill_needs_num == nil
skill_needs_num = 1
end
return false unless $game_party.item_number($data_items[skill_needs.to_i])>=skill_needs_num.to_i
end

#Check for HP exceeds
skill_needs = getTag(skill_note,"hp_percent_exceed") #percent
if skill_needs !=nil
return false unless (100.0 * @hp/maxhp)>=skill_needs.to_f
end

#Check for HP below
skill_needs = getTag(skill_note,"hp_percent_below") #percent
if skill_needs != nil
return false unless (100.0 * @hp/maxhp)<skill_needs.to_f
end

#Check for MP exceeds
skill_needs = getTag(skill_note,"mp_percent_exceed") #percent
if skill_needs != nil
return false unless (100.0 * @mp/maxmp)>=skill_needs.to_f
end

#Check for MP below
skill_needs = getTag(skill_note,"mp_percent_below") #percent
if skill_needs != nil
return false unless (100.0* @mp/maxmp)<skill_needs.to_f
end

#Check for free hand
skill_needs = hasTag(skill_note,"free_hand") #boolean
if skill_needs
return false unless hands_free>=1
end

#Check for dual weapons
skill_needs = hasTag(skill_note,"dual_weapon") #boolean
if skill_needs
return false unless weapons[0]!=nil and weapons[1]!=nil
end

#Check for two-handed weapon
skill_needs = hasTag(skill_note,"two_handed_weapon") #boolean
if skill_needs
return false unless ( weapons[0]!= nil and weapons[0].two_handed) or (weapons[1] != nil and weapons[1].two_handed)
end

end

if $game_temp.in_battle
return skill.battle_ok?
else
return skill.menu_ok?
end
end


def calc_mp_cost(skill)
base_cost=skill.mp_cost

mp_prop=getTag(skill.note,"mp_percent_exceed")
if mp_prop!=nil
mp_lose=getTagAdditionalValue(skill.note,"mp_percent_exceed",2)
if mp_lose.eql?("true")
base_cost=(mp_prop.to_f/100.0 * maxmp).to_i
end
end

if half_mp_cost
return base_cost / 2
else
return base_cost
end
end

end

class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# * Execute Battle Action: Skill
#--------------------------------------------------------------------------
alias skill_req_execute_action_skill execute_action_skill
def execute_action_skill
skill_req_execute_action_skill
skill = @active_battler.action.skill

#consume items required
skill_needs = getTag(skill.note,"item_consume")
if skill_needs != nil
num_items = getTagAdditionalValue(skill.note,"item_consume",2)
if num_items==nil
num_items=1
end
$game_party.lose_item($data_items[skill_needs.to_i],num_items.to_i,true)
end
end
end
Go to the top of the page
 
+Quote Post
   
aevonhaldy
post Mar 30 2008, 02:59 PM
Post #24


Level 4
Group Icon

Group: Member
Posts: 58
Type: Developer
RM Skill: Beginner




QUOTE (Queex @ Mar 30 2008, 11:32 AM) *
Hmm. I don't know about that. I don't get an error my end. Are you using any other scripts that affect Scene_Battle at all? That line is taken unaltered from the default code so I have no idea why it may cause a syntax error.


Erg! That could be it! I am using DerVVulfman's battlebacks script and Lomexi's Battle Theme adjuster... (@_@)!

..I will take a look at it later when I have more time--unless anyone already knows what the conflict might be.


__________________________
[Show/Hide] VX Project

Story - 85%
Database - 55%
Scripts - 90%
Maps - 8%
Graphics - 38%
Original Music - 20%
Go to the top of the page
 
+Quote Post
   
Queex
post Mar 30 2008, 04:07 PM
Post #25


Level 6
Group Icon

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




I'm using battlebacks (before this script) without problems. Try moving scripts to after main until the problem goes away.
Go to the top of the page
 
+Quote Post
   
aevonhaldy
post Mar 30 2008, 06:29 PM
Post #26


Level 4
Group Icon

Group: Member
Posts: 58
Type: Developer
RM Skill: Beginner




Well, I tried taking out my scripts ONE BY ONE until I was left with just TagNote and the Skill Req script, but still the syntax error on the last line. (!)

Finally, I just added "end, end" to the end... and it SEEMS to work (so far so good).

CODE
display_animation(targets, skill.animation_id)
end
end


I have yet to do much with the actual notes, so we shall see... Anyway, thanks for your helpful demeanor! (And I'll be back if I have more problems that I can't fix on my own! But here's hoping I wont have any!)

Regards,
AEVH


__________________________
[Show/Hide] VX Project

Story - 85%
Database - 55%
Scripts - 90%
Maps - 8%
Graphics - 38%
Original Music - 20%
Go to the top of the page
 
+Quote Post
   
Queex
post Mar 31 2008, 12:51 AM
Post #27


Level 6
Group Icon

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




Actually- that shouldn't be the last line. I think you may not have copied all of it. Double check that and see if it works.
Go to the top of the page
 
+Quote Post
   
aevonhaldy
post Mar 31 2008, 08:28 AM
Post #28


Level 4
Group Icon

Group: Member
Posts: 58
Type: Developer
RM Skill: Beginner




QUOTE (Queex @ Mar 31 2008, 03:05 AM) *
Actually- that shouldn't be the last line. I think you may not have copied all of it. Double check that and see if it works.


Hm, yeah, that was one of the first things I checked when I got the script because I thought the end looked funny. --But I can't seem to get the code box to scroll down any further than that line. I often have trouble with code boxes though...maybe because I'm in Internet Explorer....

I don't suppose I could trouble you to post the full code as a TXT file download?


__________________________
[Show/Hide] VX Project

Story - 85%
Database - 55%
Scripts - 90%
Maps - 8%
Graphics - 38%
Original Music - 20%
Go to the top of the page
 
+Quote Post
   
Queex
post Mar 31 2008, 02:07 PM
Post #29


Level 6
Group Icon

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




Done- check the original post. That version is the semi-experimental one posted earlier attempting to use an alias, so if there are still problems I'll revert it to the older version.

I intend to upgrade this at some point, after revising TagNote to handle multiple tags of the same type properly.
Go to the top of the page
 
+Quote Post
   
aevonhaldy
post Mar 31 2008, 03:06 PM
Post #30


Level 4
Group Icon

Group: Member
Posts: 58
Type: Developer
RM Skill: Beginner




Thanks Queex,

You are awesome. I look forward to any upgrades, etc., because this is a really useful script. Thanks for making it.


__________________________
[Show/Hide] VX Project

Story - 85%
Database - 55%
Scripts - 90%
Maps - 8%
Graphics - 38%
Original Music - 20%
Go to the top of the page
 
+Quote Post
   
Dark Koji
post Apr 1 2008, 07:55 AM
Post #31


Level 1
Group Icon

Group: Member
Posts: 8
Type: Artist
RM Skill: Beginner




Yo there!

I noticed that if I set <weapon_type x> to a specified skill, the skill will only work when the "x" weapon is equipped to the character's first weapon slot.

This means that when I shift the same weapon over to the character's shield slot (secondary weapon in this case, since he is allowed to wield two weapons), the skill will still remain disabled - not recognizing the presence of "x" weapon in place.

Any tips on how can I overcome this problem?
Go to the top of the page
 
+Quote Post
   
Queex
post Apr 1 2008, 08:15 AM
Post #32


Level 6
Group Icon

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




I'll fix the script. Tonight, probably. Should be fairly trivial.

Edit: Done. As always, if there are any problems with it let me know. I've cleaned it up a little, too.

This post has been edited by Queex: Apr 1 2008, 10:03 AM
Go to the top of the page
 
+Quote Post
   
Dark Koji
post Apr 1 2008, 03:56 PM
Post #33


Level 1
Group Icon

Group: Member
Posts: 8
Type: Artist
RM Skill: Beginner




Tested it, and it works! Both when equipped with only the weapon on the off-hand, and with two weapons~ Great job as always, Queex!

Oh and, I would like to point out that there is a small bug with <item_consume x>.
You still have to state 'n', as in <item_consume x n> in order for the item to be consumed.

The problem is nothing big, though just wanna let you know it won't be assumed as 1, without an 'n' stated. >_<
Go to the top of the page
 
+Quote Post
   
Queex
post Apr 1 2008, 04:19 PM
Post #34


Level 6
Group Icon

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




Umm, it seems to work for me. As ever, check both it and TagNote are the latest version, other scripts, etc. etc. I'll look into it if the problem persists.
Go to the top of the page
 
+Quote Post
   
luciddose
post Apr 2 2008, 11:25 PM
Post #35



Group Icon

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




wow that totally works - thank you, dont know what you did but it works like a charm. You rock! Mucho Kudos!
Go to the top of the page
 
+Quote Post
   
Queex
post Apr 4 2008, 05:03 PM
Post #36


Level 6
Group Icon

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




Bump for newer version.

Now uses the revised TagNote script, has a couple of fixes and includes a facility to make sure required items appear in the inventory when testing battles.
Go to the top of the page
 
+Quote Post
   
yuukimaru
post Apr 9 2008, 01:15 PM
Post #37



Group Icon

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




hey is there a way to make one of the requirements being that the actor is under a certain state? like a light arts/dark arts set up if anyone has played FFXI >.>
Go to the top of the page
 
+Quote Post
   
hjorverdr
post May 28 2008, 09:16 AM
Post #38



Group Icon

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




sorry, i'm having problems with the status on the skills
for example, if a skill causes atk up, there's an error. it is in line 196. i don't know anything about scripting, but i guess that the error is in all this part:

#consume items required
skill_needs = get_tag(skill.note,"item_consume")
if skill_needs != nil
num_items = get_additional_tag(skill.note,"item_consume",2)
if num_items==nil
num_items=1
end
$game_party.lose_item($data_items[skill_needs.to_i],num_items.to_i,true)
end
end
end

even so, it's a great job, man wink.gif
Go to the top of the page
 
+Quote Post
   
thinkabout
post May 28 2008, 12:26 PM
Post #39


Level 3
Group Icon

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




This script looks solid.
I'll look forward <gold_exceed p> and <party_member_present p>


__________________________
Keep thinking.....
Go to the top of the page
 
+Quote Post
   
Queex
post May 29 2008, 05:57 AM
Post #40


Level 6
Group Icon

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




I've been side-tracked by other time sinks recently- most notably getting my car past the MOT- so it might be a while before I make any substantial revisions- although thinkabout's suggestions are definitely good choices for inclusion.

As for hjorverdr's problem, I can't see any way that status effects could interfere. Can you verify that the problem isn't present for a skill with identical requirements but no status effect, and that you're using the latest version in the zip file?
Go to the top of the page
 
+Quote Post
   

3 Pages V  < 1 2 3 >
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 08:52 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker