Average Actor Level
Authors: game_guy
Version: 1.0
Type: Level Add-On
Key Term: Actor Add-on
IntroductionWhat this script does is when you add an actor to the party instead of the actors level being 1 this will average the total level amount of the party and make it so the actor will have the same level area of the party.
Features
- Makes new party member have level equal to party's averaged level
- Easy to use
- Makes it so you can still normally add actors without level averaging
ScreenshotsN/A
DemoDemo (http://www.sendspace.com/file/uzflq7)
Script
#===============================================================================
# Average Actor Level
# Author game_guy
# Version 1.0
#-------------------------------------------------------------------------------
# Intro:
# What this script does is when you add an actor to the party instead of the
# actors level being 1 this will average the total level amount of the party
# and make it so the actor will have the same level area of the party.
#
# Features:
# Makes new party member have level equal to party's averaged level
# Easy to use
# Makes it so you can still normally add actors without level averaging
#
# Instructions:
# In a script call command just type this in
# a_add_actor(actor_id)
# actor_id = id of the actor in database
# to average the level.
#
# Side Notes:
# This can be easily evented but who cares. I like making things more
# easy.
#
# Credits:
# game_guy ~ for making it
#===============================================================================
class Game_Party
alias gg_average_levels add_actor
def add_actor(actor_id, average=false)
if average
actor = $game_actors[actor_id]
level = 0
for i in 0...$game_party.actors.size
level += $game_actors[$game_party.actors[i].id].level
end
level = level / $game_party.actors.size
actor.level = level
end
gg_average_levels(actor_id)
end
end
class Game_Actor
attr_accessor :level
end
class Interpreter
def a_add_actor(id)
$game_party.add_actor(id, true)
end
end
InstructionsIn the script.
CompatibilityShould work with everything.
Not tested with SDK
Credits and Thanks
Author's NotesGive credits and enjoy.
This can be easily evented but who cares this makes it easier.
Cool script bro, but...can't this be Evented easily?
Set Variable 001 to Actor 01's level
Add Actor 02's level to Variable 001
Add Actor 03's level to Variable 001
Divide Variable 001 by 3
Add New Party Member
Subtract Variable 001 by One (This is because the Party Member will be Level 1)
Set Level of New Party Member by Variable 001
...I guess?
I can see some uses where this script beats eventing though, mainly on parts where Party member count cannot be determined.
Yea but didnt you see the side notes in the script? Maybe I should add those.
Quote from: game_guy on August 30, 2009, 02:00:17 am
This can be easily evented but who cares this makes it easier.
Lol, beat me to it. I wanted to say that. xD
It does makes things easier if you don't know who's in your party, though.
Cool script G_G! Wish I'd found this earlier.
Hope you don't mind if I use this ~ ^_^
Necropost achieved!
Oh god you're right.