i found this script while looking on the internet for scripts, i did not make this, you may credit me for looking up but not needed.
the script is made by prexus, i found it on http://rm-dev.org/portfolio/index.html
discription
-PARTY CHANGER
it lets you have a party of maximum 4 characters, you can put characters in or out the party at any moment by the party in the menu
-INN
can be evented but this looks better, you get a choice for staying for night, if you chose yes it cost 30 gold and you heal and stuff
-BEASTIONARY
the best thing about this script, it is like the pokedex in every pokemon game, from the menu you have a option beastionary, if you click that it wil show a list from all enemies in your game, when the player has never faught to a monster its name will be ???? and nothing will be shown about it, when he has faught against a monster its name will be show, among with a picture and all info about the monster (like this: (https://rmrk.net/proxy.php?request=http%3A%2F%2Frm-dev.org%2FScripts%2FPX%2520Module%2FScreenshot3.png&hash=20f2f6d603771b46818fe43c33a76ff5b17b6607)) in this picture you can only see the half of the monster because it is to big.
the script:
[spoiler]
# --------------------------------- #
# PX Mod
# By Prexus
# Adds features to RMXP including:
# Party Selector
# Inn
# Beastiary
# --------------------------------- #
module PXMod
ENABLED = true;
INN_SE = "137-Light03";
STEXT_COLOR = Color.new(0, 0, 0, 192);
class Window_Help < Window_Base
def initialize
super(0, 0, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
end
def set_text(text, align = 0)
if text != @text or align != @align
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text_shadow(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
def set_actor(actor)
if actor != @actor
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
draw_actor_hp(actor, 284, 0)
draw_actor_sp(actor, 460, 0)
@actor = actor
@text = nil
self.visible = true
end
end
def set_enemy(enemy)
text = enemy.name
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ""
text += " " + state_text
end
set_text(text, 1)
end
end
end
class Bitmap
def draw_text_shadow(x, y, wid, hei, text, align = 0)
color = self.font.color.clone;
self.font.color = PXMod::STEXT_COLOR;
draw_text(x+1, y+1, wid, hei, text, align)
self.font.color = color
draw_text(x, y, wid, hei, text, align)
end
end
# ------------------------------------------------------------------- #
# PXMod::Inn #
# By Prexus #
# Description: Mimics the Inn function of old RPG Makers and most #
# commercial RPGs. #
# ------------------------------------------------------------------- #
class Scene_Map
alias pxmod_s_map_update update
def update
if PXMod::ENABLED
if $inn
if $inn.active
$inn.update
else
$inn = nil
return
end
$game_map.update
$game_system.update
$game_screen.update
@spriteset.update
@message_window.update
return
end
end
pxmod_s_map_update
end
end
# ------------------------------------------------------------------- #
# Appends to Module::PXMod #
# By Prexus #
# These are parts of the script that act independantly of the default #
# RGSS coding. Its very important to PXMod to do the work this way. #
# ------------------------------------------------------------------- #
module PXMod
class Inn
attr_accessor :active
def initialize(price=0, message='Would you like to stay the night?')
@price = price
@message = message
@active = true
@wait_count = 0
@started = false
@message_window = PXMod::Window_InnMessage.new(@message.to_s)
@price_window = PXMod::Window_Price.new(@price)
@yesno_window = Window_Command.new(128, ['Yes', 'No'])
@yesno_window.x = 512
@yesno_window.y = 64
end
def update
@message_window.update
@price_window.update
@yesno_window.update
if @wait_count != 0
@wait_count -= 1
if @started
if @wait_count == 0
Audio.se_play("Audio/SE/" + PXMod::INN_SE)
for actor in $game_party.actors
actor.recover_all
end
$game_screen.start_tone_change(Tone.new(0, 0, 0, 0), 40)
@started = false
@wait_count = 80
end
else
dispose
return
end
return
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
dispose
return
end
if Input.trigger?(Input::C)
case @yesno_window.index
when 0 # Yes
if $game_party.gold < @price
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$game_party.lose_gold(@price)
$game_screen.start_tone_change(Tone.new(-255, -255, -255, 0), 40)
@message_window.visible = false
@price_window.visible = false
@yesno_window.visible = false
@started = true
@wait_count = 60
when 1 # No
$game_system.se_play($data_system.decision_se)
dispose
end
return
end
end
def dispose
@active = false
@message_window.dispose
@price_window.dispose
@yesno_window.dispose
end
end
class Window_InnMessage < Window_Base
def initialize(message)
super(0, 0, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.draw_text_shadow(4, 0, self.contents.width - 4, 32, message.to_s, 1)
end
end
class Window_Price < Window_Base
def initialize(price)
super(416, 64, 96, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.draw_text_shadow(4, 0, self.contents.width - 4, 32, price.to_s + ' ' + $data_system.words.gold, 1)
end
end
end
# ------------------------------------------------------------------- #
# PXMod::PartyManager #
# By Prexus #
# Description: Allows you to change your party based on availability. #
# ------------------------------------------------------------------- #
# Add a player's Party status to Game_Actor
class Game_Actor < Game_Battler
attr_accessor :party;
alias pxmod_g_actor_setup setup;
def setup(actor_id)
pxmod_g_actor_setup(actor_id);
@party = Game_Actor::Party.new;
end
# Subclass Party to Game_Actor holds any party information.
class Party
def initialize
# This determines if they are available in the PartySelector
@available = false;
@first_time = true;
@mandatory = false;
end
attr_accessor :available;
attr_accessor :first_time;
attr_accessor :mandatory;
end
end
# Adds functions to Game_Party to add and remove party members with ease.
class Game_Party
# Add the Manager subclass to Game_Party to handle methods to add/remove members
# with the new system.
attr_accessor :manager;
alias pxmod_g_party_initialize initialize
def initialize
pxmod_g_party_initialize;
@manager = Game_Party::Manager.new;
end
# Editting the default method to setup starting members to adjust for
# Game_Actor::Party
# Only if PXMOD_ENABLED == True
def setup_starting_members
@actors = [];
for i in $data_system.party_members
if PXMod::ENABLED
add_actor($game_actors.id);
else
@actors.push($game_actors);
end
end
end
# Adds a condition to add_actor to update Game_Actor::Party if PXMOD is on.
alias pxmod_g_party_add add_actor;
def add_actor(actor_id)
pxmod_g_party_add(actor_id);
return if not PXMod::ENABLED;
actor = $game_actors[actor_id];
@manager.add_actor(actor);
end
# Handles methods and classes beyond the default Game_Party
class Manager
# Updates the Actor's information if PXMOD is Enabled.
def add_actor(actor)
actor.party.available = true;
actor.party.first_time = false;
$game_player.refresh;
end
end
end
# Automagically creates the entire actor database instead of only if you have
# referenced $game_actors[id]. Makes it easier to locate unused actors.
class Game_Actors
# Makes Data readable.
attr_reader :data;
alias pxmod_g_actors_initialize initialize;
def initialize
pxmod_g_actors_initialize;
# Checks all of $data_actors and adds all the available actors.
for i in $data_actors
if @data[i.id] == nil
@data[i.id] = Game_Actor.new(i.id);
end
end
end
end
# ------------------------------------------------------------------- #
# Appends to Module::PXMod #
# By Prexus #
# These are parts of the script that act independantly of the default #
# RGSS coding. Its very important to PXMod to do the work this way. #
# ------------------------------------------------------------------- #
module PXMod
class Scene_PartyManager
def main
if not PXMod::ENABLED
$scene = Scene_Map.new;
return;
end
@current_party = Window_CurrentParty.new;
@available_actors = Window_Available.new;
@actor_status = Window_ActorStatus.new;
Graphics.transition;
loop do
Graphics.update;
Input.update;
update;
if $scene != self
break;
end
end
Graphics.freeze;
@current_party.dispose;
@available_actors.dispose;
@actor_status.dispose;
end
def update
@current_party.update;
@available_actors.update;
@actor_status.update;
if @current_party.active
@actor_status.actor(@current_party.actor);
if Input.trigger?(Input::B)
if $game_party.actors.size == 0
$game_system.se_play($data_system.buzzer_se);
return;
end
$game_system.se_play($data_system.cancel_se);
$scene = Scene_Menu.new(3);
return;
end
if Input.trigger?(Input::C)
@actor = @current_party.actor;
if @actor != nil
if @actor.party.mandatory
$game_system.se_play($data_system.buzzer_se);
return;
end
end
$game_system.se_play($data_system.decision_se);
@available_actors.active = true;
@available_actors.index = 0;
@current_party.active = false;
return;
end
return;
end
if @available_actors.active
@actor_status.actor(@available_actors.actor);
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se);
@actor = nil;
@available_actors.active = false;
@available_actors.index = -1;
@current_party.active = true;
@current_party.index = 0;
return;
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se);
$game_party.add_actor(@available_actors.actor.id) unless @available_actors.actor == nil;
$game_party.remove_actor(@actor.id) unless @actor == nil;
@current_party.refresh;
@available_actors.refresh;
@actor = nil;
@available_actors.active = false;
@available_actors.index = -1;
@current_party.active = true;
@current_party.index = 0;
return;
end
return;
end
end
end
class Window_ActorStatus < Window_Base
def initialize
super(232, 96, 288, 144);
self.contents = Bitmap.new(width - 32, height - 32);
@actor = nil;
refresh;
end
def actor(actor)
@actor = actor;
refresh;
end
def refresh
self.contents.clear;
return if @actor == nil;
draw_actor_graphic(@actor, 16, 48);
self.contents.draw_text_shadow(40, 0, 144, 24, @actor.name.to_s);
self.contents.draw_text_shadow(184, 0, 72, 32, "Lv. " + @actor.level.to_s, 2);
self.contents.draw_text_shadow(40, 24, 216, 24, @actor.class_name.to_s);
self.contents.draw_text_shadow(0, 48, 256, 32, "HP: " + @actor.hp.to_s + ":" + @actor.maxhp.to_s, 1);
self.contents.draw_text_shadow(0, 80, 256, 32, "SP: " + @actor.sp.to_s + ":" + @actor.maxsp.to_s, 1);
end
end
class Window_Available < Window_Selectable
def initialize
super(120, 240, 400, 144);
self.contents = Bitmap.new(width - 32, height - 32);
@data = [];
for i in $game_actors.data
next if $game_party.actors.include?(i);
next if i == nil;
next if i.party.available == false;
@data.push(i);
end
for i in 0...16-@data.size
@data.push(nil);
end
@item_max = @data.size;
@column_max = @data.size >= 8 ? 8 : @data.size;
@index = -1; @active = false;
refresh;
end
def actor
return @data[self.index];
end
def refresh
self.contents.clear;
@data = [];
for i in $game_actors.data
next if $game_party.actors.include?(i);
next if i == nil;
next if i.party.available == false;
@data.push(i);
end
for i in 0...16-@data.size
@data.push(nil);
end
for index in 0..@data.size
actor = @data[index];
return if actor == nil;
x = (index) % 8 * 48;
y = (index) / 8 * 64;
draw_actor_graphic(actor, x+16, y+48);
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty;
else
self.cursor_rect.set(@index % 8 * 48, @index / 8 * 64, 32, 48);
end
end
end
class Window_CurrentParty < Window_Selectable
def initialize
super(120, 96, 112, 144);
self.contents = Bitmap.new(width - 32, height - 32);
@item_max = 4;
@column_max = 2;
@index = 0;
refresh;
end
def actor
return $game_party.actors[self.index];
end
def refresh
self.contents.clear;
for index in 0..$game_party.actors.size
actor = $game_party.actors[index];
return if actor == nil;
x = (index) % 2 * 48;
y = (index) / 2 * 64;
draw_actor_graphic(actor, x+16, y+48);
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty;
else
self.cursor_rect.set(@index % 2 * 48, @index / 2 * 64, 32, 48);
end
end
end
end
# ------------------------------------------------------------------- #
# PXMod::Beastiary #
# By Prexus #
# Description: Allows you to view enemies in the game and their stats #
# ------------------------------------------------------------------- #
module RPG
class Enemy
alias pxmod_r_enemy_initialize initialize
def initialize
pxmod_r_enemy_initialize
@seen = false
end
attr_accessor :seen
def set_seen(yes = false)
@seen = yes
end
end
end
class Game_Enemy < Game_Battler
alias pxmod_g_enemy_initialize initialize
def initialize(troop_id, member_index)
pxmod_g_enemy_initialize(troop_id, member_index)
enemy = $data_enemies[@enemy_id]
enemy.set_seen(true)
end
end
module PXMod
class Window_BeastList < Window_Selectable
def initialize
super(480, 64, 160, 416);
self.index = 0;
refresh;
end
def enemy
return @data[self.index];
end
def refresh
if self.contents != nil
self.contents.dispose;
self.contents = nil;
end
@data = [];
for i in 1...$data_enemies.size
if $data_enemies.seen
@data.push($data_enemies);
else
@data.push('????');
end
end
@item_max = @data.size;
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32);
for i in 0...@item_max
draw_item(i);
end
end
end
def draw_item(index)
item = @data[index];
x = 4;
y = index * 32;
case item
when RPG::Enemy
self.contents.draw_text_shadow(x, y, self.contents.width - 8, 32,
"#{item.id}: #{item.name}", 0);
else
self.contents.draw_text_shadow(x, y, self.contents.width - 8, 32, item, 1);
end
end
end
class Window_BeastInfo < Window_Base
def initialize
super(0, 64, 480, 416);
self.contents = Bitmap.new(width - 32, height - 32);
end
def refresh(enemy)
return if enemy == @enemy;
@enemy = enemy;
self.contents.clear;
third_width = (self.contents.width - 8) / 3;
y_offset = 192;
if @enemy.is_a?(String);
rect = Rect.new(0, 0, third_width+8, 32);
rect2 = Rect.new(1, 1, third_width+6, 30);
self.contents.fill_rect(rect, Color.new(0, 0, 32, 160));
self.contents.fill_rect(rect2, Color.new(32, 32, 64, 114));
rect = Rect.new(0, y_offset, self.contents.width, self.contents.height - 192);
rect2 = Rect.new(1, y_offset + 1, self.contents.width - 2, self.contents.height - 194);
self.contents.fill_rect(rect, Color.new(0, 0, 32, 160));
self.contents.fill_rect(rect2, Color.new(32, 32, 64, 114));
return
else
bitmap = RPG::Cache.battler(@enemy.battler_name, @enemy.battler_hue);
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height);
x = (self.contents.width - bitmap.width) / 2;
self.contents.blt(x, 0, bitmap, src_rect);
rect = Rect.new(0, 0, third_width+8, 32);
rect2 = Rect.new(1, 1, third_width+6, 30);
self.contents.fill_rect(rect, Color.new(0, 0, 32, 160));
self.contents.fill_rect(rect2, Color.new(32, 32, 64, 114));
rect = Rect.new(0, y_offset, self.contents.width, self.contents.height - 192);
rect2 = Rect.new(1, y_offset + 1, self.contents.width - 2, self.contents.height - 194);
self.contents.fill_rect(rect, Color.new(0, 0, 32, 160));
self.contents.fill_rect(rect2, Color.new(32, 32, 64, 114));
end
self.contents.draw_text_shadow(4, 0, third_width, 32, @enemy.name, 1);
self.contents.draw_text_shadow(4, y_offset, third_width, 32,
"#{$data_system.words.hp}: #{@enemy.maxhp}", 0);
self.contents.draw_text_shadow(third_width, y_offset, third_width, 32,
"#{$data_system.words.sp}: #{@enemy.maxsp}", 0);
self.contents.draw_text_shadow(4, y_offset + 32, third_width, 32,
"#{$data_system.words.str}: #{@enemy.str}", 0);
self.contents.draw_text_shadow(4, y_offset + 64, third_width, 32,
"#{$data_system.words.dex}: #{@enemy.dex}", 0);
self.contents.draw_text_shadow(third_width, y_offset + 32, third_width, 32,
"#{$data_system.words.agi}: #{@enemy.agi}", 0);
self.contents.draw_text_shadow(third_width, y_offset + 64, third_width, 32,
"#{$data_system.words.int}: #{@enemy.int}", 0);
self.contents.draw_text_shadow(third_width*2, y_offset + 32, third_width, 32,
"EXP: #{@enemy.exp}", 0);
self.contents.draw_text_shadow(third_width*2, y_offset + 64, third_width, 32,
"#{$data_system.words.gold}: #{@enemy.gold}", 0);
self.contents.draw_text_shadow(4, y_offset + 128, third_width, 32,
"#{$data_system.words.atk}: #{@enemy.atk}", 0);
self.contents.draw_text_shadow(4, y_offset + 160, third_width, 32,
"Evasion: #{@enemy.eva}", 0);
self.contents.draw_text_shadow(third_width, y_offset + 128, third_width, 32,
"#{$data_system.words.pdef}: #{@enemy.pdef}", 0);
self.contents.draw_text_shadow(third_width, y_offset + 160, third_width, 32,
"#{$data_system.words.mdef}: #{@enemy.mdef}", 0);
self.contents.draw_text_shadow(third_width*2, y_offset + 128, third_width, 32,
"Prob%: #{@enemy.treasure_prob}", 0);
if @enemy.item_id > 0
item_name = $data_items[@enemy.item_id];
elsif @enemy.weapon_id > 0
item_name = $data_weapons[@enemy.weapon_id];
elsif @enemy.armor_id > 0
item_name = $data_armors[@enemy.armor_id];
else
item_name = 'No Treasure';
end
self.contents.draw_text_shadow(third_width*2, y_offset + 160, third_width, 32,
"#{item_name}", 0);
end
end
class Scene_Beastiary
def main
@help_window = PXMod::Window_Help.new;
@help_window.set_text("Press Cancel to return to the Menu.", 1)
@beast_list = PXMod::Window_BeastList.new;
@beast_info = PXMod::Window_BeastInfo.new;
@beast_info.refresh(@beast_list.enemy);
Graphics.transition;
loop do
Graphics.update;
Input.update;
update;
if $scene != self
break;
end
end
Graphics.freeze;
@help_window.dispose;
@beast_list.dispose;
@beast_info.dispose;
end
def update
@help_window.update;
@beast_list.update;
@beast_info.refresh(@beast_list.enemy);
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(5)
return
end
end
end
end
[/spoiler]
instructions:
open beastionary without the menu:
[spoiler]$scene = PXMod::Scene_Beastiary.new[/spoiler]
open party manager out the menu:
[spoiler]$scene = PXMod::Scene_PartyManager.new[/spoiler]
inn
[spoiler]$inn = PXMod::Inn.new(30)[/spoiler]
i dont really know what this does but its in the demo so you might need it:
[spoiler]$game_actors[8].party.available = false[/spoiler]
This reminds me of a similar set of scripts that Blizzard had on these forums, although he didn't create these ones by the looks.
Nice find. The inn one seems okay, but the party changer and bestionary (bestiary?) ones look great.
does someone knows a way to add a monster to the beastionary without fighting it? it is for my game with mr mos abs, and than you dont "fight" monsters anymore in the battle processing
The Bestiary was made by Blizzard, not the prexus guy. Blizzards updated bestiary looks like this. If you use it, fix your credits!
:S why does he puts them together with the prexes guy than? but ok, i will edit my first post, im not going to use it myself, im using an abs, just taught it whould be nice for you guys
I dunno about prexus, he might be taking credit for Blizz's work, or he could just like the script a lot. Anyways, thanks for the other two scripts, I like them :)
I'm fairly certain that that's not Blizzard's Bestiary. I think you can be comfortable crediting Prexus.
it's not blizzard's, blizz's bestiary is different :)
ok, than i change it back ::)
Are you sure? Huh it HAS been a while since I used Blizz s beast script...
Quote from: Blulightning on September 13, 2008, 09:02:17 PM
Are you sure? Huh it HAS been a while since I used Blizz s beast script...
yes, I'm sure.
I checked his script on CP just to be sure.
Well, thanks! Lol sorry about the confusion, I believe Blizz uses that monster in his screenies as well. Lemme check...
Yep! He does! The leviathan or whatever :) Anyway I am SO sorry I messed that up.
this all makes me wonder why anyone needs an Inn script...
Quote from: NAMKCOR on September 16, 2008, 12:10:09 PM
this all makes me wonder why anyone needs an Inn script...
because it looks better than the evented ones :P
Quote from: drakenkanon on September 16, 2008, 01:22:57 PM
Quote from: NAMKCOR on September 16, 2008, 12:10:09 PM
this all makes me wonder why anyone needs an Inn script...
because it looks better than the evented ones :P
it fades the screen and displays a message?
Eh... I'm using it, why not, it's just as simple to copy and paste as to event it, and we all have our preferences.
not justr as simple, but more simple, it just takes like 5 seconds to set up.
::)
Quote from: NAMKCOR on September 17, 2008, 01:41:37 PM
::)
what? ;) some people (like me ;D) are just to lazy to event it everytime ;)
Quote from: drakenkanon on September 17, 2008, 07:53:14 PM
Quote from: NAMKCOR on September 17, 2008, 01:41:37 PM
::)
what? ;) some people (like me ;D) are just to lazy to event it everytime ;)
copy and paste events
there's no real purpose or advantage in a scripted inn system :/
Like I said, personal preference.
Looks really cool, but I am completely noob at scripting. :( I got a SyntaxError at line 572. Could you help me? ???