Level Modification by Hero
#1
Level Modification by Hero
by iPenguin
Jun 9 2010

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Hello,

This is my first script and it is very short, I am not even sure if this is the right section.

Function:
Call this script before adding a character to the party (for their first time).
It adjust the new character's initial level equal to the main Hero's level. You can specify who the main hero is, or even make it a relative of the character. It basically increases the level of a lower level character to a higher one; it won't modify anything if the new character is already higher, thus if you accidentally call it when it isn't the character's first time joining it won't do any harm other than some beefing up.

This can easily be done via variables and such without the aid of scripts but I like the simplicity of only having to call one line of code with 2 numbers (actor ids) rather than all the variable modifications.

How to use it:
1. Go to the event where the character joins.
2. Call Script
3. Type Mod.new(ACTOR ID of the Character Joining, ACTOR ID of the Main Hero or Higher Level char)
4. Add the party member
5. Heal the party

The code
Code:
#Level Modification by Hero Script
#By iPenguin
#
#Free for use and adaption
#
#Call script before adding the Actor.
#Call by  Mod.new(ID of New Actor, ID of Main Actor)
#Example: Actor 2 is the main character and Actor 1 is the newly joining
#character.
#                Mod.new(1,2)
#
# You can also set the Main Actor ID as any other actor, such as the character's
# brother or parent or something.


module LevelMod
end
class Mod
  #First the new recruit, then the main character
  attr_accessor :actor1
  attr_accessor :actor2
  def initialize(actor1, actor2)
    @actor1 = actor1
    @actor2 = actor2
    @level = $game_actors[@actor1].level
    @level2 = $game_actors[@actor2].level
    @actor3 =  $game_actors[@actor1]
    if @level <= @level2
      @actor3.level=(@level2)
    end
  end
end


Adaption:
I have some ideas how to make it more customizable but not completely sure how to go about it.
Thus if you want to add your own, be my guest. My personal ideas were to add a configuration at the top where you can set an offset for how much the level should differ. Maybe you don't want it equal but one level below for example.

I could also do that by adding a 3rd parameter for offset, but eh.
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Hero HP Bar in map Sheol 0 2,515 11-19-2005, 01:00 PM
Last Post: Sheol



Users browsing this thread: 1 Guest(s)