Main Menu
  • Welcome to The RPG Maker Resource Kit.

[VX] Creating Skills using Variables.

Started by thanatos2k1, July 12, 2011, 05:58:55 AM

0 Members and 1 Guest are viewing this topic.

thanatos2k1

Ok, I've created a few skills such as detecting and disarming traps.. One problem..  I don't want people to be able to grind this out and get 100 points in it over night..  I would like something to check the level of the character and only be able to get to a certain points in skills.

In example:

Ralph is Level 2,  he has disable trap skill, with 3 points in it:  (It goes up at a 31%chance).

I'm using a d20 like system for this so

Random 1-20 integer + Disable Trap Skill (3):  He rolled a 14+3 = 17. He was able to disable the trap.

Now..  The problem I'm running into is this:
At level 2 he should only be able to have 4 points, at level 3 he can get up to 5 points and so on..

How do I make this happen?

I used Conditional Branches to check the level and skill so that if it is 2 for level and 4 points it doesnt run the Skill up event.

I notice now though that even if they come back at a later time and level (say 20) to disable the trap you won't get skill up either.

How can I make a script to use an algorhythm for a max rank system as per level
Level/Max Points
1/3
2/4
3/5

Without having to rewrite this all in conditional throughout the event.. ehich would take way too long and make me not want to do this..

I'm trying to use the script/rank system for all actors..  Any ideas?


Heres my tiny script i made for the skill system with the d20 and a variable:

#Skill System
#------------------------------------------------------------
# Written by Matthew Pappalardo and Nicholas LoBianco
# Version 1.0
#------------------------------------------------------------

#  This script is used as a basic d20 rolling system using variable for a skill.



class Detect_d20
 
  def initialize
   
   
@@detect_skill = $game_variables[19]  # <--- Change this Variable
@@roll_20 = rand(20)  # <--- Random # generated. (d20)


$det_trap = @@roll_20+@@detect_skill

   end
end

pacdiggity

$game_variables[VARIABLE ID] = $game_actors[ACTOR ID].level
That will make a variable equal to the actor level. Now, to control your skill...
$game_variables[VARIABLE ID] += 2
If I am understanding correctly that you want the variable to be equal to the actor's level + 2?

EDIT:: You can actually do both of those commands through events.
it's like a metaphor or something i don't know

thanatos2k1

Well,  the system is skill based not level based, I want there to be a cap for how many points you can get per level..

So if you're level 2, the max you should be able to get is 4 in the disarm skill, I don't want  the skill to go up when you level.  Is there any way to do that?

pacdiggity

$game_variables[1] = $game_actors[ID].level
if $game_variables[1] >= $game_actors[ID].level + 2
  nothing
else
  $game_variables[2] += 1
end

Which can also be done without eventing.
it's like a metaphor or something i don't know

thanatos2k1

Thank you for the advice, it works really well. :P