[XP] Legacy Class Change

Started by legacyblade, August 26, 2008, 06:23:45 pm

Previous topic - Next topic

legacyblade

As to the first question, I might try adding that as a feature, if I get the time this weekend.

For your second question...

To check the level of a certain actor's class by overall ID (their database ID), use the following in the script field of a conditional branch

$game_actors[ACTOR_ID].class_levels[CLASS_ID] == CLASS_LEVEL


Where ACTOR_ID is the ID of the actor, CLASS_ID is the database ID of the class you want to check, and CLASS_LEVEL is the required level for the branch to execute (if you want them to have to have 2 class levels, CLASS_LEVEL would be 2

If you want to check the class level of a certain person based on their position in the party (is the current player a level 5 cleric, for example), use the following

$game_party.actors[POSITION].class_levels[CLASS_ID] == CLASS_LEVEL


Where Position is the position in the party (the one you're controlling is 0, and it just goes up from there), CLASS_ID is the database ID of the class you want to check, and CLASS_LEVEL is the required level for the branch to execute (if you want them to have to have 2 class levels, CLASS_LEVEL would be 2

Hope that made sense!

TheGreyFox

I get "Script 'Legacy Class Change' line 251: SyntaxError occurred" o.o I just pasted the script in

legacyblade

you need to set up configuration to not get a syntax error. I suggest using the project from the demo as a base for your game, since it already has some classes and configuration set up.

Arkaea Halfdemon

This looks excellent... just what I need, actually, and I hadn't even thought about it. My main character is the only character you get to play as, in the game. He, however, can transform into two other unique characters (using the Chaos Limit sys. Ano no, they are not transforms. They are actual characters.), so you can actually use three characters... just not at once.

Using this, I can make the main character as versatile as he should be... Thanks a bunch  :haha:

TheGreyFox

uhh...how do I disable the graphic change in the class changing menu?

fugibo

Two steps:

1) Hit Control-F and search for "CLASS_GRAPHIC_CHANGE"
2) When you find the line with an "= true" on it, replace "true" with "false"

When you're done, it should look like this:

  CLASS_GRAPHIC_CHANGE = false

Kirye

Hey, i'm new here, and i'm not sure if this has been answered somewhere. I've been using your script for the past few weeks, amazing script by the way, and I just one small question. ><

Is it possible to make classes level up at a different ratio than characters?

Spoiler: ShowHide

legacyblade

I don't quite understand what you're asking. Could you give me more information on what you're trying to do?

Kirye

July 01, 2009, 08:27:35 pm #68 Last Edit: July 01, 2009, 09:54:55 pm by Kirye
Sorry for not being clear. >< Here's what I mean.

Main character is level 4 and is a Level 1 Healer. When he goes to level 5, Healer class becomes level 2. But unless I did something wrong, or that's how the script is written as, the main character could be level 50 and the class he's using wouldn't level up at all until he becomes level 51.

I was wondering if there was a way to level up classes without the character having to level up? Or am I doing something wrong? XD

Spoiler: ShowHide

legacyblade

Oh, crap, I thought I responded to this already. Sorry for the delay.

That is actually the design of the system. Think about it. If you had been studying as say...a Fighter all your life (the "I like swords" people), and suddenly you decide "You know what, I wanna be a mage", would it make ANY sense for combat training to directly translate into mage training? You'd have to start as a beginner mage, makes sense right?

However, if you want to give a class level up, use this code

$game_actors[1].
class_levels[$game_actors[
1].class_id] += 1


that would give actor 1 a level up in whatever class he is currently using.

I hope that helped. Needless to say, I will not add the feature you're looking for, as it makes no logical sense whatsoever. I could help you edit the script if you want that though, as it just requires removing some lines of code.

Kirye

I still don't think you know what I mean, but that script for class level ups does help. XD

What I meant was that at Base Level 30, it would take the same amount of time to level up Mage 1 to Mage 2 as it would to level up your Base Level to 31.

At Baselvl 1, it takes 20 exp to reach level 2. Fighter lv 1 will also take 20 exp to reach level 2.
At Baselvl 30, it takes 1327 exp to reach level 31. Mage lv 1 will also take 1327 exp to reach level 2.

And if you're level 99, you cannot level up any classes further.

Regardless, I edited the game to work with your script's current programming, so it doesn't matter now. XD

Spoiler: ShowHide

legacyblade

OH!! That makes sense. Thanks for the idea, I'd never even thought of doing that. I'll try and add that option to do that into my script. What a great idea. Thanks Kirye.

Kirye

Awesome. =o I was hoping for an FFT style of class leveling, where the classes leveled up differently than the main character, but finding a script like that is hard. I thought about doing something of my own with events, but it would have taken too long and not have been as effective. ><

Anywho, thanks for taking the time to respond, and again I love the script. Very useful.

Spoiler: ShowHide

sournote103

Is there a way to change an actor's class via event? (I.E. When Actor 1 talks to Event 1, Actor 1 changes class to Class 2.)
If anyone can help me, that would be very helpful.

legacyblade

Yes. Use the  "Change Actor Class" event command (it's on the tab 3)

sournote103

Quote from: legacyblade on October 20, 2009, 09:02:02 pm
Yes. Use the  "Change Actor Class" event command (it's on the tab 3)

Right! Forgot about that little button. I wasn't entirely sure it would work completely with the script, as well.

legacyblade

No problem. And all events work just the same way they always have, with this script. I designed it to work with 99% of scripts too. If you ever find a problem that it causes, though, it'd be great if you could report them here :D

sournote103

So, I'm using a system to where the player's level doesn't matter. Is there a way to display the player's Job Level on the menu, rather than their actual level?

legacyblade

Oh, sorry, I missed that. Just add the following script right below the class change script

Spoiler: ShowHide

class Window_Base < Window

 def draw_actor_level(actor, x, y)
   self.contents.font.color = system_color
   self.contents.draw_text(x, y, 32, 32, "Lv")
   self.contents.font.color = normal_color
   self.contents.draw_text(x + 32, y, 24, 32, actor.class_levels[actor.class_id].to_s, 2)
 end

end

class Window_Actor_List < Window_Selectable

 def refresh
   self.contents.clear
   @item_max = $game_party.actors.size
   for i in 0...$game_party.actors.size
     x = 64
     y = i * 80
     actor = $game_party.actors[i]
     draw_actor_graphic(actor, x - 40, y + 55)
     draw_actor_name(actor, x, y)
     self.contents.draw_text(x, y + 32, width - 32, 32, ($data_classes[$game_party.actors[i].class_id].name + ' rank: ' + $game_party.actors[i].class_levels[$game_party.actors[i].class_id].to_s))
   end
 end
end


That'll display your class level in the main menu, as well as remove the display of your overall level from the class change window (it'll only show your class level)


--edit--

by the way, the demo link has been fixed. Sorry for the inconvenience, my hosting on that server somehow got canceled. (no, I didn't miss the payment like ole blizzy :P)

CursedSoldier

Not sure how old this is but i just jioned and i found your script its awesome but i keep getting Syntax Errors on this portion of the script. Specifically the first end

  def self.class_spells(class_id)
    case class_id
       
      end
     
    return []
  end