script help

Status
Not open for further replies.

nightdragon

Veteran
Veteran
Joined
Mar 24, 2012
Messages
92
Reaction score
6
First Language
English
Primarily Uses
Hi

I'm using Yanfly's Learn skill and JP manager scripts. I manged to show the jp in the status

screen and put all the note tags in but it does not add to the total jp. what am I missing?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
please link to the scripts, so that we can read it's description - otherwise helping becomes difficult.
 

Euphoria

Veteran
Veteran
Joined
Jun 27, 2013
Messages
378
Reaction score
93
First Language
English
Primarily Uses
These are the note tags:

# -----------------------------------------------------------------------------# Actor Notetags - These notetags go in the actors notebox in the database.# -----------------------------------------------------------------------------# <jp rate: x%># Changes the JP earned rate to x%. This affects JP earned and not JP directly# gained. If this notetag isn't used, the object will default to 100%.# # -----------------------------------------------------------------------------# Class Notetags - These notetags go in the class notebox in the database.# -----------------------------------------------------------------------------# <jp rate: x%># Changes the JP earned rate to x%. This affects JP earned and not JP directly# gained. If this notetag isn't used, the object will default to 100%.# # -----------------------------------------------------------------------------# Skill Notetags - These notetags go in the skills notebox in the database.# -----------------------------------------------------------------------------# <jp gain: x># When the actor successfully hits an target with this action, the actor will# earn x JP. If this notetag isn't used, the amount of JP earned will equal to# the ACTION_JP constant in the module.# # -----------------------------------------------------------------------------# Item Notetags - These notetags go in the items notebox in the database.# -----------------------------------------------------------------------------# <jp gain: x># When the actor successfully hits an target with this action, the actor will# earn x JP. If this notetag isn't used, the amount of JP earned will equal to# the ACTION_JP constant in the module.# # -----------------------------------------------------------------------------# Weapon Notetags - These notetags go in the weapon notebox in the database.# -----------------------------------------------------------------------------# <jp rate: x%># Changes the JP earned rate to x%. This affects JP earned and not JP directly# gained. If this notetag isn't used, the object will default to 100%.# # -----------------------------------------------------------------------------# Armour Notetags - These notetags go in the armour notebox in the database.# -----------------------------------------------------------------------------# <jp rate: x%># Changes the JP earned rate to x%. This affects JP earned and not JP directly# gained. If this notetag isn't used, the object will default to 100%.# # -----------------------------------------------------------------------------# Enemy Notetags - These notetags go in the enemy notebox in the database.# -----------------------------------------------------------------------------# <jp gain: x># Changes the amount of JP gained for killing the enemy to x. If this notetag# isn't used, then the default JP gain will be equal to the amount set in the# module through the constant ENEMY_KILL.# # -----------------------------------------------------------------------------# State Notetags - These notetags go in the states notebox in the database.# -----------------------------------------------------------------------------# <jp rate: x%># Changes the JP earned rate to x%. This affects JP earned and not JP directly# gained. If this notetag isn't used, the object will default to 100%.
Unless you were in battle, there is no way to gain JP through note tags. If you put the tags on an actor or class, that is a modifier of how much JP they will receive. NOT how much they will obtain. To give an actor JP without battling you have to use these script calls:

Code:
$game_actors[x].earn_jp(y)# $game_actors[x].earn_jp(y, z)# This will cause actor x to earn y amount of JP. JP earned will be modified by# any JP Rate traits provided through notetags. If z is used, z will be the# class the JP is earned for.# # $game_actors[x].gain_jp(y)# $game_actors[x].gain_jp(y, z)# This will cause actor x to gain y amount of JP. JP gained this way will not# be modified by any JP Rate traits provided through notetags. If z is used,# z will be the class the JP is gained for.# # $game_actors[x].lose_jp(y)# $game_actors[x].lose_jp(y, z)# This will cause actor x to lose y amount of JP. JP lost this way will not be# modified by any JP Rate traits provided through notetags. If z is used, z# will be the class the JP is lost from.
 

nightdragon

Veteran
Veteran
Joined
Mar 24, 2012
Messages
92
Reaction score
6
First Language
English
Primarily Uses
Thanks for responding. It would be cool if I could also see the total JP. I'll still use the scrip. But I don't know how to use the $game_actors[x]. earn_jp(y) script call properly. My print screen doesnt work so I just type it.

I get an error on line 1409 Game Interpreter. undefinded local variable or method 'x' for #<Game_Interpreter: 0x8bd3adc>.

  def command_355

    script = @list[@index].parameters[0] + "\n"

    while next_event_code == 655

      @index += 1

      script += @list[@index].parameters[0] + "\n"

    end

    eval(script)

  end

end 

 

 

Im using Yanflys message system, button common events, JP manager scripts and learn skill scripts. Khas Sapphire Action system, HUD scripts. and modern algebra quest scripts

 

 

Yanflychannel.wordpress.com

 

http://rmrk.net/index.php/topic,45127.0.html

 

arcthunder.blogspot.com.br/p/rpg_maker.html
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Thanks for responding. It would be cool if I could also see the total JP. I'll still use the scrip. But I don't know how to use the $game_actors[x]. earn_jp(y) script call properly. My print screen doesnt work so I just type it.


I get an error on line 1409 Game Interpreter. undefinded local variable or method 'x' for #<Game_Interpreter: 0x8bd3adc>.
You do not type in the x or y, you need to replace them with the numbers that are correct for your game.
X has to be replaced by the ID of the actor - who should get the JP?


Y has to be replaced with the number of JP to be added - how many JP should actor X get?
 

nightdragon

Veteran
Veteran
Joined
Mar 24, 2012
Messages
92
Reaction score
6
First Language
English
Primarily Uses
Thanks, I was putting the name of the character for x instead of the ID.  :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top