Stormtronics CMS
Authors: Blizzard
Version: 5.6
Type: Enhanced Custom Menu System
Key Term: Custom Menu System
IntroductionThis script will allow you to access a simplified version of the Custom Menu System from "Lexima Legends™ IV - Chaos Project".
This work is licensed under BSD License 2.0:
QuoteCopyright (c) Boris "Blizzard" Mikić
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
You may use this script for both non-commercial and commercial products without limitations as long as you fulfill the conditions presented by the above license. The "complete" way to give credit is to include the license somewhere in your product (e.g. in the credits screen), but a "simple" way is also acceptable. The "simple" way to give credit is as follows:
QuoteStormtronics CMS licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikić
Alternatively, if your font doesn't support diacritic characters, you may use this variant:
QuoteStormtronics CMS licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikic
In general other similar variants are allowed as long as it is clear who the creator is (e.g. "Stormtronics CMS created by Blizzard" is acceptable). But if possible, prefer to use one of the two variants listed above.
If you fail to give credit and/or claim that this work was created by you, this may result in legal action and/or payment of damages even though this work is free of charge to use normally.
Features- completely animated and graphically optimized (lag-free)
- own set of windowskins, fonts and icons for every status change and element
- saves all changed options together with the savefile
- menu commands "Item", "Equipment", "Skill", "Equip", "Status", "Options", "Save", "Load", "Exit"
- Item submenu: "Items", "Sort" (by quantity or by alphabet), "Quest Items"
- Equipment submenu shows information about equippable items for the chosen character, switch the character with LEFT and RIGHT
- Skill submenu shows available skills for use for the chosen character, switch character with L and R, menu status window in background shows the chosen character
- Equip submenu shows complete information about Status resistance/attack, Element resistance/attack and complete character stat changing (has even "max HP" and "max SP" available if you are using "Weapon/Armor HP/SP Plus")
- Status screen with overall information about character status
- Options submenu with "BGM Volume", "SFX Volume", "Battle BGM", "Battle Cam" (if using KGC's Pseudo 3D Battle Camera with my add-on for disabling), "Bar Style", "Bar Opacity" (if you are using Gradient Bar Styler), "Font" and "Windowskin" (both with preview)
- Standard Save, Load and Exit commands
- uses "Ultimate Font Override", so the font changes will affect RPG Maker XP versions 1.00, 1.01, 1.02 and 1.03 (including Dyna Edition and Postality Knights Edition Enhanced) and the font even gets saved with the savedata
new in Hybrid Edition- supports either windowskin background or custom images:
>>> All Stormtronics CMS Editions in one! <<<
- compatible with all my scripts (even DREAM v4.x)
- draws SR in the menu if CLRS was detected
- supports any number of party members
- removed some special add-ons, please get Tons of Add-ons if you want to continue using them, ST CMS will recognize Tons v4.98b and higher
- more than 1500 code lines less than Nemesis Edition and almost 2000 code lines less than Metal-Plate Edition
- removes options from Options menu that are not / cannot being used at all
- possibility to use a different equip system
- doesn't need skin icons anymore, the icon is drawn from the skin directly
- improved windowskins from "Lexima Legends™ IV - Chaos Project"
ScreenshotsNote that those are screenshots from Nemesis and Metal-Plate Edition. Hybrid Edition looks 90% the same.
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/storm_cms1.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/storm_cms2.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/storm_cms3.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/storm_cms4.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/storm_cms5.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/storm_cms6.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/storm_cms7.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/metal_plate_SS_1.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/metal_plate_SS_2.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/metal_plate_SS_3.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/metal_plate_SS_4.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/metal_plate_SS_5.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/metal_plate_SS_6.png)
(http://s67.photobucket.com/albums/h316/bblizzard/Screenies/metal_plate_SS_7.png)
DemoStormtronics CMS - Hybrid Edition (https://downloads.chaos-project.com/scripts/Stormtronics CMS - Hybrid Edition.zip)
Metal-Plate Edition Graphics Pack (https://downloads.chaos-project.com/scripts/Metal-Plate Graphics.zip)
Note that the demo has the
BASIC graphics files already included. If you want to use custom images as background, please download the Metal-Plate Edition Graphics Pack, so you know where you need to copy the images and how you need to name them.
ScriptJust make a new script above main and paste this code into it.
Script Download (https://downloads.chaos-project.com/scripts/Stormtronics CMS - Hybrid Edition.txt)
InstructionsInside the script in the first comment.
If you can't start the demo, make a new project and replace the Game.rxproj inside the demo with the new one, open Game.ini and change RGSS102E.dll to RGSS100J.dll.
FAQInside the script in the first comment.
Compatibility97% compatible with SDK v1.x. 80% compatible with SDK v2.x. Glitchs with Fukuyama's Caterpillar script (but not with mine). Designed only for 8 elements. WILL corrupt old savegames.
Credits and Thanks
Author's NotesIf you find any bugs, please report them here:
http://forum.chaos-project.com
That's it! Enjoy! =D
COOOOL!
And So, I get the first Error:
(http://img178.imageshack.us/img178/9991/errorie4.th.png) (http://img178.imageshack.us/my.php?image=errorie4.png)
With the Bars off or On in the Add-on >__>;;
V5.1b.....
Does this one solve the problem with the bars??
Yes, but you should get Tons 6.03b. I'll check that bug out and simply update the script, just give me a moment.
*Listens, and does as he is told*
Just a typo, I updated the script. This is what you need to do:
The error giving line will say something with $game_system.BARS at the end. Change it to @BARS.
Ok...
How come you can't fix that??
Lol, I already did. I just meant that you don't have to download the fixed version, simply fix it in 5.1 yourself (if you are already using 5.1).
Oh, haha...well I got 5.1 now, so everything should be fine...
>> *goes to re0insert the CRSLS back into the game*
:oOh my god. This CMS is legendary! Amazing Job! :o I've got one question tho: How would I change the script so that this CMS completely ignores the status menu, skill menu, and equipment menu (for other script purposes). If this can be changed than i'm definitely using this CMS. Thanks.
What do you mean? Do you mean that the options are now accessible or that you get a custom screen if you select them? This already works for the EQUIP options as it was requested and increases compatiblity with the Multi Equip.
What i mean is i want the status, equip, and skill options to still be accessable from the main menu but when they are selected, i want it to only display the default screens for each menu. This is because I have an equipment skill system that is doesn't work with this CMS (you can't see the learning skill progress and when going to skill option, game crashes). Please help me. If you still don't understand, just tell me what else you need to know. Thank you.
I get what you mean. Simply calling the scene like the equip option, right? As I said, I already made it possible to call the default equip screen through the CMS. Expect an update to 5.2 tomorrow which will make that possible.
I was first confused when I looked at the demo. I thought it to be exactly or virtually the same as the Nemisis version, but then I read the differences, and I also noticed the more lack of errors, which makes me more happy. This is a great edition, and I LURV it. <3
Ooops. :-\ Forget about adding a default equip scene (unless you want to). I totally didn't see the part of the script that allowed the other equip menu. However, it still would be nice if I could make it so that it showed the default skill scene and status scene. Thanks again.
As I said, it will make that possible, it's no problem. :) As soon as I check the new posts today, I will do that.
EDIT:
There you go.
YES! Thank you Blizz. This is exactly what i needed. I haven't tried it out yet but i'm sure there shouldn't be any problems. Dis CMS is a KEEPER.
Lol, agreed...He did a wonderful job on this script!!
If I may Ask . . .
I sorta have a bit problem or my game:
http://img148.imageshack.us/my.php?image=r3r3ddddd3tr3.png
I just want that the Image isn't blocked by their names. =X I want to move sorta move it a bit that won't block the Image itself. Where & what do I have to edit or to do for it? >_>;;
Here you go young sir.....
Scroll through the script until you come to the Window_CMSMenuStatus scetion
And scroll until you find the section below >> and change the
8 with whatever you want >> I tested this with your menu layout in mind, I really think 260-272 will work exceptionally well...
def refresh
self.contents.clear
self.contents.font.name = $game_system.fontname
self.contents.font.color = normal_color
draw_actor_graphic(@actor, 56, 80)
draw_actor_name2(@actor, 8, 0, 88, 1)
draw_actor_level(@actor, 104, 0)
draw_actor_state(@actor, 168, 0, 252)
draw_actor_hp(@actor, 104, 28)
draw_actor_sp(@actor, 272, 28)
draw_actor_exp_alt(@actor, 272, 56)
if $crls
if BlizzCFG::DRAW_BAR
draw_actor_sr_with_bar(@actor, 104, 56)
else
draw_actor_sr(@actor, 104, 56)
end
end
end
I get this error using the above CMS script (Aswell as numerous other scripts such as tons of addons etc)
(http://img137.imageshack.us/img137/9051/69412670jd1.jpg) (http://imageshack.us)
Whenever I hit ESC to open the menu.
Nice menu Blizzard!
I believed that means that you don't have the def initialize for that particular window
Well.. it's a start, but I really don't know how to effectively utilise that information :p
oh, Lol...I don't reallow know everything he put in this script, so you'll have to wait for him...srry
That's a weird error. Are you sure that you copied the WHOLE script? This seems to me like an error that would occur if you didn't.
Aha.. re-checked the thing just now (After I'd given my head a much needed break ;) ) and realised there had been changes in the script from the last time I downloaded it, as such my options I was using at the moment weren't up to date whereas I'd copied the rest of the script out.. so yeah, the whole thing was my own silly mistake. (WIN_MIRRORED = false wasn't present, but MIRROR = false was :p)
Thanks for making me re-check.. initially it went funny due to something going weird with the SP Cost mod somehow, as when I fixed that (By removing an 'else' line in a version check somewhere.. don't ask me to know what I'm talking about, dumb luck appears to have made it work) so then I recopied all except for the configuration from the script here, to my games scripts section. Without noticing the changes in config section obviously, I only skimmed it. :o
Lesson; don't do stuff tired.
That's true. That's mostly the reason why 5.2 (orignally 5.1) got released: It was incompatible with the newest Tons of Add-ons version. xD
New error.. but this time I'm using the full script with everything named right! >.<
(http://img148.imageshack.us/img148/4343/71120668sp2.jpg) (http://imageshack.us)
On line 995, argumenets are located in parenthesis...You have more than the alloted amount.
self.contents.gradient_bar(x, y, width, color1, color2, color3, vol, true)
Is what's on the line currently... havn't edited it since I copied it, tried removing the "true" as it seemed out of place, but still got that error when using "options" from the menu.
You need to update Tons of Add-ons to 6.03b to make it work properly. I updated the Gradient Bar Styler add-on.
Aha, well, out of not wanting to go through every setting again, I just replaced the old bars bit with the new one, everything seems to work so far, anything else I should be wary of if I'm to Frakenstein things? :o
Thanks for the help, btw.
Nope. The Bars add-ons is the only thing I changed since the last version, so you don't have to worry about it if you just replaced it and the commented header down to the version variable of Tons.
hay Blizzard, got a bug and suggestion
the bug, i don't know if you fixed it or it was reported (had a quick scan but nothing) the bug is that the CMS when you enter the skills and have Tons it comes up with an error about 1-SP, had a look at the code and the CMS seems to be looking for 2 seperate SP Change addons which don't exsist anymore, but i don't know if you fixed this
my suggestion is that with the CMS how it gives the map name, maybe have the CMS show the name but as they are in the tree
e.g.
map layout
World Map
-Home
--first floor
--second floor
-garden
--hidden place
---strange pit
other world
so like when your in strange pit, insted of the CMS just saying strange pit it shows world map-garden-strange pit, also have a part in the editble place so you can add map IDs that gets exclude like if you had 2 maps saying Real World and Dream World but you don't go into those map, there just there to keep the maps tidy, you can add the IDs of those 2 maps, if you get what i mean
1. Fixed in 5.1 in 5.2.
2. Use normal map names? xD
It's a lot easier to just do it with one map name, I don't even think the rgss records if somethings below another it's just to make it easier organisation ( I think) , and yeah maybe just change the map names
Actually it does. There are a few parameters like @parent_id which is the ID of the parent map and @order which is the position in the tree view in Windows. It's altogether in MapInfos.rxdata.
I used a name separator in CP which indicates whether a map name is being displayed only in one row or necessarily in two. Of course this is a feature of the custom mod of STCMS which I consider v6.4 in my game.
(http://img256.imageshack.us/img256/3015/snap663ok5.th.png) (http://img256.imageshack.us/img256/3015/snap663ok5.png)
really? *writes mental note* And you just used / to seperate them? Sounds nice
Yeah, I simply split the name at the / and draw out up to two lines. I also split the name if it's too long.
def slice_bitmap(input)
(0...input.length).each {|i|
return [input[0, i], input[i+1, input.length-i-1]] if input[i, 1] == '/'}
return [input, ''] if self.contents.text_size(input).width < 140
pos1 = input.length/2 - 1
pos2 = input.length/2
str1 = str2 = ''
loop do
if input[pos2, 1] == ' '
str1 = input[0, pos2]
str2 = input[pos2+1, input.length-pos1-1]
break
end
if input[pos1, 1] == ' '
str1 = input[0, pos1]
str2 = input[pos1+1, input.length-pos1-1]
break
end
pos1 -= 1
pos2 += 1
if pos1 == 0 || pos2 == input.length-1
str1 = input
str2 = ''
break
end
end
return [str1, str2]
end
...
name = slice_bitmap($game_map.name)
(0..1).each {|i| self.contents.draw_text(4, 52+i*24, 140, 26, name[i])}
*another mental note* lol ty
How do I sort out items into Quest items and into normal items? ???
go to line 278 and add in the numbers of the id of items which are quest items any not there are normal items
I'd need to know if it's possible to separate the skill/item/armour etc windows and replace the original Scene_Items etcwith them without using the cms?
yeah simple
Yes, it's easy. Use a custom Scene_Items scene and set CUSTOM_SCENE_ITEMS (or soemthing like that >.<) to true.
@Twinn Killa: There is an array which says "$quest_items = [NUMBER1, NUMBER2, ...]". Simply add item IDs into that array and separate them with commas. The items with those IDs will not appear in the normal item menu, but in the Quest Item menu instead. Basically what Nortos already said.
hi when i try to open the options menu it comes up with a message saying "Script 'Stormtronics' Line 997 : ArgumentError occured. wrong number of arguments (8 for 7)" but every other menu works except options??????
Did you get the latest version? If you're using other scripts by Blizzard, check my sig for the topic about script order.
When the tons of addons addon "Map name on field" is activated, and you open menu when it's showing it stays over the CMS and freezes until I stop navigating in the menu :o
Good you mentioned that, I always forget to fix it. I found that bug when working on Blizz-ABS while playing CoSLAL.
@mollymozo: Yes, you should get the most recent version of the CMS (which is currently 5.2) and the most recent version of Tons of Add-ons (which is 6.2) and it should work fine.
i got the latest version of this CMS so that way i could use the Skills menu (a problem because of the new SP Mod Addon) but now i get an error every time i open the CMS
on line 1800 there's a NameError
uninitalized constant BlizzCFG::DRAW_BAR
on that line i have
if BlizzCFG::DRAW_BAR
I'll fix it ASAP.
Could you make a script so it only changes the status screen changes from this menu system please because this is exactly what I am looking for in a custom status screen. Also if you do this script change could you please compatibilitize this script with Guillame777's Multi-Slot Equipment by allowing the equipment display to scroll, because it won't fit around 12 types of equipment?
For the multi-equip script just change the following values in the configuration part of the script. First look for
CUSTOM_EQUIP_SCENE = false
and change this to
CUSTOM_EQUIP_SCENE = true
No, I mean on the status screen to make it scroll, because that is all I want from this script is the status screen piece not the whole menu, I already have a ring menu.
I have made once an edit that was compatible with the Multi-Equip for Sthrathoff, but I don't think that I still have that edit. It's outdated anyway. I guess you'll have to ask somebody else as I lack the time to make that edit again. ._.
No problem, and lol this is just like how I wanted my custom status screen I was making to be with the name over the battler, I had that and it was in the center of the window, wierd. So I'll use this instead to save lots of time.
Is there a way, to change in the menu, instead of the battlers, to replace it with Pictures from the picture file?
Yeah its a minor edit. I'd have to look at the script itself but I am not allowed to download rpg maker untill my other computer with rpg maker on it gets fixed.
Well I have thought about it and every other scene I have other than equip and status shows only the four default equipment types and they are my main equipment. So could someone please just help me seperate the parts of the script I need for the menu's status screen only and then I can rename it to the proper name and i'm done getting my status screen, please someone help me. I will post that I have gotten it if I get the peices prepared myself.
Well I tried doing it myself and I am doing alright, but I have ran into a NoMethodError. The error message is: "Script 'Window_Base[Edited]' line 17: NoMethodError occurred. unidentified method 'windowskin_name' for nil:NilClass". Well what I tried to do again was modify this script so it only takes the Custom Status Screen. Could someone please help me do this and clear any unneeded script to stop lag? This would be great! The only edit to my Window_Base is that it display and small resized battler instead of the character's front sprite. That couldn't cause this error. Here is my script:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# StormTronics CMS by Blizzard
# Version: 5.0b - Hybrid Edition
# Type: Enhanced Custom Menu System
# Date v5.0: 27.8.2007
# Date v5.0b: 12.9.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
# 97% compatible with SDK v1.x. 80% compatible with SDK v2.x. Glitchs with
# Fukuyama's Caterpillar script (but not with mine). Designed only for 8
# elements. WILL corrupt old savegames.
#
#
# Features:
#
# - completely animated and graphically optimized (lag-free)
# - own set of windowskins, fonts and icons for every status change and
# element
# - saves all changed options together with the savefile
# - menu commands "Item", "Equipment", "Skill", "Equip", "Status", "Options",
# "Save", "Load", "Exit"
# - Item submenu: "Items", "Sort" (by quantity or by alphabet), "Quest Items"
# - Equipment submenu shows information about equippable items for the chosen
# character, switch the character with LEFT and RIGHT
# - Skill submenu shows available skills for use for the chosen character,
# switch character with L and R, menu status window in background shows the
# chosen character
# - Equip submenu shows complete information about Status resistance/attack,
# Element resistance/attack and complete character stat changing (has
# even "max HP" and "max SP" available if you are using "Weapon/Armor HP/SP
# Plus")
# - Status screen with overall information about character status
# - Options submenu with "BGM Volume", "SFX Volume", "Battle BGM",
# "Battle Cam" (if using KGC's Pseudo 3D Battle Camera with my add-on for
# disabling), "Bar Style", "Bar Opacity" (if you are using Gradient Bar
# Styler), "Font" and "Windowskin" (both with preview)
# - Standard Save, Load and Exit commands
# - uses "Ultimate Font Override", so the font changes will affect RPG Maker
# XP versions 1.00, 1.01, 1.02 and 1.03 (including Dyna Edition and
# Postality Knights Edition Enhanced) and the font even gets saved with the
# savedata
#
# new in Hybrid Edition:
# - supports either windowskin background or custom images:
# >>> All StormTronics CMS Editions in one! <<<
# - compatible with all my scripts (even DREAM v4.0)
# - draws SR in the menu if CLRS was detected
# - supports any number of party members
# - removed some special add-ons, please get Tons of Add-ons if you want to
# continue using them, ST CMS will recognize Tons v4.98b and higher
# - more than 1500 code lines less than Nemesis Edition and almost 2000
# code lines less than Metal-Plate Edition
# - removes options from Options menu that are not / cannot being used at all
# - possibility to use a different equip system
# - doesn't need skin icons anymore, the icon is drawn from the skin directly
# - improved windowskins from "The Legend of Lexima™ IV - Chaos Project"
#
#
# Instructions:
#
# Copy your character faces into a the folder called "Characters". The
# facesets MUST have the same names as the character spritesets with a _face
# added at the end. Also copy the windowskins and the icons. Don't forget to
# include the font files used by the game in your game folder. Also change
# the variable ID in the conditional branches if you use another variable
# than 49.
#
#
# Configuration:
#
# CAM_AVAILABLE - set to true if you use KGC 3DPBC
# FACESETS - set to true if you want to use facesets
# BGM_Variable - ID number of the variable for the Battle BGM changer
# BGM_Lock - ID number of the switch used to temporarily disable
# the option of changing the Battle BGM, for that, just
# turn the switch on and off to disable and enable this
# option
# WEAPONS_AND_ARMORS - set to false to not show weapons and armors in the
# Item screen
# $quest_items - add any item IDs that are supposed to be quest items,
# so the CMS can separate them
# BATTLE_BGMS - add any battle BGMs you are using
# SKINS - add any skin name you are using
# SKINS - add any font name you are using, be sure to include
# the font install files in your game release as some
# people may not have those fonts installed
# SAVE_NAME - name of your savefiles (usually "Save")
# SAVE_EXTENSION - extension of your savefiles (usually "rxdata")
# SAVE_FILES_NUMBER - number of savefiles you are using (usually 4)
# MAP_BACKGROUND - set to true to show map as background, otherwise
# if CMS_EDITION is not nil or false the
# "CMSFullscreen" image will be displayed
# CUSTOM_EQUIP_SCENE - set this to true if you want to use a different equip
# scene and make this CMS compatible even with exotic
# Equipment Systems
# FONT_BACKGROUND_FIX - set this to true if you want dark font colors to be
# used in the menu, this comes in handy when the
# custom background images you use are bright
# MIRROR - flips all horizontal window positions
# CMS_EDITION - set this to false or nil if you want to use Nemesis
# Edition, set to folder name where in the Pictures/CMS
# the images should be loaded from if you want to use
# custom images as background
#
# The syntax $game_system.get_cam can be used by an event (Call script
# command) to restore the user's setting of the KGC 3DPBC if a forced cam
# control was initiated during an event.
#
# You can use $game_system.reset_battle_bgm to reset the battle BGM to the
# player's menu setting if you have changed it for i.e. a boss fight via
# event.
#
#
# FAQ:
#
# - Problem:
# I get an error that some icons can't be found. how do I solve this?
#
# - Solution:
# Copy the icons from the demo or download them and place the into the Icons
# folder into another folder called "CMS". Done.
#
# - Problem:
# I still get an error.
#
# - Solution:
# Rename the icons. If your elements were renamed and don't have the standard
# names, your icons need to be renamed as well. Same goes for status effects.
# Also be sure to add new icons with new names if you have more than the
# basic 8 elements and/or more than the basic 16 status effects in your
# database.
#
# - Question:
# Can I use my own skins, icons, fonts, battle BGMs, etc...?
#
# - Answer:
# Of course. Only be sure to change the appropriate options in the script and
# to use the appropriate names, so everything can function normally after
# that.
#
# - Question:
# Can this CMS be connected with other scripts? If yes, how and how much work
# is it?
#
# - Answer:
# Yes, it can. A little bit of scripting and enhancing the functions of the
# CMS are needed if it is going to be connected with other scripts. How much
# of additional work it can cause only depends how big the script merge is. A
# simple changing of the battle menu to display status effects in icons
# should take between 15~30 minutes of scripting and testing. Adding another
# option into the Options menu should also take only 15~30 minutes of
# scripting and testing. Even adding an entire series of new windows or
# implementing another Scene into the menu also won't take more than 30
# minutes, because the menu itself works with the "sub-scene" system, saving
# this way RAM and CPU.
#
# - Question:
# What is the "sub-scene" system? Also I have tried other animated CMS-es.
# Why is this one so lag-free?
#
# - Answer:
# It is lag-free just because of the "sub-scene" system. This system is also
# used in the "Scene_Battle". It only creates windows and handels them when
# they are needed or used, otherwise they get disposed or not created at all.
# In this script this method is being used to a possible maximum.
#
# - Question:
# Is this for real? This CMS doesn't even have 3000 lines of code!
#
# - Answer:
# Actually not even 2500 if you don't count the instructions.
#
# - Question:
# How is such a large collection of features possible with so relatively few
# lines of code?!
#
# - Answer:
# Smart coding. =P
#
#
# Additional scripts/snipplets/add-ons:
#
# - Ultimate Font Override v1.0b (by Blizzard)
# - BGM/SFX Volume Control with volume correction v1.0b (by Blizzard)
# - Map Name/Location v1.0b (by Blizzard)
# - Elemental Vulnerability Graph v1.0b (by Blizzard)
# - Battle BGM control v2.0b (by Blizzard)
# - Options control layout and funcionality v4.0b (by Blizzard)
# - CMS layout/funcionality v5.0b (by Blizzard)
# - optimized code and delagged by "sub-scene" window handling (by Blizzard)
#
# If you experience the "Stack level too deep" error, you may already have
# one of the scripts listed above and it conflicts with itself, because of
# aliased recursive calling. Try removing script by script and testing
# everything. Don't forget to backup you Scripts.rxdata before doing so.
# Scripts.rxdata is a file that contains your current scripts and is located
# in the Data folder of your game folder.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# basic config
CAM_AVAILABLE = false
FACESETS = false
BGM_Variable = 49
BGM_Lock = 49
WEAPONS_AND_ARMORS = true
$quest_items = [23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
# custom game configs
BATTLE_BGMS = [
# ['BGM_NAME', VOLUME, PITCH, 'DISPLAY_NAME']
['001-Battle01', 100, 100, 'BGM 1'],
['002-Battle02', 100, 100, 'BGM 2'],
['003-Battle03', 100, 100, 'BGM 3'],
['004-Battle04', 100, 100, 'BGM 4']]
SKINS = []
FONTS = []
# save file options
SAVE_NAME = 'Save'
SAVE_EXTENSION = 'rxdata'
SAVE_FILES_NUMBER = 4
# extra options
MAP_BACKGROUND = true
CUSTOM_EQUIP_SCENE = false
FONT_BACKGROUND_FIX = false
MIRROR = false
CMS_EDITION = false # 'Metal-Plate'
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
CAM_Variable = 25 if CAM_AVAILABLE # change only if changed in the 3DPBC script
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
def now_exp
return (@exp-@exp_list[@level])
end
def next_exp
return (@exp_list[@level+1] > 0 ? @exp_list[@level+1]-@exp_list[@level] : 0)
end
def test_equip(equip_type, id)
case equip_type
when 0 then old_id, @weapon_id = @weapon_id, id
when 1 then old_id, @armor1_id = @armor1_id, id
when 2 then old_id, @armor2_id = @armor2_id, id
when 3 then old_id, @armor3_id = @armor3_id, id
when 4 then old_id, @armor4_id = @armor4_id, id
end
tested = [self.maxhp, self.maxsp, self.atk, self.pdef, self.mdef, self.str,
self.dex, self.agi, self.int, self.eva]
case equip_type
when 0 then @weapon_id = old_id
when 1 then @armor1_id = old_id
when 2 then @armor2_id = old_id
when 3 then @armor3_id = old_id
when 4 then @armor4_id = old_id
end
return tested
end
end
#==============================================================================
# Bitmap
#==============================================================================
class Bitmap
if $tons_version == nil || $tons_version < 3.71
alias init_ultimate_font_override_later initialize
def initialize(w, h = nil)
if w.is_a?(Numeric) && h.is_a?(Numeric)
init_ultimate_font_override_later(w, h)
else
init_ultimate_font_override_later(w)
end
if $game_system != nil && $game_system.fontname != nil &&
!$scene.is_a?(Scene_Title)
self.font.name = $game_system.fontname
self.font.size = $game_system.fontsize
else
self.font.name = 'Arial'
self.font.size = 24
end
end
if !$crls || !BAR_STYLES
def gradient_bar(x, y, w, color1, color2, color3, rate)
offset = 5
x += offset
y += 26
(0...offset+3).each {|i| fill_rect(x-i, y+i-2, w+3, 1, Color.new(0, 0, 0))}
(0...offset+1).each {|i| fill_rect(x-i, y+i-1, w+1, 1, Color.new(255, 255, 255))}
(0...w+offset).each {|i|
red = color3.red * i / (w + offset)
green = color3.green * i / (w + offset)
blue = color3.blue * i / (w + offset)
oy = i < offset ? offset-i : 0
off = i < offset ? i : i > w ? w+offset-i : offset
fill_rect(x+i-offset+1, y+oy-1, 1, off, Color.new(red, green, blue))}
if (w*rate).to_i >= offset
(0...(w*rate).to_i+offset).each {|i|
red = color1.red + (color2.red-color1.red)*i/((w+offset)*rate)
green = color1.green + (color2.green-color1.green)*i/((w+offset)*rate)
blue = color1.blue + (color2.blue-color1.blue)*i/((w+offset)*rate)
oy = i < offset ? offset-i : 0
off = i < offset ? i : i > w*rate ? (w*rate).to_i+offset-i : offset
fill_rect(x+i-offset+1, y+oy-1, 1, off, Color.new(red, green, blue))}
else
(0...(w*rate).to_i).each {|i| (0...offset-1).each {|j|
red = color1.red + (color2.red-color1.red) * i / (w * rate)
green = color1.green + (color2.green-color1.green) * i / (w * rate)
blue = color1.blue + (color2.blue-color1.blue) * i / (w * rate)
set_pixel(x+i-j+1, y+j-1, Color.new(red, green, blue))}}
end
end
end
end
def draw_element_graph(x_plus, y_plus, rad, color, limit = -1)
(-rad-1...0).each {|r| (r...0).each {|x|
color.alpha = 255 * (rad+1.0-r.abs)/(rad+1)
y = (r.abs * Math.sin(Math.acos(x/r.to_f))).to_i
h = y * 2
case limit
when 1, 8 then h = (y < x.abs ? 0 : y - x.abs)
when 2, 7 then y > x.abs ? h = y = x.abs : h = y
when 3, 6
y > x.abs ? h = y = x.abs : h = y
y = 0 if y > 0
when 4, 5
h = (y < x.abs ? 0 : y - x.abs)
y = -x.abs
end
if limit < 5
fill_rect(rad*2-x + x_plus, rad-y + y_plus, 1, h, color)
else
fill_rect(rad*2+x+1 + x_plus, rad-y + y_plus, 1, h, color)
end}}
end
end
#==============================================================================
# Window_Base
#==============================================================================
class Window_Base < Window
alias draw_actor_graphic_st_cms_later draw_actor_graphic
def draw_actor_graphic(actor, x, y)
if actor != nil && actor.character_name != ''
if self.is_a?(Window_CMSMenuStatus) && FACESETS
bitmap = RPG::Cache.character("#{actor.character_name}_face", actor.character_hue)
x -= bitmap.width / 2
y -= bitmap.height
draw_actor_face_st_cms(actor, x, y)
else
draw_actor_graphic_st_cms_later(actor, x, y)
end
end
end
def draw_actor_face_st_cms(actor, x, y)
if $tons_version == nil || $tons_version < 3.71 || !FACE_HUE
hue = 0
else
hue = (FACE_HUE ? actor.character_hue : 0)
end
bitmap = RPG::Cache.character("#{actor.character_name}_face", hue)
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(x, y, bitmap, src_rect)
end
def draw_actor_battler(actor, x, y)
if actor != nil && actor.battler_name != ''
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw,ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
end
def draw_actor_exp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 48, 32, 'EXP')
if actor.exp_s.to_i > 999999
w = self.contents.text_size('999999').width
else
w = self.contents.text_size(actor.exp_s).width
end
if actor.next_exp_s.to_i > 999999
w2 = self.contents.text_size('999999').width
else
w2 = self.contents.text_size(actor.next_exp_s).width
end
self.contents.font.color = normal_color
self.contents.draw_text(x + 108 - w2, y, w2, 32, actor.exp_s, 2)
self.contents.draw_text(x + 108, y, 12, 32, '/', 1)
self.contents.draw_text(x + 120, y, w2, 32, actor.next_exp_s)
end
def draw_actor_exp_alt(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 64, 32, 'next')
self.contents.font.color = normal_color
self.contents.draw_text(x + 56, y, 84, 32, actor.next_rest_exp_s, 2)
end
def draw_actor_name2(actor, x, y, w, a)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, w, 32, actor.name, a)
end
def up_color
return Color.new(0, 255, 0)
end
def down_color
return Color.new(255, 0, 0)
end
alias draw_actor_parameter_st_cms_later draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
if type == 7
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, 'Evasion')
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
else
draw_actor_parameter_st_cms_later(actor, x, y, type)
end
end
def draw_actor_element_vulnerability(actor, x, y, rad = 60)
colors = []
(1..8).each {|i|
rate = actor.element_rate(i)
if rate < 0
colors.push(Color.new(0, 255 * (100-rate.abs) / 200, 255))
elsif rate == 0
colors.push(Color.new(0, 128, 255))
elsif rate <= 50
colors.push(Color.new(0, 255 * (rate+50) / 100, 255 * (50-rate) / 50))
elsif rate <= 100
colors.push(Color.new(255 * (rate-50) / 50 , 255, 0))
elsif rate <= 200
colors.push(Color.new(255, 255 * (200-rate) / 100, 0))
else
colors.push(normal_color)
end}
(1..8).each {|i|
self.contents.draw_element_graph(x + 16, y + 32, rad, colors[i-1], i)}
save_color = self.contents.font.color.clone
(1..8).each {|i|
str1 = $data_system.elements[i]
str2 = "#{actor.element_rate(i)}%"
w1 = self.contents.text_size(str1).width
w2 = self.contents.text_size(str2).width
case i
when 1 then x2, y2, x3, y3 = x+152, y+20, x+168, y+4
when 2 then x2, y2, x3, y3 = x+176, y+56, x+192, y+40
when 3 then x2, y2, x3, y3 = x+176, y+92, x+192, y+108
when 4 then x2, y2, x3, y3 = x+152, y+128, x+168, y+144
when 5 then x2, y2, x3, y3 = x+120-w1, y+128, x+104-w2, y+144
when 6 then x2, y2, x3, y3 = x+96-w1, y+92, x+80-w2, y+108
when 7 then x2, y2, x3, y3 = x+96-w1, y+56, x+80-w2, y+40
when 8 then x2, y2, x3, y3 = x+120-w1, y+20, x+104-w2, y+4
end
self.contents.font.color = save_color
self.contents.draw_text(x2, y2, w1, 32, str1)
self.contents.font.color = colors[i-1]
self.contents.draw_text(x3, y3, w2, 32, str2)}
self.contents.font.color = save_color
end
if $Blizz_Art
alias draw_actor_exp_blizzart_later draw_actor_exp
def draw_actor_exp(actor, x, y, w = 148)
if $game_system.BARS
w -= 12
rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
if rate < 0.5
color1 = Color.new(20 * rate, 60, 80, 192)
color2 = Color.new(60 * rate, 180, 240, 192)
elsif rate >= 0.5
color1 = Color.new(20 + 120 * (rate-0.5), 60 + 40 * (rate-0.5), 80, 192)
color2 = Color.new(60 + 360 * (rate-0.5), 180 + 120 * (rate-0.5), 240, 192)
end
color3 = Color.new(80, 80, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
end
draw_actor_exp_blizzart_later(actor, x, y)
end
alias draw_actor_exp_new2 draw_actor_exp_alt
def draw_actor_exp_alt(actor, x, y, w = 148)
w -= 12
rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
if rate < 0.5
color1 = Color.new(20 * rate, 60, 80)
color2 = Color.new(60 * rate, 180, 240)
elsif rate >= 0.5
color1 = Color.new(20 + 120 * (rate-0.5), 60 + 40 * (rate-0.5), 80)
color2 = Color.new(60 + 360 * (rate-0.5), 180 + 120 * (rate-0.5), 240)
end
color3 = Color.new(80, 80, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
draw_actor_exp_new2(actor, x, y)
end
end
end
#==============================================================================
# Window_CMSStatus
#==============================================================================
class Window_Status < Window_Base
def initialize(actor)
@background = 'CMSFullscreen'
super(0, 512, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, self.active, self.z = actor, true, 2999
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(224, 0, 120, 32, @actor, 1)
draw_actor_battler(@actor, 284, 232)
draw_actor_class(@actor, 400, 32)
draw_actor_level(@actor, 400, 0)
draw_actor_state(@actor, 400, 64, 168)
draw_actor_hp(@actor, 400, 92, 172)
draw_actor_sp(@actor, 400, 122, 172)
if $crls
if DRAW_BAR
draw_actor_sr_with_bar(@actor, 400, 152, 172)
else
draw_actor_sr(@actor, 400, 152, 172)
end
draw_actor_exp(@actor, 400, 182, 172)
else
draw_actor_exp(@actor, 400, 152, 172)
end
(0..7).each {|i| draw_actor_parameter(@actor, 4, i*28, i)}
self.contents.font.color = system_color
w = self.contents.text_size('Resistances').width
self.contents.draw_text(365, 244, w, 32, 'Resistances')
self.contents.font.size -= 4
draw_actor_element_vulnerability(@actor, 320, 268)
self.contents.font.size += 4
self.contents.font.color = system_color
self.contents.draw_text(84, 244, 96, 32, 'Equipment')
self.contents.draw_text(4, 276, 96, 32, $data_system.words.weapon)
self.contents.draw_text(4, 308, 96, 32, $data_system.words.armor1)
self.contents.draw_text(4, 340, 96, 32, $data_system.words.armor2)
self.contents.draw_text(4, 372, 96, 32, $data_system.words.armor3)
self.contents.draw_text(4, 404, 96, 32, $data_system.words.armor4)
equips = [$data_weapons[@actor.weapon_id], $data_armors[@actor.armor1_id],
$data_armors[@actor.armor2_id], $data_armors[@actor.armor3_id],
$data_armors[@actor.armor4_id]]
equips.each_index {|i|
if @actor.equippable?(equips[i])
draw_item_name(equips[i], 108, 276 + i*32)
else
self.contents.font.color = (i == 0 ? knockout_color : crisis_color)
self.contents.draw_text(108, 276 + i*32, 192, 32, 'Nothing equipped')
end}
end
def update_actor(actor)
@actor = actor
refresh
end
end
#==============================================================================
# Scene_Menu
#==============================================================================
class Window_Status
del_status if @playerstatus_window != nil
def del_status
@playerstatus_window.dispose
@playerstatus_window = nil
end
move_da_status if @playerstatus_window != nil && @playerstatus_window.y > 0
if @moved
@moved = false
return
end
def move_windows(wins, border, mdiff, lead, xy, acc = false)
if acc
diff = [[((xy ? lead.x : lead.y)-border).abs, mdiff].min, 1].max
else
diff = [[((xy ? lead.x : lead.y)-border).abs/2, mdiff].min, 1].max
end
wins[0].each {|win| win.x += diff if win != nil}
wins[1].each {|win| win.x -= diff if win != nil}
wins[2].each {|win| win.y += diff if win != nil}
wins[3].each {|win| win.y -= diff if win != nil}
@moved = true
end
def move_da_outro
@flag = true
lead = @status_windows[0]
x_plus = [@command_window]
x_minus = @status_windows + @target_windows + [@skill_window, @help_window]
y_plus = [@info_window]
y_minus = [@item_choose_window, @items_window1, @items_window2, @help_window]
move_windows([x_plus, x_minus, y_plus, y_minus], 0, 128, lead, true, true)
end
def move_da_selection(lead = @status_windows[@actor_index])
if lead.dir == 1
move_windows([[], [], [], @status_windows], 360, 32, lead, false)
else
move_windows([[], [], @status_windows, []], 0, 32, lead, false)
end
end
def move_da_status(win = @playerstatus_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
@playerstatus_window = Window_Status.new(@actor)
@status_windows.each {|win| win.active = false}
def update_playerstatus
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@actor_index = -1
del_status
elsif Input.trigger?(Input::R) || Input.trigger?(Input::RIGHT) ||
Input.trigger?(Input::L) || Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::R) || Input.trigger?(Input::RIGHT)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::L) || Input.trigger?(Input::LEFT)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@actor = $game_party.actors[@actor_index]
@playerstatus_window.update_actor(@actor)
end
end
end
If someone could please help me with this I will have my game's status screen :). So please help.
Upgrade to 5.2b first and don't use it with a save game.
Quote# elements. WILL corrupt old savegames.
That error could also be happening if you are using a window before the title since $game_system wasn't set up yet.
I didn't go on any saved games, I started a new one, I know I also start new ones when I put a new script in, in fact I don't save unless testing a new save feature. I think that you thought I had a Custom Status Screen and was trying to put it in. My goal is to seperate only the Status Screen of the Stormtronics CMS that way I don't have to use the menu because I have a CMS. I don't want my game lagging because of uneeded code, I know it won't lag much but still, it will affect it. I know it shouldn't be to hard but I need some help. Could you please help me Blizzard?
It won't lag at all. Code that is not being executed at all is only in the memory. It can't cause any lag, don't worry about that. :)
If you want to isolate the status window, try it this way:
1. Find the line thcat says "class Window_CMSStatus".
2. Change it to "class Window_Status".
3. Isolate the code beginning from this line (including) to the next line where the keyword "class" is used (excluding).
4. Remove the rest of STCMS.
5. Calling the normal menu scene and the status scene from that should now display the STCMS status screen.
Well I needed a bit of code from Bitmap and Window_Base edits of the STCMS to get it to go to Scene_Status (element graph, and element vulnerability), it goes to the scene, but appears as a full black square. It will go back to the menu but appears as a square, I think I am missing something. Here is the code:
class Bitmap
def draw_element_graph(x_plus, y_plus, rad, color, limit = -1)
(-rad-1...0).each {|r| (r...0).each {|x|
color.alpha = 255 * (rad+1.0-r.abs)/(rad+1)
y = (r.abs * Math.sin(Math.acos(x/r.to_f))).to_i
h = y * 2
case limit
when 1, 8 then h = (y < x.abs ? 0 : y - x.abs)
when 2, 7 then y > x.abs ? h = y = x.abs : h = y
when 3, 6
y > x.abs ? h = y = x.abs : h = y
y = 0 if y > 0
when 4, 5 then h, y = (y < x.abs ? 0 : y - x.abs), -x.abs
end
if limit < 5
fill_rect(rad*2-x + x_plus, rad-y + y_plus, 1, h, color)
else
fill_rect(rad*2+x+1 + x_plus, rad-y + y_plus, 1, h, color)
end}}
end
end
#==============================================================================
# Window_Base
#==============================================================================
class Window_Base < Window
def draw_actor_exp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 48, 32, 'EXP')
if actor.exp_s.to_i > 999999
w = self.contents.text_size('999999').width
else
w = self.contents.text_size(actor.exp_s).width
end
if actor.next_exp_s.to_i > 999999
w2 = self.contents.text_size('999999').width
else
w2 = self.contents.text_size(actor.next_exp_s).width
end
self.contents.font.color = normal_color
self.contents.draw_text(x + 108 - w2, y, w2, 32, actor.exp_s, 2)
self.contents.draw_text(x + 108, y, 12, 32, '/', 1)
self.contents.draw_text(x + 120, y, w2, 32, actor.next_exp_s)
end
def draw_actor_exp_alt(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 64, 32, 'next')
self.contents.font.color = normal_color
self.contents.draw_text(x + 56, y, 84, 32, actor.next_rest_exp_s, 2)
end
def draw_actor_name2(actor, x, y, w, a)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, w, 32, actor.name, a)
end
def up_color
return Color.new(0, 255, 0)
end
def down_color
return Color.new(255, 0, 0)
end
alias draw_actor_parameter_st_cms_later draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
if type == 7
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, 'Evasion')
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
else
draw_actor_parameter_st_cms_later(actor, x, y, type)
end
end
def draw_actor_element_vulnerability(actor, x, y, rad = 60)
colors = []
(1..8).each {|i|
rate = actor.element_rate(i)
if rate < 0
colors.push(Color.new(0, 255 * (100-rate.abs) / 200, 255))
elsif rate == 0
colors.push(Color.new(0, 128, 255))
elsif rate <= 50
colors.push(Color.new(0, 255 * (rate+50) / 100, 255 * (50-rate) / 50))
elsif rate <= 100
colors.push(Color.new(255 * (rate-50) / 50 , 255, 0))
elsif rate <= 200
colors.push(Color.new(255, 255 * (200-rate) / 100, 0))
else
colors.push(normal_color)
end}
(1..8).each {|i|
self.contents.draw_element_graph(x + 16, y + 32, rad, colors[i-1], i)}
save_color = self.contents.font.color.clone
(1..8).each {|i|
str1 = $data_system.elements[i]
str2 = "#{actor.element_rate(i)}%"
w1 = self.contents.text_size(str1).width
w2 = self.contents.text_size(str2).width
case i
when 1 then x2, y2, x3, y3 = x+152, y+20, x+168, y+4
when 2 then x2, y2, x3, y3 = x+176, y+56, x+192, y+40
when 3 then x2, y2, x3, y3 = x+176, y+92, x+192, y+108
when 4 then x2, y2, x3, y3 = x+152, y+128, x+168, y+144
when 5 then x2, y2, x3, y3 = x+120-w1, y+128, x+104-w2, y+144
when 6 then x2, y2, x3, y3 = x+96-w1, y+92, x+80-w2, y+108
when 7 then x2, y2, x3, y3 = x+96-w1, y+56, x+80-w2, y+40
when 8 then x2, y2, x3, y3 = x+120-w1, y+20, x+104-w2, y+4
end
self.contents.font.color = save_color
self.contents.draw_text(x2, y2, w1, 32, str1)
self.contents.font.color = colors[i-1]
self.contents.draw_text(x3, y3, w2, 32, str2)}
self.contents.font.color = save_color
end
alias draw_actor_exp_new2 draw_actor_exp_alt
def draw_actor_exp_alt(actor, x, y, w = 148)
w -= 12
rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
if rate < 0.5
color1 = Color.new(20 * rate, 60, 80)
color2 = Color.new(60 * rate, 180, 240)
elsif rate >= 0.5
color1 = Color.new(20 + 120 * (rate-0.5), 60 + 40 * (rate-0.5), 80)
color2 = Color.new(60 + 360 * (rate-0.5), 180 + 120 * (rate-0.5), 240)
end
color3 = Color.new(80, 80, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
draw_actor_exp_new2(actor, x, y)
end
end
#==============================================================================
# Window_CMSStatus
#==============================================================================
class Window_Status < Window_Base
def initialize(actor)
@background = 'CMSFullscreen'
super(0, 512, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, self.active, self.z = actor, true, 2999
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(224, 0, 120, 32, @actor.name, 1)
draw_actor_battler(@actor, 284, 232)
draw_actor_class(@actor, 400, 32)
draw_actor_level(@actor, 400, 0)
draw_actor_state(@actor, 400, 64, 168)
draw_actor_hp(@actor, 400, 92, 172)
draw_actor_sp(@actor, 400, 122, 172)
if $crls
if BlizzCFG::DRAW_BAR
draw_actor_sr_with_bar(@actor, 400, 152, 172)
else
draw_actor_sr(@actor, 400, 152, 172)
end
draw_actor_exp(@actor, 400, 182, 172)
else
draw_actor_exp(@actor, 400, 152, 172)
end
(0..7).each {|i| draw_actor_parameter(@actor, 4, i*28, i)}
self.contents.font.color = system_color
w = self.contents.text_size('Elemental Vulnerability').width
self.contents.draw_text(365, 244, w, 32, 'Elemental Vulnerability')
self.contents.font.size -= 4
draw_actor_element_vulnerability(@actor, 320, 268)
self.contents.font.size += 4
self.contents.font.color = system_color
self.contents.draw_text(84, 244, 96, 32, 'Equipment')
self.contents.draw_text(4, 276, 96, 32, $data_system.words.weapon)
self.contents.draw_text(4, 308, 96, 32, $data_system.words.armor1)
self.contents.draw_text(4, 340, 96, 32, $data_system.words.armor2)
self.contents.draw_text(4, 372, 96, 32, $data_system.words.armor3)
self.contents.draw_text(4, 404, 96, 32, $data_system.words.armor4)
equips = [$data_weapons[@actor.weapon_id], $data_armors[@actor.armor1_id],
$data_armors[@actor.armor2_id], $data_armors[@actor.armor3_id],
$data_armors[@actor.armor4_id]]
equips.each_index {|i|
if @actor.equippable?(equips[i])
draw_item_name(equips[i], 108, 276 + i*32)
else
self.contents.font.color = (i == 0 ? knockout_color : crisis_color)
self.contents.draw_text(108, 276 + i*32, 192, 32, 'Nothing equipped')
end}
end
def update_actor(actor)
@actor = actor
refresh
end
end
Well a screenshot can't really help, it's basically a black 640*480 square I believe the code missing a piece of Bitmap or Window_Base it needs. I would post a screenshot but no point for this problem.
EDIT: I also don't have that CMSFullscreen "@background = 'CMSFullscreen", what is it?
It's a background file if you are using custom backgrounds instead of skins. Remove that line. You might need parts of "class Sprite" and/or "class Window" (if I even used it) as well. Try that.
Got it running nice, even changed the battler's position to make it look better (put it closer up to the name but not too high). It's great, but there is one more problem, I need the normal equipment display instead of yours, because it's incompatibile, it shows "nothing equipped" in orange for my weapon, not sure about armor. I tried to put it in myself but didn't know how, I think your coordinates for yours are different, or I did it wrong most likely :P, lol. Well other than that this good, this is nicest status screen I've seen good job Blizz. Also thanks for the help getting this setup.
Here is my code:
class Bitmap
def draw_element_graph(x_plus, y_plus, rad, color, limit = -1)
(-rad-1...0).each {|r| (r...0).each {|x|
color.alpha = 255 * (rad+1.0-r.abs)/(rad+1)
y = (r.abs * Math.sin(Math.acos(x/r.to_f))).to_i
h = y * 2
case limit
when 1, 8 then h = (y < x.abs ? 0 : y - x.abs)
when 2, 7 then y > x.abs ? h = y = x.abs : h = y
when 3, 6
y > x.abs ? h = y = x.abs : h = y
y = 0 if y > 0
when 4, 5 then h, y = (y < x.abs ? 0 : y - x.abs), -x.abs
end
if limit < 5
fill_rect(rad*2-x + x_plus, rad-y + y_plus, 1, h, color)
else
fill_rect(rad*2+x+1 + x_plus, rad-y + y_plus, 1, h, color)
end}}
end
end
#==============================================================================
# Window_Base
#==============================================================================
class Window_Base < Window
def draw_actor_exp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 48, 32, 'EXP')
if actor.exp_s.to_i > 999999
w = self.contents.text_size('999999').width
else
w = self.contents.text_size(actor.exp_s).width
end
if actor.next_exp_s.to_i > 999999
w2 = self.contents.text_size('999999').width
else
w2 = self.contents.text_size(actor.next_exp_s).width
end
self.contents.font.color = normal_color
self.contents.draw_text(x + 108 - w2, y, w2, 32, actor.exp_s, 2)
self.contents.draw_text(x + 108, y, 12, 32, '/', 1)
self.contents.draw_text(x + 120, y, w2, 32, actor.next_exp_s)
end
def draw_actor_exp_alt(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 64, 32, 'next')
self.contents.font.color = normal_color
self.contents.draw_text(x + 56, y, 84, 32, actor.next_rest_exp_s, 2)
end
def draw_actor_name2(actor, x, y, w, a)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, w, 32, actor.name, a)
end
def up_color
return Color.new(0, 255, 0)
end
def down_color
return Color.new(255, 0, 0)
end
alias draw_actor_parameter_st_cms_later draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
if type == 7
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, 'Evasion')
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
else
draw_actor_parameter_st_cms_later(actor, x, y, type)
end
end
def draw_actor_element_vulnerability(actor, x, y, rad = 60)
colors = []
(1..8).each {|i|
rate = actor.element_rate(i)
if rate < 0
colors.push(Color.new(0, 255 * (100-rate.abs) / 200, 255))
elsif rate == 0
colors.push(Color.new(0, 128, 255))
elsif rate <= 50
colors.push(Color.new(0, 255 * (rate+50) / 100, 255 * (50-rate) / 50))
elsif rate <= 100
colors.push(Color.new(255 * (rate-50) / 50 , 255, 0))
elsif rate <= 200
colors.push(Color.new(255, 255 * (200-rate) / 100, 0))
else
colors.push(normal_color)
end}
(1..8).each {|i|
self.contents.draw_element_graph(x + 16, y + 32, rad, colors[i-1], i)}
save_color = self.contents.font.color.clone
(1..8).each {|i|
str1 = $data_system.elements[i]
str2 = "#{actor.element_rate(i)}%"
w1 = self.contents.text_size(str1).width
w2 = self.contents.text_size(str2).width
case i
when 1 then x2, y2, x3, y3 = x+152, y+20, x+168, y+4
when 2 then x2, y2, x3, y3 = x+176, y+56, x+192, y+40
when 3 then x2, y2, x3, y3 = x+176, y+92, x+192, y+108
when 4 then x2, y2, x3, y3 = x+152, y+128, x+168, y+144
when 5 then x2, y2, x3, y3 = x+120-w1, y+128, x+104-w2, y+144
when 6 then x2, y2, x3, y3 = x+96-w1, y+92, x+80-w2, y+108
when 7 then x2, y2, x3, y3 = x+96-w1, y+56, x+80-w2, y+40
when 8 then x2, y2, x3, y3 = x+120-w1, y+20, x+104-w2, y+4
end
self.contents.font.color = save_color
self.contents.draw_text(x2, y2, w1, 32, str1)
self.contents.font.color = colors[i-1]
self.contents.draw_text(x3, y3, w2, 32, str2)}
self.contents.font.color = save_color
end
alias draw_actor_exp_new2 draw_actor_exp_alt
def draw_actor_exp_alt(actor, x, y, w = 148)
w -= 12
rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
if rate < 0.5
color1 = Color.new(20 * rate, 60, 80)
color2 = Color.new(60 * rate, 180, 240)
elsif rate >= 0.5
color1 = Color.new(20 + 120 * (rate-0.5), 60 + 40 * (rate-0.5), 80)
color2 = Color.new(60 + 360 * (rate-0.5), 180 + 120 * (rate-0.5), 240)
end
color3 = Color.new(80, 80, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
draw_actor_exp_new2(actor, x, y)
end
end
#==============================================================================
# Window_CMSStatus
#==============================================================================
class Window_Status < Window_Base
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(224, 0, 120, 32, @actor.name, 1)
draw_actor_battler(@actor, 284, 140)
draw_actor_class(@actor, 400, 32)
draw_actor_level(@actor, 400, 0)
draw_actor_state(@actor, 400, 64, 168)
draw_actor_hp(@actor, 400, 92, 172)
draw_actor_sp(@actor, 400, 122, 172)
if $crls
if BlizzCFG::DRAW_BAR
draw_actor_sr_with_bar(@actor, 400, 152, 172)
else
draw_actor_sr(@actor, 400, 152, 172)
end
draw_actor_exp(@actor, 400, 182, 172)
else
draw_actor_exp(@actor, 400, 152, 172)
end
(0..7).each {|i| draw_actor_parameter(@actor, 4, i*28, i)}
self.contents.font.color = system_color
w = self.contents.text_size('Resistances').width
self.contents.draw_text(365, 244, w, 32, 'Resistances')
self.contents.font.size -= 4
draw_actor_element_vulnerability(@actor, 320, 268)
self.contents.font.size += 4
self.contents.font.color = system_color
self.contents.draw_text(84, 244, 96, 32, 'Equipment')
self.contents.draw_text(4, 276, 96, 32, $data_system.words.weapon)
self.contents.draw_text(4, 308, 96, 32, $data_system.words.armor1)
self.contents.draw_text(4, 340, 96, 32, $data_system.words.armor2)
self.contents.draw_text(4, 372, 96, 32, $data_system.words.armor3)
self.contents.draw_text(4, 404, 96, 32, $data_system.words.armor4)
equips = [$data_weapons[@actor.weapon_id], $data_armors[@actor.armor1_id],
$data_armors[@actor.armor2_id], $data_armors[@actor.armor3_id],
$data_armors[@actor.armor4_id]]
equips.each_index {|i|
if @actor.equippable?(equips[i])
draw_item_name(equips[i], 108, 276 + i*32)
else
self.contents.font.color = (i == 0 ? knockout_color : crisis_color)
self.contents.draw_text(108, 276 + i*32, 192, 32, 'Nothing equipped')
end}
end
def update_actor(actor)
@actor = actor
refresh
end
end
Also, power up for you, for the excellent help here and your help with other things like Blizz-ABS. Well later the next one, need two hour wait.
This piece of code:
equips.each_index {|i|
if @actor.equippable?(equips[i])
draw_item_name(equips[i], 108, 276 + i*32)
else
self.contents.font.color = (i == 0 ? knockout_color : crisis_color)
self.contents.draw_text(108, 276 + i*32, 192, 32, 'Nothing equipped')
end}
You can remove the color change if you change it to this here:
equips.each_index {|i|
if @actor.equippable?(equips[i])
draw_item_name(equips[i], 108, 276 + i*32)
else
self.contents.draw_text(108, 276 + i*32, 192, 32, 'Nothing equipped')
end}
Or completey disable "Nothing equipped" with this here.
equips.each_index {|i|
draw_item_name(equips[i], 108, 276 + i*32)}
I'm not sure if it's what you wanted.
Thanks Blizzard, it was the "Nothing Equipped" part that was stopping it from showing my equipment. I needed to delete that part and replace it with the last code, thanks again.
Update to v5.3b.
im using 5.3b of your stormtronics cms and I am getting an error.
Script ' CreationSystem' line 1483 SyntaxError occured
also in battle, after killing all enemies, the battle continues, but as soon as damage is to be applied, the game crashes with no error given.
also, every other font type after Arial is invisible, and I am running Ultimate Font Override
and finally, after changing from my default windowskin (which is rather nice looking), i can not get back to it. maybe im doing something wrong...
Quoteevery other font type after Arial is invisible
Even Times New Roman? Cause all the fonts work fine for me. Check how many of them you don't have in your C:\Windows\Fonts folder. If you don't have a font installed, it won't show.
Quoteafter changing from my default windowskin (which is rather nice looking), i can not get back to it.
You need to include the name of the windowskin in the CMS_SKINS array in the config section.
Something was wrong with the CS, I put up a fixed version. IDK why the font Override doesn't work. Are you sure that you have turned it on? Are you using any other font manipulating script? Or are you using a script that changes Bitmap#initialize?
i must have been drunk last night trying to figure everything out... ( i swear i didnt drink that much...). Fantasist, your suggestions were so incredibly simple i had to slap myself several times for not thinking of them... there, thats another one... now i looked at Blizzard's (using blizzard's scripts and getting a bug?) topic, re ordered all my scripts, everything is now compatible and working except battle, and I believe that that is caused by Guillaume777's Multi-Equip system. the error says Battle 4, and the game crashes after victory... like i said, it all worked together before, so why not now? perhaps im missing something and forgot to configure one of your scripts...
btw, your CS [did you upload the fixed version yet?] is still problematic, but if you remove the command end on line 1498 and change the command elsif on line 1490 to if then your script is fixed... (so it seems on my end...)
also, your CS gave me an idea... how about unlocking BGMs, windowskins, and fonts in STCMS like icons and animations in your CS (and the possibility to unlock and change battle transitions, and SEs for menu, cursor, select, cancel, buzzer...?) ? and maybe modify the icon for the Main Menu Options (item, equip, save, load, etc.) with the possibility to unlock options? Your Options menu is by far the most customizeable and the so far the best ive, seen. how about releasing it as an addon in Tons for the DMS (it would add an option to the DMS called Options) Then, not only would your Options sub-menu be the best and most configurable, but it would make it more desirable amongst many more RMXP game makers out there.
Nah, taking out the options menu is a 5-minute work and fairly simple. If somebody needs it, they can just ask somebody for it. The problem would be generally compatibility since most people don't bother with the DMS anyway.
Yes, I put up the fixed version. I also had that elsif branch left over from testing.
Hi.Im new here :P
Just downloaded your CMS Grate work on that =)
I had some error's but fixed them =)
I just need help with one thing plez
I see a quest items tap in the menu but how do i add a quest
I read the Configuration in the script But dont under stand it :shy:
QUEST_ITEMS - add any item IDs that are supposed to be quest
# items, so the CMS can separate them
Plez help thanx
It should be
QUEST_ITEMS = 1,2, 4 #This is an example
Basicly add any quest items id from the database screen in rmxp.
Thanx for the fast reply
I just dont know how to add then in the game and then add them to the menu :shy:
What im trying to say is im not even on step one :'(
The numbers Juan put, 1, 2, 4 are the Item IDs.
So in your Items Database, let's say you make Item 35 a Hentai Magazine. In the script, you make:
QUEST_ITEMS = 35 #This is an example
Now Item 35 will be a quest item (And belong into a special section I believe). Item 35 is the Hentai Magazine. It'll act just like a regular item, it's just at a special place. At least...that's what I assume. I hope I got it right, it's been months since I used this CMS.
Ok I get it now :^_^':
Thanx so much for the help i got it to work :w00t:
One more thing plez :P
How do i get the skill's to show
(http://img27.picoodle.com/data/img27/3/8/17/f_skillm_7871896.jpg)
As you can see in that screen the skill is there but it wont show the name or icon
After this i will bug you guy's no more :^_^':
That's one strange screenshot.
You may have the Postality Knights RPG Maker XP. That one is illegal to have, so I recommend you to change to the legal version, but it's okay if you keep or not. Doesn't really matter.
In the case if you do have Postality Knights, go to Main and paste this code into the script (Don't know where):
$defaultfonttype = "Tahoma"
$defaultfontsize = 22
If you don't, then I don't know what is the problem, as this shouldn't happen. Who knows, who knows.
Or use "Ultimate Font Override" from "Tons of Add-ons".
QuoteYou may have the Postality Knights RPG Maker XP. That one is illegal to have, so I recommend you to change to the legal version, but it's okay if you keep or not. Doesn't really matter.
I dont know what i have
I got this RPG maker as a gift bout 2 years ago
How can i find out if it's the real thing or not
QuoteOr use "Ultimate Font Override" from "Tons of Add-ons".
I just tryed that still didnt work =(
I just went back to the defalt skill's Window
Postality Knights has a blue logo for the RPG Maker XP icon. It also hate Postality Knights slapped on the thing. The legal version is all regular and nice...
That's really strange of why it's not staying like that even though you used those items mentioned.
I'm going out on a whim here, but this is the only conclusion I can think of to what happened to the skill text.
(http://img240.imageshack.us/img240/2982/onawhimls5.jpg)
Maybe there was formatting error there or something (script-wise). The screenshot was very odd to begin with, especially Arshes getting a bit cut off. Make some more skills that Arshes learns and see if they're there. I don't know any solution unfortunately.
Ok i dont know
But the con is no blue and i dont see Knights any where on it
Here is a full screen shot
I just dont want to use a illegal copy
And i found one more bug
When i put CUSTOM_SKILL_SCENE = true
the stats screen will go to the defalt screen too
if i put CUSTOM_STATUS_SCENE = true
it wont do any thing
this is what i have
CUSTOM_SKILL_SCENE = true
CUSTOM_STATUS_SCENE = false
but is changes the status screen too
(http://img26.picoodle.com/data/img26/3/8/17/f_screenm_5baf854.jpg)
Ah, now I understand what that window was. Seems to me that your whole game is at a strange...resolution maybe? It's definitely some layout malfunction. Make sure you're using the latest version...I don't know what else to say. I guess it's time to wait for the almighty Blizzard. And I doubt you're using the illegal version, okay? ^_^
For your bug, that's quite strange. I totally wish I have RPG Maker XP on this computer, as I could have tested that on it. Oh well...Sorry. My deepest and humblest apologies. ^^;
QuoteSorry. My deepest and humblest apologies. ^^;
:O.o:
No need to be sorry i glad you helped me
Ya i just found one more bug :^_^':
In the option's menu you can edit the bar Opacity an when i try to change it the game will crash an give me an error
Script 'Tones of add-ons Part 1' line 1744: Type error occurred. cannot convert nil into String
And at line 1744 i have this draw_text_shaded_later(x, y, w, h, text, a)
Man why can the scripting be as ez as Vb or DBO :P
Well im dont bugging you guy's with my bad spelling an gramer
Hm... did you edit the opacity wrong?
What's the code you edited to change the bar's opacity?
Quote from: Aqua on August 18, 2008, 12:04:23 am
Hm... did you edit the opacity wrong?
What's the code you edited to change the bar's opacity?
I didnt edit nothing
When i look an that scripting i get lost an have to smoke 3 cig's
In the ingame option's menu has the option to change bar opacity and all i did was hit the arrow key to change it
Sorry if this has been asked before, but do you have the scripts in the right order?
http://forum.chaos-project.com/index.php?topic=23.0 (http://forum.chaos-project.com/index.php?topic=23.0)
Quote from: Aqua on August 18, 2008, 12:14:46 am
Sorry if this has been asked before, but do you have the scripts in the right order?
http://forum.chaos-project.com/index.php?topic=23.0 (http://forum.chaos-project.com/index.php?topic=23.0)
Lol yes
(http://img32.picoodle.com/data/img32/3/8/17/f_screenm_3e98093.jpg)
Upload your Scripts.rxdata on sendspace.com and post the link here, I'll look into it. The other error happens either if you use the script with a saved game or some other script is messing up, it's not Tons. Best you remove Tons for the while being and try it again. If you still get the error, it will point at the right location this time. But as I said, I'd rather say that it's because you are using a saved game and not a new game.
Ok here
Edit i tryed it with out Tons of add pn's 1,2,3 an no error
I tryed your demo StormTronics CMS - Hybrid and added
ton's 1,2,3 to your demo an still got the error
It's ok i found away around it
http://www.sendspace.com/file/uw00jz (http://www.sendspace.com/file/uw00jz)
Yay my stats is not noob no more :w00t:
Quote from: goth1sniper on August 18, 2008, 12:40:58 am
Quote from: Aqua on August 18, 2008, 12:14:46 am
Sorry if this has been asked before, but do you have the scripts in the right order?
http://forum.chaos-project.com/index.php?topic=23.0 (http://forum.chaos-project.com/index.php?topic=23.0)
Lol yes
(http://img32.picoodle.com/data/img32/3/8/17/f_screenm_3e98093.jpg)
Lol, no.
Quote from: Blizzard on January 07, 2008, 09:35:43 pm
I have noticed that many people have problems putting my scripts in the right order into the editor. It's not that bad if it were only 3 scripts, but what if it are 6, 7 or even more...? Anyway, here is the script order that should work for my scripts. If a script has ~ before the name, that means "mulitple scripts". Bolded scripts are by me.
- Resource Tester
- ~ RTP scripts
- ~ SDK
- ~ Other people's scripts
- Tons of Add-ons Part 1
- Tons of Add-ons Part 2
- Tons of Add-ons Part 3
- StormTronics CMS (any Edition)
- Blizz-ABS Part 1
- Blizz-ABS Part 2
- Blizz-ABS Part 3
- Creation System
- Chaos Rage Limit System
- CRLS + Blizz-ABS plugin
- Scene_SoulRage
- Soul Force Combo System
- Advanced Analyze System
- Bestiary
- Chaos Project Debug System
- Dynamic Day and Night System
- DREAM for Music Files
- DREAM for Save Files
- Easy Party Switcher
- Easy LvlUp Notifier
- Custom Stat Growing System
- Stat Distribution System
- RO Job/Skill System
- Full Reflection System
- Blizz-ABSEAL (DO NOT USE IF YOU HAVE BLIZZ-ABS!!!)
- Main
You do not have to maintain the exact order of my scripts, but I can't guarantee that there will be no problems if you don't. Individual scripts that I have created are not listed here. I will keep this topic updated.
Your script order:
- SDK 2.3
- Tons of Add-ons 1
- Tons of Add-ons 2
- Tons of Add-ons 3
- (*) STCMS - Hybrid Edition
- (*) Easy LvlUp Notifier
- Slipknot Message System
- Map_Loction
- Anti Event Lag Script
- Scene_Load2
- SG Animated Savefiles
- FullScreenWindow
- FullScreen
- SG Window Pixel Fix
- Title Sora Edition
- Day and Night System
- Advanced Shop Status Window
- Dash on Map System
Failed.
And get a better Event Anti Lag (http://forum.chaos-project.com/index.php?topic=104.0).
OOOOOOHHHH
Now i see it in the big letter's :^_^':
Oop's i will try it that way lol
My bad
Um........
Ok i tryed it in your order still the same
So i redownloaded your StormTronics CMS - Hybrid Edition demo and added then
Tons of Add-ons Part 1
Tons of Add-ons Part 2
Tons of Add-ons Part 3
above your (*) STCMS - Hybrid Edition
So every thing looks like this
Defalt scrpts that comes with RMXP
Tons of Add-ons Part 1
Tons of Add-ons Part 2
Tons of Add-ons Part 3
above your (*) STCMS - Hybrid Edition
Main
still all the same
Dont worry bout it i found ways arund it
QuoteAnd get a better Event Anti Lag.
Um... i dont know what the anti lag scritp does I just added it for the hell of it :haha:
I know it stops lag 0.o but dont see how w/e
I was talking about that other people's scripts should be above mine, my scripts were in the right order.
Try a big map with REALLY many events with and without event anti lag and you'll see the effects quickly.
I'm not sure what to do about this, as I imported all of the graphics supplied with the demo... It happens whenever I try to teleport away from the starting map, or even when I set another map as the starting point. I don't think it has to do with it, but the other scripts I am using are Tons of Addons and Blizz's ABS
(http://i292.photobucket.com/albums/mm33/fatcat46/RPG%20Resources/Problem.jpg)
Turn off the "Location Display" add-on in Tons of Add-ons or configure it properly if you're gonna use it.
Thanks :)
First off: I have been using RMXP for about 8 days, and are fooling around with learning it all and stuff. Part of that is making a game, of course, and I found this script wich I really like. But I have the same problem as this:
Quote from: goth1sniper on August 17, 2008, 12:11:04 pm
One more thing plez :P
How do i get the skill's to show
(http://img27.picoodle.com/data/img27/3/8/17/f_skillm_7871896.jpg)
As you can see in that screen the skill is there but it wont show the name or icon
After this i will bug you guy's no more :^_^':
My skill screen looks exactly like this screenshot. I thought I'd check the forum out to see if there was a solution, but seems not. I have checked that all scripts are in right order (I only have this and Tons of Addons, anyway, and next to nothing in Tons of Addons is activated. I got Tons of Addons after this, and the problem was there before that).
I tried using the Ultimate Font Overwrite in Tons of Addons, it had no effect. I then tried turning "CUSTOM_SKILL_SCREEN" to true. That made the skills show, but the status screen was also effected, and I liked it as it was...
I start testing from a new game, not a saved one.
I've tried with different Windowskins, no difference. I have also tried with different skills, doesn't help. So, being the newb I am, I don't know of anything more to try to make it work.
I don't know if it matters, but I'm currently using the trial version of RMXP, and it's the legal one.
Is there a solution to this? I love this custom menu, and would really like to use it :)
If you already have them in the right order (http://forum.chaos-project.com/index.php?topic=23.0), I suggest that you upload your Scripts.rxdata file (it's in the Data folder) on sendspace.com and post a download link. I'll look into this problem right away.
Allrighty, here it is: http://www.sendspace.com/file/7334jq
Alright, I fixed it. Get v5.32b. There was a leftover code when I added the AP display which I didn't remove when making it work right.
Wow, that was quick :haha:
It works now! Maybe one day I'll understand stuff like this too :P
*off to experiment some more*
Click here (http://forum.chaos-project.com/index.php?topic=57.0) if you want to learn how to script. :)
Thanx for the fix Blizzard =)
Im still trying to see why i still get that bar opacity error
Script 'Tons of add ons 1'line 1745:typeError occurred. cannot convert nil into string
**This error with shaded text off
1744 # draw normal text
1745 draw_text_shaded_later(x, y, w, h, text, a)
get the same error with shaded text on
Script 'Tons of add ons 1'line 1740:typeError occurred. cannot convert nil into string
**This error with shaded text on
1739 # draw shade
1740 draw_text_shaded_later(x+1, y+1, w, h, text, a)
Don't just urn it off, comment it by using "=begin" and "=end".
@Bliz: Maybe you should mention about the this in the documentation.
Quote from: Blizzard on August 18, 2008, 05:15:07 am
Upload your Scripts.rxdata on sendspace.com and post the link here, I'll look into it.
Ok
http://www.sendspace.com/file/l042r3 (http://www.sendspace.com/file/l042r3)
It's an error in the HUD in Tons caused by a typo. I'll update Tons now.
QuoteIt's an error in the HUD in Tons caused by a typo. I'll update Tons now.
Ok thanx so much :)
EDIT: All work's 100% now ty :)
Hi! No double-posting within 24 hours. *cough* ~Love, Starrodkirby86
Big fan of this script, but I would like to suggest a new feature, something I wanted to have in my game is unlockables. Have the CMS check for switches that are on and off and each switch can unlock a new window skin or battle music thats not in the list by default. Then the user can turn on the switches in events throughout the game to allow the player to unlock more features of the menu.
Maybe. Don't get me wrong, the idea is good. I use it in my own game. :P But I don't feel like adding it.
EDIT: Update to v5.33b to fix an issue with Ultimate Font Override.
you know when you press the equipment menu and the equip, status, skill menu it goes to the left to pick a person to view what they have, but i only have one person in my game so i was wondering if that bit can be taken away so it just goes to the menu any way instead if selecting the person.
yeh Blizzard, i found a problem with the CMS with Tons of Addons Scene_Item calling, when i create a Scene_Item item using the code
when 59 then retunr [50, 51, 52, 53, 54, 56, 57]
items 50 to 57 still show up in the main list of items and when i use item 59, i get the following error
script 'STCMS - Hybrid Edition' line 2377: NoMethodError occurred.
undefined method 'scope' for nil:NilCalss
and on line 2377:
item 59 is ste so it's non comsumable, it's can only be used from the menu and it's not set as a quest item in the CMS
when 59 then retunr [50, 51, 52, 53, 54, 56, 57]
Mmm...
That should be return for one thing :P
I'm not familiar with STCMS, but getting rid of the typo might help.
Quote from: Aqua on December 29, 2008, 09:04:44 pm
when 59 then retunr [50, 51, 52, 53, 54, 56, 57]
Mmm...
That should be return for one thing :P
I'm not familiar with STCMS, but getting rid of the typo might help.
i mean return, it's typed correctly in the script, i retyped it here and i mostly always forget to check if i've typed return right, anyway, i would bet getting a differnt error, also, i forgot to add, when i remove the CMS and use the defult item menu, it work fine (shows that is spelled right in the script)
That add-on isn't compatible with STCMS.
Quote from: Blizzard on December 30, 2008, 07:59:54 am
That add-on isn't compatible with STCMS.
think you can make it compatible cause one of the items that would use the addon groups 255 items and i would rather use STCMS cause out of all the CMS's i've downloaded, yours it the only one that has a seperate part for quest items
I can't do that. The problem is that the whole menu would have to be called over and over again instead of just the item scene, because it's a One-Scene-CMS. This would only make sense if you use a "custom Item Scene". If it doesn't work with a custom Item Scene (or the default one), then I can look into it and fix that.
Error:
Script 'StormTronics CMS' line 905: TypeError occured.
can't convert NilClass into Bitmap
Help, please?
http://forum.chaos-project.com/index.php?topic=23.0
blizz, could i have a template for the element icons, you know those sphere like icons.
all i need is that sphere shape with nothin on it.
(http://img294.imageshack.us/img294/9203/templateforelementvg7.png)
Something like that?
yeah but with the 3d effect shading.
I don't have the PSD files from those icons anymore. >.<
:( O WELL
i think i might make my own icons ( well, edit and merge icons i have :haha: )
i want all the icons to match and im adding some new elements.
Man...I can't figure out how to add options into your menu, Blizz, and I swear I saw somebody request that same thing here, only I can't remember where I found it. I just don't get it. Scripting is not my strong point. Bleah.
I wanted to replace the Save option with the RO Job/Skill system and then add a Party switcher option. The closest i've gotten is editing line 891 to include those options (With Save being replaced.) And now I just need those options to work. :wacko:
What else should I edit in the script to actually make those options work? I understand scripts well enough to edit them and the like, but I just need to be pointed in the right direction, big time. I'm a Cruise Missile without coordinates to blow up at. :'(
I will try to help you the best that I can.
You need to start at the top, with the Window_CMSCommand...
#==============================================================================
# Window_CMSCommand
#==============================================================================
class Window_CMSCommand < Window_Command
attr_reader :continue
def initialize(index, continue)
@background = 'CMSCommand'
commands = (([$data_system.words.item, 'Equipment', $data_system.words.equip,
$data_system.words.skill, 'Status', 'Options', 'Tutorials', 'Save', 'Load', 'Exit']))
super(180, commands)
@continue, self.index, self.x, self.y, self.z = continue, index, 972, 0, 999
end
def draw_item(i, color)
self.contents.fill_rect(0, i*32, 148, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon("CMS/commandmenu#{i}")
opacity = (color == normal_color ? 255 : 128)
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.font.color = color
self.contents.draw_text(32, i*32, 148, 32, @commands[i])
end
end
What I have in dual parenthesis is your 1st concern. **Note that those parenthesis are NOT part of the script.
You can find this section in his script "around" lines 850-880 somewhere.
After you have configured this section to your specifics needs, then you need to scroll down to the bottom of the script. Line 1805 is roughly where you should be looking now...You want to find the (Scene Menu) section.
LOOK FOR THISdef update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.actors.size == 0 && @command_window.index < 5
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
@item_choose_window = Window_CMSChooseItem.new
@items_window1 = Window_NormalItem.new
@items_window2 = Window_QuestItem.new
@items_window1.help_window = @items_window2.help_window = @help_window
@command_window.active = false
@help_window.x, @help_window.y = 0, -576
@help_window.set_text('')
@help_window.visible = false
items_refresh
when 1..4
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_windows.each {|win| win.active = true}
@actor_index = 0
when 5
$game_system.se_play($data_system.decision_se)
@options_window = Window_CMSOptions.new
@command_window.active = false
when 6
$game_system.se_play($data_system.decision_se)
@scene = Scene_Blakestutorials.new
when 7
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@scene = Scene_CMSSave.new
Graphics.transition(0)
end
when 8
if @command_window.continue
$game_system.se_play($data_system.decision_se)
@scene = Scene_CMSLoad.new
Graphics.transition(0)
else
$game_system.se_play($data_system.buzzer_se)
end
when 9
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@end_window = Window_CMSEndCommand.new
end
end
end
This is where you set what happens when you select your command from the main menu.
You should be able to figure it out from there. If you have more questions...please ask.
P.S.If you are changing the location of the save and load options in your menu, make sure you find these lines of code in the Scene_Menu section(mentioned earlier) and change them accordingly. They are located just several lines away from the top of the Scene_Menu section's beginning...
@command_window.disable_item(7) if $game_system.save_disabled
@command_window.disable_item(8) unless @command_window.continue
Here is a screenshot of my menu...
(http://i212.photobucket.com/albums/cc283/Derek16438/RMXP%20Screenshots/Untitled-1.jpg)
You will notice that each line of code correlates with my custom menu.OFF TOPICThis however, is not the final version of "my" edit to Blizzard's CMS...The following changes still have yet to be made:
- Custom Windowskin
- Font change
- Bookbag, Options, Tutorials, Save, Load, and Exit icons will be changed...
No matter what I do, the farthest I get is adding the options to the menu. :urgh:
I just can't do it. You've been the biggest help, Calintz, but this is just somehow eluding me. I work best when I actually see the changes and stuff inside a project. I'm so sorry I wasted your time, man, but It just won't work for me. I guess i'm having one of those "Break all you touch" moments. :'(
Alright, so throw up your request into the Script Request section, and someone can help.
Don't just give up!!
i was just thinking if some one could make an edit of this and instead of the the blizz-abs sub menu bieng seperate from the rest of the menu could it be part of this menu.
i was just wondering becuase that will make games using both scripts look better
edit
bump
Alright, I was working along with my own scripts when I thought "hey, might as well test this with StormTronics CMS". So, I downloaded the latest version, pasted it into my project section, and got this very surprising error.
(http://i39.tinypic.com/x0sg1z.png)
and when I click the options menu, I get the following
(http://i44.tinypic.com/25hn0qw.png)
I worked for awhile, but couldn't figure it out. So I remove all the custom scripts from the project, the problem still continues. So I opened Darkness Rebirth, pulled the script from that game (it works in that game file) and pasted it into the project. Same thing.
So, I decide to try out the demo for stormtronics...same errors. I'm using the legal version, have reinstalled both RMXP AND the RTP, as well as rebooted my comp, and the error stays, except when I use the script in Darkness Rebirth . O_o any idea how to fix this?
OH DEAR GOD PUT SOME CLOTHES ON THAT THING WILL YOU!? ~Love, Starrodkirby86
It might be some sort of registry error. :???:
I have actually had a problem similar to this in the past. I did not get the same error message, but I had been getting the same dysfunctions as you. The error that I encountered occurred when I attempted to preview a message from the command window(F2).
I don't remember the exact error, but it completely closed the RMXP engine!!
The only solution that came to, was when my step sister actually crashed the computer. I had made a backup of my project when I 1st encountered the error, because I knew something was wrong, and that it wasn't a script that was causing the issue.
Upon the system crash, I restored the entire OS with PC Angel, and when I got around to re-installing RMXP, the error was gone.
**Conclusion:
**The problem may very well be your CPU itself, and not a script. Not even CCleaner or other Registry repair applications were sufficient enough to completely solve the problem, and the only sure solution for me was a system restore.
if you use tons you don't get that get when you turn on ultimate font overide on.
You don't have to turn the unlimate font add-on just have it in above the CMS, so just open up the first Tons script and copy the Ultimate font overide along with the begining module, paste it above STCMS and you can see the text.
So THAT'S why it only worked in DR, DR is the only project file I tried that had Tons x_x When I put Tons in the project file, STCMS works perfectly. Apparently storm tronics needs tons to work (maybe this should be mentioned in the first post, if it isn't)
Well, if that is true, it can be altered.
Blizzard will probably do it actually. Once he sees this, he will let you know 100% what's going on. If it needs tons, he will probably make it compatible without it.
I thought I prevented this issue with the font fix. I probably messed something up when I fixed an issue with Ultimate Font Override. I'll look into this.
EDIT: New version is up. I forgot to fix the font problem, though.
@LB: The crash happens with old save files.
EDIT: v5.35b is up.
@LB: I'm unsure about the font problem. it should actually work normally. Do you think you can put a demo together so I can take a look at it?
The font error is because I dont think you have your Class Game_System set up right.
class Game_System
attr_accessor :bgm_volume
attr_accessor :sfx_volume
attr_accessor :cam
attr_reader :fontname
attr_reader :fontsize
alias init_storm_cms_later initialize
def initialize
init_storm_cms_later
@bgm_volume = @sfx_volume = 100
@cam = 0
if $tons_version != nil
if $tons_version >= 6.03 && !@BARS
@bar_style, @bar_opacity = 0, 255
end
if $tons_version < 1.6
self.fontname = 'Arial'
self.fontsize = 24
end
end
end
end
Should that part be
class Game_System
attr_accessor :bgm_volume
attr_accessor :sfx_volume
attr_accessor :cam
attr_reader :fontname
attr_reader :fontsize
alias init_storm_cms_later initialize
def initialize
init_storm_cms_later
@bgm_volume = @sfx_volume = 100
@cam = 0
if $tons_version != nil
if $tons_version >= 6.03 && !@BARS
@bar_style, @bar_opacity = 0, 255
end
if $tons_version < 1.6
self.fontname = 'Arial'
self.fontsize = 24
end
else
self.fontname = "Arial"
self.fontsize = 24
end
end
end
AFter I did that it worked perfectly. The before method always gave me an error and didnt display right.
I thought I already did that. I'll fix it ASAP then.
Hi, I got the newest version of the CMS and I am having font problems. It is unrelated to the problem above, and it is probably conflicting with this other script im using.
Here is the font I chosen, Comic Sans MS
(http://i123.photobucket.com/albums/o296/MightyLink/font1.jpg)
But in message boxes it shows the default font, ariel:
(http://i123.photobucket.com/albums/o296/MightyLink/font2.jpg)
My problem is fonts are not changing in the message text, they are only changing in the menu labels. Then after I save my game and load it again, the menus go back to defailt ariel but in the options menu its still set to comic. I am using Letter by Letter by Slipknot and in its config it has this line:
# Font for the mesage text
@font = Font.default_name
Can I change that to anything to get it to work with stormtronics? Here is the full script if it helps:
#==============================================================================
# ** Letter by Letter Message Window
#------------------------------------------------------------------------------
# Slipknot (dubealex.com/asylum)
# Version 1.11
# September 8, 2006
#------------------------------------------------------------------------------
# Thanks to:
# - Dubealex, for some of the features.
# - RPG Advocate, for the hexadecimal color.
#==============================================================================
# Loads the maps' names
$data_map_infos = load_data('Data/MapInfos.rxdata')
#==============================================================================
# ** Game_Message
#------------------------------------------------------------------------------
# This class handles the message data
#==============================================================================
class Game_Message
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :letter_by_letter, :speed, :can_skip, :height, :font,
:sound_enable, :sound, :path, :face_rect, :fit, :skin, :nb_skin,
:nbyo, :opacity, :shadow, :outline, :pause, :autoclose_frames
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Letter by letter mode
@letter_by_letter = true
# Lettter by letter mode's speed
@speed = 1
# If this option is false, the player can't skip the message
@can_skip = true
# Height of each line, used within the fit or above event options
@height = 32
# Always resize the message
@fit = true
# Font for the mesage text
@font = Font.default_name
# Sound enable
@sound_enable = true
# Sound for letter by letter, ['filename', vol]
@sound = ['speechletter', 90]
# Folder for the message pictures
@path = 'Graphics/Pictures/'
# Face rect (only the last two numbers are used)
@face_rect = Rect.new(0, 0, 96, 96)
# Skin for the message window, nil = default
@skin = nil
# Skin for the name box, nil = default
@nb_skin = 'RPG Standard'
# Name box y offset
@nbyo = 20
# Message window's opacity
@opacity = 160
# Outline text
@outline = true
# Shadow text
@shadow = false
# Show or not the pause graphic
@pause = true
# Frames before the message autoclose
@autoclose_frames = 8
end
end
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# Adds Game Message
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :message
#--------------------------------------------------------------------------
# * Alias Listing
#--------------------------------------------------------------------------
alias slipknot_lblms_initialize initialize
#--------------------------------------------------------------------------
# * Load Database
#--------------------------------------------------------------------------
def initialize
slipknot_lblms_initialize
@message = Game_Message.new
end
end
#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
# Adds a reader to the Event Name
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
# * Name
#--------------------------------------------------------------------------
def name
@event.name
end
end
#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
# Adds a reader to the Character Sprites
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :character_sprites
end
#==============================================================================
# ** Window_Message
#------------------------------------------------------------------------------
# Rewrites Window_Message
#==============================================================================
class Window_Message < Window_Selectable
#--------------------------------------------------------------------------
# * Alias Listing
#--------------------------------------------------------------------------
alias slipknot_lblms_initialize initialize
alias slipknot_lblms_terminatemessage terminate_message
#--------------------------------------------------------------------------
# * Initialize
#--------------------------------------------------------------------------
def initialize
slipknot_lblms_initialize
@autoclose = -1
end
#--------------------------------------------------------------------------
# * Terminate Message
#--------------------------------------------------------------------------
def terminate_message
slipknot_lblms_terminatemessage
[@name_box, @picture].each do |x|
x.dispose if x && ! x.disposed?
end
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.opacity = $game_system.message_frame == 0 ? 255 : 0
self.back_opacity = system.opacity
unless system.fit
self.width, self.height = 480, 160
skin = system.skin ? system.skin : $game_system.windowskin_name
self.windowskin = RPG::Cache.windowskin(skin)
self.contents = Bitmap.new(448, 128)
else
contents.clear
contents.font.color = normal_color
contents.font.size = Font.default_size
end
contents.font.name = system.font
@x = @y = @wait_count = indent = 0
@fit_size, @sound = false, system.sound_enable
@start_x = 4
@cursor_width = [0, 0, 0, 0]
@x = 8 if $game_temp.choice_start == 0
return if ! (@text = $game_temp.message_text)
@text.gsub!(/\\\\/) { "\000" }
@text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
@text.gsub!('\$') { $game_party.gold.to_s }
@text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] ? $game_actors[$1.to_i].name : ''
end
@text.gsub!(/\\[Nn][Pp]\[([\d+])\]/) do
$game_party.actors[$1.to_i] ? $game_party.actors[$1.to_i].name : ''
end
@text.gsub!(/\\[Cc]lass\[(\d+)\]/) do
$game_actors[$1.to_i] ? $game_actors[$1.to_i].class_name : ''
end
@text.gsub!(/\\[Mm]ap/) { $data_map_infos[$game_map.map_id].name }
gold_set = @text.gsub!(/\\[Gg]/, '')
if @text[/\\[Nn]ame/]
if @text.sub!(/\\[Nn]ame\[(.*?)\]/, '')
name_text = $1
elsif @text.sub!(/\\[Nn]ame/, '')
name_text = $game_map.events[$game_system.map_interpreter.event_id].name
end
end
if @text[/\\[Ff]ace/]
# Left
if @text.sub!(/\\[Ff]ace{(.+?)}/, '')
face, face_name = 1, $1
# Right
elsif @text.sub!(/\\[Ff]ace\[(.+?)\]/, '')
face, face_name = 2, $1
end
end
picture = $1 if @text.sub!(/\\[Pp]ic\[(.+?)\]/, '')
if @text[/\\[Pp]/]
if @text.sub!(/\\[Pp]\[([-1,0-9]+)\]/, '')
event = $1.to_i
elsif @text.gsub!(/\\[Pp]/, '')
event = $game_system.map_interpreter.event_id
end
end
@text.gsub!('\$') { $game_party.gold.to_s }
@text.gsub!(/\\[Cc]\[([0-9A-Fa-f #]+?)\]/) { "\001[#$1]" }
@text.gsub!(/\\[Cc]/) { "\001[0]" }
@text.gsub!(/\\[Ii]con{([IiWwAaSs])}\[(\d+)\]/) { change_icon($1, $2.to_i) }
@text.gsub!(/\\[Ii]con\[(.*?)\]/) { "\002[#$1]" }
@text.gsub!('\!') { "\003" }
@text.gsub!('\.') { "\004" }
@text.gsub!(/\\[Ss]\[([Xx\d]+)\]/) { "\005[#$1]" }
@text.gsub!(/\\[Bb]/) { "\006" }
@text.gsub!(/\\[Ii]/) { "\007" }
@text.gsub!(/\\[Ff]\[(.*?)\]/) { "\010[#$1]" }
@text.gsub!(/\\\%\[(\d+)\]/) { "\011[#$1]" }
@text.gsub!('\%') { "\011" }
if @fit_size = (event || system.fit)
lines_size = [0, 0, 0, 0]
save, lines = @text.clone, 0
while (c = @text.slice!(/./m))
if c == "\n"
lines += 1
break if lines == 4
if lines >= $game_temp.choice_start
lines_size[lines] += 16
end
next
end
lines_size[lines] += eval_text(c, true)
end
end
if face
if @fit_size
mh = system.height
fh = system.face_rect.height
lines = (fh.to_f / mh.to_f).ceil if (lines * mh) < fh
f_x = face == 2 ? 0 : lines_size.max + 16
f_y = (lines * mh) <= fh ? 0 : (lines * mh - fh) / 2
@start_x += system.face_rect.width + 4 if face == 2
indent += system.face_rect.width + 8
else
f_x, f_y = face == 2 ? 16 : 336, 16
@start_x += system.face_rect.width + 36 if face == 2
end
f_bitmap = RPG::Cache.load_bitmap(system.path, face_name)
end
if @fit_size
@text = save
self.height = lines * system.height + 32
self.height += 32 if $game_temp.num_input_variable_id > 0
self.width = lines_size.max + indent + 40
windowskin = system.skin ? system.skin : $game_system.windowskin_name
self.windowskin = RPG::Cache.windowskin(windowskin)
self.contents = Bitmap.new(self.width - 32, self.height - 32)
contents.font.name = system.font
end
contents.blt(f_x, f_y, f_bitmap, system.face_rect) if face
if ! event
h2 = self.height / 2
self.y = $game_temp.in_battle ? 96 - h2 + system.nbyo :
case $game_system.message_position
when 0 then 96 - h2 + system.nbyo
when 1 then 240 - h2
when 2 then 384 - h2
end
self.x = 320 - self.width / 2
else
c = event > 0 ? $game_map.events[event] : $game_player
mx, my = 636 - self.width, 476 - self.height
fx = [[c.screen_x - self.width / 2, 4].max, mx].min
sy = name_text ? system.nbyo + 4 : 4
ch = [$scene.spriteset.character_sprites[event - 1].bitmap.height /
4 + 4, 48].max
fy = [[c.screen_y - (ch + self.height), sy].max, my].min
self.x, self.y = fx, fy
end
if name_text
@name_box = Window_NameBox.new(x, y - system.nbyo, name_text)
@name_box.back.opacity = 0 if $game_system.message_frame == 1
end
if picture
@picture = Sprite.new
@picture.bitmap = RPG::Cache.load_bitmap(system.path, picture)
@picture.x = self.x + self.width - @picture.bitmap.width
@picture.y = self.y - @picture.bitmap.height
end
if gold_set
@gold_window = Window_Gold.new
@gold_window.x = 560 - @gold_window.width
if $game_temp.in_battle
@gold_window.y = 192
else
@gold_window.y = self.y >= 128 ? 32 : 384
end
@gold_window.opacity = self.opacity
@gold_window.back_opacity = self.back_opacity
end
end
#--------------------------------------------------------------------------
# * Evaluate Text
#--------------------------------------------------------------------------
def eval_text(c, read = false)
case c
when "\000"
c = '\\'
when "\001"
@text.sub!(/\[(.*?)\]/, '')
return 0 if read
h, c = $1, $1.to_i
contents.font.color = h.slice!(/./) == '#' ? hex_color(h) : text_color(c)
return
when "\002"
@text.sub!(/\[(.*?)\]/, '')
return 24 if read
y = @fit_size ? system.height * @y + (system.height - 24) / 2 : 32 * @y + 4
contents.blt(@x + @start_x, y, RPG::Cache.icon($1.to_s), Rect.new(0, 0, 24, 24))
@x += 24
return unless @y >= $game_temp.choice_start
@cursor_width[@y] += 24
return
when "\003"
return 0 if read
@stop = true
return
when "\004"
return 0 if read
@wait_count += 10
return
when "\005"
@text.sub!(/\[([x\d]+)\]/, '')
if $1.downcase == 'x'
contents.font.size = Font.default_size
else
contents.font.size = [[$1.to_i, 6].max, system.height].min
end
return 0
when "\006"
contents.font.bold = (! contents.font.bold)
return 0
when "\007"
contents.font.italic = (! contents.font.italic)
return 0
when "\010"
@text.sub!(/\[(.*?)\]/, '')
if $1.downcase == 'x'
contents.font.name = system.font
else
contents.font.name = [$1.to_s, system.font]
end
return 0
when "\011"
@text.sub!(/\[(\d+)\]/, '')
return 0 if read
@autoclose = $1 ? $1.to_i : system.autoclose_frames
return
when "\n"
@y += 1
@x = 0
@x = 8 if @y >= $game_temp.choice_start
return
end
w = contents.text_size(c).width
return w if read
y = @fit_size ? system.height * @y : 32 * @y
if system.outline
color = contents.font.color.dup
contents.font.color.set(0, 0, 0, 255)
contents.draw_text(@x + @start_x + 1, y, w * 2, system.height, c)
contents.draw_text(@x + @start_x, y + 1, w * 2, system.height, c)
contents.draw_text(@x + @start_x - 1, y, w * 2, system.height, c)
contents.draw_text(@x + @start_x, y - 1, w * 2, system.height, c)
contents.font.color = color
contents.draw_text(@x + @start_x, y, w * 2, system.height, c)
elsif system.shadow
color = contents.font.color.dup
contents.font.color.set(0, 0, 0, 192)
contents.draw_text(@x + @start_x + 2, y + 2, w * 2, system.height, c)
contents.font.color = color
contents.draw_text(@x + @start_x, y, w * 2, system.height, c)
else
contents.draw_text(@x + @start_x, y, w * 2, system.height, c)
end
@sound = (system.sound_enable && c != ' ')
@x += w
return if @y < $game_temp.choice_start || @y > 3
@cursor_width[@y] += w
end
#--------------------------------------------------------------------------
# * Finish
#--------------------------------------------------------------------------
def finish
if temp.choice_max > 0
@item_max, self.active, self.index = temp.choice_max, true, 0
end
if temp.num_input_variable_id > 0
digits_max = temp.num_input_digits_max
number = $game_variables[temp.num_input_variable_id]
@input_number_window = Window_InputNumber.new(digits_max)
input_number.number = number
input_number.x = x + 8
input_number.y = y + temp.num_input_start * (@fit_size ? system.height : 32)
end
end
#--------------------------------------------------------------------------
# * Database Icon
#--------------------------------------------------------------------------
def change_icon(option, index)
s = case option.downcase
when 'i' then $data_items[index]
when 'w' then $data_weapons[index]
when 'a' then $data_armors[index]
when 's' then $data_skills[index]
end
return sprintf("\002[%s]%s", s.icon_name, s.name) if s.name
end
#--------------------------------------------------------------------------
# * Hexadecimal Color
#--------------------------------------------------------------------------
def hex_color(string)
return normal_color if string.size != 6
r = g = b = 0
5.times do |i|
s = string.slice!(/./m)
v = hex_convert(s.downcase)
case i
when 0 then r += v * 16
when 1 then r += v
when 2 then g += v * 16
when 3 then g += v
when 4 then b += v * 16
when 5 then b += v
end
end
return Color.new(r, g, b)
end
#--------------------------------------------------------------------------
def hex_convert(c)
return c.to_i if c[/[0-9]/]
case c
when 'a' then 10
when 'b' then 11
when 'c' then 12
when 'd' then 13
when 'e' then 14
when 'f' then 15
end
end
#--------------------------------------------------------------------------
# * Game Message
#--------------------------------------------------------------------------
def system() $game_system.message end
#--------------------------------------------------------------------------
# * Game Temp
#--------------------------------------------------------------------------
def temp() $game_temp end
#--------------------------------------------------------------------------
# * Input Number Window
#--------------------------------------------------------------------------
def input_number() @input_number_window end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
if @contents_showing
super
if @fade_in
self.contents_opacity += 24
if input_number
input_number.contents_opacity += 24
end
@fade_in = contents_opacity != 255
return
end
if @text
if Input.trigger?(13)
if @stop
self.pause = @stop = false
return
end
@skip = system.can_skip
end
return if @stop
if @wait_count > 0 && ! @skip
@wait_count -= 1
return
end
loop do
if (c = @text.slice!(/./m))
eval_text(c)
if @stop
self.pause = system.pause
return
end
if ! @skip && @sound
Audio.se_play('Audio/SE/' + system.sound[0], system.sound[1])
@sound = false
end
@wait_count += system.speed
else
@text = nil
break
end
break if ! @skip
end
return if @text || @autoclose != -1
finish
return
else
if @autoclose > 0
@autoclose -= 1
return
elsif @autoclose == 0
terminate_message
@autoclose = -1
return
end
end
end
if input_number
input_number.update
if Input.trigger?(13)
$game_system.se_play($data_system.decision_se)
$game_variables[$game_temp.num_input_variable_id] = input_number.number
$game_map.need_refresh = true
input_number.dispose
@input_number_window = nil
terminate_message
end
return
end
if @contents_showing
self.pause = ($game_temp.choice_max == 0) & system.pause
if Input.trigger?(12)
if $game_temp.choice_max > 0 && $game_temp.choice_cancel_type > 0
$game_system.se_play($data_system.cancel_se)
$game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
terminate_message
end
end
if Input.trigger?(13)
if $game_temp.choice_max > 0
$game_system.se_play($data_system.decision_se)
$game_temp.choice_proc.call(self.index)
end
terminate_message
end
return
end
if ! @fade_out && $game_temp.message_text
@contents_showing = temp.message_window_showing = true
@stop = false
@autoclose = -1
@skip = (! system.letter_by_letter)
reset_window
refresh
@wait_count, self.visible = 0, true
return
end
return if ! visible
@fade_out = true
self.opacity -= 48
if self.opacity == 0
self.visible = @fade_out = false
$game_temp.message_window_showing = false
end
end
#--------------------------------------------------------------------------
# * Updates Cursor Rectangle
#--------------------------------------------------------------------------
def update_cursor_rect
if index >= 0
n = $game_temp.choice_start + @index
y = (@fit_size ? system.height : 32) * n
cursor_rect.set(4 + @start_x, y, @cursor_width.max + 8,
@fit_size ? system.height : 32)
else
cursor_rect.empty
end
end
end
#==============================================================================
# ** Window_NameBox
#------------------------------------------------------------------------------
# This window is used to display the box above the message.
#==============================================================================
class Window_NameBox < Sprite
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :back
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y, text)
dumb = Bitmap.new(160, 42)
dumb.font.name = system.font
size = dumb.text_size(text).width
dumb.dispose
@back = Window_Base.new(x, y, size + 12, 32)
skin = system.nb_skin ? system.nb_skin : $game_system.windowskin_name
@back.windowskin = RPG::Cache.windowskin(skin)
viewport = Viewport.new(x + 6, y + 5, size, 22)
@back.z = viewport.z = 9999
super(viewport)
self.bitmap = Bitmap.new(size, 22)
bitmap.font.name = system.font
bitmap.draw_text(0, 0, size, 22, text)
end
#--------------------------------------------------------------------------
# * Game Message
#--------------------------------------------------------------------------
def system() $game_system.message end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
@back.dispose
@back = nil
super
end
end
#==============================================================================
# ** Interpreter
#------------------------------------------------------------------------------
# Adds a reader to the Event ID and Game Message
#==============================================================================
class Interpreter
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :event_id
#--------------------------------------------------------------------------
# * Game Message
#--------------------------------------------------------------------------
def message
$game_system.message
end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# Adds a reader to the Spriteset
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :spriteset
end
change @font = Font.default_name in the script to $game_system.fontname. That way it changes the menu font as well as the message box font. No idea how to fix that other issue hopefully the instructions I gave might help.
I answered the question the other day in the Tons thread:
Quote from: Rival Blizzard on April 26, 2009, 10:46:52 am
Now insert this code below my STCMS:
class Scene_Menu
alias update_options_amsfix_later update_options
def update_options
update_options_amsfix_later
$ams.font_type = $game_system.fontname
$ams.name_font_type = $game_system.fontname
$ams.font_size = $game_system.fontsize
$ams.name_font_size = $game_system.fontsize
$ams.message_box_skin = $game_system.windowskin_name
$ams.name_box_skin = $game_system.windowskin_name
end
end
That's it.
It might not be "$ams.SOMETHING" since this isn't his AMS. Just use the proper call for the letter-by-letter script then.
im sorry, what am i sappose to replace ams with, i dont understand what the "proper call" is
ughhh i hate to sound like the moron but im not to big on coding...
is it @letter_by_letter?
You put this below Blizz-ABS. If you are using the AMS, the proper call to change the font is "$ams.font_type". In that case this code would work. If you are not using the AMS, then I don't know. The letter by letter script must be having its own font defined and there should be a script call to change it.
EDIT: v5.36 is up to fix that other font issue.
Im no coder but could you get the cms to save the font its chosen to a string, then call that string in the letter by letter, like font = $font.variable or something :P
My CMS already does that. It's the letter-by-letter script that messes up things if it doesn't save your setting. :/
I have no clue what to do, i'll just go and take my stupidity with me...
I got totally confused when you started mentioning ams, what ams?
Advanced Message System by Dubealex. You have those name boxes on our messages so I thought you would be using it.
No that was also part of letter by letter, the script is called letter by letter by Slipknot (dubealex.com/asylum)
i tried your ams fix though, it didnt cause any errors but it didnt work either :P
im sorry i have no clue how variables and strings work, i know some are global and some are for the script only, thats about it <_< i tried several things by myself, resulting in worse errors :P
i also tried setting it to nil but then the game wouldnt even start, it lets me set the window skin to nil and that works, but it doesnt work the same way for the font i guess....
Generally if you put my fix below STCMS and STCMS below the AMS, it should work. When you change the font in the CMS, it should apply the new font to the AMS.
Ya thats how I got it, Your script order thread said to put any scripts that arnt yours above.
Am I sappose to change that config to something else, you never mentioned it :P
This is what its at right now in the LbL config:
@font = Font.default_name
im no coder but doesnt that set the font to default <_<
Try "@font = $game_system.fontname" instead.
hmmm crashes
undefined method 'fontname' for nil:Nilclass
am I sappose to put like attr_accessor :fontname above it or something?
When are you using that? It looks like you are using this the title screen.
I didnt get that, I am using it above all your scripts in the script order, there is no in game options menu it is just being used all the time, It crashes before the title screen.
Not sure what you meant, there is no event to call it, its just on all the time.
Man, why do people script stuff badly like this? -_- Use this code:
class Scene_Menu
alias update_options_lblfix_later update_options
def update_options
update_options_lblfix_later
$game_system.message.font = $game_system.fontname
end
end
Blizzard... you are a GOD!
Works perfectly, finally I can bitch slap this aside and move on with my game, thank you :)
Hi, i have a problem with the Items, everytime i go to items and press an time apear this:
(http://i658.photobucket.com/albums/uu304/DarokTitan/Dibujooo.png)
All the others options works perfectly, and i have a question, is necessary to have Tons? If you say yes, you are the master, not me, i will have every script you say is good :P :P
No, Tons is not necessary. This seems to be a problem with another script since it doesn't actually seem to be having anything to do with the CMS. Do you have your scripts in the right order? http://forum.chaos-project.com/index.php?topic=23.0 If yes, make a demo and I will take a look at it.
Great Script.. had a prob though.. im using charlie lee's ctb along with your script and it was working fine but as soon as i put the your tons of add-on's in and went to the option's menu I got this error.. "note" that all the other menu's worked.
(http://i101.photobucket.com/albums/m45/reaper72004/error.png)
I started looking to see what the problem was I couldn't figure it out so as a temp fix I went to line 1082 and did this:
changed this:
@font_name = $game_system.fontname
to this:
**Off Topic**
Oh and some useful info for other people that use charlie lee's ctb and tons of add-on's. You will need to comment out facesets and death image in tons
Quote# Compatibility:
#
# 97% compatible with SDK v1.x. 80% compatible with SDK v2.x. Glitchs with
# Fukuyama's Caterpillar script (but not with mine). Designed only for 8
# elements. WILL corrupt old savegames.
Would this be why a custom skill scene replace's the status menu too...
when 3
if @actor.restriction >= 2
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_SKILL_SCENE <--------------------
@scene = Scene_Skill.new(@actor_index)
else
@skill_window = Window_CMSSkill.new(@actor)
@skill_window.help_window = @help_window
@help_window.visible = true
@help_window.x, @help_window.y = -768, 0
@status_windows.each {|win| win.active = false}
end
end
when 4
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_SKILL_SCENE <----------------------
@scene = Scene_Status.new(@actor_index)
else
@playerstatus_window = Window_CMSStatus.new(@actor)
@status_windows.each {|win| win.active = false}
end
end
And I need some help...
Where would I put these codes in your cms:
class Scene_Status
alias sa_update update
def update
if Input.trigger?(Input::SHIFT)
@actor.toggle_superart_type
@status_window.refresh
return
end
sa_update
end
end
class Window_Status
alias sa_refresh refresh
def refresh
sa_refresh
# Superarts
actor=@actor
return if !actor.has_superarts?
x=300
y=0
temp_fontsize=self.contents.font.size
temp_fontbold=self.contents.font.bold
self.contents.font.size = 12
bar_sa=Bar.new(x,y+16,200,4,self.contents)
bar_sa.back_opacity=200
bar_sa.bar="bar"
bar_sa.bar_background="bar_hp_bg"
bar_sa.highlight_complete = true
bar_sa.bar_complete = "bar complete - superarts"
bar_sa.refresh(actor.super_arts_points,SUPER_ARTS_MAX)
self.contents.draw_text(x,y,200,24,"SUPERARTS GAUGE")
self.contents.draw_text(x,y+16,200,24,"SUPERARTS TYPE: "+
actor.superart_type_s)
self.contents.blt(x+140,y+20,RPG::Cache.picture("shift"),
Rect.new(0, 0, 28, 12))
self.contents.draw_text(x+170,y+16,60,24,": change")
self.contents.font.size=temp_fontsize
self.contents.font.bold=temp_fontbold
end
end
class Window_MenuStatus < Window_Selectable
alias sa_refresh refresh
def refresh
sa_refresh
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
next if !actor.has_superarts?
x = 64+236
y = i * 116
temp_fontsize=self.contents.font.size
temp_fontbold=self.contents.font.bold
self.contents.font.size = 12
bar_sa=Bar.new(x,y+16,100,4,self.contents)
bar_sa.back_opacity=200
bar_sa.bar="bar"
bar_sa.bar_background="bar_hp_bg"
bar_sa.highlight_complete = true
bar_sa.bar_complete = "bar complete - superarts"
bar_sa.refresh(actor.super_arts_points,SUPER_ARTS_MAX)
self.contents.draw_text(x,y,200,24,"SUPERARTS GAUGE")
self.contents.draw_text(x,y+16,200,24,"SUPERARTS TYPE: "+
actor.superart_type_s)
self.contents.font.size=temp_fontsize
self.contents.font.bold=temp_fontbold
end
end
end
http://forum.chaos-project.com/index.php?topic=23.0
Quote from: Blizzard on May 19, 2009, 03:07:26 pm
http://forum.chaos-project.com/index.php?topic=23.0
Yes, I've looked at the order of the scripts only thing i have diff is i have ton's above the ctb i have the bestairy and custom end menu below the ctb to get the monster and encounter data but your cms is the last. I have it this way for compatibility reasons.
Anywho all this does is it draws a superart bar in the menu by the char and in the status window, and when in the status window when u press shift it changes your super arts type like from rage to pain..etc. I can get the code to splice in with your menu but the prob im haveing is getting sa_refresh refresh to work or when i comment out the alias and the sa_refresh another error accours when i goto status window and press shift i get a error at @window_cmsstatus.refresh . At the moment im only trying get this to work in the cmsstatus screen.. here's how i have the code for it:
#==============================================================================
# Window_CMSStatus
#==============================================================================
class Window_CMSStatus < Window_Base
def initialize(actor)
@background = 'CMSFullscreen'
super(0, 512, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, self.active, self.z = actor, true, 2999
refresh
end
alias sa_refresh refresh
def refresh
self.contents.clear
###
sa_refresh
# Superarts
actor=@actor
return if !actor.has_superarts?
x=400
y=200
temp_fontsize=self.contents.font.size
temp_fontbold=self.contents.font.bold
self.contents.font.size = 12
bar_sa=Bar.new(x,y+16,200,4,self.contents)
bar_sa.back_opacity=200
bar_sa.bar="bar"
bar_sa.bar_background="bar_hp_bg"
bar_sa.highlight_complete = true
bar_sa.bar_complete = "bar complete - superarts"
bar_sa.refresh(actor.super_arts_points,SUPER_ARTS_MAX)
self.contents.draw_text(x,y,200,24,"SUPERARTS GAUGE")
self.contents.draw_text(x,y+16,200,24,"SUPERARTS TYPE: "+
actor.superart_type_s)
self.contents.blt(x+140,y+20,RPG::Cache.picture("shift"),
Rect.new(0, 0, 28, 12))
self.contents.draw_text(x+170,y+16,60,24,": change")
self.contents.font.size=temp_fontsize
self.contents.font.bold=temp_fontbold
###
self.contents.font.color = normal_color
self.contents.draw_text(224, 0, 120, 32, @actor.name, 1)
draw_actor_battler(@actor, 284, 232)
draw_actor_class(@actor, 400, 32)
draw_actor_level(@actor, 400, 0)
draw_actor_state(@actor, 400, 64, 168)
draw_actor_hp(@actor, 400, 92, 172)
draw_actor_sp(@actor, 400, 122, 172)
if $crls
if BlizzCFG::DRAW_SR_BAR
draw_actor_sr_with_bar(@actor, 400, 152, 172)
else
draw_actor_sr(@actor, 400, 152, 172)
end
draw_actor_exp(@actor, 400, 182, 172)
else
draw_actor_exp(@actor, 400, 152, 172)
end
(0..7).each {|i| draw_actor_parameter(@actor, 4, i*28, i)}
self.contents.font.color = system_color
w = self.contents.text_size('Elemental Vulnerability').width
self.contents.draw_text(365, 244, w, 32, 'Elemental Vulnerability')
self.contents.font.size -= 4
draw_actor_element_vulnerability(@actor, 320, 268)
self.contents.font.size += 4
self.contents.font.color = system_color
self.contents.draw_text(84, 244, 96, 32, 'Equipment')
self.contents.draw_text(4, 276, 96, 32, $data_system.words.weapon)
self.contents.draw_text(4, 308, 96, 32, $data_system.words.armor1)
self.contents.draw_text(4, 340, 96, 32, $data_system.words.armor2)
self.contents.draw_text(4, 372, 96, 32, $data_system.words.armor3)
self.contents.draw_text(4, 404, 96, 32, $data_system.words.armor4)
equips = [$data_weapons[@actor.weapon_id], $data_armors[@actor.armor1_id],
$data_armors[@actor.armor2_id], $data_armors[@actor.armor3_id],
$data_armors[@actor.armor4_id]]
equips.each_index {|i|
if @actor.equippable?(equips[i])
draw_item_name(equips[i], 108, 276 + i*32)
else
self.contents.font.color = (i == 0 ? knockout_color : crisis_color)
self.contents.draw_text(108, 276 + i*32, 192, 32, 'Nothing equipped')
end}
end
def update_actor(actor)
@actor = actor
refresh
end
end
And heres a pic to to show it in the status screen
(http://i101.photobucket.com/albums/m45/reaper72004/sagauge.png)
1 is the guage its self
2 is the superarts type: rage when you press shift its supposed to change to a diff type
now like i said earlier in the post i can comment out the alias sa_refresh refriesh , sa_refresh and it shows and i go down to where the @window_cmsstatus.refresh and take out the .refresh from that line i get no errors but it doesn't refresh the superarts type when pressing shift. to get it to refresh i would have to leave the status screen then go back in.
Hopefully this is detailed enough that you get the idea of what im talking about..
Ok, there are a few things you should know. You don't need to make a custom scene for the status screen. It should be enough if you just edit the window. You can safely turn off CUSTOM_STATUS_SCENE.
Now the next thing. Your script goes under STCMS. Alias
update_playerstatus and add a handling for the SHIFT button. The current actor shown on the screen is stored in the variable
@actor and the status window is in
@playerstatus_window. Remember to add a refresh call in the SHIFT handling.
The last thing to do is to edit
refresh of
Window_CMSStatus as you already did. First call the original method, then do your additional code. You don't need to copy paste any of my code and you don't need to use
self.contents.clear.
class Window_CMSStatus
alias refresh_superarts_alias refresh
def refresh
refresh_superarts_alias
# your drawing code here
end
end
class Scene_Menu
alias update_playerstatus_superarts_alias update_playerstatus
def update_playerstatus
if Input.trigger?(Input::SHIFT)
#@actor.superarts = X
#all the other stuff you might need here
@playerstatus_window.refresh
else
update_playerstatus_superarts_alias
end
end
end
You can use this skeleton and just add the drawing code that you need. It's not complicated. Also, if you want a bar, you can either do it yourself, or you can call the bar drawing method from Tons of Add-ons.
:) your the man..tyvm
oh and it has a bar it just blind's in well :D
ok one more problem.. i added this:
class Window_CMSMenuStatus
alias refresh_superarts_alias refresh
def refresh
refresh_superarts_alias
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
next if !actor.has_superarts?
x = 64+236
y = i * 116
temp_fontsize=self.contents.font.size
temp_fontbold=self.contents.font.bold
self.contents.font.size = 12
bar_sa=Bar.new(x,y+16,100,4,self.contents)
bar_sa.back_opacity=200
bar_sa.bar="bar"
bar_sa.bar_background="bar_hp_bg"
bar_sa.highlight_complete = true
bar_sa.bar_complete = "bar complete - superarts"
bar_sa.refresh(actor.super_arts_points,SUPER_ARTS_MAX)
self.contents.draw_text(x,y,200,24,"SUPERARTS GAUGE")
self.contents.draw_text(x,y+16,200,24,"SUPERARTS TYPE: "+
actor.superart_type_s)
self.contents.font.size=temp_fontsize
self.contents.font.bold=temp_fontbold
end
end
end
to the above parts you told me and when i start game and goto status and change super arts type then go back to the menu the type that it show's there doesn't change guess i forgot to put a refresh somewhere, also when i exit the menu and go back into the menu all the actors have the same super arts type when i only changed the first one. any suggestions
here's a pic to see:
(http://i101.photobucket.com/albums/m45/reaper72004/menu.png)
ok i fixed where all the actors super arts where changeing when i changed one replaced this actor = $game_party.actors
with this @actor = actor
now all i need is to figure out how to refresh the main menu when i exit the status screen
Oh.. I also forgot to mention I never had CUSTOM_STATUS_SCENE turned on I was simply pointing out a bug.. from when you turn on CUSTOM_SKILL_SCENE the custom status scene gets turned on too cause line 2242 and line 2254 are the same when line 2254 should be: if BlizzCFG::CUSTOM_STATUS_SCENE
I made a mistake. ;_; It's not "Window_CMSStatus" but "Window_CMSPlayerStatus". >.<
I'll fix the bug.
.... that doesn't mean i have to download the fixed version does it
No. You can keep using yours and fix the bug yourself.
k good lol done too much work on it allready :^_^': any idea on how i can refresh the menu screen when i leave the status window
Sure.
alias update_playerstatus_superarts_alias update_playerstatus
def update_playerstatus
if Input.trigger?(Input::SHIFT)
#@actor.superarts = X
#all the other stuff you might need here
@playerstatus_window.refresh
else
# add from here
if Input.trigger?(Input::B)
@status_windows.each {|win| win.refresh}
end
# to here
update_playerstatus_superarts_alias
end
end
Woot your the man :bow: thanks alot
oh here's a pic of the menu after i made some @commands edits
(http://i101.photobucket.com/albums/m45/reaper72004/newmen.png)
Very nice. ^_^
Thx: had to do some editing to the info window but it looks good i think. Haven't added a quest book yet though, can't find a good one thats easy to use and good looking.
Try Zeriab's. His is very good.
yeah i tried his and i tried to make my own quest and failed lol guess i could try again though.
right now im trying to find some font's ^^ ... 15 fonts out of 323
kinda sorta figured out Zeriab's quest book..
k need some help again, I'm trying to add a font size option in the options menu.. this is what I got so far.
This is under the BlizzCFG :
CMS_FONT_SIZE = [14, 16, 18, 20, 22, 24, 26, 28]
This is the edited options window :
#==============================================================================
# Window_CMSOptions
#==============================================================================
class Window_CMSOptions < Window_Selectable
attr_accessor :current_font
attr_accessor :current_fontsize
attr_reader :current_skin
attr_reader :skin_name
attr_reader :font_name
attr_reader :fontsize
def initialize
@background = 'CMSFullscreen'
super(0, 512, 640, 480)
@commands = ['BGM Volume', 'SFX Volume', 'Battle BGM']
@commands.push('Battle Cam') if BlizzCFG::CAM_AVAILABLE
@commands.push('Bar Style', 'Bar Opacity') if $Blizz_Art
@commands.push('Font', 'Font Size', 'Windowskin')
get_skin_and_font
self.contents = Bitmap.new(width - 32, height - 32)
self.z, self.index = 2999, 0
@item_max = @commands.size
refresh
end
def get_option
return @commands[index]
end
def refresh
self.contents.clear
self.contents.font.name = $game_system.fontname
(0...@item_max).each {|i|
self.contents.font.color = normal_color
self.contents.fill_rect(24, 16 + i*36, 192, 32, Color.new(0, 0, 0, 0))
self.contents.draw_text(24, 16 + i*36, 192, 32, @commands[i])
draw_arrows(288, 4 + i*36)
case @commands[i]
when 'BGM Volume' then draw_volume(288, 4 + i*36)
when 'SFX Volume' then draw_volume(288, 4 + i*36, true)
when 'Battle BGM' then draw_battle_bgm(288, 4 + i*36)
when 'Battle Cam' then draw_battle_cam(288, 4 + i*36)
when 'Bar Style' then draw_style(288, 4 + i*36)
when 'Bar Opacity' then draw_opacity(288, 4 + i*36)
when 'Font' then draw_font(288, 4 + i*36)
when 'Font Size' then draw_fontsize(288, 4 + i*36)
when 'Windowskin' then draw_skin(288, 4 + i*36)
end}
end
def draw_arrows(x, y)
self.contents.draw_text(x - 32, y + 13, 32, 32, '<<')
self.contents.draw_text(x + 249, y + 13, 32, 32, '>>')
end
def draw_volume(x, y, mode = false, width = 224)
volume = (mode ? $game_system.sfx_volume.to_f : $game_system.bgm_volume.to_f)
vol = volume.to_f / 100
color1 = Color.new(20, 40, 80, 192)
color2 = Color.new(60, 120, 240, 192)
color3 = Color.new(0, 0, 80, 192)
old, $game_system.bar_opacity = $game_system.bar_opacity, 255 if $Blizz_Art
self.contents.gradient_bar(x, y, width, color1, color2, color3, vol, true)
$game_system.bar_opacity = old if $Blizz_Art
end
def draw_style(x, y, width = 224)
color1 = Color.new(80, 80, 0, 192)
color2 = Color.new(240, 240, 0, 192)
self.contents.gradient_bar(x + 32, y, width - 64, color1, color2, color1, 1, true)
end
def draw_battle_bgm(x, y, width = 224)
bgm = BlizzCFG::BATTLE_BGMS[$game_variables[BlizzCFG::BGM_Variable]][3]
if $game_switches[BlizzCFG::BGM_Lock] || BlizzCFG::BATTLE_BGMS.size <= 1
self.contents.font.color = Color.new(0, 0, 0, 255)
self.contents.draw_text(x+1, y + 13+1, 224, 32, bgm, 1)
self.contents.font.color = disabled_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(x, y + 13, 224, 32, bgm, 1)
end
def draw_battle_cam(x, y, width = 224)
cam = ($game_variables[BlizzCFG::CAM_Variable] == 0 ? 'ON' : 'OFF')
self.contents.draw_text(x, y + 13, 224, 32, cam, 1)
end
def draw_opacity(x, y, width = 224)
alpha = case $game_system.bar_opacity
when 0 then 'No Bar'
when 1..85 then 'Light'
when 86..170 then 'Medium'
when 171..254 then 'Hard'
when 255 then 'Full'
end
self.contents.draw_text(x, y + 13, 224, 32, alpha, 1)
end
def draw_font(x, y, width = 224)
@font_name = BlizzCFG::CMS_FONTS[@current_font]
self.contents.font.name = @font_name
self.contents.draw_text(x, y + 13, 224, 32, @font_name, 1)
self.contents.font.name = $game_system.fontname
end
def draw_fontsize(x, y, widthe = 224)
@fontsize = BlizzCFG::CMS_FONT_SIZE[@current_fontsize]
self.contents.font.size = @fontsize
self.contents.draw_text(x, y + 13, 224, 32, @fontsize, 1)
self.contents.font.size = $game_system.fontsize
end
def draw_skin(x, y, width = 224)
@skin_name = BlizzCFG::CMS_SKINS[self.current_skin]
self.contents.draw_text(x, y + 13, 224, 32, @skin_name, 1)
self.contents.fill_rect(x + 48, y +428, 128, 128, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.windowskin(@skin_name)
self.contents.blt(x + 50, y + 50, bitmap, Rect.new(2, 2, 124, 124))
self.contents.blt(x + 48, y + 48, bitmap, Rect.new(128, 0, 16, 16))
self.contents.blt(x + 160, y + 48, bitmap, Rect.new(176, 0, 16, 16))
self.contents.blt(x + 48, y + 160, bitmap, Rect.new(128, 48, 16, 16))
self.contents.blt(x + 160, y + 160, bitmap, Rect.new(176, 48, 16, 16))
(2..4).each {|i|
self.contents.blt(x+i*32, y+48, bitmap, Rect.new(144, 0, 32, 16))}
(2..4).each {|i|
self.contents.blt(x+i*32, y+160, bitmap, Rect.new(144, 48, 32, 16))}
(2..4).each {|i|
self.contents.blt(x+48, y+i*32, bitmap, Rect.new(128, 16, 16, 32))}
(2..4).each {|i|
self.contents.blt(x+160, y+i*32, bitmap, Rect.new(176, 16, 16, 32))}
end
def current_skin
return (@current_skin == nil ? 0 : @current_skin)
end
def current_skin=(val)
@current_skin = (val.is_a?(Numeric) ? val : 0)
end
def get_skin_and_font
@font_name = "Arial"
@current_font = BlizzCFG::CMS_FONTS.index(@font_name)
@fontsize = 24
@current_fontsize = BlizzCFG::CMS_FONT_SIZE.index(@fontsize)
@skin_name = $game_system.windowskin_name
self.current_skin = BlizzCFG::CMS_SKINS.index(@skin_name)
end
def update_cursor_rect
if self.index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(16, @index*36 + 16, 128, 32)
end
end
end
And this is under def update_options :
when 'Font Size'
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.decision_se)
@options_window.current_fontsize += 1
@options_window.current_fontsize %= BlizzCFG::CMS_FONT_SIZE.size
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.decision_se)
@options_window.current_fontsize += BlizzCFG::CMS_FONT_SIZE.size - 1
@options_window.current_fontsize %= BlizzCFG::CMS_FONT_SIZE.size
@options_window.refresh
elsif Input.repeat?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_system.fontsize = @options_window.fontsize
@command_window.refresh
@info_window.refresh
@status_windows.each {|win| win.refresh}
@help_window.refresh
@options_window.refresh
(0...5).each {|i| @command_window.disable_item(i)} if $game_party.actors.size == 0
@command_window.disable_item(6) if $game_system.save_disabled
@command_window.disable_item(7) unless @command_window.continue
end
Here's the error I get when I goto the options menu : cannot convert fixnum into string : pointing to this line in the script : self.contents.draw_text(x, y + 13, 224, 32, @fontsize, 1) :
Any ideas...
Woot nvm I got it.. :dance:
I just wanted to say that I do love this menu system :D.
BTW, I forgot to say that I put up v5.37b which has the bug fixed that reaper72004 mentioned. xD
Quote from: Blizzard on May 22, 2009, 04:36:48 am
BTW, I forgot to say that I put up v5.37b which has the bug fixed that reaper72004 mentioned. xD
"Shivers" @Blizzard <--- said my name
Probable Bug Report:
Me and Game_Guy were working on his default menu system thingie when he wanted me to screenshot all the bars and when I tried to change the bars in game with the STCMS Option menu, it wouldn't work. He tried to and failed. So it might be something we messed up or idk...
Just letting you know in case it wasn't our fault messing it up
When I create my new custom skin to go with this menu system I will post some screenshots.
Quote from: Landith on May 26, 2009, 09:38:59 pm
Probable Bug Report:
Me and Game_Guy were working on his default menu system thingie when he wanted me to screenshot all the bars and when I tried to change the bars in game with the STCMS Option menu, it wouldn't work. He tried to and failed. So it might be something we messed up or idk...
Just letting you know in case it wasn't our fault messing it up
How did you try to make a screenshot? Printscreen, a separate program or a script ingame? Also, does it happen every time you try that?
Nevermind xD
I messed up on my part.
Sorry Blizz.
Hey Blizzard.. I'm adding a optimize option in the equip window where all you have to do is press s and the equipment gets optimized. And what I can't figure out how to add this line into the help window on the right side.. 'To optimize: Press S.' .. any input? :P
@help_window.set_text(@item_window.item)
or
@help_window.set_text(@right_window.item)
Depends on which is currently active.
Okay.. now how can I move that over and have it not cover up the description of the equips.
Quote from: Blizzard on May 28, 2009, 03:27:33 am
@help_window.set_text(@right_window.item)
Depends on which is currently active.
Would be this one.
class Window_CMSEquipRight < Window_Selectable
def update_help
@help_window.set_text(data == nil ? 'Press S to optimize...' : data.description + ' Press S to optimize...')
end
end
Something like this? Or can you actually post a screenshot so I can see what is actually wrong?
That will do for now I think. :) Can I send you a pm, for your help with something.
No, no problem.
Is that a no or a yes about the pm.. :???:
Ah crap, I misread your post. Yes, of course you can send me a PM, but you might wanna post it after all. Depends on what you need help with.
Okie I'll just post it.
When I goto the Equip menu, the weapon armor helm and accessory are all showing the weapons, and I can't select a weapon, armor or exit the equip menu. And to get the optimize to work I have to mash the s key and up arrow. Any idea what I'm doing wrong? :O.o:
Here's the code, if you want to see what I'm talking about you can put the code in a new script under the menu script.
def update_right_equip
###
if Kboard.keyboard($R_Key_S)
for i in 0..6
@actor.equip(i, 0) unless @actor.equip_fix?(i)
next if @actor.equip_fix?(i)
case i
when 0
weapons = []
weapon_set = $data_classes[@actor.class_id].weapon_set
for j in 1...$data_weapons.size
if $game_party.weapon_number(j) > 0 && weapon_set.include?(j)
weapons.push($data_weapons[j])
end
end
next if weapons == []
weapons = weapons.reverse
strongest_weapon = weapons[0]
for weapon in weapons
strongest_weapon = weapon if strongest_weapon.atk < weapon.atk
end
@actor.equip(0, strongest_weapon.id)
when 1..6
armors = []
armor_set = $data_classes[@actor.class_id].armor_set
for j in 1...$data_armors.size
if $game_party.armor_number(j) > 0 && armor_set.include?(j)
if $data_armors[j].kind == i - 1
armors.push($data_armors[j])
end
end
end
next if armors == []
armors = armors.reverse
strongest_armor = armors[0]
for armor in armors
strongest_armor = armor if strongest_armor.pdef < armor.pdef
end
@actor.equip(i, strongest_armor.id)
end
end
@right_window.refresh
(@item_windows + @status_windows).each {|win| win.refresh}
end
end
There's probably somewhere else something wrong. Make a demo, upload it on sendspace and post a download link. I will look into it.
okie gimmie a few min and I'll get it uploaded.
okie here: http://www.sendspace.com/file/u2wczj (http://www.sendspace.com/file/u2wczj)
Solution of your problem: Use Tons of Add-ons and turn on Custom Controls rather than using Cybersam's input module.
Also, you didn't alias the method.
alias update_right_equip_optimizer_alias update_right_equip
def update_right_equip
update_right_equip_optimizer_alias
###
Thx abunch.. :) ... Well I almost had it. lol ;)
:O.o: I like your custom controls.. way easier and much better than Cybersam's.
Next on my list is to make a equipment tab in the items window. :^_^': should be fun.
lol need more help. Ok you know how when u goto the item menu and the window for items and quest items show up when the selector is on them. how can I make the Window_EquipmentItem do the same.. thats all I got left to modify in the items window. So any help would be appreciated :)
I check for the index of the window I am currently in and then change the visibility. i.e.
@item_windows.each {|window| window.visible = false}
@item_windows[@right_window.index].visible = true
That should actually already work automatically.
umm I must be tired cause I don't get it :P
As I said, my code should be doing that already.
I'll upload a demo so you can see. Gimme a few min and I'll have it up.
Okie here it is : http://www.sendspace.com/file/zg162n (http://www.sendspace.com/file/zg162n)
Warning though don't select the equipment option on the main menu.
*selects the Equipment option* OH SHI-
I think I didn't understand you right, because what I understood that isn't working actually is working. o_o; Can you explain what's wrong in a different way?
Okie lol you see how when your in the option's menu and when items or quest items is selected but not pressing C, it auto shows the window with the items in it. I want that to happen when I have equipment selected.
Haha ment item's menu not option's
As I said, that already happens in the Equip menu. When you change the index of Window_CMSEquipRight (aka you press down and then Shield is selected instead of Weapon), the appropriate Window_CMSEquipItem instance below becomes visible (showing you now shields instead of weapons).
I don't need it for Window_CMSEquipRight though, I need it for this Window_EquipmentItem.
On Item:
(http://i101.photobucket.com/albums/m45/reaper72004/err1.png)
On Equipment: the one I'm trying to do..
(http://i101.photobucket.com/albums/m45/reaper72004/err.png)
On Quest Items:
(http://i101.photobucket.com/albums/m45/reaper72004/err2.png)
You see when the courser or selector is on Item or Quest Item how it show the window of the items without being in that window.. that's what I want to do with the Equipment one that's beside Item.
Change this:
@commands = [' Items', ' Equipment', ' Sort', ' Quest Items']
to this:
@commands = ['Items', 'Sort', 'Equipment', 'Quest Items']
Change this:
self.contents.fill_rect(8 + 150*i, 0, 164, 32, Color.new(0, 0, 0, 0))
self.contents.draw_text(8 + 150*i, 0, 164, 32, @commands[i], 0)
to this:
self.contents.fill_rect(160*i, 0, 128, 32, Color.new(0, 0, 0, 0))
self.contents.draw_text(160*i, 0, 128, 32, @commands[i], 1)
Change this:
when 1
@equips_window = Window_EquipmentItem.new
@equips_window.help_window = @help_window
@equips_window.active = @help_window.visible = true
@items_window1.active = false
@items_window1.visible = false
@equips_window.visible = true
@help_window.x, @help_window.y = 0, -612
@equips_window.index = 0
when 2 then @sort_window = Window_CMSSortCommand.new
to this:
when 2
@equips_window.active = @help_window.visible = true
@equips_window.index = 0
when 1 then @sort_window = Window_CMSSortCommand.new
Change this:
when 0
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_ITEM_SCENE
@scene = Scene_Item.new
else
@item_choose_window = Window_CMSChooseItem.new
@items_window1 = Window_NormalItem.new
@items_window2 = Window_QuestItem.new
@items_window1.help_window = @items_window2.help_window = @help_window
@command_window.active = false
@help_window.x, @help_window.y = 0, -576
@help_window.set_text('')
@help_window.visible = false
items_refresh
end
to this:
when 0
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_ITEM_SCENE
@scene = Scene_Item.new
else
@item_choose_window = Window_CMSChooseItem.new
@items_window1 = Window_NormalItem.new
@items_window2 = Window_QuestItem.new
@equips_window = Window_EquipmentItem.new
@items_window1.help_window = @items_window2.help_window =
@equips_window.help_window = @help_window
@command_window.active = false
@equips_window.active = false
@equips_window.index = -1
@help_window.x, @help_window.y = 0, -576
@help_window.set_text('')
@help_window.visible = false
items_refresh
end
Change this:
def items_refresh
index = @item_choose_window.index
@items_window1.visible = [0, 1].include?(index)
@items_window2.visible = (index == 3)
end
to this:
def items_refresh
index = @item_choose_window.index
@items_window1.visible = [0, 1].include?(index)
@equips_window.visible = (index == 2)
@items_window2.visible = (index == 3)
end
Change this:
def del_items
@items_window1.dispose
@items_window1 = nil
@items_window2.dispose
@items_window2 = nil
@item_choose_window.dispose
@item_choose_window = nil
end
def del_equipment
@equips_window.dispose
@equips_window = nil
end
to this:
def del_items
@items_window1.dispose
@items_window1 = nil
@items_window2.dispose
@items_window2 = nil
@item_choose_window.dispose
@item_choose_window = nil
@equips_window.dispose
@equips_window = nil
end
def del_equipment
@equips_window.active = false
@equips_window.index = -1
end
And finally find and delete this line:
:^_^': lol every thing you just told me to change I've been messing with this whole time. :haha:
Thx Blizz.. I bow to you.. :bow:
Umm.. It's not show a discription of the item's and equips now. :O.o:
I think you messed up something badly since I can't find what's causing the problem. There are also a few other problems.
If I messed up something it's gonna be in Scene_Menu.. I'll look over mine by comparing it to a unmodified one.
Only other thing modified in Scene_menu that connects to that is this..
I changed this:
Quote
if @equips_window != nil
update_equipment
elsif @command_window.active
update_command
elsif @status_windows[0].active
update_status
elsif @item_choose_window != nil
if @item_choose_window.active
items_refresh
update_items_choose
elsif @sort_window != nil && @sort_window.active
update_sort
elsif @items_window1 != nil && @items_window1.active
@items_window1.update
update_item
elsif @items_window2 != nil && @items_window2.active
@items_window2.update
update_item
To this:
Quote
if @command_window.active
update_command
elsif @status_windows[0].active
update_status
elsif @item_choose_window != nil
if @item_choose_window.active
items_refresh
update_items_choose
elsif @sort_window != nil && @sort_window.active
update_sort
elsif @items_window1 != nil && @items_window1.active
@items_window1.update
update_item
elsif @equips_window != nil
update_equipment
elsif @items_window2 != nil && @items_window2.active
@items_window2.update
update_item
Hmm I dunno whats causing the prob, I made the exact changes on a unmodifed version and it does the same thing.
Also now the sort "Alphabet" is messed up. :(
I need a break before I start pulling out hair. ^^
Okie I fixed the sort problem. Just found something else though, when I select a item aka..'Potion'.. and try to use it then go back to the item choose window the select actor to use the item on window is active, not getting disposed I think :P If that makes since..lol
Hmm, this whole problem with the help window and the last prob I found is all pointing at this:
when 0
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_ITEM_SCENE
@scene = Scene_Item.new
else
@item_choose_window = Window_CMSChooseItem.new
@items_window1 = Window_NormalItem.new
@items_window2 = Window_QuestItem.new
@equips_window = Window_EquipmentItem.new
@items_window1.help_window = @items_window2.help_window =
@equips_window.help_window = @help_window
@command_window.active = false
@equips_window.active = false
@equips_window.index = -1
@help_window.x, @help_window.y = 0, -576
@help_window.set_text('')
@help_window.visible = false
items_refresh
end
If I comment out the lines that have to do with the @equips the help window displays and the problem with the items disappears, but then equipment doesn't work cause I commented them out.
I'll do it for you.
I made some progress: here's the scripts data file:
http://www.sendspace.com/file/jit9tj (http://www.sendspace.com/file/jit9tj)
I got it to where the help display's but once you goto equipment and exit and go back the help display disappears, if that makes since. Still can't figure out whats causing the prob with the items though.
I'll do it from scratch, it will be better that way.
.. ok, when you do redo it I'll have to redo all the other changes I made huh. :O.o:
*off topic* XD game guy wants me to make cave's for him now. 8)
Put this code under STCMS. It will disable the Equipment option and show Equipment in the Items menu instead. Just like you wanted it.
#=begin
class Window_CMSCommand < Window_Command
alias initialize_cmsmod_alias initialize
def initialize(index, continue)
initialize_cmsmod_alias(index, continue)
self.disable_item(1)
end
end
class Window_CMSChooseItem < Window_Selectable
def initialize
@background = 'CMSHelp'
super(0, -576, 640, 64)
@commands = ['Items', 'Sort', 'Equipment', 'Quest Items']
@item_max = @column_max = @commands.size
self.contents = Bitmap.new(width - 32, 32)
refresh
self.active, self.z, self.index = true, 2900, 0
end
def draw_item(i, color)
self.contents.font.color = color
self.contents.fill_rect(160*i, 0, 128, 32, Color.new(0, 0, 0, 0))
self.contents.draw_text(160*i, 0, 128, 32, @commands[i], 1)
end
end
class Window_EquipmentItem < Window_CMSItem
alias initialize_cmsmod_alias initialize
def initialize(actor)
initialize_cmsmod_alias(actor)
self.x, self.y = 256, -512
self.active = self.visible = false
end
def draw_item(i)
self.contents.font.color = normal_color
case @data[i]
when RPG::Weapon then number = $game_party.weapon_number(@data[i].id)
when RPG::Armor then number = $game_party.armor_number(@data[i].id)
end
self.contents.fill_rect(4, i*32, 352, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(@data[i].icon_name)
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(308, i*32, 16, 32, ':', 1)
self.contents.draw_text(324, i*32, 24, 32, number.to_s, 2)
end
end
class Scene_Menu
def del_items
@items_window1.dispose
@items_window1 = nil
@items_window2.dispose
@items_window2 = nil
@item_choose_window.dispose
@item_choose_window = nil
@equip_window.dispose
@equip_window = nil
end
def move_da_items(win = @item_choose_window)
y_plus = [@item_choose_window, @items_window1, @items_window2,
@equip_window, @help_window]
move_windows([[], [], y_plus, []], 0, 64, win, false)
end
def update
@status_windows.each {|win| win.update(@actor_index)}
@target_windows.each {|win| win.update(@target_index)}
@info_window.update
unless @status_windows[0].x < 0 || @status_windows[0].dir != 0 ||
@target_windows[0] != nil && @target_windows[0].dir != 0
@command_window.update
[@help_window, @item_choose_window, @sort_window,
@skill_window, @left_window, @right_window, @playerstatus_window,
@options_window, @end_window].each {|win| win.update if win != nil}
end
move_da_main if @status_windows[0].x < 0
move_da_selection if @status_windows[0].dir != 0
move_da_targeting if @target_windows[0] != nil && @target_windows[0].dir != 0
move_da_status if @playerstatus_window != nil && @playerstatus_window.y > 0
move_da_equip if @left_window != nil && @left_window.x > 0
move_da_skill if @skill_window != nil && @skill_window.x < 256
move_da_target if @target_windows[0] != nil && @target_windows[0].x < 0
move_da_items if @item_choose_window != nil && @item_choose_window.y < 0
move_da_sort if @sort_window != nil && @sort_window.y < 64
move_da_options if @options_window != nil && @options_window.y > 0
move_da_end if @end_window != nil && @end_window.y > 336
if @moved
@moved = false
return
end
if @command_window.active
update_command
elsif @status_windows[0].active
update_status
elsif @item_choose_window != nil
if @item_choose_window.active
items_refresh
update_items_choose
elsif @sort_window != nil && @sort_window.active
update_sort
elsif @items_window1 != nil && @items_window1.active
@items_window1.update
update_item
elsif @equip_window != nil && @equip_window.active
@equip_window.update
update_item_equipment
elsif @items_window2 != nil && @items_window2.active
@items_window2.update
update_item
elsif @target_windows[0] != nil && @target_windows[0].active
update_item_target
end
elsif @skill_window != nil && @skill_window.active
update_skill
elsif @target_windows[0] != nil && @target_windows[0].active
update_skill_target
elsif @right_window != nil
if @right_window.active
update_right_equip
elsif @item_window != nil && @item_window.active
@item_window.update
update_eitem
end
elsif @playerstatus_window != nil && @playerstatus_window.active
update_playerstatus
elsif @options_window != nil && @options_window.active
update_options
elsif @end_window != nil
update_end
end
end
alias update_command_cmsmod_alias update_command
def update_command
if Input.trigger?(Input::C) && @command_window.index == 0
if $game_party.actors.size == 0
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_ITEM_SCENE
@scene = Scene_Item.new
else
@item_choose_window = Window_CMSChooseItem.new
@items_window1 = Window_NormalItem.new
@items_window2 = Window_QuestItem.new
@equip_window = Window_EquipmentItem.new(@actor)
@equip_window.index = -1
@items_window1.help_window = @items_window2.help_window = @help_window
@items_window1.help_window = @items_window2.help_window =
@equip_window.help_window = @help_window
@command_window.active = false
@help_window.x, @help_window.y = 0, -576
@help_window.set_text('')
@help_window.visible = false
items_refresh
end
elsif Input.trigger?(Input::C) && @command_window.index == 1
$game_system.se_play($data_system.buzzer_se)
else
update_command_cmsmod_alias
end
end
alias update_items_choose_cmsmod_alias update_items_choose
def update_items_choose
if Input.trigger?(Input::C) && @item_choose_window.index == 2
items_refresh
@item_choose_window.active = false
$game_system.se_play($data_system.decision_se)
@equip_window.active = @help_window.visible = true
@equip_window.index = 0
elsif Input.trigger?(Input::C) && @item_choose_window.index == 3
items_refresh
@item_choose_window.active = false
$game_system.se_play($data_system.decision_se)
@items_window2.active = @help_window.visible = true
@items_window2.index = 0
else
update_items_choose_cmsmod_alias
end
end
def items_refresh
index = @item_choose_window.index
@items_window1.visible = [0, 1].include?(index)
@equip_window.visible = (index == 2)
@items_window2.visible = (index == 3)
end
def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@item_choose_window.active = true
@help_window.set_text('')
@items_window1.active = @items_window2.active = @help_window.visible = false
@items_window1.index = @items_window2.index = -1
elsif Input.trigger?(Input::C)
win = (@item_choose_window.index == 0 ? @items_window1 : @items_window2)
@item = win.data
unless @item.is_a?(RPG::Item) && $game_party.item_can_use?(@item.id)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_party.actors.each_index {|i|
@target_windows.push(Window_CMSTarget.new($game_party.actors[i]))}
@target_index = 0
$game_system.se_play($data_system.decision_se)
if @item.scope.between?(3, 6)
win.active = false
@target_windows.each {|win| win.active = true}
if [4, 6].include?(@item.scope)
@target_windows.each {|win| win.index = -2}
else
@target_windows[@target_index].index = 0
end
elsif @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
win.draw_item(win.index)
end
(@status_windows + @target_windows).each {|win| win.refresh}
@scene = Scene_Map.new
elsif @skill.scope == 7
$game_system.se_play($data_system.buzzer_se)
end
end
end
alias update_item_cmsmod_later update_item
def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@item_choose_window.active = true
@help_window.set_text('')
@equip_window.active = @items_window1.active = @items_window2.active =
@help_window.visible = false
@equip_window.index = @items_window1.index = @items_window2.index = -1
else
update_item_cmsmod_later
end
end
def update_item_equipment
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@item_choose_window.active = true
@help_window.set_text('')
@equip_window.active = @items_window1.active = @items_window2.active =
@help_window.visible = false
@equip_window.index = @items_window1.index = @items_window2.index = -1
end
end
end
Woot tyvm it works.
I think im gonna redo the menu lol cause now my equip option and quest option is unelectable ^^
Just be careful, Lol ...
BTW:
Like your avy
Thx it's one of those old battle pic's I found long ago lol
and yeah any time I make a edit Im gonna back up the script now lol and mark where I edit ^^ stupid me lmao
blizz :'( self.disable_item(1)
(http://i101.photobucket.com/albums/m45/reaper72004/menuuuu.png)
Oh and @equip_window should be @equips_window
Then rename it back to @equips_window and you will see very soon why I made that "mistake".
If you don't want to disable option 1, remove these two parts of code:
elsif Input.trigger?(Input::C) && @command_window.index == 1
$game_system.se_play($data_system.buzzer_se)
class Window_CMSCommand < Window_Command
alias initialize_cmsmod_alias initialize
def initialize(index, continue)
initialize_cmsmod_alias(index, continue)
self.disable_item(1)
end
end
tyvm.. one more question, as you can see from my pic I don't have the save option in the menu, and when I delete the save file my summons, party switcher quest and bestiary get disabled. how can I change that.
Quote from: Blizzard on May 31, 2009, 10:42:04 am
Then rename it back to @equips_window and you will see very soon why I made that "mistake".
oohhh my bad XD
You need to change this part:
@command_window.disable_item(6) if $game_system.save_disabled
@command_window.disable_item(7) unless @command_window.continue
Quote from: Blizzard on May 31, 2009, 11:18:09 am
You need to change this part:
@command_window.disable_item(6) if $game_system.save_disabled
@command_window.disable_item(7) unless @command_window.continue
I commented all 6 of those lines and it still does it. ^^
I'm a pain huh.. :<_<: Gave you a lvlup
Then the cause must be somewhere else. Try to find other lines that could be disabling something in the command window.
Haha fixed.. amateur scripting on my part :^_^':
when 5
if @command_window.continue <------
$game_system.se_play($data_system.decision_se)
@scene = Scene_Summons.new
Graphics.transition(0)
else
$game_system.se_play($data_system.buzzer_se)
end
Lol, copy-paste errors. I still get them. xD
Question.. how do I make the end window's I created come up from the bottom like the options menu?
It's a bit complicated. You need an update for moving windows and you need to define how the windows should move. You also need a proper starting position for those windows.
I'm assuming your meaning in the def update in scene main like the move_da_something then define it after the update.. and changing the y position in the window to where it's off screen so when it updates it move to the y position the the def move_da_blabla
If so I tried and failed lol.. will try again here in a bit gotta go take down a tent before this thunder storm moves in :<_<: .. got like 20 tree's down from the last storm we had :O.o:
Yeah, that's pretty much the way it should work. Too bad I code this CMS 2 years ago. Today I could have made it MUCH better if I did it from scratch (even though this script most probably already exceeds most scripters in properly coding xD).
;) I switched from mogs menu to your cause I got tired of looking at it and the comments where in Portuguese I think dunno lol, but I probably won't switch from yours mainly cause I like it and easy to edit for the most part. Anywho I got the tent down so I can get back to this.. started raining while I was taking it down lol.. If I run into prob's I'll probably post again. :P
Believe me, this can be scripted much better, more suitable for edits and more extensible. ;)
Too bad I lack the time to totally overwork it. :/
No you don't ... :(
<_<; Stop tempting me.
:) It's still brilliantly scripted either way.. anywho I got the end commands to move up XD but.. 'lol always a but' I can't do the same for the window_data that I had under it for some reason..
I am actually looking into doing a great deal of work to this script to compliment some of the unique features in my game. Should be promising if things go as planned ...
BTW:
Please ... Blizzard ... :(
Okie can you tell me what I'm doing wrong here's the super of window_data
super(0, 0, 640, 280)
self.y, self.z, self.opacity = 524, 2999, 255
and here's the def update and def moves
def update
@status_windows.each {|win| win.update(@actor_index)}
@target_windows.each {|win| win.update(@target_index)}
@info_window.update
unless @status_windows[0].x < 0 || @status_windows[0].dir != 0 ||
@target_windows[0] != nil && @target_windows[0].dir != 0
@command_window.update
[@help_window, @equips_window, @item_choose_window, @sort_window,
@skill_window, @left_window, @right_window, @playerstatus_window,
@options_window, @end_window].each {|win| win.update if win != nil}
end
move_da_main if @status_windows[0].x < 0
move_da_selection if @status_windows[0].dir != 0
move_da_targeting if @target_windows[0] != nil && @target_windows[0].dir != 0
move_da_status if @playerstatus_window != nil && @playerstatus_window.y > 0
move_da_equip if @left_window != nil && @left_window.x > 0
move_da_skill if @skill_window != nil && @skill_window.x < 256
move_da_target if @target_windows[0] != nil && @target_windows[0].x < 0
move_da_items if @item_choose_window != nil && @item_choose_window.y < 0
move_da_sort if @sort_window != nil && @sort_window.y < 64
move_da_equipment if @equips_window != nil && @equips_window.y < 64
move_da_options if @options_window != nil && @options_window.y > 0
move_da_end if @end_window != nil && @end_window.y > 0
move_da_endd if @window_data != nil && @windos_data.y > 64
if @moved
@moved = false
return
end
if @command_window.active
update_command
elsif @status_windows[0].active
update_status
elsif @item_choose_window != nil
if @item_choose_window.active
items_refresh
update_items_choose
elsif @sort_window != nil && @sort_window.active
update_sort
elsif @items_window1 != nil && @items_window1.active
@items_window1.update
update_item
elsif @items_window2 != nil && @items_window2.active
@items_window2.update
update_item
elsif @equips_window != nil
update_equipment
elsif @target_windows[0] != nil && @target_windows[0].active
update_item_target
end
elsif @skill_window != nil && @skill_window.active
update_skill
elsif @target_windows[0] != nil && @target_windows[0].active
update_skill_target
elsif @right_window != nil
if @right_window.active
update_right_equip
elsif @item_window != nil && @item_window.active
@item_window.update
update_eitem
end
elsif @playerstatus_window != nil && @playerstatus_window.active
update_playerstatus
elsif @options_window != nil && @options_window.active
update_options
elsif @end_window != nil
update_end
elsif @window_data != nil
update_endd
end
end
def move_windows(wins, border, mdiff, lead, xy, acc = false)
if acc
diff = [[((xy ? lead.x : lead.y)-border).abs, mdiff].min, 1].max
else
diff = [[((xy ? lead.x : lead.y)-border).abs/2, mdiff].min, 1].max
end
wins[0].each {|win| win.x += diff if win != nil}
wins[1].each {|win| win.x -= diff if win != nil}
wins[2].each {|win| win.y += diff if win != nil}
wins[3].each {|win| win.y -= diff if win != nil}
@moved = true
end
def move_da_main
lead = @status_windows[0]
x_plus = @status_windows
x_minus = [@command_window]
y_minus = [@info_window]
move_windows([x_plus, x_minus, [], y_minus], 0, 128, lead, true)
end
def move_da_outro
@flag = true
lead = @status_windows[0]
x_plus = [@command_window]
x_minus = @status_windows + @target_windows + [@skill_window, @help_window]
y_plus = [@info_window]
y_minus = [@item_choose_window, @items_window1, @equips_window, @items_window2, @help_window]
move_windows([x_plus, x_minus, y_plus, y_minus], 0, 128, lead, true, true)
end
def move_da_selection(lead = @status_windows[@actor_index])
if lead.dir == 1
move_windows([[], [], [], @status_windows], 360, 32, lead, false)
else
move_windows([[], [], @status_windows, []], 0, 32, lead, false)
end
end
def move_da_targeting(lead = @target_windows[@target_index])
if lead.dir == 1
move_windows([[], [], [], @target_windows], 376, 32, lead, false)
else
move_windows([[], [], @target_windows, []], 64, 32, lead, false)
end
end
def move_da_sort(win = @sort_window)
move_windows([[], [], [win], []], 64, 32, win, false)
end
def move_da_status(win = @playerstatus_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
def move_da_equip(win = @left_window)
x_minus = [@left_window, @right_window, @help_window] + @item_windows
move_windows([[], x_minus, [], []], 0, 64, win, true)
end
def move_da_skill(win = @skill_window)
x_plus = [@skill_window, @help_window]
move_windows([x_plus, [], [], []], 256, 64, win, true)
end
def move_da_target(win = @target_windows[0])
move_windows([@target_windows, [], [], []], 0, 32, win, true)
end
def move_da_items(win = @item_choose_window)
y_plus = [@item_choose_window, @items_window1, @items_window2, @help_window]
move_windows([[], [], y_plus, []], 0, 64, win, false)
end
def move_da_equipment(win = @equips_window)
y_plus = [@equips_window, @help_window]
move_windows([[], [], y_plus, []], 64, 64, win, false)
end
def move_da_options(win = @options_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
def move_da_end(win = @end_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
def move_da_endd(win = @window_data)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
I need the window data to display right under the end menu, so end menu is at 0,0 and i need window_data at 0,64
woot nvm I got it XD
You've revamped bABS a lot, why not revamp the CMS? That would mean I could revamp my addons for it ^_~
And maybe include in add on that displays your summons status or something.
Believe it or not, at one moment I wanted to do that. xD
Edit: haha got it
Hey Blizzard ...
Let's say that I wanted to run a common event when selecting an option from the menu's index, is that possible?? If so, how and where would I edit the script??
**Note
I tried doing what you had mentioned in the thread about calling common events from the script, but I couldn't seem to get it to work right ...
Which option would that be?
I used the second option that you posted ...
Quote from: Blizzard on October 15, 2008, 09:02:24 am
interpreter = Interpreter.new(0, false)
interpreter.setup($data_common_events[C_ID].list, C_ID)
interpreter.setup_starting_event
interpreter.update
Keep in mind that this will execute events without "Wait X frames" commands normally. C_ID is the event of the common event you are calling. If you want it to run in the title screen, you would rather need something like this here.
This code goes into "def main" before the "loop" and "Graphics.transition" part.
@interpreter = Interpreter.new(0, false)
@interpreter.setup($data_common_events[C_ID].list, C_ID)
@interpreter.setup_starting_event
This goes into "def update", best right below the line "def update".
I'm not sure if that will work seemlessly, but you can try it out.
**I tried adding the code to your CMS, but of course it didn't work, because I didn't know what I was doing, but I am looking to call a common event from the menu.
Second, that is Equipment. Then you need to add it in "def update_status" under "when 1".
Oh no, my mistake I was unclear ...
I'm gonna make a new option in the menu's index called, "Class."
When I select it, I want it to travel over to the characters status windows like the other ones, so I'm gonna have to disable the menu index, and activate the status index I know. Then, add the new option to the case handler. Is the case handler where I would insert this code??
edit
I think I understand, because the def update_status is the same as the def main, because your def update_status IS the def main for the status window, right? They have the same properties ...
It's the "main" for updating the menu status window, that is when you select which character you want.
I realized that after your last post. Thank you for clarifying. I will let you know how this turns out.
edit001Something isn't right ... my common event uses pictures. Are they appearing behind the menu?? If so, is there a way to manually exit the menu screen??
edit002Nevermind that ... I just used $scene = Scene_Map.new to get out, but for some reason, it isn't working right. It will fade the screen, but pictures don't appear, music won't play, and I can't figure out why ...
here is the code that I edited ...
**This code is from a new project. I wanted to test it plain before I went and started modifying your CMS.
**You will notice the changes in the "def main," and the "def update_status" of course ...
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs menu screen processing.
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make command window
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Class"
s5 = "Status"
s6 = "Save"
s7 = "End Game"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.index = @menu_index
# If number of party members is 0
if $game_party.actors.size == 0
# Disable items, skills, equipment, and status
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
@command_window.disable_item(4)
end
# If save is forbidden
if $game_system.save_disabled
# Disable save
@command_window.disable_item(5)
end
# Make play time window
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 224
# Make steps window
@steps_window = Window_Steps.new
@steps_window.x = 0
@steps_window.y = 320
# Make gold window
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
# Make status window
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
# Execute transition
Graphics.transition
# Main loop
loop do
# Set the Common Event
@interpreter = Interpreter.new(0, false)
@interpreter.setup($data_common_events[1].list, 1)
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@command_window.dispose
@playtime_window.dispose
@steps_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@command_window.update
@playtime_window.update
@steps_window.update
@gold_window.update
@status_window.update
# If command window is active: call update_command
if @command_window.active
update_command
return
end
# If status window is active: call update_status
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when command window is active)
#--------------------------------------------------------------------------
def update_command
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Map.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# If command other than save or end game, and party members = 0
if $game_party.actors.size == 0 and @command_window.index < 4
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Branch by command window cursor position
case @command_window.index
when 0 # item
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_Item.new
when 1 # skill
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3 # class
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 5 # save
# If saving is forbidden
if $game_system.save_disabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to save screen
$scene = Scene_Save.new
when 6 # end game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to end game screen
$scene = Scene_End.new
end
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when status window is active)
#--------------------------------------------------------------------------
def update_status
@interpreter.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Make command window active
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 1 # skill
# If this actor's action limit is 2 or more
if $game_party.actors[@status_window.index].restriction >= 2
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to skill screen
$scene = Scene_Skill.new(@status_window.index)
when 2 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to equipment screen
$scene = Scene_Equip.new(@status_window.index)
when 3 # class
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Exit the menu
$scene = Scene_Map.new
# Switch to class changing screen
@interpreter.setup_starting_event
when 4 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to status screen
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
edit003Ah ... I remember you saying that the code will not execute the wait commands properly, so I removed all of the wait commands from the event system, and it worked, but without those wait commands ... things flow terribly. Is there anyway I can improve the code pasted above to allow for those wait commands??
You need to use @scene = Scene_Map.new. Also, I already said that events that aren't simply one-time executables might not work properly as they need to be executed more than once in order to be executed properly (i.e. if you have a wait command)
Oh, so it actually may not even be possible!?
Of course it is. You simply need to do what I explained before.
Quote from: Blizzard on October 15, 2008, 09:02:24 am
This code goes into "def main" before the "loop" and "Graphics.transition" part.
@interpreter = Interpreter.new(0, false)
@interpreter.setup($data_common_events[C_ID].list, C_ID)
@interpreter.setup_starting_event
This goes into "def update", best right below the line "def update".
I'm not sure if that will work seemlessly, but you can try it out.
You just don't put it in def update, but in def update_WHEREVER_YOU_WANT_IT.
It doesn't work properly Blizzard.
The wait commands won't execute still, and when I exit the menu normally the common event tries to play. I did just as you instructed here ...
Def Main def main
if BlizzCFG::MAP_BACKGROUND
@spriteset = Spriteset_Map.new
elsif BlizzCFG::CMS_EDITION
@spriteset = Sprite.new
@spriteset.bitmap = RPG::Cache.picture("CMS/#{BlizzCFG::CMS_EDITION}/CMSFullscreen")
end
continue = ((1..BlizzCFG::SAVE_FILES_NUMBER).any? {|i|
FileTest.exist?("#{BlizzCFG::SAVE_NAME}#{i}.#{BlizzCFG::SAVE_EXTENSION}")})
@command_window = Window_CMSCommand.new(@menu_index, continue)
(0...5).each {|i| @command_window.disable_item(i)} if $game_party.actors.size == 0
@command_window.disable_item(6) if $game_system.save_disabled
@command_window.disable_item(7) unless @command_window.continue
@info_window = Window_CMSInfo.new
@status_windows, @target_windows = [], []
$game_party.actors.each {|actor|
@status_windows.push(Window_CMSMenuStatus.new(actor))}
@help_window = Window_Help.new
@help_window.x, @help_window.y, @help_window.z = 0, -368, 9999
@interpreter = Interpreter.new(0, false)
@interpreter.setup($data_common_events[7].list, 7)
@interpreter.setup_starting_event
Graphics.transition
loop do
Graphics.update
Input.update
update
break if @scene != nil || $scene != self
end
loop do
Graphics.update
(@status_windows + [@command_window, @info_window]).each {|win| win.update}
move_da_outro
break if @status_windows[0].x <= - 512
end
Graphics.freeze
(@status_windows + @target_windows + [@command_window, @info_window,
@help_window, @spriteset]).each {|obj| obj.dispose if obj != nil}
del_sort if @sort_window != nil
del_status if @playerstatus_window != nil
del_equip if @left_window != nil
del_skill if @skill_window != nil
del_end if @end_window != nil
del_items if @item_choose_window != nil
del_items if @equips_window != nil
del_options if @options_window != nil
if @scene.is_a?(Scene_Title)
Graphics.transition(25)
Graphics.freeze
end
$scene = @scene
end
def equip_refresh
if @item_window.active
item = @item_window.data
last_hp = @actor.hp
last_sp = @actor.sp
@left_window.current = [@actor.maxhp, @actor.maxsp, @actor.atk,
@actor.pdef, @actor.mdef, @actor.str, @actor.dex, @actor.agi,
@actor.int, @actor.eva]
@left_window.changed = @actor.test_equip(@right_window.index, item == nil ? 0 : item.id)
elements = (item.is_a?(RPG::Weapon) ? item.element_set :
(item.is_a?(RPG::Armor) ? item.guard_element_set : []))
states = (item.is_a?(RPG::Weapon) ? item.plus_state_set :
(item.is_a?(RPG::Armor) ? item.guard_state_set : []))
@actor.hp = last_hp
@actor.sp = last_sp
@left_window.set_new_parameters(elements, states)
else
@left_window.current = @left_window.changed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
@left_window.set_new_parameters([], [])
end
end
def del_sort
@sort_window.dispose
@sort_window = nil
end
def del_status
@playerstatus_window.dispose
@playerstatus_window = nil
end
def del_equip
@left_window.dispose
@right_window.dispose
@item_windows.each {|win| win.dispose}
@left_window = @right_window = @item_window = @item_windows = nil
end
def del_skill
@skill_window.dispose
@skill_window = nil
end
def del_target
@target_windows.each {|win| win.dispose}
@target_windows = []
end
def del_end
@end_window.dispose
@end_window = nil
end
def del_items
@items_window1.dispose
@items_window1 = nil
@items_window2.dispose
@items_window2 = nil
@item_choose_window.dispose
@item_choose_window = nil
end
def del_equipment
@equips_window.dispose
@equips_window = nil
del_target
end
def del_options
@options_window.dispose
@options_window = nil
end
Def Update def update
@interpreter.update
@status_windows.each {|win| win.update(@actor_index)}
@target_windows.each {|win| win.update(@target_index)}
@info_window.update
unless @status_windows[0].x < 0 || @status_windows[0].dir != 0 ||
@target_windows[0] != nil && @target_windows[0].dir != 0
@command_window.update
[@help_window, @equips_window, @item_choose_window, @sort_window,
@skill_window, @left_window, @right_window, @playerstatus_window,
@options_window, @end_window].each {|win| win.update if win != nil}
end
move_da_main if @status_windows[0].x < 0
move_da_selection if @status_windows[0].dir != 0
move_da_targeting if @target_windows[0] != nil && @target_windows[0].dir != 0
move_da_status if @playerstatus_window != nil && @playerstatus_window.y > 0
move_da_equip if @left_window != nil && @left_window.x > 0
move_da_skill if @skill_window != nil && @skill_window.x < 256
move_da_target if @target_windows[0] != nil && @target_windows[0].x < 0
move_da_items if @item_choose_window != nil && @item_choose_window.y < 0
move_da_sort if @sort_window != nil && @sort_window.y < 64
move_da_equipment if @equips_window != nil && @equips_window.y < 64
move_da_options if @options_window != nil && @options_window.y > 0
move_da_end if @end_window != nil && @end_window.y > 336
if @moved
@moved = false
return
end
if @equips_window != nil
update_equipment
elsif @command_window.active
update_command
elsif @status_windows[0].active
update_status
elsif @item_choose_window != nil
if @item_choose_window.active
items_refresh
update_items_choose
elsif @sort_window != nil && @sort_window.active
update_sort
elsif @items_window1 != nil && @items_window1.active
@items_window1.update
update_item
elsif @items_window2 != nil && @items_window2.active
@items_window2.update
update_item
elsif @target_windows[0] != nil && @target_windows[0].active
update_item_target
end
elsif @skill_window != nil && @skill_window.active
update_skill
elsif @target_windows[0] != nil && @target_windows[0].active
update_skill_target
elsif @right_window != nil
if @right_window.active
update_right_equip
elsif @item_window != nil && @item_window.active
@item_window.update
update_eitem
end
elsif @playerstatus_window != nil && @playerstatus_window.active
update_playerstatus
elsif @options_window != nil && @options_window.active
update_options
elsif @end_window != nil
update_end
end
end
def move_windows(wins, border, mdiff, lead, xy, acc = false)
if acc
diff = [[((xy ? lead.x : lead.y)-border).abs, mdiff].min, 1].max
else
diff = [[((xy ? lead.x : lead.y)-border).abs/2, mdiff].min, 1].max
end
wins[0].each {|win| win.x += diff if win != nil}
wins[1].each {|win| win.x -= diff if win != nil}
wins[2].each {|win| win.y += diff if win != nil}
wins[3].each {|win| win.y -= diff if win != nil}
@moved = true
end
def move_da_main
lead = @status_windows[0]
x_plus = @status_windows
x_minus = [@command_window]
y_minus = [@info_window]
move_windows([x_plus, x_minus, [], y_minus], 0, 128, lead, true)
end
def move_da_outro
@flag = true
lead = @status_windows[0]
x_plus = [@command_window]
x_minus = @status_windows + @target_windows + [@skill_window, @help_window]
y_plus = [@info_window]
y_minus = [@item_choose_window, @items_window1, @items_window2, @help_window]
move_windows([x_plus, x_minus, y_plus, y_minus], 0, 128, lead, true, true)
end
def move_da_selection(lead = @status_windows[@actor_index])
if lead.dir == 1
move_windows([[], [], [], @status_windows], 360, 32, lead, false)
else
move_windows([[], [], @status_windows, []], 0, 32, lead, false)
end
end
def move_da_targeting(lead = @target_windows[@target_index])
if lead.dir == 1
move_windows([[], [], [], @target_windows], 376, 32, lead, false)
else
move_windows([[], [], @target_windows, []], 64, 32, lead, false)
end
end
def move_da_sort(win = @sort_window)
move_windows([[], [], [win], []], 64, 32, win, false)
end
def move_da_status(win = @playerstatus_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
def move_da_equip(win = @left_window)
x_minus = [@left_window, @right_window, @help_window] + @item_windows
move_windows([[], x_minus, [], []], 0, 64, win, true)
end
def move_da_skill(win = @skill_window)
x_plus = [@skill_window, @help_window]
move_windows([x_plus, [], [], []], 256, 64, win, true)
end
def move_da_target(win = @target_windows[0])
move_windows([@target_windows, [], [], []], 0, 32, win, true)
end
def move_da_items(win = @item_choose_window)
y_plus = [@item_choose_window, @items_window1, @items_window2, @help_window]
move_windows([[], [], y_plus, []], 0, 64, win, false)
end
def move_da_equipment(win = @equips_window)
y_plus = [@equips_window, @help_window]
move_windows([[], [], y_plus, []], 64, 64, win, false)
end
def move_da_options(win = @options_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
def move_da_end(win = @end_window)
move_windows([[], [], [], [win]], 336, 64, win, false)
end
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.actors.size == 0 && @command_window.index < 5
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_ITEM_SCENE
@scene = Scene_Item.new
else
@item_choose_window = Window_CMSChooseItem.new
@items_window1 = Window_NormalItem.new
@items_window2 = Window_QuestItem.new
@items_window1.help_window = @items_window2.help_window = @help_window
@command_window.active = false
@help_window.x, @help_window.y = 0, -576
@help_window.set_text('')
@help_window.visible = false
items_refresh
end
when 1..4
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_windows.each {|win| win.active = true}
@actor_index = 0
when 5
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_OPTIONS_SCENE
@scene = Scene_Options.new
else
@scene = Scene_Map.new
#@options_window = Window_CMSOptions.new
#@command_window.active = false
end
when 6
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@scene = Scene_CMSSave.new
Graphics.transition(0)
end
when 7
if @command_window.continue
$game_system.se_play($data_system.decision_se)
@scene = Scene_CMSLoad.new
Graphics.transition(0)
else
$game_system.se_play($data_system.buzzer_se)
end
when 8
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_END_SCENE
@scene = Scene_End.new
else
@command_window.active = false
@end_window = Window_CMSEndCommand.new
end
end
end
end
Look, I can't read minds. If you don't tell me where you actually want that common event to run, I can't tell you where exactly you need to put it.
And I can't find the line saying "@interpreter.update" anywhere.
I apologize about the @interpreter.update thing. I didn't copy the right part of the code.
Regardless, the @interpreter.update is located directly below the Def Update line as you suggested it be best placed. I have fixed the spoiler to show it.
For now, I commented the options lines to test this, and put @scene = Scene_Map.new in it's place. This is also in the spoiler. So look for "when 5" in the def update for where I want this.
No, I didn't say to put it below def update, I said to put it below def update_SOMETHING. If you want it to run when you select the "Options" command, then you put it in def update_options.
BUT! As you seem to want to call the event when returning to the map (which you should have told me since that works differently, all you need to do is to add this command before "@scene = Scene_Map.new":
$game_temp.common_event_id = X
X is the common event you want to run on map entry. So you have this code:
$game_temp.common_event_id = 7
@scene = Scene_Map.new
When you select the "Options" command.
Don't forget to remove the three lines you put in def main.
No, I don't want to run it from the map, but I thought that that would be the only way it would work. So, you're telling me that if I put it in it's proper scene's update method, then it should work properly?? Okay, let me try that ...
Edit
Does the fact that I don't have a scene for it pose a problem, because the common event IS the scene itself. I was planning on just adding an extra selection to the main menu that upon selection will call the common event.
You're complicating things too much if the common event is a scene. But then again, if it is a scene, simply activate it, return to the map and it will run.
Either we just can't get on the same page, or I'm a retard, Lol, but this is the best I can explain what I am doing with this common event.
I have created a Class Changing System with events that allows the player to switch his character's class and preview the changes and all that good stuff. It's in common event form and utilizes roughly 25pictures during operation. I have assigned special functions to the left, right, down, and up arrow keys.
I want to call this common event from the menu, from it's own option. It will be right under the "Bag," so it will be option 2 in the main menu. It's suppose to run when you select it from the menu. I don't know if I need to return to the map or not for this.
**The common event isn't a $scene
**I don't wanna have to return to the map if I don't have to.
Edit
Scratch it ... I will just use what you've posted.
Hi
Is there anyway that i could add the Party switcher window by blizzard and the limit break menu by DerVVulfman
into the menu because this menu is ideal for my game but i am also using those scripts.
I just wanted to ask first before i fiddle with the script and make it go wrong lol
is there anyway to do this
The question "how to add another option to the menu" has been answered multiple times in this thread and on the entire forum. Please use the search button.
just a question. I tried to add your easy party switcher to this menu..
now when I select it, the game just quits.
tried it with other menu stuff (beastery, quest log, etc) all the same. when you select it, the game just quits.
looked true all the posts. followed all the info given on how to add another menu to this 1. still fails.
looked at the order of the scripts... its like you suggest.
so? any sugestions?
class Window_CMSCommand < Window_Command
attr_reader :continue
def initialize(index, continue)
@background = 'CMSCommand'
commands = [$data_system.words.item, 'Equipment', $data_system.words.equip,
$data_system.words.skill, 'Status', 'Party switch', 'Options', 'Save', 'Load', 'Exit']
super(180, commands)
@continue, self.index, self.x, self.y, self.z = continue, index, 972, 0, 999
end
def draw_item(i, color)
self.contents.fill_rect(0, i*32, 148, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon("CMS/commandmenu#{i}")
opacity = (color == normal_color ? 255 : 128)
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.font.color = color
self.contents.draw_text(32, i*32, 148, 32, @commands[i])
end
end
here I added the menu option (like the that the name will show up in the menu)
when 1..4
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_windows.each {|win| win.active = true}
@actor_index = 0
when 5 #opening party switcher
$game_system.se_play($data_system.decision_se)
$scene = Scene_PartySwitcher.new
when 6
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_OPTIONS_SCENE
@scene = Scene_Options.new
else
@options_window = Window_CMSOptions.new
@command_window.active = false
end
and here i added what it should do when u click on it
(ofc i also changed the disable load game etc to 1 number higher)
I'm not going to search through the entire edit of the script just to find your small edits.
srry. edited my post
Didn't you notice this here? xD
Quote$scene = Scene_PartySwitcher.new
when 6
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_OPTIONS_SCENE
@scene = Scene_Options.new
i gone kill myself.... :'(
This is pretty nice looking. But, i want to ask something, which may be a dumb thing to ask, but what is DYNA version or edition? I know PKE is postality knghts enchenced...
but DYNA? never heard of it.
Dyna is an illegal version that was created before PKE. Don't bother about it.
OK! Probaly then works even less than PKE. Nice work Blizz :) You´re the best scripter i know.
Honestly? I liked Dyna more than PKE. I've used all three and Dyna was just better IMO. PKE was messed up. :/
Don´t know. haven´t tried dyna. But PKE stinks.
But, i´ve encountered a bug, or a something of a annoyance anyway.
I added my own windowskins to this, no prob, but they only equip to the menu. Do i have to modify something or use a call script to change the windowskin on text aswell?
Yes, there's a configuration for setting up skins. Just read the instructions.
As we all know (or do we, anyway) when it somes to scripting, i´m all thmubs. Meaning i don´t know allmost anything...
So were should i put the code to add G_Gs quest thing?
And i still haven´t solved the problem about the windowskins... Please help.
this is the 1 with GG quest log:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# StormTronics CMS by Blizzard
# Version: 5.38b - Hybrid Edition
# Type: Enhanced Custom Menu System
# Date v5.0: 27.8.2007
# Date v5.0b: 12.9.2007
# Date v5.1b: 28.1.2008
# Date v5.2b: 29.1.2008
# Date v5.3b: 23.7.2008
# Date v5.31b: 20.8.2008
# Date v5.32b: 21.8.2008
# Date v5.33b: 15.11.2008
# Date v5.34b: 8.4.2009
# Date v5.35b: 9.4.2009
# Date v5.36b: 6.5.2009
# Date v5.37b: 20.5.2009
# Date v5.38b: 31.5.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
# 97% compatible with SDK v1.x. 80% compatible with SDK v2.x. Glitchs with
# Fukuyama's Caterpillar script (but not with mine). Designed only for 8
# elements. WILL corrupt old savegames.
#
#
# Features:
#
# - completely animated and graphically optimized (lag-free)
# - own set of windowskins, fonts and icons for every status change and
# element
# - saves all changed options together with the savefile
# - menu commands "Item", "Equipment", "Skill", "Equip", "Status", "Options",
# "Save", "Load", "Exit"
# - Item submenu: "Items", "Sort" (by quantity or by alphabet), "Quest Items"
# - Equipment submenu shows information about equippable items for the chosen
# character, switch the character with LEFT and RIGHT
# - Skill submenu shows available skills for use for the chosen character,
# switch character with L and R, menu status window in background shows the
# chosen character
# - Equip submenu shows complete information about Status resistance/attack,
# Element resistance/attack and complete character stat changing (has
# even "max HP" and "max SP" available if you are using "Weapon/Armor HP/SP
# Plus")
# - Status screen with overall information about character status
# - Options submenu with "BGM Volume", "SFX Volume", "Battle BGM",
# "Battle Cam" (if using KGC's Pseudo 3D Battle Camera with my add-on for
# disabling), "Bar Style", "Bar Opacity" (if you are using Gradient Bar
# Styler), "Font" and "Windowskin" (both with preview)
# - Standard Save, Load and Exit commands
# - uses "Ultimate Font Override", so the font changes will affect RPG Maker
# XP versions 1.00, 1.01, 1.02 and 1.03 (including Dyna Edition and
# Postality Knights Edition Enhanced) and the font even gets saved with the
# savedata
#
# new in Hybrid Edition:
# - supports either windowskin background or custom images:
# >>> All StormTronics CMS Editions in one! <<<
# - compatible with all my scripts (even DREAM v4.0)
# - draws SR in the menu if CLRS was detected
# - supports any number of party members
# - removed some special add-ons, please get Tons of Add-ons if you want to
# continue using them, ST CMS will recognize Tons v4.98b and higher
# - more than 1500 code lines less than Nemesis Edition and almost 2000
# code lines less than Metal-Plate Edition
# - removes options from Options menu that are not / cannot being used at all
# - possibility to use a different equip system
# - doesn't need skin icons anymore, the icon is drawn from the skin directly
# - improved windowskins from "The Legend of Lexima™ IV - Chaos Project"
#
#
# Instructions:
#
# Copy your character faces into a the folder called "Characters". The
# facesets MUST have the same names as the character spritesets with a _face
# added at the end. Also copy the windowskins and the icons. Don't forget to
# include the font files used by the game in your game folder. Also change
# the variable ID in the conditional branches if you use another variable
# than 49.
#
#
# Configuration:
#
# CAM_AVAILABLE - set to true if you use KGC 3DPBC
# FACESETS - set to true if you want to use facesets
# BGM_Variable - ID number of the variable for the Battle BGM
# changer
# BGM_Lock - ID number of the switch used to temporarily
# disable the option of changing the Battle BGM, for
# that, just turn the switch on and off to disable
# and enable this option
# WEAPONS_AND_ARMORS - set to false to not show weapons and armors in the
# Item screen
# QUEST_ITEMS - add any item IDs that are supposed to be quest
# items, so the CMS can separate them
# BATTLE_BGMS - add any battle BGMs you are using
# CMS_SKINS - add any skin name you are using
# CMS_FONTS - add any font name you are using, be sure to
# include the font install files in your game
# release as some people may not have those fonts
# installed
# SAVE_NAME - name of your savefiles (usually "Save")
# SAVE_EXTENSION - extension of your savefiles (usually "rxdata")
# SAVE_FILES_NUMBER - number of savefiles you are using (usually 4)
# MAP_BACKGROUND - set to true to show map as background, otherwise
# if BlizzCFG::CMS_EDITION is not nil or false the
# "CMSFullscreen" image will be displayed
# CUSTOM_ITEM_SCENE - set this to true if you want to use a different
# equip scene and make this CMS compatible even with
# exotic Item Systems
# CUSTOM_EQUIPMENT_SCENE - set this to true if you want to use a different
# equip scene and make this CMS compatible even with
# exotic Equipment Systems, change only if you have
# another Equipment Scene script ready
# CUSTOM_EQUIP_SCENE - set this to true if you want to use a different
# equip scene and make this CMS compatible even with
# exotic Equipment Systems
# CUSTOM_SKILL_SCENE - set this to true if you want to use a different
# skill scene and make this CMS compatible even with
# exotic Skill Systems
# CUSTOM_STATUS_SCENE - set this to true if you want to use a different
# status scene
# CUSTOM_OPTIONS_SCENE - set this to true if you want to use a different
# options scene, change only if you have another
# Options Scene script ready
# CUSTOM_END_SCENE - set this to true if you want to use a different
# end scene
# FONT_BACKGROUND_FIX - set this to true if you want dark font colors to
# be used in the menu, this comes in handy when the
# custom background images you use are bright
# WIN_MIRRORED - flips horizontally all window positions
# CMS_EDITION - set this to false or nil if you want to use
# Nemesis Edition, set to folder name where in the
# Pictures/CMS the images should be loaded from if
# you want to use custom images as background
#
# The syntax $game_system.get_cam can be used by an event (Call script
# command) to restore the user's setting of the KGC 3DPBC if a forced cam
# control was initiated during an event.
#
# You can use $game_system.reset_battle_bgm to reset the battle BGM to the
# player's menu setting if you have changed it for i.e. a boss fight via
# event.
#
#
# FAQ:
#
# - Problem:
# I get an error that some icons can't be found. how do I solve this?
#
# - Solution:
# Copy the icons from the demo or download them and place the into the Icons
# folder into another folder called "CMS". Done.
#
# - Problem:
# I still get an error.
#
# - Solution:
# Rename the icons. If your elements were renamed and don't have the standard
# names, your icons need to be renamed as well. Same goes for status effects.
# Also be sure to add new icons with new names if you have more than the
# basic 8 elements and/or more than the basic 16 status effects in your
# database.
#
# - Question:
# Can I use my own skins, icons, fonts, battle BGMs, etc...?
#
# - Answer:
# Of course. Only be sure to change the appropriate options in the script and
# to use the appropriate names, so everything can function normally after
# that.
#
# - Question:
# Can this CMS be connected with other scripts? If yes, how and how much work
# is it?
#
# - Answer:
# Yes, it can. A little bit of scripting and enhancing the functions of the
# CMS are needed if it is going to be connected with other scripts. How much
# of additional work it can cause only depends how big the script merge is. A
# simple changing of the battle menu to display status effects in icons
# should take between 15~30 minutes of scripting and testing. Adding another
# option into the Options menu should also take only 15~30 minutes of
# scripting and testing. Even adding an entire series of new windows or
# implementing another Scene into the menu also won't take more than 30
# minutes, because the menu itself works with the "sub-scene" system, saving
# this way RAM and CPU.
#
# - Question:
# What is the "sub-scene" system? Also I have tried other animated CMS-es.
# Why is this one so lag-free?
#
# - Answer:
# It is lag-free just because of the "sub-scene" system. This system is also
# used in the "Scene_Battle". It only creates windows and handels them when
# they are needed or used, otherwise they get disposed or not created at all.
# In this script this method is being used to a possible maximum.
#
# - Question:
# Is this for real? This CMS doesn't even have 3000 lines of code!
#
# - Answer:
# Actually not even 2500 if you don't count the instructions.
#
# - Question:
# How is such a large collection of features possible with so relatively few
# lines of code?!
#
# - Answer:
# Smart coding. =P
#
#
# Additional scripts/snipplets/add-ons:
#
# - Ultimate Font Override v1.0b (by Blizzard)
# - BGM/SFX Volume Control with volume correction v1.0b (by Blizzard)
# - Map Name/Location v1.0b (by Blizzard)
# - Elemental Vulnerability Graph v1.0b (by Blizzard)
# - Battle BGM control v2.0b (by Blizzard)
# - Options control layout and funcionality v4.0b (by Blizzard)
# - CMS layout/funcionality v5.0b (by Blizzard)
# - optimized code and delagged by "sub-scene" window handling (by Blizzard)
#
# If you experience the "Stack level too deep" error, you may already have
# one of the scripts listed above and it conflicts with itself, because of
# aliased recursive calling. Try removing script by script and testing
# everything. Don't forget to backup you Scripts.rxdata before doing so.
# Scripts.rxdata is a file that contains your current scripts and is located
# in the Data folder of your game folder.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#==============================================================================
# module BlizzCFG
#==============================================================================
module BlizzCFG
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# basic config
CAM_AVAILABLE = false
FACESETS = false
BGM_Variable = 49
BGM_Lock = 49
WEAPONS_AND_ARMORS = true
QUEST_ITEMS = [23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
# custom game configs
BATTLE_BGMS = [
# ['BGM_NAME', VOLUME, PITCH, 'DISPLAY_NAME']
['001-Battle01', 100, 100, 'BGM 1'],
['002-Battle02', 100, 100, 'BGM 2'],
['003-Battle03', 100, 100, 'BGM 3'],
['004-Battle04', 100, 100, 'BGM 4']]
CMS_SKINS = ['Original', 'Heavy Gold', 'Hell Breath', 'Liquid Water',
'Violent Violet', 'Ice Cool', 'Fatal Venom', 'Perfect Chaos',
'Blizzard Master']
CMS_FONTS = ['Arial', 'Future', 'Comic Sans MS', 'Brush Script', 'Tahoma',
'Times New Roman']
# save file options
SAVE_NAME = 'Save'
SAVE_EXTENSION = 'rxdata'
SAVE_FILES_NUMBER = 4
# extra options
MAP_BACKGROUND = true
CUSTOM_ITEM_SCENE = false
CUSTOM_EQUIPMENT_SCENE = false
CUSTOM_EQUIP_SCENE = false
CUSTOM_SKILL_SCENE = false
CUSTOM_STATUS_SCENE = false
CUSTOM_OPTIONS_SCENE = false
CUSTOM_END_SCENE = false
FONT_BACKGROUND_FIX = false
WIN_MIRRORED = false
CMS_EDITION = false # 'Metal-Plate'
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# change only if changed in the 3DPBC script
CAM_Variable = 25 if CAM_AVAILABLE
end
# for compatibility
$stormtronics_cms = 5.38
#==============================================================================
# Game_System
#==============================================================================
class Game_System
attr_accessor :bgm_volume
attr_accessor :sfx_volume
attr_accessor :cam
attr_reader :fontname
attr_reader :fontsize
alias init_storm_cms_later initialize
def initialize
init_storm_cms_later
@bgm_volume = @sfx_volume = 100
@cam = 0
if $tons_version != nil
if $tons_version >= 6.03 && !@BARS
@bar_style, @bar_opacity = 0, 255
end
if $tons_version < 1.6
self.fontname = 'Arial'
self.fontsize = 22
end
else
self.fontname = 'Arial'
self.fontsize = 22
end
end
def fontname=(name)
Font.default_name = $defaultfonttype = $fontface = @fontname = name
end
def fontsize=(size)
Font.default_size = $defaultfontsize = $fontsize = @fontsize = size
end
def get_cam
$game_variables[BlizzCFG::CAM_Variable] = @cam
return true
end
def reset_battle_bgm
bgm = BlizzCFG::BATTLE_BGMS[$game_variables[BlizzCFG::BGM_Variable]]
$game_system.battle_bgm = RPG::AudioFile.new(bgm[0], bgm[1], bgm[2])
return true
end
if $dream_music
def bgm_play(bgm)
@playing_bgm = bgm
if bgm != nil && bgm.name != ''
vol = correction(@bgm_volume)
dream_ed = bgm.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/BGM/', dream_ed, 0)
else
Audio.bgm_stop
end
Graphics.frame_reset
end
def bgs_play(bgs)
@playing_bgs = bgs
if bgs != nil && bgs.name != ''
vol = correction(@sfx_volume)
dream_ed = bgs.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/BGS/', dream_ed, 1)
else
Audio.bgs_stop
end
Graphics.frame_reset
end
def me_play(me)
if me != nil && me.name != ''
vol = correction(@bgm_volume)
dream_ed = me.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/ME/', dream_ed, 2)
else
Audio.me_stop
end
Graphics.frame_reset
end
def se_play(se)
if se != nil && se.name != ''
vol = correction(@sfx_volume)
dream_ed = se.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/SE/', dream_ed, 3)
end
end
else
def bgm_play(bgm)
@playing_bgm = bgm
if bgm != nil && bgm.name != ''
vol = correction(@bgm_volume)
Audio.bgm_play('Audio/BGM/' + bgm.name , bgm.volume * vol / 100, bgm.pitch)
else
Audio.bgm_stop
end
Graphics.frame_reset
end
def bgs_play(bgs)
@playing_bgs = bgs
if bgs != nil && bgs.name != ''
vol = correction(@sfx_volume)
Audio.bgs_play('Audio/BGS/' + bgs.name, bgs.volume * vol / 100, bgs.pitch)
else
Audio.bgs_stop
end
Graphics.frame_reset
end
def me_play(me)
if me != nil && me.name != ''
vol = correction(@bgm_volume)
Audio.me_play('Audio/ME/' + me.name, me.volume * vol / 100, me.pitch)
else
Audio.me_stop
end
Graphics.frame_reset
end
def se_play(se)
if se != nil && se.name != ''
vol = correction(@sfx_volume)
Audio.se_play('Audio/SE/' + se.name, se.volume * vol / 100, se.pitch)
end
end
end
def correction(volume)
case volume
when 100 then return 100
when 95 then return 97
when 90 then return 95
when 85 then return 92
when 80 then return 90
when 75 then return 87
when 70 then return 85
when 65 then return 82
when 60 then return 80
when 55 then return 77
when 50 then return 75
when 45 then return 72
when 40 then return 70
when 35 then return 65
when 30 then return 60
when 25 then return 55
when 20 then return 50
when 15 then return 40
when 10 then return 35
when 5 then return 25
end
return 0
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
def now_exp
return (@exp-@exp_list[@level])
end
def next_exp
return (@exp_list[@level+1] > 0 ? @exp_list[@level+1]-@exp_list[@level] : 0)
end
def test_equip(equip_type, id)
case equip_type
when 0 then old_id, @weapon_id = @weapon_id, id
when 1 then old_id, @armor1_id = @armor1_id, id
when 2 then old_id, @armor2_id = @armor2_id, id
when 3 then old_id, @armor3_id = @armor3_id, id
when 4 then old_id, @armor4_id = @armor4_id, id
end
tested = [self.maxhp, self.maxsp, self.atk, self.pdef, self.mdef, self.str,
self.dex, self.agi, self.int, self.eva]
case equip_type
when 0 then @weapon_id = old_id
when 1 then @armor1_id = old_id
when 2 then @armor2_id = old_id
when 3 then @armor3_id = old_id
when 4 then @armor4_id = old_id
end
return tested
end
end
#==============================================================================
# Scene_Title
#==============================================================================
class Scene_Title
alias main_storm_cms_later main
def main
$map_infos = load_data('Data/MapInfos.rxdata')
$map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name}
main_storm_cms_later
end
end
#==============================================================================
# Game_Map
#==============================================================================
class Game_Map
def name
return $map_infos[@map_id]
end
end
#==============================================================================
# Bitmap
#==============================================================================
class Bitmap
if $tons_version == nil || $tons_version < 3.71
alias init_ultimate_font_override_later initialize
def initialize(w, h = nil)
if w.is_a?(Numeric) && h.is_a?(Numeric)
init_ultimate_font_override_later(w, h)
else
init_ultimate_font_override_later(w)
end
if $game_system != nil && $game_system.fontname != nil &&
!$scene.is_a?(Scene_Title)
self.font.name = $game_system.fontname
self.font.size = $game_system.fontsize
else
self.font.name = Font.default_name
self.font.size = Font.default_size
end
end
def gradient_bar(x, y, w, color1, color2, color3, rate, flag = false)
offset = 5
x += offset
y += 26
(0...offset+3).each {|i| fill_rect(x-i, y+i-2, w+3, 1, Color.new(0, 0, 0))}
(0...offset+1).each {|i| fill_rect(x-i, y+i-1, w+1, 1, Color.new(255, 255, 255))}
(0...w+offset).each {|i|
red = color3.red * i / (w + offset)
green = color3.green * i / (w + offset)
blue = color3.blue * i / (w + offset)
oy = i < offset ? offset-i : 0
off = i < offset ? i : i > w ? w+offset-i : offset
fill_rect(x+i-offset+1, y+oy-1, 1, off, Color.new(red, green, blue))}
if (w*rate).to_i >= offset
(0...(w*rate).to_i+offset).each {|i|
red = color1.red + (color2.red-color1.red)*i/((w+offset)*rate)
green = color1.green + (color2.green-color1.green)*i/((w+offset)*rate)
blue = color1.blue + (color2.blue-color1.blue)*i/((w+offset)*rate)
oy = i < offset ? offset-i : 0
off = i < offset ? i : i > w*rate ? (w*rate).to_i+offset-i : offset
fill_rect(x+i-offset+1, y+oy-1, 1, off, Color.new(red, green, blue))}
else
(0...(w*rate).to_i).each {|i| (0...offset-1).each {|j|
red = color1.red + (color2.red-color1.red) * i / (w * rate)
green = color1.green + (color2.green-color1.green) * i / (w * rate)
blue = color1.blue + (color2.blue-color1.blue) * i / (w * rate)
set_pixel(x+i-j+1, y+j-1, Color.new(red, green, blue))}}
end
end
end
def draw_element_graph(x_plus, y_plus, rad, color, limit = -1)
(-rad-1...0).each {|r| (r...0).each {|x|
color.alpha = 255 * (rad+1.0-r.abs)/(rad+1)
y = (r.abs * Math.sin(Math.acos(x/r.to_f))).to_i
h = y * 2
case limit
when 1, 8 then h = (y < x.abs ? 0 : y - x.abs)
when 2, 7 then y > x.abs ? h = y = x.abs : h = y
when 3, 6
y > x.abs ? h = y = x.abs : h = y
y = 0 if y > 0
when 4, 5 then h, y = (y < x.abs ? 0 : y - x.abs), -x.abs
end
if limit < 5
fill_rect(rad*2-x + x_plus, rad-y + y_plus, 1, h, color)
else
fill_rect(rad*2+x+1 + x_plus, rad-y + y_plus, 1, h, color)
end}}
end
end
#==============================================================================
# Window_Base
#==============================================================================
class Window_Base < Window
alias st_cms_hybrid_hack_init initialize
def initialize(xx, yy, w, h)
st_cms_hybrid_hack_init(xx, yy, w, h)
if BlizzCFG::CMS_EDITION && @background != nil
@backsprite = Sprite.new
@backsprite.bitmap = RPG::Cache.picture("CMS/#{BlizzCFG::CMS_EDITION}/#{@background}")
self.opacity, @backsprite.x, @backsprite.y = 0, self.x, self.y
end
end
alias st_cms_hybrid_hack_x_ x=
def x=(xx)
st_cms_hybrid_hack_x_($scene.is_a?(Scene_Menu) && BlizzCFG::WIN_MIRRORED ? 640-width-xx : xx)
@backsprite.x = xx unless @backsprite == nil || @backsprite.disposed?
end
alias st_cms_hybrid_hack_y_ y=
def y=(yy)
st_cms_hybrid_hack_y_(yy)
@backsprite.y = yy unless @backsprite == nil || @backsprite.disposed?
end
alias st_cms_hybrid_hack_x x
def x
xx = st_cms_hybrid_hack_x
return ($scene.is_a?(Scene_Menu) && BlizzCFG::WIN_MIRRORED ? 640-width-xx : xx)
end
alias st_cms_hybrid_hack_z z=
def z=(z)
st_cms_hybrid_hack_z(z)
@backsprite.z = z unless @backsprite == nil || @backsprite.disposed?
end
alias st_cms_hybrid_hack_width width=
def width=(w)
self.x += w-width if $scene.is_a?(Scene_Menu) && BlizzCFG::WIN_MIRRORED
st_cms_hybrid_hack_width(w)
end
alias st_cms_hybrid_hack_visible visible=
def visible=(expr)
st_cms_hybrid_hack_visible(expr)
@backsprite.visible = expr unless @backsprite == nil || @backsprite.disposed?
end
alias disp_sprite_later dispose
def dispose
@backsprite.dispose unless @backsprite == nil || @backsprite.disposed?
disp_sprite_later
end
alias st_cms_hybrid_hack_normal_color normal_color
def normal_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(0, 0, 0)
else
return st_cms_hybrid_hack_normal_color
end
end
alias st_cms_hybrid_hack_system_color system_color
def system_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(160, 0, 255)
else
return st_cms_hybrid_hack_system_color
end
end
alias st_cms_hybrid_hack_disabled_color disabled_color
def disabled_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(96, 96, 96)
else
return st_cms_hybrid_hack_disabled_color
end
end
alias st_cms_hybrid_hack_crisis_color crisis_color
def crisis_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(192, 192, 0)
else
return st_cms_hybrid_hack_crisis_color
end
end
alias draw_actor_graphic_st_cms_later draw_actor_graphic
def draw_actor_graphic(actor, x, y)
if actor != nil && actor.character_name != ''
if self.is_a?(Window_CMSMenuStatus) && BlizzCFG::FACESETS
bitmap = RPG::Cache.character("#{actor.character_name}_face", actor.character_hue)
x -= bitmap.width / 2
y -= bitmap.height
draw_actor_face_st_cms(actor, x, y)
else
draw_actor_graphic_st_cms_later(actor, x, y)
end
end
end
def draw_actor_face_st_cms(actor, x, y)
if $tons_version == nil || $tons_version < 3.71 || !FACE_HUE
hue = 0
else
hue = (FACE_HUE ? actor.character_hue : 0)
end
bitmap = RPG::Cache.character("#{actor.character_name}_face", hue)
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(x, y, bitmap, src_rect)
end
def draw_actor_battler(actor, x, y)
if actor != nil && actor.battler_name != ''
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw,ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
end
def draw_actor_exp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 48, 32, 'EXP')
if actor.exp_s.to_i > 999999
w = self.contents.text_size('999999').width
else
w = self.contents.text_size(actor.exp_s).width
end
if actor.next_exp_s.to_i > 999999
w2 = self.contents.text_size('999999').width
else
w2 = self.contents.text_size(actor.next_exp_s).width
end
self.contents.font.color = normal_color
self.contents.draw_text(x + 108 - w2, y, w2, 32, actor.exp_s, 2)
self.contents.draw_text(x + 108, y, 12, 32, '/', 1)
self.contents.draw_text(x + 120, y, w2, 32, actor.next_exp_s)
end
def draw_actor_exp_alt(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 64, 32, 'next')
self.contents.font.color = normal_color
self.contents.draw_text(x + 56, y, 84, 32, actor.next_rest_exp_s, 2)
end
def draw_actor_name2(actor, x, y, w, a)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, w, 32, actor.name, a)
end
def up_color
return Color.new(0, 255, 0)
end
def down_color
return Color.new(255, 0, 0)
end
alias draw_actor_parameter_st_cms_later draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
if type == 7
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, 'Evasion')
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
else
draw_actor_parameter_st_cms_later(actor, x, y, type)
end
end
def draw_actor_element_vulnerability(actor, x, y, rad = 60)
colors = []
(1..8).each {|i|
rate = actor.element_rate(i)
if rate < 0
colors.push(Color.new(0, 255 * (100-rate.abs) / 200, 255))
elsif rate == 0
colors.push(Color.new(0, 128, 255))
elsif rate <= 50
colors.push(Color.new(0, 255 * (rate+50) / 100, 255 * (50-rate) / 50))
elsif rate <= 100
colors.push(Color.new(255 * (rate-50) / 50 , 255, 0))
elsif rate <= 200
colors.push(Color.new(255, 255 * (200-rate) / 100, 0))
else
colors.push(normal_color)
end}
(1..8).each {|i|
self.contents.draw_element_graph(x + 16, y + 32, rad, colors[i-1], i)}
save_color = self.contents.font.color.clone
(1..8).each {|i|
str1 = $data_system.elements[i]
str2 = "#{actor.element_rate(i)}%"
w1 = self.contents.text_size(str1).width
w2 = self.contents.text_size(str2).width
case i
when 1 then x2, y2, x3, y3 = x+152, y+20, x+168, y+4
when 2 then x2, y2, x3, y3 = x+176, y+56, x+192, y+40
when 3 then x2, y2, x3, y3 = x+176, y+92, x+192, y+108
when 4 then x2, y2, x3, y3 = x+152, y+128, x+168, y+144
when 5 then x2, y2, x3, y3 = x+120-w1, y+128, x+104-w2, y+144
when 6 then x2, y2, x3, y3 = x+96-w1, y+92, x+80-w2, y+108
when 7 then x2, y2, x3, y3 = x+96-w1, y+56, x+80-w2, y+40
when 8 then x2, y2, x3, y3 = x+120-w1, y+20, x+104-w2, y+4
end
self.contents.font.color = save_color
self.contents.draw_text(x2, y2, w1, 32, str1)
self.contents.font.color = colors[i-1]
self.contents.draw_text(x3, y3, w2, 32, str2)}
self.contents.font.color = save_color
end
if $Blizz_Art
alias draw_actor_exp_blizzart_later draw_actor_exp
def draw_actor_exp(actor, x, y, w = 148)
if $game_system.BARS
w -= 12
rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
if rate < 0.5
color1 = Color.new(20 * rate, 60, 80, 192)
color2 = Color.new(60 * rate, 180, 240, 192)
elsif rate >= 0.5
color1 = Color.new(20 + 120 * (rate-0.5), 60 + 40 * (rate-0.5), 80, 192)
color2 = Color.new(60 + 360 * (rate-0.5), 180 + 120 * (rate-0.5), 240, 192)
end
color3 = Color.new(80, 80, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
end
draw_actor_exp_blizzart_later(actor, x, y)
end
alias draw_actor_exp_new2 draw_actor_exp_alt
def draw_actor_exp_alt(actor, x, y, w = 148)
w -= 12
rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
if rate < 0.5
color1 = Color.new(20 * rate, 60, 80)
color2 = Color.new(60 * rate, 180, 240)
elsif rate >= 0.5
color1 = Color.new(20 + 120 * (rate-0.5), 60 + 40 * (rate-0.5), 80)
color2 = Color.new(60 + 360 * (rate-0.5), 180 + 120 * (rate-0.5), 240)
end
color3 = Color.new(80, 80, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
draw_actor_exp_new2(actor, x, y)
end
end
end
#==============================================================================
# Window_CMSCommand
#==============================================================================
class Window_CMSCommand < Window_Command
attr_reader :continue
def initialize(index, continue)
@background = 'CMSCommand'
commands = [$data_system.words.item, 'Equipment', $data_system.words.equip,
$data_system.words.skill, 'Status', 'Quest Log','Options', 'Save', 'Load', 'Exit']
super(180, commands)
@continue, self.index, self.x, self.y, self.z = continue, index, 972, 0, 999
end
def draw_item(i, color)
self.contents.fill_rect(0, i*32, 148, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon("CMS/commandmenu#{i}")
opacity = (color == normal_color ? 255 : 128)
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.font.color = color
self.contents.draw_text(32, i*32, 100, 32, @commands[i])
end
end
#==============================================================================
# Window_CMSChooseItem
#==============================================================================
class Window_CMSChooseItem < Window_Selectable
def initialize
@background = 'CMSHelp'
super(0, -576, 640, 64)
@commands = ['Items', 'Sort', 'Quest Items']
@item_max = @column_max = @commands.size
self.contents = Bitmap.new(width - 32, 32)
refresh
self.active, self.z, self.index = true, 2900, 0
end
def refresh
self.contents.clear
(0...@item_max).each {|i| draw_item(i, normal_color)}
end
def draw_item(i, color)
self.contents.font.color = color
self.contents.fill_rect(8 + 212*i, 0, 164, 32, Color.new(0, 0, 0, 0))
self.contents.draw_text(8 + 212*i, 0, 164, 32, @commands[i], 1)
end
end
#==============================================================================
# Window_CMSOptions
#==============================================================================
class Window_CMSOptions < Window_Selectable
attr_accessor :current_font
attr_reader :current_skin
attr_reader :skin_name
attr_reader :font_name
def initialize
@background = 'CMSFullscreen'
super(0, 512, 640, 480)
@commands = ['BGM Volume', 'SFX Volume', 'Battle BGM']
@commands.push('Battle Cam') if BlizzCFG::CAM_AVAILABLE
@commands.push('Bar Style', 'Bar Opacity') if $Blizz_Art
@commands.push('Font', 'Windowskin')
get_skin_and_font
self.contents = Bitmap.new(width - 32, height - 32)
self.z, self.index = 2999, 0
@item_max = @commands.size
refresh
end
def get_option
return @commands[index]
end
def refresh
self.contents.clear
self.contents.font.name = $game_system.fontname
(0...@item_max).each {|i|
self.contents.font.color = normal_color
self.contents.fill_rect(24, 16 + i*36, 192, 32, Color.new(0, 0, 0, 0))
self.contents.draw_text(24, 16 + i*36, 192, 32, @commands[i])
draw_arrows(288, 4 + i*36)
case @commands[i]
when 'BGM Volume' then draw_volume(288, 4 + i*36)
when 'SFX Volume' then draw_volume(288, 4 + i*36, true)
when 'Battle BGM' then draw_battle_bgm(288, 4 + i*36)
when 'Battle Cam' then draw_battle_cam(288, 4 + i*36)
when 'Bar Style' then draw_style(288, 4 + i*36)
when 'Bar Opacity' then draw_opacity(288, 4 + i*36)
when 'Font' then draw_font(288, 4 + i*36)
when 'Windowskin' then draw_skin(288, 4 + i*36)
end}
end
def draw_arrows(x, y)
self.contents.draw_text(x - 32, y + 13, 32, 32, '<<')
self.contents.draw_text(x + 249, y + 13, 32, 32, '>>')
end
def draw_volume(x, y, mode = false, width = 224)
volume = (mode ? $game_system.sfx_volume.to_f : $game_system.bgm_volume.to_f)
vol = volume.to_f / 100
color1 = Color.new(20, 40, 80, 192)
color2 = Color.new(60, 120, 240, 192)
color3 = Color.new(0, 0, 80, 192)
old, $game_system.bar_opacity = $game_system.bar_opacity, 255 if $Blizz_Art
self.contents.gradient_bar(x, y, width, color1, color2, color3, vol, true)
$game_system.bar_opacity = old if $Blizz_Art
end
def draw_style(x, y, width = 224)
color1 = Color.new(80, 80, 0, 192)
color2 = Color.new(240, 240, 0, 192)
self.contents.gradient_bar(x + 32, y, width - 64, color1, color2, color1, 1, true)
end
def draw_battle_bgm(x, y, width = 224)
bgm = BlizzCFG::BATTLE_BGMS[$game_variables[BlizzCFG::BGM_Variable]][3]
if $game_switches[BlizzCFG::BGM_Lock] || BlizzCFG::BATTLE_BGMS.size <= 1
self.contents.font.color = Color.new(0, 0, 0, 255)
self.contents.draw_text(x+1, y + 13+1, 224, 32, bgm, 1)
self.contents.font.color = disabled_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(x, y + 13, 224, 32, bgm, 1)
end
def draw_battle_cam(x, y, width = 224)
cam = ($game_variables[BlizzCFG::CAM_Variable] == 0 ? 'ON' : 'OFF')
self.contents.draw_text(x, y + 13, 224, 32, cam, 1)
end
def draw_opacity(x, y, width = 224)
alpha = case $game_system.bar_opacity
when 0 then 'No Bar'
when 1..85 then 'Light'
when 86..170 then 'Medium'
when 171..254 then 'Hard'
when 255 then 'Full'
end
self.contents.draw_text(x, y + 13, 224, 32, alpha, 1)
end
def draw_font(x, y, width = 224)
@font_name = BlizzCFG::CMS_FONTS[@current_font]
self.contents.font.name = @font_name
self.contents.draw_text(x, y + 13, 224, 32, @font_name, 1)
self.contents.font.name = $game_system.fontname
end
def draw_skin(x, y, width = 224)
@skin_name = BlizzCFG::CMS_SKINS[self.current_skin]
self.contents.draw_text(x, y + 13, 224, 32, @skin_name, 1)
self.contents.fill_rect(x + 48, y +428, 128, 128, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.windowskin(@skin_name)
self.contents.blt(x + 50, y + 50, bitmap, Rect.new(2, 2, 124, 124))
self.contents.blt(x + 48, y + 48, bitmap, Rect.new(128, 0, 16, 16))
self.contents.blt(x + 160, y + 48, bitmap, Rect.new(176, 0, 16, 16))
self.contents.blt(x + 48, y + 160, bitmap, Rect.new(128, 48, 16, 16))
self.contents.blt(x + 160, y + 160, bitmap, Rect.new(176, 48, 16, 16))
(2..4).each {|i|
self.contents.blt(x+i*32, y+48, bitmap, Rect.new(144, 0, 32, 16))}
(2..4).each {|i|
self.contents.blt(x+i*32, y+160, bitmap, Rect.new(144, 48, 32, 16))}
(2..4).each {|i|
self.contents.blt(x+48, y+i*32, bitmap, Rect.new(128, 16, 16, 32))}
(2..4).each {|i|
self.contents.blt(x+160, y+i*32, bitmap, Rect.new(176, 16, 16, 32))}
end
def current_skin
return (@current_skin == nil ? 0 : @current_skin)
end
def current_skin=(val)
@current_skin = (val.is_a?(Numeric) ? val : 0)
end
def get_skin_and_font
@font_name = $game_system.fontname
@current_font = BlizzCFG::CMS_FONTS.index(@font_name)
@skin_name = $game_system.windowskin_name
self.current_skin = BlizzCFG::CMS_SKINS.index(@skin_name)
end
def update_cursor_rect
if self.index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(16, @index*36 + 16, 128, 32)
end
end
end
#==============================================================================
# Window_CMSTarget
#==============================================================================
class Window_CMSTarget < Window_Base
attr_reader :index
attr_reader :actor
attr_reader :dir
def initialize(actor, mode = false)
@background = 'CMSTarget'
super(-304, 64, 256, 104)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, @item_max = actor, 1
self.y += actor.index*104 unless mode
self.z = 3999
self.index = -1
refresh
end
def index=(i)
@index = i
update_cursor_rect
end
def refresh
self.contents.clear
draw_actor_name(@actor, 4, -4)
draw_actor_state(@actor, 100, -4, 112)
draw_actor_hp(@actor, 44, 16)
draw_actor_sp(@actor, 44, 38)
end
def update_actor(actor)
@actor = actor
refresh
end
def dir=(val)
self.y -= val*40
@dir = val
end
def update(i = @actor.index - 1)
unless self.index == -2
if @actor.index == i
self.index = 0 if self.index == -1
else
self.index = -1 if self.index == 0
end
end
self.y = 64+@actor.index*104 unless self.active
@dir = 0 if (self.y-64) / 104 * 104 == self.y-64
super()
update_cursor_rect
end
def update_cursor_rect
if !self.active || self.index == -1
self.cursor_rect.empty
elsif self.index >= 0
self.cursor_rect.set(0, @index * 96, 224, 72)
elsif self.index == -2
self.cursor_rect.set(0, 0, 224, 72)
end
end
end
#==============================================================================
# Window_Help
#==============================================================================
class Window_Help < Window_Base
alias init_storm_cms_later initialize
def initialize
@background = 'CMSHelp' if $scene.is_a?(Scene_Menu)
init_storm_cms_later
refresh
end
def refresh
self.contents.font.name = $game_system.fontname
end
end
#==============================================================================
# Window_CMSItem
#==============================================================================
class Window_CMSItem < Window_Selectable
def initialize
@background = 'CMSItem'
super(256, -512, 384, 416)
self.active, self.visible, self.z, self.index = false, false, 2999, -1
refresh
end
def data
return @data[self.index]
end
def draw_item(i)
number = case @data[i]
when RPG::Item then $game_party.item_number(@data[i].id)
when RPG::Weapon then $game_party.weapon_number(@data[i].id)
when RPG::Armor then $game_party.armor_number(@data[i].id)
end
if @data[i].is_a?(RPG::Item) && $game_party.item_can_use?(@data[i].id) ||
@mode == nil
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
self.contents.fill_rect(4, i*32, 352, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(@data[i].icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(4, i*32 + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(308, i*32, 16, 32, ':', 1)
self.contents.draw_text(324, i*32, 24, 32, number.to_s, 2)
end
def update_help
@help_window.set_text(data == nil ? '' : data.description)
end
end
#==============================================================================
# Window_NormalItem
#==============================================================================
class Window_NormalItem < Window_CMSItem
attr_accessor :mode
def initialize
@mode = 0
super
self.visible = true
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
data1, data2, data3 = [], [], []
(1...$data_items.size).each {|i|
if $game_party.item_number(i) > 0 && !BlizzCFG::QUEST_ITEMS.include?(i)
data1.push($data_items[i])
end}
if BlizzCFG::WEAPONS_AND_ARMORS
(1...$data_weapons.size).each {|i|
data2.push($data_weapons[i]) if $game_party.weapon_number(i) > 0}
(1...$data_armors.size).each {|i|
data3.push($data_armors[i]) if $game_party.armor_number(i) > 0}
end
if [1, 2].include?(@mode)
data1.sort! {|a, b|
$game_party.item_number(a.id) <=> $game_party.item_number(b.id)}
data2.sort! {|a, b|
$game_party.weapon_number(a.id) <=> $game_party.weapon_number(b.id)}
data3.sort! {|a, b|
$game_party.armor_number(a.id) <=> $game_party.armor_number(b.id)}
[data1, data2, data3].each {|ary| ary.reverse!} if @mode == 2
elsif [3, 4].include?(@mode)
[data1, data2, data3].each {|ary| ary.sort! {|a, b| a.name <=> b.name}}
[data1, data2, data3].each {|ary| ary.reverse!} if @mode == 4
end
@data = data1 + data2 + data3
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
end
#==============================================================================
# Window_QuestItem
#==============================================================================
class Window_QuestItem < Window_CMSItem
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
(1...$data_items.size).each {|i|
if $game_party.item_number(i) > 0 && BlizzCFG::QUEST_ITEMS.include?(i)
@data.push($data_items[i])
end}
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
end
#==============================================================================
# Window_EquipmentItem
#==============================================================================
class Window_EquipmentItem < Window_CMSItem
attr_accessor :item_max
def initialize(actor)
@actor = actor
super()
self.x, self.y, self.z, self.index = 256, -548, 2999, 0
self.active = self.visible = true
end
def update_actor(actor)
@actor = actor
refresh
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
(1...$data_weapons.size).each {|i|
@data.push($data_weapons[i]) if $game_party.weapon_number(i) > 0}
(1...$data_armors.size).each {|i|
@data.push($data_armors[i]) if $game_party.armor_number(i) > 0}
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
def draw_item(i)
case @data[i]
when RPG::Weapon
if @actor.equippable?($data_weapons[@data[i].id])
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
number = $game_party.weapon_number(@data[i].id)
when RPG::Armor
if @actor.equippable?($data_armors[@data[i].id])
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
number = $game_party.armor_number(@data[i].id)
end
self.contents.fill_rect(4, i*32, 352, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(@data[i].icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(308, i*32, 16, 32, ':', 1)
self.contents.draw_text(324, i*32, 24, 32, number.to_s, 2)
end
end
#==============================================================================
# Window_CMSSkill
#==============================================================================
class Window_CMSSkill < Window_CMSItem
def initialize(actor)
@actor = actor
super()
self.x, self.y, self.z, self.index = -512, 64, 2999, 0
self.active = self.visible = true
end
def update_actor(actor)
@actor = actor
refresh
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
@actor.skills.each {|id| @data.push($data_skills[id])}
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
def draw_item(i)
self.contents.fill_rect(4, i*32, 352, 32, Color.new(0, 0, 0, 0))
if @actor.skill_can_use?(@data[i].id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
bitmap = RPG::Cache.icon(@data[i].icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
text = @data[i].name
tons = ($tons_version != nil ? $tons_version : 0)
if tons >= 4.0 && TONS_OF_ADDONS::EQUAP_SKILLS && DISPLAY_AP_REQ
aps = $game_system.maxap(@data[i].id)
if aps > 0
text += " (#{@actor.ap(@data[i].id)}/#{aps})"
elsif DISPLAY_AP_ZERO
text += ' (0/0)'
end
end
self.contents.draw_text(32, i*32, 204, 32, text)
if @data[i].sp_cost > 0
sp_cost = @data[i].sp_cost
if tons >= 6.54 && $game_system.SP_COST_MOD
sp_cost = BlizzCFG.get_cost_mod(@actor.states, sp_cost)
end
self.contents.draw_text(292, i*32, 48, 32, sp_cost.to_s, 2)
end
end
end
#==============================================================================
# Window_CMSEquipLeft
#==============================================================================
class Window_CMSEquipLeft < Window_Base
attr_accessor :mode
attr_accessor :current
attr_accessor :changed
def initialize(actor)
@background = 'CMSEquipLeft'
super(640, 64, 288, 416)
self.contents = Bitmap.new(width - 32, height - 32)
@current = @changed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
@elements, @states, @actor, @mode, self.z = [], [], actor, 0, 2999
refresh
end
def update_actor(actor)
@actor = actor
refresh
end
def draw_actor_hp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 96, 32, "max #{$data_system.words.hp}")
self.contents.font.color = normal_color
self.contents.draw_text(x + 108, y, 48, 32, actor.maxhp.to_s, 2)
end
def draw_actor_sp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 96, 32, "max #{$data_system.words.sp}")
self.contents.font.color = normal_color
self.contents.draw_text(x + 108, y, 48, 32, actor.maxsp.to_s, 2)
end
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_level(@actor, 180, 0)
draw_actor_hp(@actor, 4, 28)
draw_actor_sp(@actor, 4, 52)
(0..7).each {|i| draw_actor_parameter(@actor, 4, 76 + i*24, i)}
if @mode == 0
self.contents.font.color = up_color
self.contents.draw_text(4, 276, 200, 32, 'Elemental attack:')
self.contents.draw_text(4, 324, 200, 32, 'Status attack:')
elsif @mode == 1
self.contents.font.color = up_color
self.contents.draw_text(4, 276, 200, 32, 'Elemental resistance:')
self.contents.draw_text(4, 324, 200, 32, 'Status resistance:')
end
self.contents.font.color = normal_color
draw_elements(4, 300)
draw_states(4, 348)
@current.each_index {|i|
val = @current[i] - @changed[i]
if val != 0
self.contents.font.color = system_color
self.contents.draw_text(162, 28+i*24, 40, 32, '»»', 1)
self.contents.font.color = (val > 0 ? down_color : up_color)
self.contents.draw_text(204, 28+i*24, 48, 32, @changed[i].abs.to_s, 2)
end}
end
def set_new_parameters(elements, states)
@elements, @states = elements, states
refresh
end
def draw_elements(x, y)
@elements.each_index {|i|
icon = RPG::Cache.icon("CMS/elm_#{$data_system.elements[@elements[i]].downcase}")
self.contents.blt(x + i*28, y + 4, icon, Rect.new(0, 0, 24, 24))}
end
def draw_states(x, y)
@states.each_index {|i|
icon = RPG::Cache.icon("CMS/stat_#{$data_states[@states[i]].name.downcase}")
self.contents.blt(x + i*28, y + 4, icon, Rect.new(0, 0, 24, 24))}
end
end
#==============================================================================
# Window_CMSEquipRight
#==============================================================================
class Window_CMSEquipRight < Window_Selectable
def initialize(actor)
@background = 'CMSEquipRight'
super(928, 64, 352, 192)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, self.active, self.z, self.index = actor, true, 2999, 0
refresh
end
def data
return @data[self.index]
end
def update_actor(actor)
@actor = actor
refresh
end
def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
self.contents.draw_text(4, 32 * 0, 120, 32, $data_system.words.weapon)
self.contents.draw_text(4, 32 * 1, 120, 32, $data_system.words.armor1)
self.contents.draw_text(4, 32 * 2, 120, 32, $data_system.words.armor2)
self.contents.draw_text(4, 32 * 3, 120, 32, $data_system.words.armor3)
self.contents.draw_text(4, 32 * 4, 120, 32, $data_system.words.armor4)
(0...5).each {|i| draw_item_name(@data[i], 120, 32 * i)}
end
def update_help
@help_window.set_text(data == nil ? '' : data.description)
end
end
#==============================================================================
# Window_CMSEquipItem
#==============================================================================
class Window_CMSEquipItem < Window_Selectable
def initialize(actor, equip_type)
@background = 'CMSEquipItem'
super(928, 256, 352, 224)
self.active = self.visible = false
@actor, @equip_type, self.z, self.index = actor, equip_type, 3000, -1
refresh
end
def data
return @data[self.index]
end
def update_actor(actor, equip_type)
@actor = actor
@equip_type = equip_type
refresh
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
(1...$data_weapons.size).each {|i|
if $game_party.weapon_number(i) > 0 && weapon_set.include?(i)
@data.push($data_weapons[i])
end}
else
armor_set = $data_classes[@actor.class_id].armor_set
(1...$data_armors.size).each {|i|
if $game_party.armor_number(i) > 0 && armor_set.include?(i)
@data.push($data_armors[i]) if $data_armors[i].kind == @equip_type-1
end}
end
@data.push(nil)
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32)
(0...@item_max-1).each {|i| draw_item(i)}
self.contents.font.color = system_color
self.contents.draw_text(4, (@item_max-1)*32, 100, 32, '[Unequip]')
end
def draw_item(i)
number = case @data[i]
when RPG::Weapon then $game_party.weapon_number(@data[i].id)
when RPG::Armor then $game_party.armor_number(@data[i].id)
end
self.contents.font.color = normal_color
bitmap = RPG::Cache.icon(@data[i].icon_name)
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(212, i*32, 16, 32, ':', 1)
self.contents.draw_text(228, i*32, 24, 32, number.to_s, 2)
end
def update_help
@help_window.set_text(data == nil ? '' : data.description)
end
end
#==============================================================================
# Window_CMSStatus
#==============================================================================
class Window_CMSStatus < Window_Base
def initialize(actor)
@background = 'CMSFullscreen'
super(0, 512, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, self.active, self.z = actor, true, 2999
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(224, 0, 120, 32, @actor.name, 1)
draw_actor_battler(@actor, 284, 232)
draw_actor_class(@actor, 400, 32)
draw_actor_level(@actor, 400, 0)
draw_actor_state(@actor, 400, 64, 168)
draw_actor_hp(@actor, 400, 92, 172)
draw_actor_sp(@actor, 400, 122, 172)
if $crls
if BlizzCFG::DRAW_SR_BAR
draw_actor_sr_with_bar(@actor, 400, 152, 172)
else
draw_actor_sr(@actor, 400, 152, 172)
end
draw_actor_exp(@actor, 400, 182, 172)
else
draw_actor_exp(@actor, 400, 152, 172)
end
(0..7).each {|i| draw_actor_parameter(@actor, 4, i*28, i)}
self.contents.font.color = system_color
w = self.contents.text_size('Elemental Vulnerability').width
self.contents.draw_text(365, 244, w, 32, 'Elemental Vulnerability')
self.contents.font.size -= 4
draw_actor_element_vulnerability(@actor, 320, 268)
self.contents.font.size += 4
self.contents.font.color = system_color
self.contents.draw_text(84, 244, 96, 32, 'Equipment')
self.contents.draw_text(4, 276, 96, 32, $data_system.words.weapon)
self.contents.draw_text(4, 308, 96, 32, $data_system.words.armor1)
self.contents.draw_text(4, 340, 96, 32, $data_system.words.armor2)
self.contents.draw_text(4, 372, 96, 32, $data_system.words.armor3)
self.contents.draw_text(4, 404, 96, 32, $data_system.words.armor4)
equips = [$data_weapons[@actor.weapon_id], $data_armors[@actor.armor1_id],
$data_armors[@actor.armor2_id], $data_armors[@actor.armor3_id],
$data_armors[@actor.armor4_id]]
equips.each_index {|i|
if @actor.equippable?(equips[i])
draw_item_name(equips[i], 108, 276 + i*32)
else
self.contents.font.color = (i == 0 ? knockout_color : crisis_color)
self.contents.draw_text(108, 276 + i*32, 192, 32, 'Nothing equipped')
end}
end
def update_actor(actor)
@actor = actor
refresh
end
end
#==============================================================================
# Window_CMSSortCommand
#==============================================================================
class Window_CMSSortCommand < Window_Command
def initialize
@background = 'CMSMini'
super(180, ['Standard', 'by quantity', 'by alphabet'])
self.x, self.y, self.z = 224, -128, 9999
end
end
#==============================================================================
# Window_CMSEndCommand
#==============================================================================
class Window_CMSEndCommand < Window_Command
def initialize
@background = 'CMSMini'
super(180, ['Back to game', 'Back to title', 'Exit game'])
self.x, self.y, self.z = 460, 524, 3999
end
end
#==============================================================================
# Window_CMSInfo
#==============================================================================
class Window_CMSInfo < Window_Base
def initialize
@background = 'CMSInfo'
super(0, 0, 180, 128)
self.contents = Bitmap.new(width - 32, height - 32)
self.active, self.x, self.y, self.z = false, 460, 864, 1999
refresh
end
def refresh
self.contents.clear
self.contents.font.name = $game_system.fontname
@double_sec = Graphics.frame_count * 2 / Graphics.frame_rate
total_sec = @double_sec / 2
hour, min, sec = total_sec / 60 / 60, total_sec / 60 % 60, total_sec % 60
if @double_sec % 2 == 1
text = sprintf('%02d %02d %02d', hour, min, sec)
else
text = sprintf('%02d:%02d:%02d', hour, min, sec)
end
self.contents.font.color = system_color
self.contents.font.size = 21
cx = contents.text_size($data_system.words.gold).width
self.contents.draw_text(148-cx, 16, cx, 32, $data_system.words.gold, 2) #148
self.contents.draw_text(0, 40, 148, 32, 'Location:')
self.contents.font.color = normal_color
self.contents.draw_text(-32, -9, 148, 32, text, 1)
self.contents.draw_text(0, 16, 144-cx, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(0, 64, 148, 32, $game_map.name, 2)
end
def update
super
refresh if Graphics.frame_count * 2 / Graphics.frame_rate != @double_sec
end
end
#==============================================================================
# Window_CMSMenuStatus
#==============================================================================
class Window_CMSMenuStatus < Window_Base
attr_reader :index
attr_reader :actor
attr_reader :dir
def initialize(actor)
@background = 'CMSMenuStatus'
super(0, 0, 460, 120)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
@dir = 0
refresh
self.active = false
self.index = -1
self.x, self.y, self.z = -512, @actor.index * 120, 999
end
def index=(i)
@index = i
update_cursor_rect
end
def refresh
self.contents.clear
self.contents.font.name = $game_system.fontname
self.contents.font.color = normal_color
draw_actor_graphic(@actor, 56, 80)
draw_actor_name2(@actor, 8, 0, 88, 1)
draw_actor_level(@actor, 104, 0)
draw_actor_state(@actor, 168, 0, 252)
draw_actor_hp(@actor, 104, 28)
draw_actor_sp(@actor, 272, 28)
draw_actor_exp_alt(@actor, 272, 56)
if $crls
if BlizzCFG::DRAW_SR_BAR
draw_actor_sr_with_bar(@actor, 104, 56)
else
draw_actor_sr(@actor, 104, 56)
end
end
end
def dir=(val)
self.y -= val*56
@dir = val
end
def update(i = @actor.index - 1)
if @actor.index == i
self.index = 0 if self.index == -1
else
self.index = -1 if self.index == 0
end
self.y = @actor.index*120 unless self.active
@dir = 0 if self.y / 120 * 120 == self.y
super()
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, 0, width - 32, height - 32)
end
end
end
#==============================================================================
# Scene_Menu
#==============================================================================
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
@actor_index = @target_index = -1
@viewport1 = Viewport.new(0, 0, 640, 480)
@moved = false
end
def main
if BlizzCFG::MAP_BACKGROUND
@spriteset = Spriteset_Map.new
elsif BlizzCFG::CMS_EDITION
@spriteset = Sprite.new
@spriteset.bitmap = RPG::Cache.picture("CMS/#{BlizzCFG::CMS_EDITION}/CMSFullscreen")
end
continue = ((1..BlizzCFG::SAVE_FILES_NUMBER).any? {|i|
FileTest.exist?("#{BlizzCFG::SAVE_NAME}#{i}.#{BlizzCFG::SAVE_EXTENSION}")})
@command_window = Window_CMSCommand.new(@menu_index, continue)
(0...5).each {|i| @command_window.disable_item(i)} if $game_party.actors.size == 0
@command_window.disable_item(7) if $game_system.save_disabled
@command_window.disable_item(8) unless @command_window.continue
@info_window = Window_CMSInfo.new
@status_windows, @target_windows = [], []
$game_party.actors.each {|actor|
@status_windows.push(Window_CMSMenuStatus.new(actor))}
@help_window = Window_Help.new
@help_window.x, @help_window.y, @help_window.z = 0, -368, 9999
Graphics.transition
loop do
Graphics.update
Input.update
update
break if @scene != nil || $scene != self
end
loop do
Graphics.update
(@status_windows + [@command_window, @info_window]).each {|win| win.update}
move_da_outro
break if @status_windows[0].x <= - 512
end
Graphics.freeze
(@status_windows + @target_windows + [@command_window, @info_window,
@help_window, @spriteset]).each {|obj| obj.dispose if obj != nil}
del_sort if @sort_window != nil
del_status if @playerstatus_window != nil
del_equip if @left_window != nil
del_skill if @skill_window != nil
del_end if @end_window != nil
del_items if @item_choose_window != nil
del_equipment if @equips_window != nil
del_options if @options_window != nil
if @scene.is_a?(Scene_Title)
Graphics.transition(25)
Graphics.freeze
end
$scene = @scene
end
def equip_refresh
if @item_window.active
item = @item_window.data
last_hp = @actor.hp
last_sp = @actor.sp
@left_window.current = [@actor.maxhp, @actor.maxsp, @actor.atk,
@actor.pdef, @actor.mdef, @actor.str, @actor.dex, @actor.agi,
@actor.int, @actor.eva]
@left_window.changed = @actor.test_equip(@right_window.index, item == nil ? 0 : item.id)
elements = (item.is_a?(RPG::Weapon) ? item.element_set :
(item.is_a?(RPG::Armor) ? item.guard_element_set : []))
states = (item.is_a?(RPG::Weapon) ? item.plus_state_set :
(item.is_a?(RPG::Armor) ? item.guard_state_set : []))
@actor.hp = last_hp
@actor.sp = last_sp
@left_window.set_new_parameters(elements, states)
else
@left_window.current = @left_window.changed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
@left_window.set_new_parameters([], [])
end
end
def del_sort
@sort_window.dispose
@sort_window = nil
end
def del_status
@playerstatus_window.dispose
@playerstatus_window = nil
end
def del_equip
@left_window.dispose
@right_window.dispose
@item_windows.each {|win| win.dispose}
@left_window = @right_window = @item_window = @item_windows = nil
end
def del_skill
@skill_window.dispose
@skill_window = nil
end
def del_target
@target_windows.each {|win| win.dispose}
@target_windows = []
end
def del_end
@end_window.dispose
@end_window = nil
end
def del_items
@items_window1.dispose
@items_window1 = nil
@items_window2.dispose
@items_window2 = nil
@item_choose_window.dispose
@item_choose_window = nil
end
def del_equipment
@equips_window.dispose
@equips_window = nil
del_target
end
def del_options
@options_window.dispose
@options_window = nil
end
def update
@status_windows.each {|win| win.update(@actor_index)}
@target_windows.each {|win| win.update(@target_index)}
@info_window.update
unless @status_windows[0].x < 0 || @status_windows[0].dir != 0 ||
@target_windows[0] != nil && @target_windows[0].dir != 0
@command_window.update
[@help_window, @equips_window, @item_choose_window, @sort_window,
@skill_window, @left_window, @right_window, @playerstatus_window,
@options_window, @end_window].each {|win| win.update if win != nil}
end
move_da_main if @status_windows[0].x < 0
move_da_selection if @status_windows[0].dir != 0
move_da_targeting if @target_windows[0] != nil && @target_windows[0].dir != 0
move_da_status if @playerstatus_window != nil && @playerstatus_window.y > 0
move_da_equip if @left_window != nil && @left_window.x > 0
move_da_skill if @skill_window != nil && @skill_window.x < 256
move_da_target if @target_windows[0] != nil && @target_windows[0].x < 0
move_da_items if @item_choose_window != nil && @item_choose_window.y < 0
move_da_sort if @sort_window != nil && @sort_window.y < 64
move_da_equipment if @equips_window != nil && @equips_window.y < 64
move_da_options if @options_window != nil && @options_window.y > 0
move_da_end if @end_window != nil && @end_window.y > 336
if @moved
@moved = false
return
end
if @equips_window != nil
update_equipment
elsif @command_window.active
update_command
elsif @status_windows[0].active
update_status
elsif @item_choose_window != nil
if @item_choose_window.active
items_refresh
update_items_choose
elsif @sort_window != nil && @sort_window.active
update_sort
elsif @items_window1 != nil && @items_window1.active
@items_window1.update
update_item
elsif @items_window2 != nil && @items_window2.active
@items_window2.update
update_item
elsif @target_windows[0] != nil && @target_windows[0].active
update_item_target
end
elsif @skill_window != nil && @skill_window.active
update_skill
elsif @target_windows[0] != nil && @target_windows[0].active
update_skill_target
elsif @right_window != nil
if @right_window.active
update_right_equip
elsif @item_window != nil && @item_window.active
@item_window.update
update_eitem
end
elsif @playerstatus_window != nil && @playerstatus_window.active
update_playerstatus
elsif @options_window != nil && @options_window.active
update_options
elsif @end_window != nil
update_end
end
end
def move_windows(wins, border, mdiff, lead, xy, acc = false)
if acc
diff = [[((xy ? lead.x : lead.y)-border).abs, mdiff].min, 1].max
else
diff = [[((xy ? lead.x : lead.y)-border).abs/2, mdiff].min, 1].max
end
wins[0].each {|win| win.x += diff if win != nil}
wins[1].each {|win| win.x -= diff if win != nil}
wins[2].each {|win| win.y += diff if win != nil}
wins[3].each {|win| win.y -= diff if win != nil}
@moved = true
end
def move_da_main
lead = @status_windows[0]
x_plus = @status_windows
x_minus = [@command_window]
y_minus = [@info_window]
move_windows([x_plus, x_minus, [], y_minus], 0, 128, lead, true)
end
def move_da_outro
@flag = true
lead = @status_windows[0]
x_plus = [@command_window]
x_minus = @status_windows + @target_windows + [@skill_window, @help_window]
y_plus = [@info_window]
y_minus = [@item_choose_window, @items_window1, @items_window2, @help_window]
move_windows([x_plus, x_minus, y_plus, y_minus], 0, 128, lead, true, true)
end
def move_da_selection(lead = @status_windows[@actor_index])
if lead.dir == 1
move_windows([[], [], [], @status_windows], 360, 32, lead, false)
else
move_windows([[], [], @status_windows, []], 0, 32, lead, false)
end
end
def move_da_targeting(lead = @target_windows[@target_index])
if lead.dir == 1
move_windows([[], [], [], @target_windows], 376, 32, lead, false)
else
move_windows([[], [], @target_windows, []], 64, 32, lead, false)
end
end
def move_da_sort(win = @sort_window)
move_windows([[], [], [win], []], 64, 32, win, false)
end
def move_da_status(win = @playerstatus_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
def move_da_equip(win = @left_window)
x_minus = [@left_window, @right_window, @help_window] + @item_windows
move_windows([[], x_minus, [], []], 0, 64, win, true)
end
def move_da_skill(win = @skill_window)
x_plus = [@skill_window, @help_window]
move_windows([x_plus, [], [], []], 256, 64, win, true)
end
def move_da_target(win = @target_windows[0])
move_windows([@target_windows, [], [], []], 0, 32, win, true)
end
def move_da_items(win = @item_choose_window)
y_plus = [@item_choose_window, @items_window1, @items_window2, @help_window]
move_windows([[], [], y_plus, []], 0, 64, win, false)
end
def move_da_equipment(win = @equips_window)
y_plus = [@equips_window, @help_window]
move_windows([[], [], y_plus, []], 64, 64, win, false)
end
def move_da_options(win = @options_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
def move_da_end(win = @end_window)
move_windows([[], [], [], [win]], 336, 64, win, false)
end
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.actors.size == 0 && @command_window.index < 5
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_ITEM_SCENE
@scene = Scene_Item.new
else
@item_choose_window = Window_CMSChooseItem.new
@items_window1 = Window_NormalItem.new
@items_window2 = Window_QuestItem.new
@items_window1.help_window = @items_window2.help_window = @help_window
@command_window.active = false
@help_window.x, @help_window.y = 0, -576
@help_window.set_text('')
@help_window.visible = false
items_refresh
end
when 1..4
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_windows.each {|win| win.active = true}
@actor_index = 0
when 5 #opening GG quest log
$game_system.se_play($data_system.decision_se)
@scene = Scene_Quest.new
when 6
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_OPTIONS_SCENE
@scene = Scene_Options.new
else
@options_window = Window_CMSOptions.new
@command_window.active = false
end
when 7
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@scene = Scene_CMSSave.new
Graphics.transition(0)
end
when 8
if @command_window.continue
$game_system.se_play($data_system.decision_se)
@scene = Scene_CMSLoad.new
Graphics.transition(0)
else
$game_system.se_play($data_system.buzzer_se)
end
when 9
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_END_SCENE
@scene = Scene_End.new
else
@command_window.active = false
@end_window = Window_CMSEndCommand.new
end
end
end
end
def update_status
@actor = $game_party.actors[@actor_index]
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@status_windows.each {|win| win.active, win.index = false, -1}
@actor_index = -1
@command_window.active = true
elsif Input.trigger?(Input::C)
case @command_window.index
when 1
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_EQUIPMENT_SCENE
@scene = Scene_Equipment.new(@actor_index)
else
@equips_window = Window_EquipmentItem.new(@actor)
@equips_window.help_window = @help_window
@target_windows.push(Window_CMSTarget.new(@actor, true))
@status_windows.each {|win| win.active = false}
@help_window.visible = true
@help_window.x, @help_window.y = 0, -612
end
when 2
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_EQUIP_SCENE
@scene = Scene_Equip.new(@actor_index)
else
@left_window = Window_CMSEquipLeft.new(@actor)
@right_window = Window_CMSEquipRight.new(@actor)
@right_window.help_window = @help_window
@item_windows = []
(0..4).each {|i| win = Window_CMSEquipItem.new(@actor, 4-i)
win.help_window = @help_window
@item_windows.unshift(win)}
@item_windows[0].visible = @help_window.visible = true
@help_window.x, @help_window.y = 640, 0
@status_windows.each {|win| win.active = false}
end
when 3
if @actor.restriction >= 2
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_SKILL_SCENE
@scene = Scene_Skill.new(@actor_index)
else
@skill_window = Window_CMSSkill.new(@actor)
@skill_window.help_window = @help_window
@help_window.visible = true
@help_window.x, @help_window.y = -768, 0
@status_windows.each {|win| win.active = false}
end
end
when 4
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_STATUS_SCENE
@scene = Scene_Status.new(@actor_index)
else
@playerstatus_window = Window_CMSStatus.new(@actor)
@status_windows.each {|win| win.active = false}
end
end
elsif Input.repeat?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@actor_index = (@actor_index+1) % $game_party.actors.size
if @status_windows[@actor_index].y < 0
@status_windows.each {|win| win.y += ($game_party.actors.size-4)*120}
elsif @status_windows[@actor_index].y >= 480
@status_windows.each {|win| win.dir = 1}
end
elsif Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
if @status_windows[@actor_index].y < 0
@status_windows.each {|win| win.dir = -1}
elsif @status_windows[@actor_index].y >= 480
@status_windows.each {|win| win.y -= ($game_party.actors.size-4)*120}
end
end
end
def update_items_choose
if Input.trigger?(Input::B)
del_items
$game_system.se_play($data_system.cancel_se)
@command_window.active, @help_window.x, @help_window.y = true, 0, -612
elsif Input.trigger?(Input::C)
items_refresh
@item_choose_window.active = false
$game_system.se_play($data_system.decision_se)
case @item_choose_window.index
when 0
@items_window1.active = @help_window.visible = true
@items_window1.index = 0
when 1 then @sort_window = Window_CMSSortCommand.new
when 2
@items_window2.active = @help_window.visible = true
@items_window2.index = 0
end
end
end
def update_sort
if Input.trigger?(Input::B)
del_sort
@item_choose_window.active = true
$game_system.se_play($data_system.cancel_se)
elsif Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
@items_window1.mode = case @sort_window.index
when 0 then @sort_window.index
when 1 then @items_window1.mode == 1 ? 2 : 1
when 2 then @items_window1.mode == 3 ? 4 : 3
end
@items_window1.refresh
end
end
def items_refresh
index = @item_choose_window.index
@items_window1.visible = [0, 1].include?(index)
@items_window2.visible = (index == 2)
end
def update_equipment
if Input.trigger?(Input::B)
del_equipment
$game_system.se_play($data_system.cancel_se)
@actor_index = -1
@command_window.active = true
@help_window.visible = false
@help_window.x, @help_window.y = 0, -612
elsif Input.trigger?(Input::RIGHT) || Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::RIGHT)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::LEFT)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@target_windows[0].update_actor($game_party.actors[@actor_index])
@equips_window.update_actor($game_party.actors[@actor_index])
unless @equips_window.item_max > @equips_window.index
@equips_window.index = 0
end
end
end
def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@item_choose_window.active = true
@help_window.set_text('')
@items_window1.active = @items_window2.active = @help_window.visible = false
@items_window1.index = @items_window2.index = -1
elsif Input.trigger?(Input::C)
win = (@item_choose_window.index == 0 ? @items_window1 : @items_window2)
@item = win.data
unless @item.is_a?(RPG::Item) && $game_party.item_can_use?(@item.id)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_party.actors.each_index {|i|
@target_windows.push(Window_CMSTarget.new($game_party.actors[i]))}
@target_index = 0
$game_system.se_play($data_system.decision_se)
if @item.scope.between?(3, 6)
win.active = false
@target_windows.each {|win| win.active = true}
if [4, 6].include?(@item.scope)
@target_windows.each {|win| win.index = -2}
else
@target_windows[@target_index].index = 0
end
elsif @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
win.draw_item(win.index)
end
(@status_windows + @target_windows).each {|win| win.refresh}
@scene = Scene_Map.new
elsif @skill.scope == 7
$game_system.se_play($data_system.buzzer_se)
end
end
end
def update_item_target
if Input.trigger?(Input::B)
del_target
$game_system.se_play($data_system.cancel_se)
@target_index = -1
@items_window1.refresh unless $game_party.item_can_use?(@item.id)
@items_window1.active = true
elsif Input.trigger?(Input::C)
if $game_party.item_number(@item.id) == 0
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_windows[0].index == -2
used = false
$game_party.actors.each {|actor| used |= actor.item_effect(@item)}
elsif @target_index >= 0
used = $game_party.actors[@target_index].item_effect(@item)
end
if used
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@items_window1.draw_item(@items_window1.index)
end
(@status_windows + @target_windows).each {|win| win.refresh}
if $game_party.all_dead?
@scene = Scene_Gameover.new
elsif @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
@scene = Scene_Map.new
end
else
$game_system.se_play($data_system.buzzer_se)
end
else
update_target
end
end
def update_target
return if @target_windows[0] == nil || @target_windows[0].index == -2
if Input.repeat?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@target_index = (@target_index+1) % $game_party.actors.size
if @target_windows[@target_index].y < 64
@target_windows.each {|win| win.y += ($game_party.actors.size-4)*104}
elsif @target_windows[@target_index].y >= 480
@target_windows.each {|win| win.dir = 1}
end
elsif Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
@target_index += $game_party.actors.size-1
@target_index %= $game_party.actors.size
if @target_windows[@target_index].y < 64
@target_windows.each {|win| win.dir = -1}
elsif @target_windows[@target_index].y >= 480
@target_windows.each {|win| win.y -= ($game_party.actors.size-4)*104}
end
end
end
def update_skill
if Input.trigger?(Input::B)
del_skill
$game_system.se_play($data_system.cancel_se)
@help_window.x, @help_window.y = 0, -768
@help_window.visible = false
@command_window.active = true
@actor_index = @target_index = -1
elsif Input.trigger?(Input::C)
@skill = @skill_window.data
if @skill == nil || !@actor.skill_can_use?(@skill.id)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_party.actors.each_index {|i|
@target_windows.push(Window_CMSTarget.new($game_party.actors[i]))}
@target_index = 0
$game_system.se_play($data_system.decision_se)
if @skill.scope.between?(3, 6)
@skill_window.active = false
@target_windows.each {|win| win.visible = win.active = true}
if [4, 6].include?(@skill.scope)
@target_windows.each {|win| win.index = -2}
else
@target_windows[@target_index].index = 0
end
elsif @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
$game_system.se_play(@skill.menu_se)
@actor.sp -= @skill.sp_cost
(@status_windows + @target_windows).each {|win| win.refresh}
@skill_window.refresh
@scene = Scene_Map.new
elsif @skill.scope == 7
$game_system.se_play($data_system.buzzer_se)
end
elsif Input.trigger?(Input::R) || Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::R)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::L)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@actor = $game_party.actors[@actor_index]
@skill_window.update_actor(@actor)
@skill_window.index = 0
end
end
def update_skill_target
if Input.trigger?(Input::B)
del_target
$game_system.se_play($data_system.cancel_se)
@skill_window.active = true
@target_index = -1
elsif Input.trigger?(Input::C)
unless @actor.skill_can_use?(@skill.id)
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_windows[0].index == -2
used = false
$game_party.actors.each {|actor| used |= actor.skill_effect(@actor, @skill)}
else
used = $game_party.actors[@target_index].skill_effect(@actor, @skill)
end
if used
$game_system.se_play(@skill.menu_se)
@actor.sp -= @skill.sp_cost
(@status_windows + @target_windows).each {|win| win.refresh}
@skill_window.refresh
if $game_party.all_dead?
@scene = Scene_Gameover.new
elsif @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
@scene = Scene_Map.new
end
else
$game_system.se_play($data_system.buzzer_se)
end
else
update_target
end
end
def update_right_equip
@item_windows.each_index {|i|
@item_windows[i].visible = (@right_window.index == i)}
@item_window = @item_windows[@right_window.index]
newmode = [@right_window.index, 1].min
if newmode != @left_window.mode
@left_window.mode = newmode
@left_window.refresh
end
if Input.trigger?(Input::B)
del_equip
$game_system.se_play($data_system.cancel_se)
@help_window.x, @help_window.y = 660, 0
@command_window.active = true
@actor_index = -1
elsif Input.trigger?(Input::C)
if @actor.equip_fix?(@right_window.index)
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@right_window.active = false
@item_window.active, @item_window.index = true, 0
equip_refresh
end
elsif Input.trigger?(Input::R) || Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::R)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::L)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@actor = $game_party.actors[@actor_index]
@right_window.update_actor(@actor)
@left_window.update_actor(@actor)
@item_windows.each_index {|i| @item_windows[i].update_actor(@actor, i)}
end
end
def update_eitem
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@right_window.active = true
@item_window.active, @item_window.index = false, -1
equip_refresh
elsif Input.trigger?(Input::C)
$game_system.se_play($data_system.equip_se)
item = @item_window.data
@actor.equip(@right_window.index, item == nil ? 0 : item.id)
@right_window.active = true
@item_window.active, @item_window.index = false, -1
@right_window.refresh
@item_window.refresh
(@item_windows + @status_windows).each {|win| win.refresh}
equip_refresh
elsif Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN) ||
Input.repeat?(Input::R) || Input.repeat?(Input::L)
equip_refresh
end
end
def update_playerstatus
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@actor_index = -1
del_status
elsif Input.trigger?(Input::R) || Input.trigger?(Input::RIGHT) ||
Input.trigger?(Input::L) || Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::R) || Input.trigger?(Input::RIGHT)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::L) || Input.trigger?(Input::LEFT)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@actor = $game_party.actors[@actor_index]
@playerstatus_window.update_actor(@actor)
end
end
def update_options
if Input.trigger?(Input::B)
del_options
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
return
end
case @options_window.get_option
when 'BGM Volume'
if Input.repeat?(Input::RIGHT)
$game_system.bgm_volume += 5
$game_system.bgm_volume = 100 if $game_system.bgm_volume > 100
$game_system.bgm_play($game_system.bgm_memorize)
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.bgm_volume -= 5
$game_system.bgm_volume = 0 if $game_system.bgm_volume < 0
$game_system.bgm_play($game_system.bgm_memorize)
@options_window.refresh
end
when 'SFX Volume'
if Input.repeat?(Input::RIGHT)
$game_system.sfx_volume += 5
if $game_system.sfx_volume > 100
$game_system.sfx_volume = 100
else
$game_system.se_play($data_system.cursor_se)
end
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.sfx_volume -= 5
$game_system.sfx_volume = 0 if $game_system.sfx_volume < 0
$game_system.se_play($data_system.cursor_se)
@options_window.refresh
end
when 'Battle BGM'
if Input.repeat?(Input::LEFT) || Input.repeat?(Input::RIGHT) ||
Input.repeat?(Input::C)
if $game_switches[BlizzCFG::BGM_Lock] || BlizzCFG::BATTLE_BGMS.size <= 1
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
ind = $game_variables[BlizzCFG::BGM_Variable]
if Input.repeat?(Input::RIGHT) || Input.repeat?(Input::C)
ind = (ind+1) % BlizzCFG::BATTLE_BGMS.size
elsif Input.repeat?(Input::LEFT)
ind = (ind+BlizzCFG::BATTLE_BGMS.size-1) % BlizzCFG::BATTLE_BGMS.size
end
$game_variables[BlizzCFG::BGM_Variable] = ind
$game_system.reset_battle_bgm
@options_window.refresh
end
end
when 'Battle Cam'
if Input.repeat?(Input::LEFT) || Input.repeat?(Input::RIGHT) ||
Input.repeat?(Input::C)
if BlizzCFG::CAM_AVAILABLE
$game_system.se_play($data_system.decision_se)
$game_system.cam = ($game_system.cam+1) % 2
$game_system.get_cam
@options_window.refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
when 'Bar Style'
if Input.repeat?(Input::RIGHT)
if $game_system.bar_opacity == 0
$game_system.se_play($data_system.buzzer_se)
else
$game_system.bar_style = ($game_system.bar_style + 1) % 7
$game_system.se_play($data_system.decision_se)
@options_window.refresh
@status_windows.each {|win| win.refresh}
end
elsif Input.repeat?(Input::LEFT)
if $game_system.bar_opacity == 0
$game_system.se_play($data_system.buzzer_se)
else
$game_system.bar_style = ($game_system.bar_style + 6) % 7
$game_system.se_play($data_system.decision_se)
@options_window.refresh
@status_windows.each {|win| win.refresh}
end
end
when 'Bar Opacity'
if Input.repeat?(Input::LEFT) || Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.decision_se)
$game_system.bar_opacity += (Input.repeat?(Input::RIGHT) ? 64 : -64)
@options_window.refresh
@status_windows.each {|win| win.refresh}
end
when 'Font'
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.decision_se)
@options_window.current_font += 1
@options_window.current_font %= BlizzCFG::CMS_FONTS.size
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.decision_se)
@options_window.current_font += BlizzCFG::CMS_FONTS.size - 1
@options_window.current_font %= BlizzCFG::CMS_FONTS.size
@options_window.refresh
elsif Input.repeat?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_system.fontname = @options_window.font_name
@command_window.refresh
@info_window.refresh
@status_windows.each {|win| win.refresh}
@help_window.refresh
@options_window.refresh
(0...5).each {|i| @command_window.disable_item(i)} if $game_party.actors.size == 0
@command_window.disable_item(8) if $game_system.save_disabled
@command_window.disable_item(9) unless @command_window.continue
end
when 'Windowskin'
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.decision_se)
@options_window.current_skin += 1
@options_window.current_skin %= BlizzCFG::CMS_SKINS.size
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.decision_se)
@options_window.current_skin += BlizzCFG::CMS_SKINS.size - 1
@options_window.current_skin %= BlizzCFG::CMS_SKINS.size
@options_window.refresh
elsif Input.repeat?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_system.windowskin_name = @options_window.skin_name
end
end
end
def update_end
if Input.trigger?(Input::B) || Input.trigger?(Input::C) &&
@end_window.index == 0
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
del_end
elsif Input.trigger?(Input::C)
Graphics.freeze
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
@end_window.index == 1 ? @scene = Scene_Title.new : $scene = nil
del_end
end
end
end
#==============================================================================
# Scene_CMSSave
#==============================================================================
class Scene_CMSSave < Scene_Save
def on_cancel
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(7)
end
end
#==============================================================================
# Scene_CMSLoad
#==============================================================================
class Scene_CMSLoad < Scene_Load
def on_cancel
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(6)
end
end
and edit line 295 for the skins
CMS_SKINS = ['Original', 'Heavy Gold', 'Hell Breath', 'Liquid Water',
'Violent Violet', 'Ice Cool', 'Fatal Venom', 'Perfect Chaos',
'Blizzard Master']
I´ve edited that line ( i think, it had the Wskin names, so...) but it still applies them only to the menu.
And thanks anyway
Hey, is there a way to give different names to the two equipment scenes?
Since it is kinda dumb (no offense) to have two equipment choices, from which one shows what is equipped, nd the other let´s to control the equipping. I want one to be named (as an example) equipped (that´s the first i think) and the latter where you change your equipment, to be known as equip...
Sorry if this has been asked before or if didn´t make sense...
try line 903
Lines 894-919 ,which define Window_CMSCommand look like this:
#==============================================================================
# Window_CMSCommand
#==============================================================================
class Window_CMSCommand < Window_Command
attr_reader :continue
def initialize(index, continue)
@background = 'CMSCommand'
commands = [$data_system.words.item, 'Equipment', $data_system.words.equip,
$data_system.words.skill, 'Status', 'Options', 'Save', 'Load', 'Exit']
super(180, commands)
@continue, self.index, self.x, self.y, self.z = continue, index, 972, 0, 999
end
def draw_item(i, color)
self.contents.fill_rect(0, i*32, 148, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon("CMS/commandmenu#{i}")
opacity = (color == normal_color ? 255 : 128)
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.font.color = color
self.contents.draw_text(32, i*32, 148, 32, @commands)
end
end
yeah... and?
thought you where looking for changing the name of the menu items??
commands = [$data_system.words.item, 'Equipment', $data_system.words.equip,
$data_system.words.skill, 'Status', 'Options', 'Save', 'Load', 'Exit']
guess what to change.
I´m an idiot! Thanks Jackolas
"Equipment" is there because in "Equip" you can't see stuff that noboby can equip and the view hierarchy is actor->equipment part and in "Items" you can't see who can equip what on one sight.
I changed the menu around a little to fit what I want with my game. I replaced Load for the Quest Log system that game_guy made. It works but I was wondering where I edit the font color from grey to white. Thank you for making all these wonderful scripts. I would be stuck making a very boring mediocre game without them or spending a lifetime trying to figure out how to use ruby scripts haha.
edit: Also, how do I properly add another option in the option menu. I was hoping to add your Bestiary script. I want it to be there without the arrows so that when someone presses the action key it opens up the bestiary script. I guess something in the vain of the Tales of series.
I've posted that several times around already. Just search the forum. *points to search button*
I'm sorry of this has been asked before but I'm wondering
if it's possible to change the picture used in the status screen right now it says;
1653 draw_actor_battler(@actor, 284, 232)
Since I'm using Minkoffs CBS my battler sprites shows up instead...
I just erased the line but it would be nicer to put in a pic of your own there.
replace it with this
draw_actor_graphic(@actor, 284, 232)
I'll draw the actor sprite instead
Didn't work :/
The pic is way to small so nothing shows up still.
Thanks for the help though :)
Sorry if this question has been asked already, or if it's obvious, but in the Options menu, you can choose what Battle BGM to use. Now, I like that.
However, I want the player to buy battle BGMs as bonus music etc, so how would I go about adding to the Battle BGMs with script calls?
Alternatively, could you tell me how to disable it from the menu? If I can't do it the other way, I suppose I'll just have events that do the same thing.
I didn't add the possibility to add or remove battle BGMs because I use that feature exclusively in my game.
You can practically disable it if you simply have just 1 BGM.
The script link is down, can you please (PLEASE!!) update it? This CMS has always been, and still is one my favs T_T
No it's not, just change the the 't' in tronics to 'T', or just click here (http://downloads.chaos-project.com/scripts/StormTronics%20CMS%20-%20Hybrid%20Edition.txt)
Always a good idea to check downloads.chaos-project.com :P
It's kinda weird, though. I did fix filenames of the uploaded files. I'll take a look at it anyway.
EDIT: Yeah, looks like it didn't change the capitalization. Anyway, the links in the first post will work properly now.
Sorry if this has been asked before, but how can i add that moving background llike in CP? Now, don´t go saying it´s unique, because it´s been made in VX, and in XP at least by MOG... Now, please tell me... I love this sytem, and thought that it would be nice to have I.e a logo of PK-Prod (that deosn´t yet exist... the logo i mean... :P) going in the background. Also, would it be possible to change the pic mid-game, i.e for a BABS boss fight, instead of the logo, there would be the text BOSS moving/flashing in the back...
It's unique to my game with this CMS and I'm not going to add it. Period.
Quotedon´t go saying it´s unique, because it´s been made in VX, and in XP at least by MOG
all I can say is use mog his script than.
i know how this can be achieved in this script but i respect blizz his unique game
How hard would it be to add different functions (read, new functions) to the options menu, because i´m thinking of adding a few things that control BABS. (mainly Hud type and its location)
as long as u know a litle bid of scripting its fairly easy
Well, i guess i know just a little bit... I´m not sure if i could do it on my own, but if somebody gave me instructions, i guess i could do it...
make an request in the script request section.
describe exactly what you want and how you want it, more info is better.
Actually, i´m thinking i should start to try and learn to script my self, at least a little, so i´ll instead of asking some one to add them, ask them to help me do it myself...
When I go to Exit > Return to Game and execute that option, it does nothing. Shouldn't it close the menu?
I know you can just hit the cancel button, but it would be nice if the menu was intuitive enough for n00bs.
No, it's supposed to return to the menu. That's how it works in the default menu as well.
Ok, I see now. I guess I thought it through wrong because the wording is different. "End Game" obviously means only one thing. "Exit" on the menu sounded to me like it would "Exit" the menu. But it makes sense now. If I really want to be picky, it's easy enough to change the wording from "Return to Game to something like "Return to Menu".
Sorry if I came off sounding unappreciative. I really enjoy this script. I don't think Blizz needs a n00b on his forums to tell him that he does an amazing job with scripts!
No problem. I was actually going to suggest that you just change it if you want something else to be written there.
Hello.
I've searched this topic and found similar font issues, but I wasn't clear on any answers.
I'm trying to remove a few fonts from CMS_FONTS, including Arial, which is the default. I'd like to change Comic Sans MS to be default, but the game initializes with Arial as the default. Having removed Arial from the CMS options, I get an error when I select "Options" in the CMS. Presumably because it is searching for the matching current font in the font list. But I admit, I'm not sure.
The default font has nothing to do with the CMS.
I received the error saying that the script line @font_name = BlizzCFG::CMS_FONTS[@current_font]: TypeError Occurred. No implicit conversion from nil to integer.
The error only came after I deleted Arial, Future and a couple of other fonts from the available options. The even happens when I use the CMS and select "Options".
If the default font doesn't have to do with the CMS, then how is taking a font option out of the CMS causing an error?
that error means that @current_font isn't defined. Perhaps you deleted a bit too much? Or maybe you just need to redefine it...
Thats what I thought too, so I pasted the original text back, tested it will all the fonts, it worked. Then I took out just the Arial font, and tested it again. Same error. It's as if the script requires the Arial font. Which is why I assumed that it was the default system font and the script must have been calling for it on the options menu as the current font to display.
My thinking was that I needed to change the default font to Comic Sans MS, then when I pulled up the options menu it would show that as the current font and skip Arial altogether... but I'm not sure how or where to do that.
EDIT:
Ok, I fixed it I think.
I needed to add a new code for a default font, but that solved the issue. It seems to that the CMS was trying to display my current font (which RMXP defaulted to Arial) where you select a font, but I had deleted it as an option, causing fail. Now that the default is Comic Sans MS, the CMS displays it under fonts first rather than Arial, and it works fine.
Thanks guys, sorry to be a pest.
Please don't double post within a 24 hour period ~ Ronnie aka G_G
I need to know, how to not display exp, in the status screen, but rather somewhere else, like in the main window, perhaps in the same 'screen' or 'square' as gold,time,and location...and to make room for it, i´d prefer removing at least saving from the menu, and use save points (evented) instead...
The lines that draw the EXP look like this:
You can just do a search and comment them out.
You can't really show them in the Gold/Location/etc. window because each character has his own EXP. It just doesn't make sense.
To remove a command you'll have to edit the script.
Can I also make this so that It shows the map as background ?
Great CMS !
EDIT : I talked before I watched again :(
There's an option for that.
Hi, I appologize for posting for help so soon after registering, it really wasn't my intent.
I'm using the CMS posted in the start of this thread(the one marked by the Nemesis spoiler marks?) And found a few problems
1) When I equip an item, it doesnt show up as equipped, in the status menu, it still says "Not Equipped" The stats corressponding to said equipped item increase, so it IS equipping them, I can choose "Unequip" and the item shows up in my inventory again, so it IS equipping, its just not displaying that is, if that makes any sense.
2)I'm trying to remove the Save option in the menu and replace it with something else, but can't figure out how exactly
Quote1) When I equip an item, it doesnt show up as equipped, in the status menu, it still says "Not Equipped" The stats corressponding to said equipped item increase, so it IS equipping them, I can choose "Unequip" and the item shows up in my inventory again, so it IS equipping, its just not displaying that is, if that makes any sense.
i could not recreate the problem so you probely made a mistake.
if you copied the script can you plzz post up lines 1522 till 1563 (the part of Window_CMSEquipRight < Window_Selectable)
and the part 1936 till 1700 (the part of class Window_CMSStatus < Window_Base)
Quote2)I'm trying to remove the Save option in the menu and replace it with something else, but can't figure out how exactly
to change the save option you need to change lines 2175 till 2182
when 6
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@scene = Scene_CMSSave.new
Graphics.transition(0)
end
you want it to display:
when 6
@scene = * your scene*
Graphics.transition(0)
end
to change the name change line: 904-905
commands = [$data_system.words.item, 'Equipment', $data_system.words.equip,
$data_system.words.skill, 'Status', 'Options', 'Save', 'Load', 'Exit']
change the word save to your option or whatever
hope it helps
Ok, heres what I have:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Stormtronics CMS by Blizzard
# Version: 5.39b - Hybrid Edition
# Type: Enhanced Custom Menu System
# Date v5.0: 27.8.2007
# Date v5.0b: 12.9.2007
# Date v5.1b: 28.1.2008
# Date v5.2b: 29.1.2008
# Date v5.3b: 23.7.2008
# Date v5.31b: 20.8.2008
# Date v5.32b: 21.8.2008
# Date v5.33b: 15.11.2008
# Date v5.34b: 8.4.2009
# Date v5.35b: 9.4.2009
# Date v5.36b: 6.5.2009
# Date v5.37b: 20.5.2009
# Date v5.38b: 31.5.2009
# Date v5.39b: 24.6.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
# 97% compatible with SDK v1.x. 80% compatible with SDK v2.x. Glitchs with
# Fukuyama's Caterpillar script (but not with mine). Designed only for 8
# elements. WILL corrupt old savegames.
#
#
# Features:
#
# - completely animated and graphically optimized (lag-free)
# - own set of windowskins, fonts and icons for every status change and
# element
# - saves all changed options together with the savefile
# - menu commands "Item", "Equipment", "Skill", "Equip", "Status", "Options",
# "Save", "Load", "Exit"
# - Item submenu: "Items", "Sort" (by quantity or by alphabet), "Quest Items"
# - Equipment submenu shows information about equippable items for the chosen
# character, switch the character with LEFT and RIGHT
# - Skill submenu shows available skills for use for the chosen character,
# switch character with L and R, menu status window in background shows the
# chosen character
# - Equip submenu shows complete information about Status resistance/attack,
# Element resistance/attack and complete character stat changing (has
# even "max HP" and "max SP" available if you are using "Weapon/Armor HP/SP
# Plus")
# - Status screen with overall information about character status
# - Options submenu with "BGM Volume", "SFX Volume", "Battle BGM",
# "Battle Cam" (if using KGC's Pseudo 3D Battle Camera with my add-on for
# disabling), "Bar Style", "Bar Opacity" (if you are using Gradient Bar
# Styler), "Font" and "Windowskin" (both with preview)
# - Standard Save, Load and Exit commands
# - uses "Ultimate Font Override", so the font changes will affect RPG Maker
# XP versions 1.00, 1.01, 1.02 and 1.03 (including Dyna Edition and
# Postality Knights Edition Enhanced) and the font even gets saved with the
# savedata
#
# new in Hybrid Edition:
# - supports either windowskin background or custom images:
# >>> All Stormtronics CMS Editions in one! <<<
# - compatible with all my scripts (even DREAM v4.0)
# - draws SR in the menu if CLRS was detected
# - supports any number of party members
# - removed some special add-ons, please get Tons of Add-ons if you want to
# continue using them, ST CMS will recognize Tons v4.98b and higher
# - more than 1500 code lines less than Nemesis Edition and almost 2000
# code lines less than Metal-Plate Edition
# - removes options from Options menu that are not / cannot being used at all
# - possibility to use a different equip system
# - doesn't need skin icons anymore, the icon is drawn from the skin directly
# - improved windowskins from "Lexima Legends™ IV - Chaos Project"
#
#
# Instructions:
#
# Copy your character faces into a the folder called "Characters". The
# facesets MUST have the same names as the character spritesets with a _face
# added at the end. Also copy the windowskins and the icons. Don't forget to
# include the font files used by the game in your game folder. Also change
# the variable ID in the conditional branches if you use another variable
# than 49.
#
#
# Configuration:
#
# CAM_AVAILABLE - set to true if you use KGC 3DPBC
# FACESETS - set to true if you want to use facesets
# BGM_Variable - ID number of the variable for the Battle BGM
# changer
# BGM_Lock - ID number of the switch used to temporarily
# disable the option of changing the Battle BGM, for
# that, just turn the switch on and off to disable
# and enable this option
# WEAPONS_AND_ARMORS - set to false to not show weapons and armors in the
# Item screen
# QUEST_ITEMS - add any item IDs that are supposed to be quest
# items, so the CMS can separate them
# BATTLE_BGMS - add any battle BGMs you are using
# CMS_SKINS - add any skin name you are using
# CMS_FONTS - add any font name you are using, be sure to
# include the font install files in your game
# release as some people may not have those fonts
# installed
# SAVE_NAME - name of your savefiles (usually "Save")
# SAVE_EXTENSION - extension of your savefiles (usually "rxdata")
# SAVE_FILES_NUMBER - number of savefiles you are using (usually 4)
# MAP_BACKGROUND - set to true to show map as background, otherwise
# if BlizzCFG::CMS_EDITION is not nil or false the
# "CMSFullscreen" image will be displayed
# CUSTOM_ITEM_SCENE - set this to true if you want to use a different
# equip scene and make this CMS compatible even with
# exotic Item Systems
# CUSTOM_EQUIPMENT_SCENE - set this to true if you want to use a different
# equip scene and make this CMS compatible even with
# exotic Equipment Systems, change only if you have
# another Equipment Scene script ready
# CUSTOM_EQUIP_SCENE - set this to true if you want to use a different
# equip scene and make this CMS compatible even with
# exotic Equipment Systems
# CUSTOM_SKILL_SCENE - set this to true if you want to use a different
# skill scene and make this CMS compatible even with
# exotic Skill Systems
# CUSTOM_STATUS_SCENE - set this to true if you want to use a different
# status scene
# CUSTOM_OPTIONS_SCENE - set this to true if you want to use a different
# options scene, change only if you have another
# Options Scene script ready
# CUSTOM_END_SCENE - set this to true if you want to use a different
# end scene
# FONT_BACKGROUND_FIX - set this to true if you want dark font colors to
# be used in the menu, this comes in handy when the
# custom background images you use are bright
# WIN_MIRRORED - flips horizontally all window positions
# CMS_EDITION - set this to false or nil if you want to use
# Nemesis Edition, set to folder name where in the
# Pictures/CMS the images should be loaded from if
# you want to use custom images as background
#
# The syntax $game_system.get_cam can be used by an event (Call script
# command) to restore the user's setting of the KGC 3DPBC if a forced cam
# control was initiated during an event.
#
# You can use $game_system.reset_battle_bgm to reset the battle BGM to the
# player's menu setting if you have changed it for i.e. a boss fight via
# event.
#
#
# FAQ:
#
# - Problem:
# I get an error that some icons can't be found. how do I solve this?
#
# - Solution:
# Copy the icons from the demo or download them and place the into the Icons
# folder into another folder called "CMS". Done.
#
# - Problem:
# I still get an error.
#
# - Solution:
# Rename the icons. If your elements were renamed and don't have the standard
# names, your icons need to be renamed as well. Same goes for status effects.
# Also be sure to add new icons with new names if you have more than the
# basic 8 elements and/or more than the basic 16 status effects in your
# database.
#
# - Question:
# Can I use my own skins, icons, fonts, battle BGMs, etc...?
#
# - Answer:
# Of course. Only be sure to change the appropriate options in the script and
# to use the appropriate names, so everything can function normally after
# that.
#
# - Question:
# Can this CMS be connected with other scripts? If yes, how and how much work
# is it?
#
# - Answer:
# Yes, it can. A little bit of scripting and enhancing the functions of the
# CMS are needed if it is going to be connected with other scripts. How much
# of additional work it can cause only depends how big the script merge is. A
# simple changing of the battle menu to display status effects in icons
# should take between 15~30 minutes of scripting and testing. Adding another
# option into the Options menu should also take only 15~30 minutes of
# scripting and testing. Even adding an entire series of new windows or
# implementing another Scene into the menu also won't take more than 30
# minutes, because the menu itself works with the "sub-scene" system, saving
# this way RAM and CPU.
#
# - Question:
# What is the "sub-scene" system? Also I have tried other animated CMS-es.
# Why is this one so lag-free?
#
# - Answer:
# It is lag-free just because of the "sub-scene" system. This system is also
# used in the "Scene_Battle". It only creates windows and handels them when
# they are needed or used, otherwise they get disposed or not created at all.
# In this script this method is being used to a possible maximum.
#
# - Question:
# Is this for real? This CMS doesn't even have 3000 lines of code!
#
# - Answer:
# Actually not even 2500 if you don't count the instructions.
#
# - Question:
# How is such a large collection of features possible with so relatively few
# lines of code?!
#
# - Answer:
# Smart coding. =P
#
#
# Additional scripts/snipplets/add-ons:
#
# - Ultimate Font Override v1.0b (by Blizzard)
# - BGM/SFX Volume Control with volume correction v1.0b (by Blizzard)
# - Map Name/Location v1.0b (by Blizzard)
# - Elemental Vulnerability Graph v1.0b (by Blizzard)
# - Battle BGM control v2.0b (by Blizzard)
# - Options control layout and funcionality v4.0b (by Blizzard)
# - CMS layout/funcionality v5.0b (by Blizzard)
# - optimized code and delagged by "sub-scene" window handling (by Blizzard)
#
# If you experience the "Stack level too deep" error, you may already have
# one of the scripts listed above and it conflicts with itself, because of
# aliased recursive calling. Try removing script by script and testing
# everything. Don't forget to backup you Scripts.rxdata before doing so.
# Scripts.rxdata is a file that contains your current scripts and is located
# in the Data folder of your game folder.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#==============================================================================
# module BlizzCFG
#==============================================================================
module BlizzCFG
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# basic config
CAM_AVAILABLE = false
FACESETS = false
BGM_Variable = 49
BGM_Lock = 49
WEAPONS_AND_ARMORS = true
QUEST_ITEMS = [23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
# custom game configs
BATTLE_BGMS = [
# ['BGM_NAME', VOLUME, PITCH, 'DISPLAY_NAME']
['001-Battle01', 100, 100, 'BGM 1'],
['002-Battle02', 100, 100, 'BGM 2'],
['003-Battle03', 100, 100, 'BGM 3'],
['004-Battle04', 100, 100, 'BGM 4']]
CMS_SKINS = ['Original', 'Heavy Gold', 'Hell Breath', 'Liquid Water',
'Violent Violet', 'Ice Cool', 'Fatal Venom', 'Perfect Chaos',
'Blizzard Master', 'Blue Serenity']
CMS_FONTS = ['Arial', 'Future', 'Comic Sans MS', 'Brush Script', 'Tahoma',
'Times New Roman']
# save file options
SAVE_NAME = 'Save'
SAVE_EXTENSION = 'rxdata'
SAVE_FILES_NUMBER = 3
# extra options
MAP_BACKGROUND = true
CUSTOM_ITEM_SCENE = false
CUSTOM_EQUIPMENT_SCENE = false
CUSTOM_EQUIP_SCENE = false
CUSTOM_SKILL_SCENE = false
CUSTOM_STATUS_SCENE = false
CUSTOM_OPTIONS_SCENE = false
CUSTOM_END_SCENE = false
FONT_BACKGROUND_FIX = false
WIN_MIRRORED = false
CMS_EDITION = false # 'Metal-Plate'
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# change only if changed in the 3DPBC script
CAM_Variable = 25 if CAM_AVAILABLE
end
# for compatibility
$stormtronics_cms = 5.39
#==============================================================================
# Game_System
#==============================================================================
class Game_System
attr_accessor :bgm_volume
attr_accessor :sfx_volume
attr_accessor :cam
attr_reader :fontname
attr_reader :fontsize
alias init_storm_cms_later initialize
def initialize
init_storm_cms_later
@bgm_volume = @sfx_volume = 100
@cam = 0
if $tons_version != nil
if $tons_version >= 6.03 && !@BARS
@bar_style, @bar_opacity = 0, 255
end
if $tons_version < 1.6
self.fontname = 'Arial'
self.fontsize = 24
end
else
self.fontname = 'Arial'
self.fontsize = 24
end
end
def fontname=(name)
Font.default_name = $defaultfonttype = $fontface = @fontname = name
end
def fontsize=(size)
Font.default_size = $defaultfontsize = $fontsize = @fontsize = size
end
def get_cam
$game_variables[BlizzCFG::CAM_Variable] = @cam
return true
end
def reset_battle_bgm
bgm = BlizzCFG::BATTLE_BGMS[$game_variables[BlizzCFG::BGM_Variable]]
$game_system.battle_bgm = RPG::AudioFile.new(bgm[0], bgm[1], bgm[2])
return true
end
if $dream_music
def bgm_play(bgm)
@playing_bgm = bgm
if bgm != nil && bgm.name != ''
vol = correction(@bgm_volume)
dream_ed = bgm.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/BGM/', dream_ed, 0)
else
Audio.bgm_stop
end
Graphics.frame_reset
end
def bgs_play(bgs)
@playing_bgs = bgs
if bgs != nil && bgs.name != ''
vol = correction(@sfx_volume)
dream_ed = bgs.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/BGS/', dream_ed, 1)
else
Audio.bgs_stop
end
Graphics.frame_reset
end
def me_play(me)
if me != nil && me.name != ''
vol = correction(@bgm_volume)
dream_ed = me.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/ME/', dream_ed, 2)
else
Audio.me_stop
end
Graphics.frame_reset
end
def se_play(se)
if se != nil && se.name != ''
vol = correction(@sfx_volume)
dream_ed = se.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/SE/', dream_ed, 3)
end
end
else
def bgm_play(bgm)
@playing_bgm = bgm
if bgm != nil && bgm.name != ''
vol = correction(@bgm_volume)
Audio.bgm_play('Audio/BGM/' + bgm.name , bgm.volume * vol / 100, bgm.pitch)
else
Audio.bgm_stop
end
Graphics.frame_reset
end
def bgs_play(bgs)
@playing_bgs = bgs
if bgs != nil && bgs.name != ''
vol = correction(@sfx_volume)
Audio.bgs_play('Audio/BGS/' + bgs.name, bgs.volume * vol / 100, bgs.pitch)
else
Audio.bgs_stop
end
Graphics.frame_reset
end
def me_play(me)
if me != nil && me.name != ''
vol = correction(@bgm_volume)
Audio.me_play('Audio/ME/' + me.name, me.volume * vol / 100, me.pitch)
else
Audio.me_stop
end
Graphics.frame_reset
end
def se_play(se)
if se != nil && se.name != ''
vol = correction(@sfx_volume)
Audio.se_play('Audio/SE/' + se.name, se.volume * vol / 100, se.pitch)
end
end
end
def correction(volume)
case volume
when 100 then return 100
when 95 then return 97
when 90 then return 95
when 85 then return 92
when 80 then return 90
when 75 then return 87
when 70 then return 85
when 65 then return 82
when 60 then return 80
when 55 then return 77
when 50 then return 75
when 45 then return 72
when 40 then return 70
when 35 then return 65
when 30 then return 60
when 25 then return 55
when 20 then return 50
when 15 then return 40
when 10 then return 35
when 5 then return 25
end
return 0
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
def now_exp
return (@exp-@exp_list[@level])
end
def next_exp
return (@exp_list[@level+1] > 0 ? @exp_list[@level+1]-@exp_list[@level] : 0)
end
def test_equip(equip_type, id)
case equip_type
when 0 then old_id, @weapon_id = @weapon_id, id
when 1 then old_id, @armor1_id = @armor1_id, id
when 2 then old_id, @armor2_id = @armor2_id, id
when 3 then old_id, @armor3_id = @armor3_id, id
when 4 then old_id, @armor4_id = @armor4_id, id
end
tested = [self.maxhp, self.maxsp, self.atk, self.pdef, self.mdef, self.str,
self.dex, self.agi, self.int, self.eva]
case equip_type
when 0 then @weapon_id = old_id
when 1 then @armor1_id = old_id
when 2 then @armor2_id = old_id
when 3 then @armor3_id = old_id
when 4 then @armor4_id = old_id
end
return tested
end
end
#==============================================================================
# Scene_Title
#==============================================================================
class Scene_Title
alias main_storm_cms_later main
def main
$map_infos = load_data('Data/MapInfos.rxdata')
$map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name}
main_storm_cms_later
end
end
#==============================================================================
# Game_Map
#==============================================================================
class Game_Map
def name
return $map_infos[@map_id]
end
end
#==============================================================================
# Bitmap
#==============================================================================
class Bitmap
if $tons_version == nil || $tons_version < 3.71
alias init_ultimate_font_override_later initialize
def initialize(w, h = nil)
if w.is_a?(Numeric) && h.is_a?(Numeric)
init_ultimate_font_override_later(w, h)
else
init_ultimate_font_override_later(w)
end
if $game_system != nil && $game_system.fontname != nil &&
!$scene.is_a?(Scene_Title)
self.font.name = $game_system.fontname
self.font.size = $game_system.fontsize
else
self.font.name = Font.default_name
self.font.size = Font.default_size
end
end
def gradient_bar(x, y, w, color1, color2, color3, rate, flag = false)
offset = 5
x += offset
y += 26
(0...offset+3).each {|i| fill_rect(x-i, y+i-2, w+3, 1, Color.new(0, 0, 0))}
(0...offset+1).each {|i| fill_rect(x-i, y+i-1, w+1, 1, Color.new(255, 255, 255))}
(0...w+offset).each {|i|
red = color3.red * i / (w + offset)
green = color3.green * i / (w + offset)
blue = color3.blue * i / (w + offset)
oy = i < offset ? offset-i : 0
off = i < offset ? i : i > w ? w+offset-i : offset
fill_rect(x+i-offset+1, y+oy-1, 1, off, Color.new(red, green, blue))}
if (w*rate).to_i >= offset
(0...(w*rate).to_i+offset).each {|i|
red = color1.red + (color2.red-color1.red)*i/((w+offset)*rate)
green = color1.green + (color2.green-color1.green)*i/((w+offset)*rate)
blue = color1.blue + (color2.blue-color1.blue)*i/((w+offset)*rate)
oy = i < offset ? offset-i : 0
off = i < offset ? i : i > w*rate ? (w*rate).to_i+offset-i : offset
fill_rect(x+i-offset+1, y+oy-1, 1, off, Color.new(red, green, blue))}
else
(0...(w*rate).to_i).each {|i| (0...offset-1).each {|j|
red = color1.red + (color2.red-color1.red) * i / (w * rate)
green = color1.green + (color2.green-color1.green) * i / (w * rate)
blue = color1.blue + (color2.blue-color1.blue) * i / (w * rate)
set_pixel(x+i-j+1, y+j-1, Color.new(red, green, blue))}}
end
end
end
def draw_element_graph(x_plus, y_plus, rad, color, limit = -1)
(-rad-1...0).each {|r| (r...0).each {|x|
color.alpha = 255 * (rad+1.0-r.abs)/(rad+1)
y = (r.abs * Math.sin(Math.acos(x/r.to_f))).to_i
h = y * 2
case limit
when 1, 8 then h = (y < x.abs ? 0 : y - x.abs)
when 2, 7 then y > x.abs ? h = y = x.abs : h = y
when 3, 6
y > x.abs ? h = y = x.abs : h = y
y = 0 if y > 0
when 4, 5 then h, y = (y < x.abs ? 0 : y - x.abs), -x.abs
end
if limit < 5
fill_rect(rad*2-x + x_plus, rad-y + y_plus, 1, h, color)
else
fill_rect(rad*2+x+1 + x_plus, rad-y + y_plus, 1, h, color)
end}}
end
end
#==============================================================================
# Window_Base
#==============================================================================
class Window_Base < Window
alias st_cms_hybrid_hack_init initialize
def initialize(xx, yy, w, h)
st_cms_hybrid_hack_init(xx, yy, w, h)
if BlizzCFG::CMS_EDITION && @background != nil
@backsprite = Sprite.new
@backsprite.bitmap = RPG::Cache.picture("CMS/#{BlizzCFG::CMS_EDITION}/#{@background}")
self.opacity, @backsprite.x, @backsprite.y = 0, self.x, self.y
end
end
alias st_cms_hybrid_hack_x_ x=
def x=(xx)
st_cms_hybrid_hack_x_($scene.is_a?(Scene_Menu) && BlizzCFG::WIN_MIRRORED ? 640-width-xx : xx)
@backsprite.x = xx unless @backsprite == nil || @backsprite.disposed?
end
alias st_cms_hybrid_hack_y_ y=
def y=(yy)
st_cms_hybrid_hack_y_(yy)
@backsprite.y = yy unless @backsprite == nil || @backsprite.disposed?
end
alias st_cms_hybrid_hack_x x
def x
xx = st_cms_hybrid_hack_x
return ($scene.is_a?(Scene_Menu) && BlizzCFG::WIN_MIRRORED ? 640-width-xx : xx)
end
alias st_cms_hybrid_hack_z z=
def z=(z)
st_cms_hybrid_hack_z(z)
@backsprite.z = z unless @backsprite == nil || @backsprite.disposed?
end
alias st_cms_hybrid_hack_width width=
def width=(w)
self.x += w-width if $scene.is_a?(Scene_Menu) && BlizzCFG::WIN_MIRRORED
st_cms_hybrid_hack_width(w)
end
alias st_cms_hybrid_hack_visible visible=
def visible=(expr)
st_cms_hybrid_hack_visible(expr)
@backsprite.visible = expr unless @backsprite == nil || @backsprite.disposed?
end
alias disp_sprite_later dispose
def dispose
@backsprite.dispose unless @backsprite == nil || @backsprite.disposed?
disp_sprite_later
end
alias st_cms_hybrid_hack_normal_color normal_color
def normal_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(0, 0, 0)
else
return st_cms_hybrid_hack_normal_color
end
end
alias st_cms_hybrid_hack_system_color system_color
def system_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(160, 0, 255)
else
return st_cms_hybrid_hack_system_color
end
end
alias st_cms_hybrid_hack_disabled_color disabled_color
def disabled_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(96, 96, 96)
else
return st_cms_hybrid_hack_disabled_color
end
end
alias st_cms_hybrid_hack_crisis_color crisis_color
def crisis_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(192, 192, 0)
else
return st_cms_hybrid_hack_crisis_color
end
end
alias draw_actor_graphic_st_cms_later draw_actor_graphic
def draw_actor_graphic(actor, x, y)
if actor != nil && actor.character_name != ''
if self.is_a?(Window_CMSMenuStatus) && BlizzCFG::FACESETS
bitmap = RPG::Cache.character("#{actor.character_name}_face", actor.character_hue)
x -= bitmap.width / 2
y -= bitmap.height
draw_actor_face_st_cms(actor, x, y)
else
draw_actor_graphic_st_cms_later(actor, x, y)
end
end
end
def draw_actor_face_st_cms(actor, x, y)
if $tons_version == nil || $tons_version < 3.71 || !FACE_HUE
hue = 0
else
hue = (FACE_HUE ? actor.character_hue : 0)
end
bitmap = RPG::Cache.character("#{actor.character_name}_face", hue)
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(x, y, bitmap, src_rect)
end
def draw_actor_battler(actor, x, y)
if actor != nil && actor.battler_name != ''
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw,ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
end
def draw_actor_exp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 48, 32, 'EXP')
if actor.exp_s.to_i > 999999
w = self.contents.text_size('999999').width
else
w = self.contents.text_size(actor.exp_s).width
end
if actor.next_exp_s.to_i > 999999
w2 = self.contents.text_size('999999').width
else
w2 = self.contents.text_size(actor.next_exp_s).width
end
self.contents.font.color = normal_color
self.contents.draw_text(x + 108 - w2, y, w2, 32, actor.exp_s, 2)
self.contents.draw_text(x + 108, y, 12, 32, '/', 1)
self.contents.draw_text(x + 120, y, w2, 32, actor.next_exp_s)
end
def draw_actor_exp_alt(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 64, 32, 'next')
self.contents.font.color = normal_color
self.contents.draw_text(x + 56, y, 84, 32, actor.next_rest_exp_s, 2)
end
def draw_actor_name2(actor, x, y, w, a)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, w, 32, actor.name, a)
end
def up_color
return Color.new(0, 255, 0)
end
def down_color
return Color.new(255, 0, 0)
end
alias draw_actor_parameter_st_cms_later draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
if type == 7
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, 'Evasion')
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
else
draw_actor_parameter_st_cms_later(actor, x, y, type)
end
end
def draw_actor_element_vulnerability(actor, x, y, rad = 60)
colors = []
(1..8).each {|i|
rate = actor.element_rate(i)
if rate < 0
colors.push(Color.new(0, 255 * (100-rate.abs) / 200, 255))
elsif rate == 0
colors.push(Color.new(0, 128, 255))
elsif rate <= 50
colors.push(Color.new(0, 255 * (rate+50) / 100, 255 * (50-rate) / 50))
elsif rate <= 100
colors.push(Color.new(255 * (rate-50) / 50 , 255, 0))
elsif rate <= 200
colors.push(Color.new(255, 255 * (200-rate) / 100, 0))
else
colors.push(normal_color)
end}
(1..8).each {|i|
self.contents.draw_element_graph(x + 16, y + 32, rad, colors[i-1], i)}
save_color = self.contents.font.color.clone
(1..8).each {|i|
str1 = $data_system.elements[i]
str2 = "#{actor.element_rate(i)}%"
w1 = self.contents.text_size(str1).width
w2 = self.contents.text_size(str2).width
case i
when 1 then x2, y2, x3, y3 = x+152, y+20, x+168, y+4
when 2 then x2, y2, x3, y3 = x+176, y+56, x+192, y+40
when 3 then x2, y2, x3, y3 = x+176, y+92, x+192, y+108
when 4 then x2, y2, x3, y3 = x+152, y+128, x+168, y+144
when 5 then x2, y2, x3, y3 = x+120-w1, y+128, x+104-w2, y+144
when 6 then x2, y2, x3, y3 = x+96-w1, y+92, x+80-w2, y+108
when 7 then x2, y2, x3, y3 = x+96-w1, y+56, x+80-w2, y+40
when 8 then x2, y2, x3, y3 = x+120-w1, y+20, x+104-w2, y+4
end
self.contents.font.color = save_color
self.contents.draw_text(x2, y2, w1, 32, str1)
self.contents.font.color = colors[i-1]
self.contents.draw_text(x3, y3, w2, 32, str2)}
self.contents.font.color = save_color
end
if $Blizz_Art
alias draw_actor_exp_blizzart_later draw_actor_exp
def draw_actor_exp(actor, x, y, w = 148)
if $game_system.BARS
w -= 12
rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
if rate < 0.5
color1 = Color.new(20 * rate, 60, 80, 192)
color2 = Color.new(60 * rate, 180, 240, 192)
elsif rate >= 0.5
color1 = Color.new(20 + 120 * (rate-0.5), 60 + 40 * (rate-0.5), 80, 192)
color2 = Color.new(60 + 360 * (rate-0.5), 180 + 120 * (rate-0.5), 240, 192)
end
color3 = Color.new(80, 80, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
end
draw_actor_exp_blizzart_later(actor, x, y)
end
alias draw_actor_exp_new2 draw_actor_exp_alt
def draw_actor_exp_alt(actor, x, y, w = 148)
w -= 12
rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
if rate < 0.5
color1 = Color.new(20 * rate, 60, 80)
color2 = Color.new(60 * rate, 180, 240)
elsif rate >= 0.5
color1 = Color.new(20 + 120 * (rate-0.5), 60 + 40 * (rate-0.5), 80)
color2 = Color.new(60 + 360 * (rate-0.5), 180 + 120 * (rate-0.5), 240)
end
color3 = Color.new(80, 80, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
draw_actor_exp_new2(actor, x, y)
end
end
end
#==============================================================================
# Window_CMSCommand
#==============================================================================
class Window_CMSCommand < Window_Command
attr_reader :continue
def initialize(index, continue)
@background = 'CMSCommand'
commands = [$data_system.words.item, 'Equipment', $data_system.words.equip,
$data_system.words.skill, 'Status', 'Options', 'Save', 'Load', 'Exit']
super(180, commands)
@continue, self.index, self.x, self.y, self.z = continue, index, 972, 0, 999
end
def draw_item(i, color)
self.contents.fill_rect(0, i*32, 148, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon("CMS/commandmenu#{i}")
opacity = (color == normal_color ? 255 : 128)
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.font.color = color
self.contents.draw_text(32, i*32, 148, 32, @commands[i])
end
end
#==============================================================================
# Window_CMSChooseItem
#==============================================================================
class Window_CMSChooseItem < Window_Selectable
def initialize
@background = 'CMSHelp'
super(0, -576, 640, 64)
@commands = ['Items', 'Sort', 'Quest Items']
@item_max = @column_max = @commands.size
self.contents = Bitmap.new(width - 32, 32)
refresh
self.active, self.z, self.index = true, 2900, 0
end
def refresh
self.contents.clear
(0...@item_max).each {|i| draw_item(i, normal_color)}
end
def draw_item(i, color)
self.contents.font.color = color
self.contents.fill_rect(8 + 212*i, 0, 164, 32, Color.new(0, 0, 0, 0))
self.contents.draw_text(8 + 212*i, 0, 164, 32, @commands[i], 1)
end
end
#==============================================================================
# Window_CMSOptions
#==============================================================================
class Window_CMSOptions < Window_Selectable
attr_accessor :current_font
attr_reader :current_skin
attr_reader :skin_name
attr_reader :font_name
def initialize
@background = 'CMSFullscreen'
super(0, 512, 640, 480)
@commands = ['BGM Volume', 'SFX Volume', 'Battle BGM']
@commands.push('Battle Cam') if BlizzCFG::CAM_AVAILABLE
@commands.push('Bar Style', 'Bar Opacity') if $Blizz_Art
@commands.push('Font', 'Windowskin')
get_skin_and_font
self.contents = Bitmap.new(width - 32, height - 32)
self.z, self.index = 2999, 0
@item_max = @commands.size
refresh
end
def get_option
return @commands[index]
end
def refresh
self.contents.clear
self.contents.font.name = $game_system.fontname
(0...@item_max).each {|i|
self.contents.font.color = normal_color
self.contents.fill_rect(24, 16 + i*36, 192, 32, Color.new(0, 0, 0, 0))
self.contents.draw_text(24, 16 + i*36, 192, 32, @commands[i])
draw_arrows(288, 4 + i*36)
case @commands[i]
when 'BGM Volume' then draw_volume(288, 4 + i*36)
when 'SFX Volume' then draw_volume(288, 4 + i*36, true)
when 'Battle BGM' then draw_battle_bgm(288, 4 + i*36)
when 'Battle Cam' then draw_battle_cam(288, 4 + i*36)
when 'Bar Style' then draw_style(288, 4 + i*36)
when 'Bar Opacity' then draw_opacity(288, 4 + i*36)
when 'Font' then draw_font(288, 4 + i*36)
when 'Windowskin' then draw_skin(288, 4 + i*36)
end}
end
def draw_arrows(x, y)
self.contents.draw_text(x - 32, y + 13, 32, 32, '<<')
self.contents.draw_text(x + 249, y + 13, 32, 32, '>>')
end
def draw_volume(x, y, mode = false, width = 224)
volume = (mode ? $game_system.sfx_volume.to_f : $game_system.bgm_volume.to_f)
vol = volume.to_f / 100
color1 = Color.new(20, 40, 80, 192)
color2 = Color.new(60, 120, 240, 192)
color3 = Color.new(0, 0, 80, 192)
old, $game_system.bar_opacity = $game_system.bar_opacity, 255 if $Blizz_Art
self.contents.gradient_bar(x, y, width, color1, color2, color3, vol, true)
$game_system.bar_opacity = old if $Blizz_Art
end
def draw_style(x, y, width = 224)
color1 = Color.new(80, 80, 0, 192)
color2 = Color.new(240, 240, 0, 192)
self.contents.gradient_bar(x + 32, y, width - 64, color1, color2, color1, 1, true)
end
def draw_battle_bgm(x, y, width = 224)
bgm = BlizzCFG::BATTLE_BGMS[$game_variables[BlizzCFG::BGM_Variable]][3]
if $game_switches[BlizzCFG::BGM_Lock] || BlizzCFG::BATTLE_BGMS.size <= 1
self.contents.font.color = Color.new(0, 0, 0, 255)
self.contents.draw_text(x+1, y + 13+1, 224, 32, bgm, 1)
self.contents.font.color = disabled_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(x, y + 13, 224, 32, bgm, 1)
end
def draw_battle_cam(x, y, width = 224)
cam = ($game_variables[BlizzCFG::CAM_Variable] == 0 ? 'ON' : 'OFF')
self.contents.draw_text(x, y + 13, 224, 32, cam, 1)
end
def draw_opacity(x, y, width = 224)
alpha = case $game_system.bar_opacity
when 0 then 'No Bar'
when 1..85 then 'Light'
when 86..170 then 'Medium'
when 171..254 then 'Hard'
when 255 then 'Full'
end
self.contents.draw_text(x, y + 13, 224, 32, alpha, 1)
end
def draw_font(x, y, width = 224)
@font_name = BlizzCFG::CMS_FONTS[@current_font]
self.contents.font.name = @font_name
self.contents.draw_text(x, y + 13, 224, 32, @font_name, 1)
self.contents.font.name = $game_system.fontname
end
def draw_skin(x, y, width = 224)
@skin_name = BlizzCFG::CMS_SKINS[self.current_skin]
self.contents.draw_text(x, y + 13, 224, 32, @skin_name, 1)
self.contents.fill_rect(x + 48, y +428, 128, 128, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.windowskin(@skin_name)
self.contents.blt(x + 50, y + 50, bitmap, Rect.new(2, 2, 124, 124))
self.contents.blt(x + 48, y + 48, bitmap, Rect.new(128, 0, 16, 16))
self.contents.blt(x + 160, y + 48, bitmap, Rect.new(176, 0, 16, 16))
self.contents.blt(x + 48, y + 160, bitmap, Rect.new(128, 48, 16, 16))
self.contents.blt(x + 160, y + 160, bitmap, Rect.new(176, 48, 16, 16))
(2..4).each {|i|
self.contents.blt(x+i*32, y+48, bitmap, Rect.new(144, 0, 32, 16))}
(2..4).each {|i|
self.contents.blt(x+i*32, y+160, bitmap, Rect.new(144, 48, 32, 16))}
(2..4).each {|i|
self.contents.blt(x+48, y+i*32, bitmap, Rect.new(128, 16, 16, 32))}
(2..4).each {|i|
self.contents.blt(x+160, y+i*32, bitmap, Rect.new(176, 16, 16, 32))}
end
def current_skin
return (@current_skin == nil ? 0 : @current_skin)
end
def current_skin=(val)
@current_skin = (val.is_a?(Numeric) ? val : 0)
end
def get_skin_and_font
@font_name = $game_system.fontname
@current_font = BlizzCFG::CMS_FONTS.index(@font_name)
@skin_name = $game_system.windowskin_name
self.current_skin = BlizzCFG::CMS_SKINS.index(@skin_name)
end
def update_cursor_rect
if self.index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(16, @index*36 + 16, 128, 32)
end
end
end
#==============================================================================
# Window_CMSTarget
#==============================================================================
class Window_CMSTarget < Window_Base
attr_reader :index
attr_reader :actor
attr_reader :dir
def initialize(actor, mode = false)
@background = 'CMSTarget'
super(-304, 64, 256, 104)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, @item_max = actor, 1
self.y += actor.index*104 unless mode
self.z = 3999
self.index = -1
refresh
end
def index=(i)
@index = i
update_cursor_rect
end
def refresh
self.contents.clear
draw_actor_name(@actor, 4, -4)
draw_actor_state(@actor, 100, -4, 112)
draw_actor_hp(@actor, 44, 16)
draw_actor_sp(@actor, 44, 38)
end
def update_actor(actor)
@actor = actor
refresh
end
def dir=(val)
self.y -= val*40
@dir = val
end
def update(i = @actor.index - 1)
unless self.index == -2
if @actor.index == i
self.index = 0 if self.index == -1
else
self.index = -1 if self.index == 0
end
end
self.y = 64+@actor.index*104 unless self.active
@dir = 0 if (self.y-64) / 104 * 104 == self.y-64
super()
update_cursor_rect
end
def update_cursor_rect
if !self.active || self.index == -1
self.cursor_rect.empty
elsif self.index >= 0
self.cursor_rect.set(0, @index * 96, 224, 72)
elsif self.index == -2
self.cursor_rect.set(0, 0, 224, 72)
end
end
end
#==============================================================================
# Window_Help
#==============================================================================
class Window_Help < Window_Base
alias init_storm_cms_later initialize
def initialize
@background = 'CMSHelp' if $scene.is_a?(Scene_Menu)
init_storm_cms_later
refresh
end
def refresh
self.contents.font.name = $game_system.fontname
end
end
#==============================================================================
# Window_CMSItem
#==============================================================================
class Window_CMSItem < Window_Selectable
def initialize
@background = 'CMSItem'
super(256, -512, 384, 416)
self.active, self.visible, self.z, self.index = false, false, 2999, -1
refresh
end
def data
return @data[self.index]
end
def draw_item(i)
number = case @data[i]
when RPG::Item then $game_party.item_number(@data[i].id)
when RPG::Weapon then $game_party.weapon_number(@data[i].id)
when RPG::Armor then $game_party.armor_number(@data[i].id)
end
if @data[i].is_a?(RPG::Item) && $game_party.item_can_use?(@data[i].id) ||
@mode == nil
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
self.contents.fill_rect(4, i*32, 352, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(@data[i].icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(4, i*32 + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(308, i*32, 16, 32, ':', 1)
self.contents.draw_text(324, i*32, 24, 32, number.to_s, 2)
end
def update_help
@help_window.set_text(data == nil ? '' : data.description)
end
end
#==============================================================================
# Window_NormalItem
#==============================================================================
class Window_NormalItem < Window_CMSItem
attr_accessor :mode
def initialize
@mode = 0
super
self.visible = true
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
data1, data2, data3 = [], [], []
(1...$data_items.size).each {|i|
if $game_party.item_number(i) > 0 && !BlizzCFG::QUEST_ITEMS.include?(i)
data1.push($data_items[i])
end}
if BlizzCFG::WEAPONS_AND_ARMORS
(1...$data_weapons.size).each {|i|
data2.push($data_weapons[i]) if $game_party.weapon_number(i) > 0}
(1...$data_armors.size).each {|i|
data3.push($data_armors[i]) if $game_party.armor_number(i) > 0}
end
if [1, 2].include?(@mode)
data1.sort! {|a, b|
$game_party.item_number(a.id) <=> $game_party.item_number(b.id)}
data2.sort! {|a, b|
$game_party.weapon_number(a.id) <=> $game_party.weapon_number(b.id)}
data3.sort! {|a, b|
$game_party.armor_number(a.id) <=> $game_party.armor_number(b.id)}
[data1, data2, data3].each {|ary| ary.reverse!} if @mode == 2
elsif [3, 4].include?(@mode)
[data1, data2, data3].each {|ary| ary.sort! {|a, b| a.name <=> b.name}}
[data1, data2, data3].each {|ary| ary.reverse!} if @mode == 4
end
@data = data1 + data2 + data3
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
end
#==============================================================================
# Window_QuestItem
#==============================================================================
class Window_QuestItem < Window_CMSItem
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
(1...$data_items.size).each {|i|
if $game_party.item_number(i) > 0 && BlizzCFG::QUEST_ITEMS.include?(i)
@data.push($data_items[i])
end}
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
end
#==============================================================================
# Window_EquipmentItem
#==============================================================================
class Window_EquipmentItem < Window_CMSItem
attr_accessor :item_max
def initialize(actor)
@actor = actor
super()
self.x, self.y, self.z, self.index = 256, -548, 2999, 0
self.active = self.visible = true
end
def update_actor(actor)
@actor = actor
refresh
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
(1...$data_weapons.size).each {|i|
@data.push($data_weapons[i]) if $game_party.weapon_number(i) > 0}
(1...$data_armors.size).each {|i|
@data.push($data_armors[i]) if $game_party.armor_number(i) > 0}
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
def draw_item(i)
case @data[i]
when RPG::Weapon
if @actor.equippable?($data_weapons[@data[i].id])
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
number = $game_party.weapon_number(@data[i].id)
when RPG::Armor
if @actor.equippable?($data_armors[@data[i].id])
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
number = $game_party.armor_number(@data[i].id)
end
self.contents.fill_rect(4, i*32, 352, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(@data[i].icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(308, i*32, 16, 32, ':', 1)
self.contents.draw_text(324, i*32, 24, 32, number.to_s, 2)
end
end
#==============================================================================
# Window_CMSSkill
#==============================================================================
class Window_CMSSkill < Window_CMSItem
def initialize(actor)
@actor = actor
super()
self.x, self.y, self.z, self.index = -512, 64, 2999, 0
self.active = self.visible = true
end
def update_actor(actor)
@actor = actor
refresh
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
@actor.skills.each {|id| @data.push($data_skills[id])}
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
def draw_item(i)
self.contents.fill_rect(4, i*32, 352, 32, Color.new(0, 0, 0, 0))
if @actor.skill_can_use?(@data[i].id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
bitmap = RPG::Cache.icon(@data[i].icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
text = @data[i].name
tons = ($tons_version != nil ? $tons_version : 0)
if tons >= 4.0 && TONS_OF_ADDONS::EQUAP_SKILLS && DISPLAY_AP_REQ
aps = BlizzCFG.maxap(@data[i].id)
if aps > 0
text += " (#{@actor.ap(@data[i].id)}/#{aps})"
elsif DISPLAY_AP_ZERO
text += ' (0/0)'
end
end
self.contents.draw_text(32, i*32, 204, 32, text)
if @data[i].sp_cost > 0
sp_cost = @data[i].sp_cost
if tons >= 6.54 && $game_system.SP_COST_MOD
sp_cost = BlizzCFG.get_cost_mod(@actor.states, sp_cost)
end
self.contents.draw_text(292, i*32, 48, 32, sp_cost.to_s, 2)
end
end
end
#==============================================================================
# Window_CMSEquipLeft
#==============================================================================
class Window_CMSEquipLeft < Window_Base
attr_accessor :mode
attr_accessor :current
attr_accessor :changed
def initialize(actor)
@background = 'CMSEquipLeft'
super(640, 64, 288, 416)
self.contents = Bitmap.new(width - 32, height - 32)
@current = @changed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
@elements, @states, @actor, @mode, self.z = [], [], actor, 0, 2999
refresh
end
def update_actor(actor)
@actor = actor
refresh
end
def draw_actor_hp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 96, 32, "max #{$data_system.words.hp}")
self.contents.font.color = normal_color
self.contents.draw_text(x + 108, y, 48, 32, actor.maxhp.to_s, 2)
end
def draw_actor_sp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 96, 32, "max #{$data_system.words.sp}")
self.contents.font.color = normal_color
self.contents.draw_text(x + 108, y, 48, 32, actor.maxsp.to_s, 2)
end
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_level(@actor, 180, 0)
draw_actor_hp(@actor, 4, 28)
draw_actor_sp(@actor, 4, 52)
(0..7).each {|i| draw_actor_parameter(@actor, 4, 76 + i*24, i)}
if @mode == 0
self.contents.font.color = up_color
self.contents.draw_text(4, 276, 200, 32, 'Elemental attack:')
self.contents.draw_text(4, 324, 200, 32, 'Status attack:')
elsif @mode == 1
self.contents.font.color = up_color
self.contents.draw_text(4, 276, 200, 32, 'Elemental resistance:')
self.contents.draw_text(4, 324, 200, 32, 'Status resistance:')
end
self.contents.font.color = normal_color
draw_elements(4, 300)
draw_states(4, 348)
@current.each_index {|i|
val = @current[i] - @changed[i]
if val != 0
self.contents.font.color = system_color
self.contents.draw_text(162, 28+i*24, 40, 32, '»»', 1)
self.contents.font.color = (val > 0 ? down_color : up_color)
self.contents.draw_text(204, 28+i*24, 48, 32, @changed[i].abs.to_s, 2)
end}
end
def set_new_parameters(elements, states)
@elements, @states = elements, states
refresh
end
def draw_elements(x, y)
@elements.each_index {|i|
icon = RPG::Cache.icon("CMS/elm_#{$data_system.elements[@elements[i]].downcase}")
self.contents.blt(x + i*28, y + 4, icon, Rect.new(0, 0, 24, 24))}
end
def draw_states(x, y)
@states.each_index {|i|
icon = RPG::Cache.icon("CMS/stat_#{$data_states[@states[i]].name.downcase}")
self.contents.blt(x + i*28, y + 4, icon, Rect.new(0, 0, 24, 24))}
end
end
#==============================================================================
# Window_CMSEquipRight
#==============================================================================
class Window_CMSEquipRight < Window_Selectable
def initialize(actor)
@background = 'CMSEquipRight'
super(928, 64, 352, 192)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, self.active, self.z, self.index = actor, true, 2999, 0
refresh
end
def data
return @data[self.index]
end
def update_actor(actor)
@actor = actor
refresh
end
def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
self.contents.draw_text(4, 32 * 0, 120, 32, $data_system.words.weapon)
self.contents.draw_text(4, 32 * 1, 120, 32, $data_system.words.armor1)
self.contents.draw_text(4, 32 * 2, 120, 32, $data_system.words.armor2)
self.contents.draw_text(4, 32 * 3, 120, 32, $data_system.words.armor3)
self.contents.draw_text(4, 32 * 4, 120, 32, $data_system.words.armor4)
(0...5).each {|i| draw_item_name(@data[i], 120, 32 * i)}
end
def update_help
@help_window.set_text(data == nil ? '' : data.description)
end
end
#==============================================================================
# Window_CMSEquipItem
#==============================================================================
class Window_CMSEquipItem < Window_Selectable
def initialize(actor, equip_type)
@background = 'CMSEquipItem'
super(928, 256, 352, 224)
self.active = self.visible = false
@actor, @equip_type, self.z, self.index = actor, equip_type, 3000, -1
refresh
end
def data
return @data[self.index]
end
def update_actor(actor, equip_type)
@actor = actor
@equip_type = equip_type
refresh
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
(1...$data_weapons.size).each {|i|
if $game_party.weapon_number(i) > 0 && weapon_set.include?(i)
@data.push($data_weapons[i])
end}
else
armor_set = $data_classes[@actor.class_id].armor_set
(1...$data_armors.size).each {|i|
if $game_party.armor_number(i) > 0 && armor_set.include?(i)
@data.push($data_armors[i]) if $data_armors[i].kind == @equip_type-1
end}
end
@data.push(nil)
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32)
(0...@item_max-1).each {|i| draw_item(i)}
self.contents.font.color = system_color
self.contents.draw_text(4, (@item_max-1)*32, 100, 32, '[Unequip]')
end
def draw_item(i)
number = case @data[i]
when RPG::Weapon then $game_party.weapon_number(@data[i].id)
when RPG::Armor then $game_party.armor_number(@data[i].id)
end
self.contents.font.color = normal_color
bitmap = RPG::Cache.icon(@data[i].icon_name)
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(212, i*32, 16, 32, ':', 1)
self.contents.draw_text(228, i*32, 24, 32, number.to_s, 2)
end
def update_help
@help_window.set_text(data == nil ? '' : data.description)
end
end
#==============================================================================
# Window_CMSStatus
#==============================================================================
class Window_CMSStatus < Window_Base
def initialize(actor)
@background = 'CMSFullscreen'
super(0, 512, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, self.active, self.z = actor, true, 2999
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(224, 0, 120, 32, @actor.name, 1)
draw_actor_battler(@actor, 284, 232)
draw_actor_class(@actor, 400, 32)
draw_actor_level(@actor, 400, 0)
draw_actor_state(@actor, 400, 64, 168)
draw_actor_hp(@actor, 400, 92, 172)
draw_actor_sp(@actor, 400, 122, 172)
if $crls
if BlizzCFG::DRAW_SR_BAR
draw_actor_sr_with_bar(@actor, 400, 152, 172)
else
draw_actor_sr(@actor, 400, 152, 172)
end
draw_actor_exp(@actor, 400, 182, 172)
else
draw_actor_exp(@actor, 400, 152, 172)
end
(0..7).each {|i| draw_actor_parameter(@actor, 4, i*28, i)}
self.contents.font.color = system_color
w = self.contents.text_size('Elemental Vulnerability').width
self.contents.draw_text(365, 244, w, 32, 'Elemental Vulnerability')
self.contents.font.size -= 4
draw_actor_element_vulnerability(@actor, 320, 268)
self.contents.font.size += 4
self.contents.font.color = system_color
self.contents.draw_text(84, 244, 96, 32, 'Equipment')
self.contents.draw_text(4, 276, 96, 32, $data_system.words.weapon)
self.contents.draw_text(4, 308, 96, 32, $data_system.words.armor1)
self.contents.draw_text(4, 340, 96, 32, $data_system.words.armor2)
self.contents.draw_text(4, 372, 96, 32, $data_system.words.armor3)
self.contents.draw_text(4, 404, 96, 32, $data_system.words.armor4)
equips = [$data_weapons[@actor.weapon_id], $data_armors[@actor.armor1_id],
$data_armors[@actor.armor2_id], $data_armors[@actor.armor3_id],
$data_armors[@actor.armor4_id]]
equips.each_index {|i|
if @actor.equippable?(equips[i])
draw_item_name(equips[i], 108, 276 + i*32)
else
self.contents.font.color = (i == 0 ? knockout_color : crisis_color)
self.contents.draw_text(108, 276 + i*32, 192, 32, 'Nothing equipped')
end}
end
def update_actor(actor)
@actor = actor
refresh
end
end
#==============================================================================
# Window_CMSSortCommand
#==============================================================================
class Window_CMSSortCommand < Window_Command
def initialize
@background = 'CMSMini'
super(180, ['Standard', 'by quantity', 'by alphabet'])
self.x, self.y, self.z = 224, -128, 9999
end
end
#==============================================================================
# Window_CMSEndCommand
#==============================================================================
class Window_CMSEndCommand < Window_Command
def initialize
@background = 'CMSMini'
super(180, ['Back to game', 'Back to title', 'Exit game'])
self.x, self.y, self.z = 460, 524, 3999
end
end
#==============================================================================
# Window_CMSInfo
#==============================================================================
class Window_CMSInfo < Window_Base
def initialize
@background = 'CMSInfo'
super(0, 0, 180, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.active, self.x, self.y, self.z = false, 460, 832, 1999
refresh
end
def refresh
self.contents.clear
self.contents.font.name = $game_system.fontname
@double_sec = Graphics.frame_count * 2 / Graphics.frame_rate
total_sec = @double_sec / 2
hour, min, sec = total_sec / 60 / 60, total_sec / 60 % 60, total_sec % 60
if @double_sec % 2 == 1
text = sprintf('%02d %02d %02d', hour, min, sec)
else
text = sprintf('%02d:%02d:%02d', hour, min, sec)
end
self.contents.font.color = system_color
cx = contents.text_size($data_system.words.gold).width
self.contents.draw_text(148-cx, 32, cx, 32, $data_system.words.gold, 2)
self.contents.draw_text(0, 64, 148, 32, 'Location:')
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, 148, 32, text, 1)
self.contents.draw_text(0, 32, 144-cx, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(0, 96, 148, 32, $game_map.name, 2)
end
def update
super
refresh if Graphics.frame_count * 2 / Graphics.frame_rate != @double_sec
end
end
#==============================================================================
# Window_CMSMenuStatus
#==============================================================================
class Window_CMSMenuStatus < Window_Base
attr_reader :index
attr_reader :actor
attr_reader :dir
def initialize(actor)
@background = 'CMSMenuStatus'
super(0, 0, 460, 120)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
@dir = 0
refresh
self.active = false
self.index = -1
self.x, self.y, self.z = -512, @actor.index * 120, 999
end
def index=(i)
@index = i
update_cursor_rect
end
def refresh
self.contents.clear
self.contents.font.name = $game_system.fontname
self.contents.font.color = normal_color
draw_actor_graphic(@actor, 56, 80)
draw_actor_name2(@actor, 8, 0, 88, 1)
draw_actor_level(@actor, 104, 0)
draw_actor_state(@actor, 168, 0, 252)
draw_actor_hp(@actor, 104, 28)
draw_actor_sp(@actor, 272, 28)
draw_actor_exp_alt(@actor, 272, 56)
if $crls
if BlizzCFG::DRAW_SR_BAR
draw_actor_sr_with_bar(@actor, 104, 56)
else
draw_actor_sr(@actor, 104, 56)
end
end
end
def dir=(val)
self.y -= val*56
@dir = val
end
def update(i = @actor.index - 1)
if @actor.index == i
self.index = 0 if self.index == -1
else
self.index = -1 if self.index == 0
end
self.y = @actor.index*120 unless self.active
@dir = 0 if self.y / 120 * 120 == self.y
super()
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, 0, width - 32, height - 32)
end
end
end
#==============================================================================
# Scene_Menu
#==============================================================================
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
@actor_index = @target_index = -1
@viewport1 = Viewport.new(0, 0, 640, 480)
@moved = false
end
def main
if BlizzCFG::MAP_BACKGROUND
@spriteset = Spriteset_Map.new
elsif BlizzCFG::CMS_EDITION
@spriteset = Sprite.new
@spriteset.bitmap = RPG::Cache.picture("CMS/#{BlizzCFG::CMS_EDITION}/CMSFullscreen")
end
continue = ((1..BlizzCFG::SAVE_FILES_NUMBER).any? {|i|
FileTest.exist?("#{BlizzCFG::SAVE_NAME}#{i}.#{BlizzCFG::SAVE_EXTENSION}")})
@command_window = Window_CMSCommand.new(@menu_index, continue)
(0...5).each {|i| @command_window.disable_item(i)} if $game_party.actors.size == 0
@command_window.disable_item(6) if $game_system.save_disabled
@command_window.disable_item(7) unless @command_window.continue
@info_window = Window_CMSInfo.new
@status_windows, @target_windows = [], []
$game_party.actors.each {|actor|
@status_windows.push(Window_CMSMenuStatus.new(actor))}
@help_window = Window_Help.new
@help_window.x, @help_window.y, @help_window.z = 0, -368, 9999
Graphics.transition
loop do
Graphics.update
Input.update
update
break if @scene != nil || $scene != self
end
loop do
Graphics.update
(@status_windows + [@command_window, @info_window]).each {|win| win.update}
move_da_outro
break if @status_windows[0].x <= - 512
end
Graphics.freeze
(@status_windows + @target_windows + [@command_window, @info_window,
@help_window, @spriteset]).each {|obj| obj.dispose if obj != nil}
del_sort if @sort_window != nil
del_status if @playerstatus_window != nil
del_equip if @left_window != nil
del_skill if @skill_window != nil
del_end if @end_window != nil
del_items if @item_choose_window != nil
del_equipment if @equips_window != nil
del_options if @options_window != nil
if @scene.is_a?(Scene_Title)
Graphics.transition(25)
Graphics.freeze
end
$scene = @scene
end
def equip_refresh
if @item_window.active
item = @item_window.data
last_hp = @actor.hp
last_sp = @actor.sp
@left_window.current = [@actor.maxhp, @actor.maxsp, @actor.atk,
@actor.pdef, @actor.mdef, @actor.str, @actor.dex, @actor.agi,
@actor.int, @actor.eva]
@left_window.changed = @actor.test_equip(@right_window.index, item == nil ? 0 : item.id)
elements = (item.is_a?(RPG::Weapon) ? item.element_set :
(item.is_a?(RPG::Armor) ? item.guard_element_set : []))
states = (item.is_a?(RPG::Weapon) ? item.plus_state_set :
(item.is_a?(RPG::Armor) ? item.guard_state_set : []))
@actor.hp = last_hp
@actor.sp = last_sp
@left_window.set_new_parameters(elements, states)
else
@left_window.current = @left_window.changed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
@left_window.set_new_parameters([], [])
end
end
def del_sort
@sort_window.dispose
@sort_window = nil
end
def del_status
@playerstatus_window.dispose
@playerstatus_window = nil
end
def del_equip
@left_window.dispose
@right_window.dispose
@item_windows.each {|win| win.dispose}
@left_window = @right_window = @item_window = @item_windows = nil
end
def del_skill
@skill_window.dispose
@skill_window = nil
end
def del_target
@target_windows.each {|win| win.dispose}
@target_windows = []
end
def del_end
@end_window.dispose
@end_window = nil
end
def del_items
@items_window1.dispose
@items_window1 = nil
@items_window2.dispose
@items_window2 = nil
@item_choose_window.dispose
@item_choose_window = nil
end
def del_equipment
@equips_window.dispose
@equips_window = nil
del_target
end
def del_options
@options_window.dispose
@options_window = nil
end
def update
@status_windows.each {|win| win.update(@actor_index)}
@target_windows.each {|win| win.update(@target_index)}
@info_window.update
unless @status_windows[0].x < 0 || @status_windows[0].dir != 0 ||
@target_windows[0] != nil && @target_windows[0].dir != 0
@command_window.update
[@help_window, @equips_window, @item_choose_window, @sort_window,
@skill_window, @left_window, @right_window, @playerstatus_window,
@options_window, @end_window].each {|win| win.update if win != nil}
end
move_da_main if @status_windows[0].x < 0
move_da_selection if @status_windows[0].dir != 0
move_da_targeting if @target_windows[0] != nil && @target_windows[0].dir != 0
move_da_status if @playerstatus_window != nil && @playerstatus_window.y > 0
move_da_equip if @left_window != nil && @left_window.x > 0
move_da_skill if @skill_window != nil && @skill_window.x < 256
move_da_target if @target_windows[0] != nil && @target_windows[0].x < 0
move_da_items if @item_choose_window != nil && @item_choose_window.y < 0
move_da_sort if @sort_window != nil && @sort_window.y < 64
move_da_equipment if @equips_window != nil && @equips_window.y < 64
move_da_options if @options_window != nil && @options_window.y > 0
move_da_end if @end_window != nil && @end_window.y > 336
if @moved
@moved = false
return
end
if @equips_window != nil
update_equipment
elsif @command_window.active
update_command
elsif @status_windows[0].active
update_status
elsif @item_choose_window != nil
if @item_choose_window.active
items_refresh
update_items_choose
elsif @sort_window != nil && @sort_window.active
update_sort
elsif @items_window1 != nil && @items_window1.active
@items_window1.update
update_item
elsif @items_window2 != nil && @items_window2.active
@items_window2.update
update_item
elsif @target_windows[0] != nil && @target_windows[0].active
update_item_target
end
elsif @skill_window != nil && @skill_window.active
update_skill
elsif @target_windows[0] != nil && @target_windows[0].active
update_skill_target
elsif @right_window != nil
if @right_window.active
update_right_equip
elsif @item_window != nil && @item_window.active
@item_window.update
update_eitem
end
elsif @playerstatus_window != nil && @playerstatus_window.active
update_playerstatus
elsif @options_window != nil && @options_window.active
update_options
elsif @end_window != nil
update_end
end
end
def move_windows(wins, border, mdiff, lead, xy, acc = false)
if acc
diff = [[((xy ? lead.x : lead.y)-border).abs, mdiff].min, 1].max
else
diff = [[((xy ? lead.x : lead.y)-border).abs/2, mdiff].min, 1].max
end
wins[0].each {|win| win.x += diff if win != nil}
wins[1].each {|win| win.x -= diff if win != nil}
wins[2].each {|win| win.y += diff if win != nil}
wins[3].each {|win| win.y -= diff if win != nil}
@moved = true
end
def move_da_main
lead = @status_windows[0]
x_plus = @status_windows
x_minus = [@command_window]
y_minus = [@info_window]
move_windows([x_plus, x_minus, [], y_minus], 0, 128, lead, true)
end
def move_da_outro
@flag = true
lead = @status_windows[0]
x_plus = [@command_window]
x_minus = @status_windows + @target_windows + [@skill_window, @help_window]
y_plus = [@info_window]
y_minus = [@item_choose_window, @items_window1, @items_window2, @help_window]
move_windows([x_plus, x_minus, y_plus, y_minus], 0, 128, lead, true, true)
end
def move_da_selection(lead = @status_windows[@actor_index])
if lead.dir == 1
move_windows([[], [], [], @status_windows], 360, 32, lead, false)
else
move_windows([[], [], @status_windows, []], 0, 32, lead, false)
end
end
def move_da_targeting(lead = @target_windows[@target_index])
if lead.dir == 1
move_windows([[], [], [], @target_windows], 376, 32, lead, false)
else
move_windows([[], [], @target_windows, []], 64, 32, lead, false)
end
end
def move_da_sort(win = @sort_window)
move_windows([[], [], [win], []], 64, 32, win, false)
end
def move_da_status(win = @playerstatus_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
def move_da_equip(win = @left_window)
x_minus = [@left_window, @right_window, @help_window] + @item_windows
move_windows([[], x_minus, [], []], 0, 64, win, true)
end
def move_da_skill(win = @skill_window)
x_plus = [@skill_window, @help_window]
move_windows([x_plus, [], [], []], 256, 64, win, true)
end
def move_da_target(win = @target_windows[0])
move_windows([@target_windows, [], [], []], 0, 32, win, true)
end
def move_da_items(win = @item_choose_window)
y_plus = [@item_choose_window, @items_window1, @items_window2, @help_window]
move_windows([[], [], y_plus, []], 0, 64, win, false)
end
def move_da_equipment(win = @equips_window)
y_plus = [@equips_window, @help_window]
move_windows([[], [], y_plus, []], 64, 64, win, false)
end
def move_da_options(win = @options_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
def move_da_end(win = @end_window)
move_windows([[], [], [], [win]], 336, 64, win, false)
end
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.actors.size == 0 && @command_window.index < 5
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_ITEM_SCENE
@scene = Scene_Item.new
else
@item_choose_window = Window_CMSChooseItem.new
@items_window1 = Window_NormalItem.new
@items_window2 = Window_QuestItem.new
@items_window1.help_window = @items_window2.help_window = @help_window
@command_window.active = false
@help_window.x, @help_window.y = 0, -576
@help_window.set_text('')
@help_window.visible = false
items_refresh
end
when 1..4
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_windows.each {|win| win.active = true}
@actor_index = 0
when 5
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_OPTIONS_SCENE
@scene = Scene_Options.new
else
@options_window = Window_CMSOptions.new
@command_window.active = false
end
when 6
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@scene = Scene_CMSSave.new
Graphics.transition(0)
end
when 7
if @command_window.continue
$game_system.se_play($data_system.decision_se)
@scene = Scene_CMSLoad.new
Graphics.transition(0)
else
$game_system.se_play($data_system.buzzer_se)
end
when 8
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_END_SCENE
@scene = Scene_End.new
else
@command_window.active = false
@end_window = Window_CMSEndCommand.new
end
end
end
end
def update_status
@actor = $game_party.actors[@actor_index]
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@status_windows.each {|win| win.active, win.index = false, -1}
@actor_index = -1
@command_window.active = true
elsif Input.trigger?(Input::C)
case @command_window.index
when 1
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_EQUIPMENT_SCENE
@scene = Scene_Equipment.new(@actor_index)
else
@equips_window = Window_EquipmentItem.new(@actor)
@equips_window.help_window = @help_window
@target_windows.push(Window_CMSTarget.new(@actor, true))
@status_windows.each {|win| win.active = false}
@help_window.visible = true
@help_window.x, @help_window.y = 0, -612
end
when 2
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_EQUIP_SCENE
@scene = Scene_Equip.new(@actor_index)
else
@left_window = Window_CMSEquipLeft.new(@actor)
@right_window = Window_CMSEquipRight.new(@actor)
@right_window.help_window = @help_window
@item_windows = []
(0..4).each {|i| win = Window_CMSEquipItem.new(@actor, 4-i)
win.help_window = @help_window
@item_windows.unshift(win)}
@item_windows[0].visible = @help_window.visible = true
@help_window.x, @help_window.y = 640, 0
@status_windows.each {|win| win.active = false}
end
when 3
if @actor.restriction >= 2
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_SKILL_SCENE
@scene = Scene_Skill.new(@actor_index)
else
@skill_window = Window_CMSSkill.new(@actor)
@skill_window.help_window = @help_window
@help_window.visible = true
@help_window.x, @help_window.y = -768, 0
@status_windows.each {|win| win.active = false}
end
end
when 4
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_STATUS_SCENE
@scene = Scene_Status.new(@actor_index)
else
@playerstatus_window = Window_CMSStatus.new(@actor)
@status_windows.each {|win| win.active = false}
end
end
elsif Input.repeat?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@actor_index = (@actor_index+1) % $game_party.actors.size
if @status_windows[@actor_index].y < 0
@status_windows.each {|win| win.y += ($game_party.actors.size-4)*120}
elsif @status_windows[@actor_index].y >= 480
@status_windows.each {|win| win.dir = 1}
end
elsif Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
if @status_windows[@actor_index].y < 0
@status_windows.each {|win| win.dir = -1}
elsif @status_windows[@actor_index].y >= 480
@status_windows.each {|win| win.y -= ($game_party.actors.size-4)*120}
end
end
end
def update_items_choose
if Input.trigger?(Input::B)
del_items
$game_system.se_play($data_system.cancel_se)
@command_window.active, @help_window.x, @help_window.y = true, 0, -612
elsif Input.trigger?(Input::C)
items_refresh
@item_choose_window.active = false
$game_system.se_play($data_system.decision_se)
case @item_choose_window.index
when 0
@items_window1.active = @help_window.visible = true
@items_window1.index = 0
when 1 then @sort_window = Window_CMSSortCommand.new
when 2
@items_window2.active = @help_window.visible = true
@items_window2.index = 0
end
end
end
def update_sort
if Input.trigger?(Input::B)
del_sort
@item_choose_window.active = true
$game_system.se_play($data_system.cancel_se)
elsif Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
@items_window1.mode = case @sort_window.index
when 0 then @sort_window.index
when 1 then @items_window1.mode == 1 ? 2 : 1
when 2 then @items_window1.mode == 3 ? 4 : 3
end
@items_window1.refresh
end
end
def items_refresh
index = @item_choose_window.index
@items_window1.visible = [0, 1].include?(index)
@items_window2.visible = (index == 2)
end
def update_equipment
if Input.trigger?(Input::B)
del_equipment
$game_system.se_play($data_system.cancel_se)
@actor_index = -1
@command_window.active = true
@help_window.visible = false
@help_window.x, @help_window.y = 0, -612
elsif Input.trigger?(Input::RIGHT) || Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::RIGHT)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::LEFT)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@target_windows[0].update_actor($game_party.actors[@actor_index])
@equips_window.update_actor($game_party.actors[@actor_index])
unless @equips_window.item_max > @equips_window.index
@equips_window.index = 0
end
end
end
def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@item_choose_window.active = true
@help_window.set_text('')
@items_window1.active = @items_window2.active = @help_window.visible = false
@items_window1.index = @items_window2.index = -1
elsif Input.trigger?(Input::C)
win = (@item_choose_window.index == 0 ? @items_window1 : @items_window2)
@item = win.data
unless @item.is_a?(RPG::Item) && $game_party.item_can_use?(@item.id)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_party.actors.each_index {|i|
@target_windows.push(Window_CMSTarget.new($game_party.actors[i]))}
@target_index = 0
$game_system.se_play($data_system.decision_se)
if @item.scope.between?(3, 6)
win.active = false
@target_windows.each {|win| win.active = true}
if [4, 6].include?(@item.scope)
@target_windows.each {|win| win.index = -2}
else
@target_windows[@target_index].index = 0
end
elsif @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
win.draw_item(win.index)
end
(@status_windows + @target_windows).each {|win| win.refresh}
@scene = Scene_Map.new
elsif @skill.scope == 7
$game_system.se_play($data_system.buzzer_se)
end
end
end
def update_item_target
if Input.trigger?(Input::B)
del_target
$game_system.se_play($data_system.cancel_se)
@target_index = -1
@items_window1.refresh unless $game_party.item_can_use?(@item.id)
@items_window1.active = true
elsif Input.trigger?(Input::C)
if $game_party.item_number(@item.id) == 0
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_windows[0].index == -2
used = false
$game_party.actors.each {|actor| used |= actor.item_effect(@item)}
elsif @target_index >= 0
used = $game_party.actors[@target_index].item_effect(@item)
end
if used
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@items_window1.draw_item(@items_window1.index)
end
(@status_windows + @target_windows).each {|win| win.refresh}
if $game_party.all_dead?
@scene = Scene_Gameover.new
elsif @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
@scene = Scene_Map.new
end
else
$game_system.se_play($data_system.buzzer_se)
end
else
update_target
end
end
def update_target
return if @target_windows[0] == nil || @target_windows[0].index == -2
if Input.repeat?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@target_index = (@target_index+1) % $game_party.actors.size
if @target_windows[@target_index].y < 64
@target_windows.each {|win| win.y += ($game_party.actors.size-4)*104}
elsif @target_windows[@target_index].y >= 480
@target_windows.each {|win| win.dir = 1}
end
elsif Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
@target_index += $game_party.actors.size-1
@target_index %= $game_party.actors.size
if @target_windows[@target_index].y < 64
@target_windows.each {|win| win.dir = -1}
elsif @target_windows[@target_index].y >= 480
@target_windows.each {|win| win.y -= ($game_party.actors.size-4)*104}
end
end
end
def update_skill
if Input.trigger?(Input::B)
del_skill
$game_system.se_play($data_system.cancel_se)
@help_window.x, @help_window.y = 0, -768
@help_window.visible = false
@command_window.active = true
@actor_index = @target_index = -1
elsif Input.trigger?(Input::C)
@skill = @skill_window.data
if @skill == nil || !@actor.skill_can_use?(@skill.id)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_party.actors.each_index {|i|
@target_windows.push(Window_CMSTarget.new($game_party.actors[i]))}
@target_index = 0
$game_system.se_play($data_system.decision_se)
if @skill.scope.between?(3, 6)
@skill_window.active = false
@target_windows.each {|win| win.visible = win.active = true}
if [4, 6].include?(@skill.scope)
@target_windows.each {|win| win.index = -2}
else
@target_windows[@target_index].index = 0
end
elsif @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
$game_system.se_play(@skill.menu_se)
@actor.sp -= @skill.sp_cost
(@status_windows + @target_windows).each {|win| win.refresh}
@skill_window.refresh
@scene = Scene_Map.new
elsif @skill.scope == 7
$game_system.se_play($data_system.buzzer_se)
end
elsif Input.trigger?(Input::R) || Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::R)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::L)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@actor = $game_party.actors[@actor_index]
@skill_window.update_actor(@actor)
@skill_window.index = 0
end
end
def update_skill_target
if Input.trigger?(Input::B)
del_target
$game_system.se_play($data_system.cancel_se)
@skill_window.active = true
@target_index = -1
elsif Input.trigger?(Input::C)
unless @actor.skill_can_use?(@skill.id)
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_windows[0].index == -2
used = false
$game_party.actors.each {|actor| used |= actor.skill_effect(@actor, @skill)}
else
used = $game_party.actors[@target_index].skill_effect(@actor, @skill)
end
if used
$game_system.se_play(@skill.menu_se)
@actor.sp -= @skill.sp_cost
(@status_windows + @target_windows).each {|win| win.refresh}
@skill_window.refresh
if $game_party.all_dead?
@scene = Scene_Gameover.new
elsif @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
@scene = Scene_Map.new
end
else
$game_system.se_play($data_system.buzzer_se)
end
else
update_target
end
end
def update_right_equip
@item_windows.each_index {|i|
@item_windows[i].visible = (@right_window.index == i)}
@item_window = @item_windows[@right_window.index]
newmode = [@right_window.index, 1].min
if newmode != @left_window.mode
@left_window.mode = newmode
@left_window.refresh
end
if Input.trigger?(Input::B)
del_equip
$game_system.se_play($data_system.cancel_se)
@help_window.x, @help_window.y = 660, 0
@command_window.active = true
@actor_index = -1
elsif Input.trigger?(Input::C)
if @actor.equip_fix?(@right_window.index)
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@right_window.active = false
@item_window.active, @item_window.index = true, 0
equip_refresh
end
elsif Input.trigger?(Input::R) || Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::R)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::L)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@actor = $game_party.actors[@actor_index]
@right_window.update_actor(@actor)
@left_window.update_actor(@actor)
@item_windows.each_index {|i| @item_windows[i].update_actor(@actor, i)}
end
end
def update_eitem
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@right_window.active = true
@item_window.active, @item_window.index = false, -1
equip_refresh
elsif Input.trigger?(Input::C)
$game_system.se_play($data_system.equip_se)
item = @item_window.data
@actor.equip(@right_window.index, item == nil ? 0 : item.id)
@right_window.active = true
@item_window.active, @item_window.index = false, -1
@right_window.refresh
@item_window.refresh
(@item_windows + @status_windows).each {|win| win.refresh}
equip_refresh
elsif Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN) ||
Input.repeat?(Input::R) || Input.repeat?(Input::L)
equip_refresh
end
end
def update_playerstatus
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@actor_index = -1
del_status
elsif Input.trigger?(Input::R) || Input.trigger?(Input::RIGHT) ||
Input.trigger?(Input::L) || Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::R) || Input.trigger?(Input::RIGHT)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::L) || Input.trigger?(Input::LEFT)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@actor = $game_party.actors[@actor_index]
@playerstatus_window.update_actor(@actor)
end
end
def update_options
if Input.trigger?(Input::B)
del_options
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
return
end
case @options_window.get_option
when 'BGM Volume'
if Input.repeat?(Input::RIGHT)
$game_system.bgm_volume += 5
$game_system.bgm_volume = 100 if $game_system.bgm_volume > 100
$game_system.bgm_play($game_system.bgm_memorize)
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.bgm_volume -= 5
$game_system.bgm_volume = 0 if $game_system.bgm_volume < 0
$game_system.bgm_play($game_system.bgm_memorize)
@options_window.refresh
end
when 'SFX Volume'
if Input.repeat?(Input::RIGHT)
$game_system.sfx_volume += 5
if $game_system.sfx_volume > 100
$game_system.sfx_volume = 100
else
$game_system.se_play($data_system.cursor_se)
end
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.sfx_volume -= 5
$game_system.sfx_volume = 0 if $game_system.sfx_volume < 0
$game_system.se_play($data_system.cursor_se)
@options_window.refresh
end
when 'Battle BGM'
if Input.repeat?(Input::LEFT) || Input.repeat?(Input::RIGHT) ||
Input.repeat?(Input::C)
if $game_switches[BlizzCFG::BGM_Lock] || BlizzCFG::BATTLE_BGMS.size <= 1
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
ind = $game_variables[BlizzCFG::BGM_Variable]
if Input.repeat?(Input::RIGHT) || Input.repeat?(Input::C)
ind = (ind+1) % BlizzCFG::BATTLE_BGMS.size
elsif Input.repeat?(Input::LEFT)
ind = (ind+BlizzCFG::BATTLE_BGMS.size-1) % BlizzCFG::BATTLE_BGMS.size
end
$game_variables[BlizzCFG::BGM_Variable] = ind
$game_system.reset_battle_bgm
@options_window.refresh
end
end
when 'Battle Cam'
if Input.repeat?(Input::LEFT) || Input.repeat?(Input::RIGHT) ||
Input.repeat?(Input::C)
if BlizzCFG::CAM_AVAILABLE
$game_system.se_play($data_system.decision_se)
$game_system.cam = ($game_system.cam+1) % 2
$game_system.get_cam
@options_window.refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
when 'Bar Style'
if Input.repeat?(Input::RIGHT)
if $game_system.bar_opacity == 0
$game_system.se_play($data_system.buzzer_se)
else
$game_system.bar_style = ($game_system.bar_style + 1) % 7
$game_system.se_play($data_system.decision_se)
@options_window.refresh
@status_windows.each {|win| win.refresh}
end
elsif Input.repeat?(Input::LEFT)
if $game_system.bar_opacity == 0
$game_system.se_play($data_system.buzzer_se)
else
$game_system.bar_style = ($game_system.bar_style + 6) % 7
$game_system.se_play($data_system.decision_se)
@options_window.refresh
@status_windows.each {|win| win.refresh}
end
end
when 'Bar Opacity'
if Input.repeat?(Input::LEFT) || Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.decision_se)
$game_system.bar_opacity += (Input.repeat?(Input::RIGHT) ? 64 : -64)
@options_window.refresh
@status_windows.each {|win| win.refresh}
end
when 'Font'
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.decision_se)
@options_window.current_font += 1
@options_window.current_font %= BlizzCFG::CMS_FONTS.size
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.decision_se)
@options_window.current_font += BlizzCFG::CMS_FONTS.size - 1
@options_window.current_font %= BlizzCFG::CMS_FONTS.size
@options_window.refresh
elsif Input.repeat?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_system.fontname = @options_window.font_name
@command_window.refresh
@info_window.refresh
@status_windows.each {|win| win.refresh}
@help_window.refresh
@options_window.refresh
(0...5).each {|i| @command_window.disable_item(i)} if $game_party.actors.size == 0
@command_window.disable_item(6) if $game_system.save_disabled
@command_window.disable_item(7) unless @command_window.continue
end
when 'Windowskin'
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.decision_se)
@options_window.current_skin += 1
@options_window.current_skin %= BlizzCFG::CMS_SKINS.size
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.decision_se)
@options_window.current_skin += BlizzCFG::CMS_SKINS.size - 1
@options_window.current_skin %= BlizzCFG::CMS_SKINS.size
@options_window.refresh
elsif Input.repeat?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_system.windowskin_name = @options_window.skin_name
end
end
end
def update_end
if Input.trigger?(Input::B) || Input.trigger?(Input::C) &&
@end_window.index == 0
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
del_end
elsif Input.trigger?(Input::C)
Graphics.freeze
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
@end_window.index == 1 ? @scene = Scene_Title.new : $scene = nil
del_end
end
end
end
#==============================================================================
# Scene_CMSSave
#==============================================================================
class Scene_CMSSave < Scene_Save
def on_cancel
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(6)
end
end
#==============================================================================
# Scene_CMSLoad
#==============================================================================
class Scene_CMSLoad < Scene_Load
def on_cancel
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(7)
end
end
also, thank you for the help
tested the script.. no problems.
so this means that you have a other script thats messing with this 1.
can you post up the other scripts you use (just the titles)
I thought this would be easier @_@
(http://i846.photobucket.com/albums/ab29/Ilitsa/scriptlist.png)
note: since I took that picture earlier today for a friend of mine, I removed the <stationary enemy battlers> script
SDK, there is your problem.. almost 99% sure
Quote97% compatible with SDK v1.x. 80% compatible with SDK v2.x.
that is mostly the reason why almost everyone on this forum hates SDK,
SDK is kinda a big black spot on the history of RMXP, something that should never had been thought up.
I'm seeing no other things that can screw things over.
it was doing it before, I added the SDK hoping it would fix it, I'll remove it again and give another go then ;)
still same issue, think I should upload my project or anything?
looking at the list again. (and looking up the scrips)
the only thing that can mess with it is SDK or Enemy equipped weapons
you can also upload your project.. would save time
Alright, I noticed most of you guys here use sendspace, so:
http://www.sendspace.com/file/0anogg
its Actor Advanced Status
that script acts as a rewrite of the status screen, and equip screen.
since Stormtronics has a build in status screen it won't work together.
Ooooooh... Alrighty, I'll pop that on out then! Thanks a ton!
Would this look good with just one player? If not does anyone have any good suggestions for a One-Man CMS?
Quote from: C.C. rOyAl on February 14, 2010, 05:51:15 pm
Would this look good with just one player? If not does anyone have any good suggestions for a One-Man CMS?
I'm using this for a 1-man game and ik looks pretty good actually.
When used in map-visual function you can still see a lot of the map and that's what I really like :p
I used it in CoSLAL and it looked good.
Hey Blizzard, i've got a question. How cain i make it display a still picture at the back? I mean, where as in your CP version had those mosaics flying, i´d want to replace that with a still pic...
I´m being a bit unclear, i know. But, forgive me, i just woke up a few hours ago. (It´s 8.30 here, and i woke up 6.30)
# MAP_BACKGROUND - set to true to show map as background, otherwise
# if BlizzCFG::CMS_EDITION is not nil or false the
# "CMSFullscreen" image will be displayed
Oh. Well i was in school at the moment, and tired, so yea...
Quote from: DesPKP on February 17, 2010, 06:26:34 am
Oh. Well i was in school at the moment, and tired, so yea...
Don't have to look for excuses ;p
I have problems in this. I want to change the menu so it can have bestiary, quest menu and party changer. The save and load are perfectly optional for me, but i want the other.
Anyone can help me?
Quote from: Sima Yi on May 05, 2010, 06:06:13 am
I have problems in this. I want to change the menu so it can have bestiary, quest menu and party changer. The save and load are perfectly optional for me, but i want the other.
Anyone can help me?
I think that question has been answered a few times in this very topic. Have you read through it?
Sorry,I missed some pages while filpping through...
Let me read again.
[Edit]
I played and experimented with the script,and ended up destorying the whole thing.Which page number is it on?
Alright, I understand that talks of removing and adding options have been discussed in this topic, but I don't think I know what I'm doing still. All I want to do is remove the Options from the menu, as I don't really like it. I don't want to add anything, just disable that. If anyone could help me more directly than what's been spoken of in this topic I would be thankful.
-edit- Well... I've learned how to remove just the "Options" unfortunately, I don't know the next step, as Save now acts like Options, since I guess all the script points it at that position in the menu.
i have a question about this script.
Why cant i use other windowskins than the ones i came with? i have them all in the windoskins folder, but the only ones it lets me choose from is the ones it came with. is there any way to use my own windowskins?
Quote from: RenegadeNick27 on December 01, 2010, 05:40:07 pm
i have a question about this script.
Why cant i use other windowskins than the ones i came with? i have them all in the windoskins folder, but the only ones it lets me choose from is the ones it came with. is there any way to use my own windowskins?
You have to add them into the configuration at the beginning of the script.
OK i get it now. but i just realized that this overrides the blizz ABS menu, is there any way to fix that
Quote from: RenegadeNick27 on December 02, 2010, 04:32:09 pm
OK i get it now. but i just realized that this overrides the blizz ABS menu, is there any way to fix that
It shouldn't. Are you sure your scripts are in the right order?
IDK :???: wat order should they be in
Quote from: RenegadeNick27 on December 02, 2010, 08:16:49 pm
IDK :???: wat order should they be in
http://forum.chaos-project.com/index.php/topic,23.0.html
I'm trying to make the character status screen horizontal like FF13's one. I went about it by changing:
self.x, self.y, self.z = -512, @actor.index * 120, 999
self.y = @actor.index*120 unless self.active
to
self.x, self.y, self.z = -512, @actor.index * 1, 999
self.x = @actor.index*120 unless self.active
along with INPUTS::DOWN/UP to INPUTS::RIGHT/LEFT so that I can scroll left to right.
However, when I press CANCEL to exit, all the windows disappear and the entire menu screen shifted slightly to the left, leaving only the frozen main background image I have set and I'm stuck in the menu and can't go back to the map. It's totally fine when I leave it as:
self.y = @actor.index*120 unless self.active
but it makes the character status selection vertical
How do I go about it so that I can fix this issue? I know it has to do with the x and y adjustments, but I can't pinpoint which lines.
Thank you.
I get this error
(http://img80.imageshack.us/img80/5749/35393600.jpg)
at line
Quotealias st_cms_hybrid_hack_x_ x=
def x=(xx)
st_cms_hybrid_hack_x_($scene.is_a?(Scene_Menu) && BlizzCFG::WIN_MIRRORED ? 640-width-xx : xx)
@backsprite.x = xx unless @backsprite == nil || @backsprite.disposed?
end
it happened sometimes and I don't know the cause
edit : it seems that I get this error after upgrading to Blizz Abs 2.82
I just have a quick question, I'd appreciate it if anyone who knows how to fix this would answer as I'm sure it's been asked before. I'm using face graphics in the same game that I'm using this CMS in and I'd just like to know if it's possible to replace the Actors in the Menu with those facegraphics. Each of them are 96x96 PNG images using a simple script I got off of RRR. I'm a complete noob at scripting, never done RGSS before, so I do need to know what lines I need to edit if this is something I can implement.
For whoever answers this question, thank you for your time. :)
Look for this line in the configuration.
Set it to true. Also read instructions on how to name the face files.
Quote from: game_guy on March 11, 2011, 05:36:52 pm
Look for this line in the configuration.
Set it to true. Also read instructions on how to name the face files.
*grumbles as I spent half an hour renaming the facesets a shit ton of times to get them to work in the first place but grins and bears it* lol
I appreciate your swift reply. I'll do that right away. Thank you :)
EDIT: I mis-interpreted how they had to be renamed. I should have just looked at the instructions like a good boy XD. Thank you for your help, it worked perfectly.
Only thing I did have to do was resize the face graphics to 50% of what they were (so the default face size from 2003) because at 96x96 the text overlaps the graphic. Is there any way around that, just out of curiousity?
Well with a small snippet I can make the script resize the graphics on its own. Thats probably the best I could do, or maybe even reposition some things. Give me a screenshot of how much it overlaps and that'll give me a bit more visual information on what I need to do.
Alright... *has to redo the faces again because I resized the files that were already there* (I'm not hasty or anything XD)
Here's the screenshot.
http://i35.photobucket.com/albums/d175/Xero313/ABSOverlapGlitch.png
I'm actually all right with using smaller face graphics for now, but I'm sure what you're offering to try and do would be really useful to a lot of people, myself included, and I would really appreciate it. So I'm certainly not going to say no XD. But I certainly don't need it- I'm perfectly fine with making due lol. I'm doing this game as a collab with a friend and typically I prefer to use RPG Maker 2003 so I'm used to making due XD
EDIT: Ignore the mistitle. I wasn't thinking right because I've been looking at the Blizz ABS for the last little while and trying to figure out how to get the two scripts to work in Unison >_>
I think the best thing to do is insert this script http://forum.chaos-project.com/index.php/topic,105.0.html go into Part 2 and turn SHADED_TEXT to true. This will make the text easier to see over your face graphic. But if you need the thing to repositioned I can do that too.
Okay, I'll give that a try soon and let you know how the result comes out. Thank you for your assistance today, you've helped me greatly, good sir. :nod:
Hey.
I have a request..
I wants have only options menu. I already have Winko's CMS and I would like to add this options menu..
Can someone script on the options?
Melvin
Uh, I don't remember making a CMS. Ever. But if you post the CMS you are using, it will be a lot easier for people to help you with the merge/edit.
Sorry this is "Blizz-ABS FE CMS" and Winko's HUD.
I would like it the this CMS(Blizz FE CMS) had options menu.
oh, if you are referring to the one in Dissipate, it will take a lot more work because I didn't make it compatible with much as I wasn't releasing it. Plus it was designed for exactly 10 menu options, so unless you wanted the options menu to replace one of the other ones, all the graphics code would need to be redone.
Unnecessary to me "AI_Triggers" so this could be replaced.
I love the design of this nemesis edition CMS but there are things that I think need to be add/remove if possibly.
1. remove the sub menu "Equipment"
2. add sub menu "Party" between sub menu "Status" and "Option" where you can arrange your party member to be added on active party (first four arranged like in game Star Ocean 2)
3. when we change windowskin, make the dialog message box windowskin changed too not just the menu windowskin
Thanks if you can help me :-*
1. & 2. This is a CMS, not a party change system. Besides, the command can be replaced and connected with a party change system easily.
3. It does that already. If it doesn't, then you may have a script that interferes with this one.
4. I have retired from RMXP over a year ago.
Is it possible to remove the "save" option somehow? :D
There is always a way to do things with programming :D (well, realistic things)
Remove ", 'Save'" from row 905.
Remove rows 2176 to 2183.
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@scene = Scene_CMSSave.new
Graphics.transition(0)
end
when 7
And it should be done. It's not removed, but it's unaccessible.
Quote from: stripe103 on August 07, 2011, 05:55:59 am
There is always a way to do things with programming :D (well, realistic things)
Remove ", 'Save'" from row 905.
Remove rows 2176 to 2183.
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@scene = Scene_CMSSave.new
Graphics.transition(0)
end
when 7
And it should be done. It's not removed, but it's unaccessible.
Haha, thanks for replying but that change in the script messed up the whole menu xD
It made the "load" option become the "save" option and the "exit" option became the "load" option :P. So when i press load and selects a slot it saves instead... an when i press exit to exit the game it bring the load menu :facepalm:
(however the SAVE option and icon still disapeared from the menu so let's say it's a 30% success :^_^':)
Now for a way to change back the Load and Exit options to their old selves...
Hmm, are you sure you removed the right part? The exact part that I put in the spoiler. Because that was what I was trying to avoid by removing that part.
Anyway, if you are sure you will have to wait a few hours because it is 22.30 here so I'd like to get some sleep. :D But I'll check what I did wrong as soon as I can. I think I know what I missed but it's hard to explain when writing on my phone :P. I don't want to leave a bad script for someone. :)
Quote from: stripe103 on August 07, 2011, 04:33:25 pm
Hmm, are you sure you removed the right part? The exact part that I put in the spoiler. Because that was what I was trying to avoid by removing that part.
Anyway, if you are sure you will have to wait a few hours because it is 22.30 here so I'd like to get some sleep. :D But I'll check what I did wrong as soon as I can. I think I know what I missed but it's hard to explain when writing on my phone :P. I don't want to leave a bad script for someone. :)
Hah, Alright ^^
Yeah i removed those lines and replaced them with the spoiler you gave me, altso remove "save" from that other line.
Don't rush about the fix, i'm patient :D
Haha, the spoiler wasn't the lines you were going to add back in. I put it there so you didn't remove the wrong lines. :)
If you put them in it is the same as before you did.
I guess I could have been more clear about it, but oh well.
Quote from: stripe103 on August 08, 2011, 02:57:22 am
Haha, the spoiler wasn't the lines you were going to add back in. I put it there so you didn't remove the wrong lines. :)
If you put them in it is the same as before you did.
I guess I could have been more clear about it, but oh well.
Ohhhh... i'm stupid :P
If those lines are exactly the same i wonder why it became like it did.
Anyway, i'll did it the right way now and it worked 80%. However, now the "Exit" option unpushable :^_^':
(the button is not marked in gray or anything it looks like it use to but i can't press it, not even a sound shows up :O.o:)
Oh right. I knew I forgot something.
A couple of lines under the ones you removed, it should say when 8.
Change that to when 7 instead.
And the reason it worked that way is because you removed the menu option, but not it's functionality, and since the options after the one you removed changes ID, they take over the function for the new ID.
Ahhh, i get it now ^^
Thanks so much for the help! :D
No worries. Glad I could help :D
Hello, I was just wondering, on the status screen where it shows a characters vulnerability to the elements, i have 13 elements, how would i able to either show all of them on that little percent circle or just get rid of it entirely? is there a way to code 13 elements instead of 8? or is there a block of code that i can delete from the script to make it so that percent circle just doesnt show up at all?
Such an awesome script, I can't create my game without it. But...too bad it doesn't allow hotkeys :/
I just found a new problem with the edit Stripe :^_^':
Suddenly the LOAD option is unaccessable. It's white texted but when i press it the "Deny" sound plays and i can come no further :P
Perhaps i chould get a quick guide to removing the Load option as well? I don't see much use of it in my game ^^
Hmm... I don't know why it stops working all of a sudden, but I'll make the edit and just send to you when I get home from school. Do you want both Save and Load to be removed or just Save?
The save option is already removed.
Now the Load option should go POOF as well ;)
Riiight.. Here!
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Stormtronics CMS by Blizzard
# Version: 5.39b - Hybrid Edition
# Type: Enhanced Custom Menu System
# Date v5.0: 27.8.2007
# Date v5.0b: 12.9.2007
# Date v5.1b: 28.1.2008
# Date v5.2b: 29.1.2008
# Date v5.3b: 23.7.2008
# Date v5.31b: 20.8.2008
# Date v5.32b: 21.8.2008
# Date v5.33b: 15.11.2008
# Date v5.34b: 8.4.2009
# Date v5.35b: 9.4.2009
# Date v5.36b: 6.5.2009
# Date v5.37b: 20.5.2009
# Date v5.38b: 31.5.2009
# Date v5.39b: 24.6.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
# 97% compatible with SDK v1.x. 80% compatible with SDK v2.x. Glitchs with
# Fukuyama's Caterpillar script (but not with mine). Designed only for 8
# elements. WILL corrupt old savegames.
#
#
# Features:
#
# - completely animated and graphically optimized (lag-free)
# - own set of windowskins, fonts and icons for every status change and
# element
# - saves all changed options together with the savefile
# - menu commands "Item", "Equipment", "Skill", "Equip", "Status", "Options",
# "Save", "Load", "Exit"
# - Item submenu: "Items", "Sort" (by quantity or by alphabet), "Quest Items"
# - Equipment submenu shows information about equippable items for the chosen
# character, switch the character with LEFT and RIGHT
# - Skill submenu shows available skills for use for the chosen character,
# switch character with L and R, menu status window in background shows the
# chosen character
# - Equip submenu shows complete information about Status resistance/attack,
# Element resistance/attack and complete character stat changing (has
# even "max HP" and "max SP" available if you are using "Weapon/Armor HP/SP
# Plus")
# - Status screen with overall information about character status
# - Options submenu with "BGM Volume", "SFX Volume", "Battle BGM",
# "Battle Cam" (if using KGC's Pseudo 3D Battle Camera with my add-on for
# disabling), "Bar Style", "Bar Opacity" (if you are using Gradient Bar
# Styler), "Font" and "Windowskin" (both with preview)
# - Standard Save, Load and Exit commands
# - uses "Ultimate Font Override", so the font changes will affect RPG Maker
# XP versions 1.00, 1.01, 1.02 and 1.03 (including Dyna Edition and
# Postality Knights Edition Enhanced) and the font even gets saved with the
# savedata
#
# new in Hybrid Edition:
# - supports either windowskin background or custom images:
# >>> All Stormtronics CMS Editions in one! <<<
# - compatible with all my scripts (even DREAM v4.0)
# - draws SR in the menu if CLRS was detected
# - supports any number of party members
# - removed some special add-ons, please get Tons of Add-ons if you want to
# continue using them, ST CMS will recognize Tons v4.98b and higher
# - more than 1500 code lines less than Nemesis Edition and almost 2000
# code lines less than Metal-Plate Edition
# - removes options from Options menu that are not / cannot being used at all
# - possibility to use a different equip system
# - doesn't need skin icons anymore, the icon is drawn from the skin directly
# - improved windowskins from "Lexima Legends™ IV - Chaos Project"
#
#
# Instructions:
#
# Copy your character faces into a the folder called "Characters". The
# facesets MUST have the same names as the character spritesets with a _face
# added at the end. Also copy the windowskins and the icons. Don't forget to
# include the font files used by the game in your game folder. Also change
# the variable ID in the conditional branches if you use another variable
# than 49.
#
#
# Configuration:
#
# CAM_AVAILABLE - set to true if you use KGC 3DPBC
# FACESETS - set to true if you want to use facesets
# BGM_Variable - ID number of the variable for the Battle BGM
# changer
# BGM_Lock - ID number of the switch used to temporarily
# disable the option of changing the Battle BGM, for
# that, just turn the switch on and off to disable
# and enable this option
# WEAPONS_AND_ARMORS - set to false to not show weapons and armors in the
# Item screen
# QUEST_ITEMS - add any item IDs that are supposed to be quest
# items, so the CMS can separate them
# BATTLE_BGMS - add any battle BGMs you are using
# CMS_SKINS - add any skin name you are using
# CMS_FONTS - add any font name you are using, be sure to
# include the font install files in your game
# release as some people may not have those fonts
# installed
# SAVE_NAME - name of your savefiles (usually "Save")
# SAVE_EXTENSION - extension of your savefiles (usually "rxdata")
# SAVE_FILES_NUMBER - number of savefiles you are using (usually 4)
# MAP_BACKGROUND - set to true to show map as background, otherwise
# if BlizzCFG::CMS_EDITION is not nil or false the
# "CMSFullscreen" image will be displayed
# CUSTOM_ITEM_SCENE - set this to true if you want to use a different
# equip scene and make this CMS compatible even with
# exotic Item Systems
# CUSTOM_EQUIPMENT_SCENE - set this to true if you want to use a different
# equip scene and make this CMS compatible even with
# exotic Equipment Systems, change only if you have
# another Equipment Scene script ready
# CUSTOM_EQUIP_SCENE - set this to true if you want to use a different
# equip scene and make this CMS compatible even with
# exotic Equipment Systems
# CUSTOM_SKILL_SCENE - set this to true if you want to use a different
# skill scene and make this CMS compatible even with
# exotic Skill Systems
# CUSTOM_STATUS_SCENE - set this to true if you want to use a different
# status scene
# CUSTOM_OPTIONS_SCENE - set this to true if you want to use a different
# options scene, change only if you have another
# Options Scene script ready
# CUSTOM_END_SCENE - set this to true if you want to use a different
# end scene
# FONT_BACKGROUND_FIX - set this to true if you want dark font colors to
# be used in the menu, this comes in handy when the
# custom background images you use are bright
# WIN_MIRRORED - flips horizontally all window positions
# CMS_EDITION - set this to false or nil if you want to use
# Nemesis Edition, set to folder name where in the
# Pictures/CMS the images should be loaded from if
# you want to use custom images as background
#
# The syntax $game_system.get_cam can be used by an event (Call script
# command) to restore the user's setting of the KGC 3DPBC if a forced cam
# control was initiated during an event.
#
# You can use $game_system.reset_battle_bgm to reset the battle BGM to the
# player's menu setting if you have changed it for i.e. a boss fight via
# event.
#
#
# FAQ:
#
# - Problem:
# I get an error that some icons can't be found. how do I solve this?
#
# - Solution:
# Copy the icons from the demo or download them and place the into the Icons
# folder into another folder called "CMS". Done.
#
# - Problem:
# I still get an error.
#
# - Solution:
# Rename the icons. If your elements were renamed and don't have the standard
# names, your icons need to be renamed as well. Same goes for status effects.
# Also be sure to add new icons with new names if you have more than the
# basic 8 elements and/or more than the basic 16 status effects in your
# database.
#
# - Question:
# Can I use my own skins, icons, fonts, battle BGMs, etc...?
#
# - Answer:
# Of course. Only be sure to change the appropriate options in the script and
# to use the appropriate names, so everything can function normally after
# that.
#
# - Question:
# Can this CMS be connected with other scripts? If yes, how and how much work
# is it?
#
# - Answer:
# Yes, it can. A little bit of scripting and enhancing the functions of the
# CMS are needed if it is going to be connected with other scripts. How much
# of additional work it can cause only depends how big the script merge is. A
# simple changing of the battle menu to display status effects in icons
# should take between 15~30 minutes of scripting and testing. Adding another
# option into the Options menu should also take only 15~30 minutes of
# scripting and testing. Even adding an entire series of new windows or
# implementing another Scene into the menu also won't take more than 30
# minutes, because the menu itself works with the "sub-scene" system, saving
# this way RAM and CPU.
#
# - Question:
# What is the "sub-scene" system? Also I have tried other animated CMS-es.
# Why is this one so lag-free?
#
# - Answer:
# It is lag-free just because of the "sub-scene" system. This system is also
# used in the "Scene_Battle". It only creates windows and handels them when
# they are needed or used, otherwise they get disposed or not created at all.
# In this script this method is being used to a possible maximum.
#
# - Question:
# Is this for real? This CMS doesn't even have 3000 lines of code!
#
# - Answer:
# Actually not even 2500 if you don't count the instructions.
#
# - Question:
# How is such a large collection of features possible with so relatively few
# lines of code?!
#
# - Answer:
# Smart coding. =P
#
#
# Additional scripts/snipplets/add-ons:
#
# - Ultimate Font Override v1.0b (by Blizzard)
# - BGM/SFX Volume Control with volume correction v1.0b (by Blizzard)
# - Map Name/Location v1.0b (by Blizzard)
# - Elemental Vulnerability Graph v1.0b (by Blizzard)
# - Battle BGM control v2.0b (by Blizzard)
# - Options control layout and funcionality v4.0b (by Blizzard)
# - CMS layout/funcionality v5.0b (by Blizzard)
# - optimized code and delagged by "sub-scene" window handling (by Blizzard)
#
# If you experience the "Stack level too deep" error, you may already have
# one of the scripts listed above and it conflicts with itself, because of
# aliased recursive calling. Try removing script by script and testing
# everything. Don't forget to backup you Scripts.rxdata before doing so.
# Scripts.rxdata is a file that contains your current scripts and is located
# in the Data folder of your game folder.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#==============================================================================
# module BlizzCFG
#==============================================================================
module BlizzCFG
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# basic config
CAM_AVAILABLE = false
FACESETS = false
BGM_Variable = 49
BGM_Lock = 49
WEAPONS_AND_ARMORS = true
QUEST_ITEMS = [23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
# custom game configs
BATTLE_BGMS = [
# ['BGM_NAME', VOLUME, PITCH, 'DISPLAY_NAME']
['001-Battle01', 100, 100, 'BGM 1'],
['002-Battle02', 100, 100, 'BGM 2'],
['003-Battle03', 100, 100, 'BGM 3'],
['004-Battle04', 100, 100, 'BGM 4']]
CMS_SKINS = ['Original', 'Heavy Gold', 'Hell Breath', 'Liquid Water',
'Violent Violet', 'Ice Cool', 'Fatal Venom', 'Perfect Chaos',
'Blizzard Master']
CMS_FONTS = ['Arial', 'Future', 'Comic Sans MS', 'Brush Script', 'Tahoma',
'Times New Roman']
# save file options
SAVE_NAME = 'Save'
SAVE_EXTENSION = 'rxdata'
SAVE_FILES_NUMBER = 4
# extra options
MAP_BACKGROUND = true
CUSTOM_ITEM_SCENE = false
CUSTOM_EQUIPMENT_SCENE = false
CUSTOM_EQUIP_SCENE = false
CUSTOM_SKILL_SCENE = false
CUSTOM_STATUS_SCENE = false
CUSTOM_OPTIONS_SCENE = false
CUSTOM_END_SCENE = false
FONT_BACKGROUND_FIX = false
WIN_MIRRORED = false
CMS_EDITION = false # 'Metal-Plate'
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# change only if changed in the 3DPBC script
CAM_Variable = 25 if CAM_AVAILABLE
end
# for compatibility
$stormtronics_cms = 5.39
#==============================================================================
# Game_System
#==============================================================================
class Game_System
attr_accessor :bgm_volume
attr_accessor :sfx_volume
attr_accessor :cam
attr_reader :fontname
attr_reader :fontsize
alias init_storm_cms_later initialize
def initialize
init_storm_cms_later
@bgm_volume = @sfx_volume = 100
@cam = 0
if $tons_version != nil
if $tons_version >= 6.03 && !@BARS
@bar_style, @bar_opacity = 0, 255
end
if $tons_version < 1.6
self.fontname = 'Arial'
self.fontsize = 24
end
else
self.fontname = 'Arial'
self.fontsize = 24
end
end
def fontname=(name)
Font.default_name = $defaultfonttype = $fontface = @fontname = name
end
def fontsize=(size)
Font.default_size = $defaultfontsize = $fontsize = @fontsize = size
end
def get_cam
$game_variables[BlizzCFG::CAM_Variable] = @cam
return true
end
def reset_battle_bgm
bgm = BlizzCFG::BATTLE_BGMS[$game_variables[BlizzCFG::BGM_Variable]]
$game_system.battle_bgm = RPG::AudioFile.new(bgm[0], bgm[1], bgm[2])
return true
end
if $dream_music
def bgm_play(bgm)
@playing_bgm = bgm
if bgm != nil && bgm.name != ''
vol = correction(@bgm_volume)
dream_ed = bgm.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/BGM/', dream_ed, 0)
else
Audio.bgm_stop
end
Graphics.frame_reset
end
def bgs_play(bgs)
@playing_bgs = bgs
if bgs != nil && bgs.name != ''
vol = correction(@sfx_volume)
dream_ed = bgs.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/BGS/', dream_ed, 1)
else
Audio.bgs_stop
end
Graphics.frame_reset
end
def me_play(me)
if me != nil && me.name != ''
vol = correction(@bgm_volume)
dream_ed = me.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/ME/', dream_ed, 2)
else
Audio.me_stop
end
Graphics.frame_reset
end
def se_play(se)
if se != nil && se.name != ''
vol = correction(@sfx_volume)
dream_ed = se.clone
dream_ed.volume = dream_ed.volume * vol / 100
DREAM.play_encrypted_audio('Audio/SE/', dream_ed, 3)
end
end
else
def bgm_play(bgm)
@playing_bgm = bgm
if bgm != nil && bgm.name != ''
vol = correction(@bgm_volume)
Audio.bgm_play('Audio/BGM/' + bgm.name , bgm.volume * vol / 100, bgm.pitch)
else
Audio.bgm_stop
end
Graphics.frame_reset
end
def bgs_play(bgs)
@playing_bgs = bgs
if bgs != nil && bgs.name != ''
vol = correction(@sfx_volume)
Audio.bgs_play('Audio/BGS/' + bgs.name, bgs.volume * vol / 100, bgs.pitch)
else
Audio.bgs_stop
end
Graphics.frame_reset
end
def me_play(me)
if me != nil && me.name != ''
vol = correction(@bgm_volume)
Audio.me_play('Audio/ME/' + me.name, me.volume * vol / 100, me.pitch)
else
Audio.me_stop
end
Graphics.frame_reset
end
def se_play(se)
if se != nil && se.name != ''
vol = correction(@sfx_volume)
Audio.se_play('Audio/SE/' + se.name, se.volume * vol / 100, se.pitch)
end
end
end
def correction(volume)
case volume
when 100 then return 100
when 95 then return 97
when 90 then return 95
when 85 then return 92
when 80 then return 90
when 75 then return 87
when 70 then return 85
when 65 then return 82
when 60 then return 80
when 55 then return 77
when 50 then return 75
when 45 then return 72
when 40 then return 70
when 35 then return 65
when 30 then return 60
when 25 then return 55
when 20 then return 50
when 15 then return 40
when 10 then return 35
when 5 then return 25
end
return 0
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
def now_exp
return (@exp-@exp_list[@level])
end
def next_exp
return (@exp_list[@level+1] > 0 ? @exp_list[@level+1]-@exp_list[@level] : 0)
end
def test_equip(equip_type, id)
case equip_type
when 0 then old_id, @weapon_id = @weapon_id, id
when 1 then old_id, @armor1_id = @armor1_id, id
when 2 then old_id, @armor2_id = @armor2_id, id
when 3 then old_id, @armor3_id = @armor3_id, id
when 4 then old_id, @armor4_id = @armor4_id, id
end
tested = [self.maxhp, self.maxsp, self.atk, self.pdef, self.mdef, self.str,
self.dex, self.agi, self.int, self.eva]
case equip_type
when 0 then @weapon_id = old_id
when 1 then @armor1_id = old_id
when 2 then @armor2_id = old_id
when 3 then @armor3_id = old_id
when 4 then @armor4_id = old_id
end
return tested
end
end
#==============================================================================
# Scene_Title
#==============================================================================
class Scene_Title
alias main_storm_cms_later main
def main
$map_infos = load_data('Data/MapInfos.rxdata')
$map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name}
main_storm_cms_later
end
end
#==============================================================================
# Game_Map
#==============================================================================
class Game_Map
def name
return $map_infos[@map_id]
end
end
#==============================================================================
# Bitmap
#==============================================================================
class Bitmap
if $tons_version == nil || $tons_version < 3.71
alias init_ultimate_font_override_later initialize
def initialize(w, h = nil)
if w.is_a?(Numeric) && h.is_a?(Numeric)
init_ultimate_font_override_later(w, h)
else
init_ultimate_font_override_later(w)
end
if $game_system != nil && $game_system.fontname != nil &&
!$scene.is_a?(Scene_Title)
self.font.name = $game_system.fontname
self.font.size = $game_system.fontsize
else
self.font.name = Font.default_name
self.font.size = Font.default_size
end
end
def gradient_bar(x, y, w, color1, color2, color3, rate, flag = false)
offset = 5
x += offset
y += 26
(0...offset+3).each {|i| fill_rect(x-i, y+i-2, w+3, 1, Color.new(0, 0, 0))}
(0...offset+1).each {|i| fill_rect(x-i, y+i-1, w+1, 1, Color.new(255, 255, 255))}
(0...w+offset).each {|i|
red = color3.red * i / (w + offset)
green = color3.green * i / (w + offset)
blue = color3.blue * i / (w + offset)
oy = i < offset ? offset-i : 0
off = i < offset ? i : i > w ? w+offset-i : offset
fill_rect(x+i-offset+1, y+oy-1, 1, off, Color.new(red, green, blue))}
if (w*rate).to_i >= offset
(0...(w*rate).to_i+offset).each {|i|
red = color1.red + (color2.red-color1.red)*i/((w+offset)*rate)
green = color1.green + (color2.green-color1.green)*i/((w+offset)*rate)
blue = color1.blue + (color2.blue-color1.blue)*i/((w+offset)*rate)
oy = i < offset ? offset-i : 0
off = i < offset ? i : i > w*rate ? (w*rate).to_i+offset-i : offset
fill_rect(x+i-offset+1, y+oy-1, 1, off, Color.new(red, green, blue))}
else
(0...(w*rate).to_i).each {|i| (0...offset-1).each {|j|
red = color1.red + (color2.red-color1.red) * i / (w * rate)
green = color1.green + (color2.green-color1.green) * i / (w * rate)
blue = color1.blue + (color2.blue-color1.blue) * i / (w * rate)
set_pixel(x+i-j+1, y+j-1, Color.new(red, green, blue))}}
end
end
end
def draw_element_graph(x_plus, y_plus, rad, color, limit = -1)
(-rad-1...0).each {|r| (r...0).each {|x|
color.alpha = 255 * (rad+1.0-r.abs)/(rad+1)
y = (r.abs * Math.sin(Math.acos(x/r.to_f))).to_i
h = y * 2
case limit
when 1, 8 then h = (y < x.abs ? 0 : y - x.abs)
when 2, 7 then y > x.abs ? h = y = x.abs : h = y
when 3, 6
y > x.abs ? h = y = x.abs : h = y
y = 0 if y > 0
when 4, 5 then h, y = (y < x.abs ? 0 : y - x.abs), -x.abs
end
if limit < 5
fill_rect(rad*2-x + x_plus, rad-y + y_plus, 1, h, color)
else
fill_rect(rad*2+x+1 + x_plus, rad-y + y_plus, 1, h, color)
end}}
end
end
#==============================================================================
# Window_Base
#==============================================================================
class Window_Base < Window
alias st_cms_hybrid_hack_init initialize
def initialize(xx, yy, w, h)
st_cms_hybrid_hack_init(xx, yy, w, h)
if BlizzCFG::CMS_EDITION && @background != nil
@backsprite = Sprite.new
@backsprite.bitmap = RPG::Cache.picture("CMS/#{BlizzCFG::CMS_EDITION}/#{@background}")
self.opacity, @backsprite.x, @backsprite.y = 0, self.x, self.y
end
end
alias st_cms_hybrid_hack_x_ x=
def x=(xx)
st_cms_hybrid_hack_x_($scene.is_a?(Scene_Menu) && BlizzCFG::WIN_MIRRORED ? 640-width-xx : xx)
@backsprite.x = xx unless @backsprite == nil || @backsprite.disposed?
end
alias st_cms_hybrid_hack_y_ y=
def y=(yy)
st_cms_hybrid_hack_y_(yy)
@backsprite.y = yy unless @backsprite == nil || @backsprite.disposed?
end
alias st_cms_hybrid_hack_x x
def x
xx = st_cms_hybrid_hack_x
return ($scene.is_a?(Scene_Menu) && BlizzCFG::WIN_MIRRORED ? 640-width-xx : xx)
end
alias st_cms_hybrid_hack_z z=
def z=(z)
st_cms_hybrid_hack_z(z)
@backsprite.z = z unless @backsprite == nil || @backsprite.disposed?
end
alias st_cms_hybrid_hack_width width=
def width=(w)
self.x += w-width if $scene.is_a?(Scene_Menu) && BlizzCFG::WIN_MIRRORED
st_cms_hybrid_hack_width(w)
end
alias st_cms_hybrid_hack_visible visible=
def visible=(expr)
st_cms_hybrid_hack_visible(expr)
@backsprite.visible = expr unless @backsprite == nil || @backsprite.disposed?
end
alias disp_sprite_later dispose
def dispose
@backsprite.dispose unless @backsprite == nil || @backsprite.disposed?
disp_sprite_later
end
alias st_cms_hybrid_hack_normal_color normal_color
def normal_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(0, 0, 0)
else
return st_cms_hybrid_hack_normal_color
end
end
alias st_cms_hybrid_hack_system_color system_color
def system_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(160, 0, 255)
else
return st_cms_hybrid_hack_system_color
end
end
alias st_cms_hybrid_hack_disabled_color disabled_color
def disabled_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(96, 96, 96)
else
return st_cms_hybrid_hack_disabled_color
end
end
alias st_cms_hybrid_hack_crisis_color crisis_color
def crisis_color
if $scene.is_a?(Scene_Menu) && BlizzCFG::FONT_BACKGROUND_FIX
return Color.new(192, 192, 0)
else
return st_cms_hybrid_hack_crisis_color
end
end
alias draw_actor_graphic_st_cms_later draw_actor_graphic
def draw_actor_graphic(actor, x, y)
if actor != nil && actor.character_name != ''
if self.is_a?(Window_CMSMenuStatus) && BlizzCFG::FACESETS
bitmap = RPG::Cache.character("#{actor.character_name}_face", actor.character_hue)
x -= bitmap.width / 2
y -= bitmap.height
draw_actor_face_st_cms(actor, x, y)
else
draw_actor_graphic_st_cms_later(actor, x, y)
end
end
end
def draw_actor_face_st_cms(actor, x, y)
if $tons_version == nil || $tons_version < 3.71 || !FACE_HUE
hue = 0
else
hue = (FACE_HUE ? actor.character_hue : 0)
end
bitmap = RPG::Cache.character("#{actor.character_name}_face", hue)
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(x, y, bitmap, src_rect)
end
def draw_actor_battler(actor, x, y)
if actor != nil && actor.battler_name != ''
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw,ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
end
def draw_actor_exp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 48, 32, 'EXP')
if actor.exp_s.to_i > 999999
w = self.contents.text_size('999999').width
else
w = self.contents.text_size(actor.exp_s).width
end
if actor.next_exp_s.to_i > 999999
w2 = self.contents.text_size('999999').width
else
w2 = self.contents.text_size(actor.next_exp_s).width
end
self.contents.font.color = normal_color
self.contents.draw_text(x + 108 - w2, y, w2, 32, actor.exp_s, 2)
self.contents.draw_text(x + 108, y, 12, 32, '/', 1)
self.contents.draw_text(x + 120, y, w2, 32, actor.next_exp_s)
end
def draw_actor_exp_alt(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 64, 32, 'next')
self.contents.font.color = normal_color
self.contents.draw_text(x + 56, y, 84, 32, actor.next_rest_exp_s, 2)
end
def draw_actor_name2(actor, x, y, w, a)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, w, 32, actor.name, a)
end
def up_color
return Color.new(0, 255, 0)
end
def down_color
return Color.new(255, 0, 0)
end
alias draw_actor_parameter_st_cms_later draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
if type == 7
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, 'Evasion')
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
else
draw_actor_parameter_st_cms_later(actor, x, y, type)
end
end
def draw_actor_element_vulnerability(actor, x, y, rad = 60)
colors = []
(1..8).each {|i|
rate = actor.element_rate(i)
if rate < 0
colors.push(Color.new(0, 255 * (100-rate.abs) / 200, 255))
elsif rate == 0
colors.push(Color.new(0, 128, 255))
elsif rate <= 50
colors.push(Color.new(0, 255 * (rate+50) / 100, 255 * (50-rate) / 50))
elsif rate <= 100
colors.push(Color.new(255 * (rate-50) / 50 , 255, 0))
elsif rate <= 200
colors.push(Color.new(255, 255 * (200-rate) / 100, 0))
else
colors.push(normal_color)
end}
(1..8).each {|i|
self.contents.draw_element_graph(x + 16, y + 32, rad, colors[i-1], i)}
save_color = self.contents.font.color.clone
(1..8).each {|i|
str1 = $data_system.elements[i]
str2 = "#{actor.element_rate(i)}%"
w1 = self.contents.text_size(str1).width
w2 = self.contents.text_size(str2).width
case i
when 1 then x2, y2, x3, y3 = x+152, y+20, x+168, y+4
when 2 then x2, y2, x3, y3 = x+176, y+56, x+192, y+40
when 3 then x2, y2, x3, y3 = x+176, y+92, x+192, y+108
when 4 then x2, y2, x3, y3 = x+152, y+128, x+168, y+144
when 5 then x2, y2, x3, y3 = x+120-w1, y+128, x+104-w2, y+144
when 6 then x2, y2, x3, y3 = x+96-w1, y+92, x+80-w2, y+108
when 7 then x2, y2, x3, y3 = x+96-w1, y+56, x+80-w2, y+40
when 8 then x2, y2, x3, y3 = x+120-w1, y+20, x+104-w2, y+4
end
self.contents.font.color = save_color
self.contents.draw_text(x2, y2, w1, 32, str1)
self.contents.font.color = colors[i-1]
self.contents.draw_text(x3, y3, w2, 32, str2)}
self.contents.font.color = save_color
end
if $Blizz_Art
alias draw_actor_exp_blizzart_later draw_actor_exp
def draw_actor_exp(actor, x, y, w = 148)
if $game_system.BARS
w -= 12
rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
if rate < 0.5
color1 = Color.new(20 * rate, 60, 80, 192)
color2 = Color.new(60 * rate, 180, 240, 192)
elsif rate >= 0.5
color1 = Color.new(20 + 120 * (rate-0.5), 60 + 40 * (rate-0.5), 80, 192)
color2 = Color.new(60 + 360 * (rate-0.5), 180 + 120 * (rate-0.5), 240, 192)
end
color3 = Color.new(80, 80, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
end
draw_actor_exp_blizzart_later(actor, x, y)
end
alias draw_actor_exp_new2 draw_actor_exp_alt
def draw_actor_exp_alt(actor, x, y, w = 148)
w -= 12
rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
if rate < 0.5
color1 = Color.new(20 * rate, 60, 80)
color2 = Color.new(60 * rate, 180, 240)
elsif rate >= 0.5
color1 = Color.new(20 + 120 * (rate-0.5), 60 + 40 * (rate-0.5), 80)
color2 = Color.new(60 + 360 * (rate-0.5), 180 + 120 * (rate-0.5), 240)
end
color3 = Color.new(80, 80, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
draw_actor_exp_new2(actor, x, y)
end
end
end
#==============================================================================
# Window_CMSCommand
#==============================================================================
class Window_CMSCommand < Window_Command
attr_reader :continue
def initialize(index, continue)
@background = 'CMSCommand'
commands = [$data_system.words.item, 'Equipment', $data_system.words.equip,
$data_system.words.skill, 'Status', 'Options', 'Exit']
super(180, commands)
@continue, self.index, self.x, self.y, self.z = continue, index, 972, 0, 999
end
def draw_item(i, color)
self.contents.fill_rect(0, i*32, 148, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon("CMS/commandmenu#{i}")
opacity = (color == normal_color ? 255 : 128)
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.font.color = color
self.contents.draw_text(32, i*32, 148, 32, @commands[i])
end
end
#==============================================================================
# Window_CMSChooseItem
#==============================================================================
class Window_CMSChooseItem < Window_Selectable
def initialize
@background = 'CMSHelp'
super(0, -576, 640, 64)
@commands = ['Items', 'Sort', 'Quest Items']
@item_max = @column_max = @commands.size
self.contents = Bitmap.new(width - 32, 32)
refresh
self.active, self.z, self.index = true, 2900, 0
end
def refresh
self.contents.clear
(0...@item_max).each {|i| draw_item(i, normal_color)}
end
def draw_item(i, color)
self.contents.font.color = color
self.contents.fill_rect(8 + 212*i, 0, 164, 32, Color.new(0, 0, 0, 0))
self.contents.draw_text(8 + 212*i, 0, 164, 32, @commands[i], 1)
end
end
#==============================================================================
# Window_CMSOptions
#==============================================================================
class Window_CMSOptions < Window_Selectable
attr_accessor :current_font
attr_reader :current_skin
attr_reader :skin_name
attr_reader :font_name
def initialize
@background = 'CMSFullscreen'
super(0, 512, 640, 480)
@commands = ['BGM Volume', 'SFX Volume', 'Battle BGM']
@commands.push('Battle Cam') if BlizzCFG::CAM_AVAILABLE
@commands.push('Bar Style', 'Bar Opacity') if $Blizz_Art
@commands.push('Font', 'Windowskin')
get_skin_and_font
self.contents = Bitmap.new(width - 32, height - 32)
self.z, self.index = 2999, 0
@item_max = @commands.size
refresh
end
def get_option
return @commands[index]
end
def refresh
self.contents.clear
self.contents.font.name = $game_system.fontname
(0...@item_max).each {|i|
self.contents.font.color = normal_color
self.contents.fill_rect(24, 16 + i*36, 192, 32, Color.new(0, 0, 0, 0))
self.contents.draw_text(24, 16 + i*36, 192, 32, @commands[i])
draw_arrows(288, 4 + i*36)
case @commands[i]
when 'BGM Volume' then draw_volume(288, 4 + i*36)
when 'SFX Volume' then draw_volume(288, 4 + i*36, true)
when 'Battle BGM' then draw_battle_bgm(288, 4 + i*36)
when 'Battle Cam' then draw_battle_cam(288, 4 + i*36)
when 'Bar Style' then draw_style(288, 4 + i*36)
when 'Bar Opacity' then draw_opacity(288, 4 + i*36)
when 'Font' then draw_font(288, 4 + i*36)
when 'Windowskin' then draw_skin(288, 4 + i*36)
end}
end
def draw_arrows(x, y)
self.contents.draw_text(x - 32, y + 13, 32, 32, '<<')
self.contents.draw_text(x + 249, y + 13, 32, 32, '>>')
end
def draw_volume(x, y, mode = false, width = 224)
volume = (mode ? $game_system.sfx_volume.to_f : $game_system.bgm_volume.to_f)
vol = volume.to_f / 100
color1 = Color.new(20, 40, 80, 192)
color2 = Color.new(60, 120, 240, 192)
color3 = Color.new(0, 0, 80, 192)
old, $game_system.bar_opacity = $game_system.bar_opacity, 255 if $Blizz_Art
self.contents.gradient_bar(x, y, width, color1, color2, color3, vol, true)
$game_system.bar_opacity = old if $Blizz_Art
end
def draw_style(x, y, width = 224)
color1 = Color.new(80, 80, 0, 192)
color2 = Color.new(240, 240, 0, 192)
self.contents.gradient_bar(x + 32, y, width - 64, color1, color2, color1, 1, true)
end
def draw_battle_bgm(x, y, width = 224)
bgm = BlizzCFG::BATTLE_BGMS[$game_variables[BlizzCFG::BGM_Variable]][3]
if $game_switches[BlizzCFG::BGM_Lock] || BlizzCFG::BATTLE_BGMS.size <= 1
self.contents.font.color = Color.new(0, 0, 0, 255)
self.contents.draw_text(x+1, y + 13+1, 224, 32, bgm, 1)
self.contents.font.color = disabled_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(x, y + 13, 224, 32, bgm, 1)
end
def draw_battle_cam(x, y, width = 224)
cam = ($game_variables[BlizzCFG::CAM_Variable] == 0 ? 'ON' : 'OFF')
self.contents.draw_text(x, y + 13, 224, 32, cam, 1)
end
def draw_opacity(x, y, width = 224)
alpha = case $game_system.bar_opacity
when 0 then 'No Bar'
when 1..85 then 'Light'
when 86..170 then 'Medium'
when 171..254 then 'Hard'
when 255 then 'Full'
end
self.contents.draw_text(x, y + 13, 224, 32, alpha, 1)
end
def draw_font(x, y, width = 224)
@font_name = BlizzCFG::CMS_FONTS[@current_font]
self.contents.font.name = @font_name
self.contents.draw_text(x, y + 13, 224, 32, @font_name, 1)
self.contents.font.name = $game_system.fontname
end
def draw_skin(x, y, width = 224)
@skin_name = BlizzCFG::CMS_SKINS[self.current_skin]
self.contents.draw_text(x, y + 13, 224, 32, @skin_name, 1)
self.contents.fill_rect(x + 48, y +428, 128, 128, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.windowskin(@skin_name)
self.contents.blt(x + 50, y + 50, bitmap, Rect.new(2, 2, 124, 124))
self.contents.blt(x + 48, y + 48, bitmap, Rect.new(128, 0, 16, 16))
self.contents.blt(x + 160, y + 48, bitmap, Rect.new(176, 0, 16, 16))
self.contents.blt(x + 48, y + 160, bitmap, Rect.new(128, 48, 16, 16))
self.contents.blt(x + 160, y + 160, bitmap, Rect.new(176, 48, 16, 16))
(2..4).each {|i|
self.contents.blt(x+i*32, y+48, bitmap, Rect.new(144, 0, 32, 16))}
(2..4).each {|i|
self.contents.blt(x+i*32, y+160, bitmap, Rect.new(144, 48, 32, 16))}
(2..4).each {|i|
self.contents.blt(x+48, y+i*32, bitmap, Rect.new(128, 16, 16, 32))}
(2..4).each {|i|
self.contents.blt(x+160, y+i*32, bitmap, Rect.new(176, 16, 16, 32))}
end
def current_skin
return (@current_skin == nil ? 0 : @current_skin)
end
def current_skin=(val)
@current_skin = (val.is_a?(Numeric) ? val : 0)
end
def get_skin_and_font
@font_name = $game_system.fontname
@current_font = BlizzCFG::CMS_FONTS.index(@font_name)
@skin_name = $game_system.windowskin_name
self.current_skin = BlizzCFG::CMS_SKINS.index(@skin_name)
end
def update_cursor_rect
if self.index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(16, @index*36 + 16, 128, 32)
end
end
end
#==============================================================================
# Window_CMSTarget
#==============================================================================
class Window_CMSTarget < Window_Base
attr_reader :index
attr_reader :actor
attr_reader :dir
def initialize(actor, mode = false)
@background = 'CMSTarget'
super(-304, 64, 256, 104)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, @item_max = actor, 1
self.y += actor.index*104 unless mode
self.z = 3999
self.index = -1
refresh
end
def index=(i)
@index = i
update_cursor_rect
end
def refresh
self.contents.clear
draw_actor_name(@actor, 4, -4)
draw_actor_state(@actor, 100, -4, 112)
draw_actor_hp(@actor, 44, 16)
draw_actor_sp(@actor, 44, 38)
end
def update_actor(actor)
@actor = actor
refresh
end
def dir=(val)
self.y -= val*40
@dir = val
end
def update(i = @actor.index - 1)
unless self.index == -2
if @actor.index == i
self.index = 0 if self.index == -1
else
self.index = -1 if self.index == 0
end
end
self.y = 64+@actor.index*104 unless self.active
@dir = 0 if (self.y-64) / 104 * 104 == self.y-64
super()
update_cursor_rect
end
def update_cursor_rect
if !self.active || self.index == -1
self.cursor_rect.empty
elsif self.index >= 0
self.cursor_rect.set(0, @index * 96, 224, 72)
elsif self.index == -2
self.cursor_rect.set(0, 0, 224, 72)
end
end
end
#==============================================================================
# Window_Help
#==============================================================================
class Window_Help < Window_Base
alias init_storm_cms_later initialize
def initialize
@background = 'CMSHelp' if $scene.is_a?(Scene_Menu)
init_storm_cms_later
refresh
end
def refresh
self.contents.font.name = $game_system.fontname
end
end
#==============================================================================
# Window_CMSItem
#==============================================================================
class Window_CMSItem < Window_Selectable
def initialize
@background = 'CMSItem'
super(256, -512, 384, 416)
self.active, self.visible, self.z, self.index = false, false, 2999, -1
refresh
end
def data
return @data[self.index]
end
def draw_item(i)
number = case @data[i]
when RPG::Item then $game_party.item_number(@data[i].id)
when RPG::Weapon then $game_party.weapon_number(@data[i].id)
when RPG::Armor then $game_party.armor_number(@data[i].id)
end
if @data[i].is_a?(RPG::Item) && $game_party.item_can_use?(@data[i].id) ||
@mode == nil
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
self.contents.fill_rect(4, i*32, 352, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(@data[i].icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(4, i*32 + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(308, i*32, 16, 32, ':', 1)
self.contents.draw_text(324, i*32, 24, 32, number.to_s, 2)
end
def update_help
@help_window.set_text(data == nil ? '' : data.description)
end
end
#==============================================================================
# Window_NormalItem
#==============================================================================
class Window_NormalItem < Window_CMSItem
attr_accessor :mode
def initialize
@mode = 0
super
self.visible = true
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
data1, data2, data3 = [], [], []
(1...$data_items.size).each {|i|
if $game_party.item_number(i) > 0 && !BlizzCFG::QUEST_ITEMS.include?(i)
data1.push($data_items[i])
end}
if BlizzCFG::WEAPONS_AND_ARMORS
(1...$data_weapons.size).each {|i|
data2.push($data_weapons[i]) if $game_party.weapon_number(i) > 0}
(1...$data_armors.size).each {|i|
data3.push($data_armors[i]) if $game_party.armor_number(i) > 0}
end
if [1, 2].include?(@mode)
data1.sort! {|a, b|
$game_party.item_number(a.id) <=> $game_party.item_number(b.id)}
data2.sort! {|a, b|
$game_party.weapon_number(a.id) <=> $game_party.weapon_number(b.id)}
data3.sort! {|a, b|
$game_party.armor_number(a.id) <=> $game_party.armor_number(b.id)}
[data1, data2, data3].each {|ary| ary.reverse!} if @mode == 2
elsif [3, 4].include?(@mode)
[data1, data2, data3].each {|ary| ary.sort! {|a, b| a.name <=> b.name}}
[data1, data2, data3].each {|ary| ary.reverse!} if @mode == 4
end
@data = data1 + data2 + data3
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
end
#==============================================================================
# Window_QuestItem
#==============================================================================
class Window_QuestItem < Window_CMSItem
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
(1...$data_items.size).each {|i|
if $game_party.item_number(i) > 0 && BlizzCFG::QUEST_ITEMS.include?(i)
@data.push($data_items[i])
end}
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
end
#==============================================================================
# Window_EquipmentItem
#==============================================================================
class Window_EquipmentItem < Window_CMSItem
attr_accessor :item_max
def initialize(actor)
@actor = actor
super()
self.x, self.y, self.z, self.index = 256, -548, 2999, 0
self.active = self.visible = true
end
def update_actor(actor)
@actor = actor
refresh
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
(1...$data_weapons.size).each {|i|
@data.push($data_weapons[i]) if $game_party.weapon_number(i) > 0}
(1...$data_armors.size).each {|i|
@data.push($data_armors[i]) if $game_party.armor_number(i) > 0}
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
def draw_item(i)
case @data[i]
when RPG::Weapon
if @actor.equippable?($data_weapons[@data[i].id])
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
number = $game_party.weapon_number(@data[i].id)
when RPG::Armor
if @actor.equippable?($data_armors[@data[i].id])
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
number = $game_party.armor_number(@data[i].id)
end
self.contents.fill_rect(4, i*32, 352, 32, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(@data[i].icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(308, i*32, 16, 32, ':', 1)
self.contents.draw_text(324, i*32, 24, 32, number.to_s, 2)
end
end
#==============================================================================
# Window_CMSSkill
#==============================================================================
class Window_CMSSkill < Window_CMSItem
def initialize(actor)
@actor = actor
super()
self.x, self.y, self.z, self.index = -512, 64, 2999, 0
self.active = self.visible = true
end
def update_actor(actor)
@actor = actor
refresh
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
@actor.skills.each {|id| @data.push($data_skills[id])}
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32) if @item_max > 0
(0...@item_max).each {|i| draw_item(i)}
end
def draw_item(i)
self.contents.fill_rect(4, i*32, 352, 32, Color.new(0, 0, 0, 0))
if @actor.skill_can_use?(@data[i].id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
bitmap = RPG::Cache.icon(@data[i].icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
text = @data[i].name
tons = ($tons_version != nil ? $tons_version : 0)
if tons >= 4.0 && TONS_OF_ADDONS::EQUAP_SKILLS && DISPLAY_AP_REQ
aps = BlizzCFG.maxap(@data[i].id)
if aps > 0
text += " (#{@actor.ap(@data[i].id)}/#{aps})"
elsif DISPLAY_AP_ZERO
text += ' (0/0)'
end
end
self.contents.draw_text(32, i*32, 204, 32, text)
if @data[i].sp_cost > 0
sp_cost = @data[i].sp_cost
if tons >= 6.54 && $game_system.SP_COST_MOD
sp_cost = BlizzCFG.get_cost_mod(@actor.states, sp_cost)
end
self.contents.draw_text(292, i*32, 48, 32, sp_cost.to_s, 2)
end
end
end
#==============================================================================
# Window_CMSEquipLeft
#==============================================================================
class Window_CMSEquipLeft < Window_Base
attr_accessor :mode
attr_accessor :current
attr_accessor :changed
def initialize(actor)
@background = 'CMSEquipLeft'
super(640, 64, 288, 416)
self.contents = Bitmap.new(width - 32, height - 32)
@current = @changed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
@elements, @states, @actor, @mode, self.z = [], [], actor, 0, 2999
refresh
end
def update_actor(actor)
@actor = actor
refresh
end
def draw_actor_hp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 96, 32, "max #{$data_system.words.hp}")
self.contents.font.color = normal_color
self.contents.draw_text(x + 108, y, 48, 32, actor.maxhp.to_s, 2)
end
def draw_actor_sp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 96, 32, "max #{$data_system.words.sp}")
self.contents.font.color = normal_color
self.contents.draw_text(x + 108, y, 48, 32, actor.maxsp.to_s, 2)
end
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_level(@actor, 180, 0)
draw_actor_hp(@actor, 4, 28)
draw_actor_sp(@actor, 4, 52)
(0..7).each {|i| draw_actor_parameter(@actor, 4, 76 + i*24, i)}
if @mode == 0
self.contents.font.color = up_color
self.contents.draw_text(4, 276, 200, 32, 'Elemental attack:')
self.contents.draw_text(4, 324, 200, 32, 'Status attack:')
elsif @mode == 1
self.contents.font.color = up_color
self.contents.draw_text(4, 276, 200, 32, 'Elemental resistance:')
self.contents.draw_text(4, 324, 200, 32, 'Status resistance:')
end
self.contents.font.color = normal_color
draw_elements(4, 300)
draw_states(4, 348)
@current.each_index {|i|
val = @current[i] - @changed[i]
if val != 0
self.contents.font.color = system_color
self.contents.draw_text(162, 28+i*24, 40, 32, '»»', 1)
self.contents.font.color = (val > 0 ? down_color : up_color)
self.contents.draw_text(204, 28+i*24, 48, 32, @changed[i].abs.to_s, 2)
end}
end
def set_new_parameters(elements, states)
@elements, @states = elements, states
refresh
end
def draw_elements(x, y)
@elements.each_index {|i|
icon = RPG::Cache.icon("CMS/elm_#{$data_system.elements[@elements[i]].downcase}")
self.contents.blt(x + i*28, y + 4, icon, Rect.new(0, 0, 24, 24))}
end
def draw_states(x, y)
@states.each_index {|i|
icon = RPG::Cache.icon("CMS/stat_#{$data_states[@states[i]].name.downcase}")
self.contents.blt(x + i*28, y + 4, icon, Rect.new(0, 0, 24, 24))}
end
end
#==============================================================================
# Window_CMSEquipRight
#==============================================================================
class Window_CMSEquipRight < Window_Selectable
def initialize(actor)
@background = 'CMSEquipRight'
super(928, 64, 352, 192)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, self.active, self.z, self.index = actor, true, 2999, 0
refresh
end
def data
return @data[self.index]
end
def update_actor(actor)
@actor = actor
refresh
end
def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
self.contents.draw_text(4, 32 * 0, 120, 32, $data_system.words.weapon)
self.contents.draw_text(4, 32 * 1, 120, 32, $data_system.words.armor1)
self.contents.draw_text(4, 32 * 2, 120, 32, $data_system.words.armor2)
self.contents.draw_text(4, 32 * 3, 120, 32, $data_system.words.armor3)
self.contents.draw_text(4, 32 * 4, 120, 32, $data_system.words.armor4)
(0...5).each {|i| draw_item_name(@data[i], 120, 32 * i)}
end
def update_help
@help_window.set_text(data == nil ? '' : data.description)
end
end
#==============================================================================
# Window_CMSEquipItem
#==============================================================================
class Window_CMSEquipItem < Window_Selectable
def initialize(actor, equip_type)
@background = 'CMSEquipItem'
super(928, 256, 352, 224)
self.active = self.visible = false
@actor, @equip_type, self.z, self.index = actor, equip_type, 3000, -1
refresh
end
def data
return @data[self.index]
end
def update_actor(actor, equip_type)
@actor = actor
@equip_type = equip_type
refresh
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
(1...$data_weapons.size).each {|i|
if $game_party.weapon_number(i) > 0 && weapon_set.include?(i)
@data.push($data_weapons[i])
end}
else
armor_set = $data_classes[@actor.class_id].armor_set
(1...$data_armors.size).each {|i|
if $game_party.armor_number(i) > 0 && armor_set.include?(i)
@data.push($data_armors[i]) if $data_armors[i].kind == @equip_type-1
end}
end
@data.push(nil)
@item_max = @data.size
self.contents = Bitmap.new(width - 32, @item_max * 32)
(0...@item_max-1).each {|i| draw_item(i)}
self.contents.font.color = system_color
self.contents.draw_text(4, (@item_max-1)*32, 100, 32, '[Unequip]')
end
def draw_item(i)
number = case @data[i]
when RPG::Weapon then $game_party.weapon_number(@data[i].id)
when RPG::Armor then $game_party.armor_number(@data[i].id)
end
self.contents.font.color = normal_color
bitmap = RPG::Cache.icon(@data[i].icon_name)
self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(212, i*32, 16, 32, ':', 1)
self.contents.draw_text(228, i*32, 24, 32, number.to_s, 2)
end
def update_help
@help_window.set_text(data == nil ? '' : data.description)
end
end
#==============================================================================
# Window_CMSStatus
#==============================================================================
class Window_CMSStatus < Window_Base
def initialize(actor)
@background = 'CMSFullscreen'
super(0, 512, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor, self.active, self.z = actor, true, 2999
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(224, 0, 120, 32, @actor.name, 1)
draw_actor_battler(@actor, 284, 232)
draw_actor_class(@actor, 400, 32)
draw_actor_level(@actor, 400, 0)
draw_actor_state(@actor, 400, 64, 168)
draw_actor_hp(@actor, 400, 92, 172)
draw_actor_sp(@actor, 400, 122, 172)
if $crls
if BlizzCFG::DRAW_SR_BAR
draw_actor_sr_with_bar(@actor, 400, 152, 172)
else
draw_actor_sr(@actor, 400, 152, 172)
end
draw_actor_exp(@actor, 400, 182, 172)
else
draw_actor_exp(@actor, 400, 152, 172)
end
(0..7).each {|i| draw_actor_parameter(@actor, 4, i*28, i)}
self.contents.font.color = system_color
w = self.contents.text_size('Elemental Vulnerability').width
self.contents.draw_text(365, 244, w, 32, 'Elemental Vulnerability')
self.contents.font.size -= 4
draw_actor_element_vulnerability(@actor, 320, 268)
self.contents.font.size += 4
self.contents.font.color = system_color
self.contents.draw_text(84, 244, 96, 32, 'Equipment')
self.contents.draw_text(4, 276, 96, 32, $data_system.words.weapon)
self.contents.draw_text(4, 308, 96, 32, $data_system.words.armor1)
self.contents.draw_text(4, 340, 96, 32, $data_system.words.armor2)
self.contents.draw_text(4, 372, 96, 32, $data_system.words.armor3)
self.contents.draw_text(4, 404, 96, 32, $data_system.words.armor4)
equips = [$data_weapons[@actor.weapon_id], $data_armors[@actor.armor1_id],
$data_armors[@actor.armor2_id], $data_armors[@actor.armor3_id],
$data_armors[@actor.armor4_id]]
equips.each_index {|i|
if @actor.equippable?(equips[i])
draw_item_name(equips[i], 108, 276 + i*32)
else
self.contents.font.color = (i == 0 ? knockout_color : crisis_color)
self.contents.draw_text(108, 276 + i*32, 192, 32, 'Nothing equipped')
end}
end
def update_actor(actor)
@actor = actor
refresh
end
end
#==============================================================================
# Window_CMSSortCommand
#==============================================================================
class Window_CMSSortCommand < Window_Command
def initialize
@background = 'CMSMini'
super(180, ['Standard', 'by quantity', 'by alphabet'])
self.x, self.y, self.z = 224, -128, 9999
end
end
#==============================================================================
# Window_CMSEndCommand
#==============================================================================
class Window_CMSEndCommand < Window_Command
def initialize
@background = 'CMSMini'
super(180, ['Back to game', 'Back to title', 'Exit game'])
self.x, self.y, self.z = 460, 524, 3999
end
end
#==============================================================================
# Window_CMSInfo
#==============================================================================
class Window_CMSInfo < Window_Base
def initialize
@background = 'CMSInfo'
super(0, 0, 180, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.active, self.x, self.y, self.z = false, 460, 832, 1999
refresh
end
def refresh
self.contents.clear
self.contents.font.name = $game_system.fontname
@double_sec = Graphics.frame_count * 2 / Graphics.frame_rate
total_sec = @double_sec / 2
hour, min, sec = total_sec / 60 / 60, total_sec / 60 % 60, total_sec % 60
if @double_sec % 2 == 1
text = sprintf('%02d %02d %02d', hour, min, sec)
else
text = sprintf('%02d:%02d:%02d', hour, min, sec)
end
self.contents.font.color = system_color
cx = contents.text_size($data_system.words.gold).width
self.contents.draw_text(148-cx, 32, cx, 32, $data_system.words.gold, 2)
self.contents.draw_text(0, 64, 148, 32, 'Location:')
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, 148, 32, text, 1)
self.contents.draw_text(0, 32, 144-cx, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(0, 96, 148, 32, $game_map.name, 2)
end
def update
super
refresh if Graphics.frame_count * 2 / Graphics.frame_rate != @double_sec
end
end
#==============================================================================
# Window_CMSMenuStatus
#==============================================================================
class Window_CMSMenuStatus < Window_Base
attr_reader :index
attr_reader :actor
attr_reader :dir
def initialize(actor)
@background = 'CMSMenuStatus'
super(0, 0, 460, 120)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
@dir = 0
refresh
self.active = false
self.index = -1
self.x, self.y, self.z = -512, @actor.index * 120, 999
end
def index=(i)
@index = i
update_cursor_rect
end
def refresh
self.contents.clear
self.contents.font.name = $game_system.fontname
self.contents.font.color = normal_color
draw_actor_graphic(@actor, 56, 80)
draw_actor_name2(@actor, 8, 0, 88, 1)
draw_actor_level(@actor, 104, 0)
draw_actor_state(@actor, 168, 0, 252)
draw_actor_hp(@actor, 104, 28)
draw_actor_sp(@actor, 272, 28)
draw_actor_exp_alt(@actor, 272, 56)
if $crls
if BlizzCFG::DRAW_SR_BAR
draw_actor_sr_with_bar(@actor, 104, 56)
else
draw_actor_sr(@actor, 104, 56)
end
end
end
def dir=(val)
self.y -= val*56
@dir = val
end
def update(i = @actor.index - 1)
if @actor.index == i
self.index = 0 if self.index == -1
else
self.index = -1 if self.index == 0
end
self.y = @actor.index*120 unless self.active
@dir = 0 if self.y / 120 * 120 == self.y
super()
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, 0, width - 32, height - 32)
end
end
end
#==============================================================================
# Scene_Menu
#==============================================================================
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
@actor_index = @target_index = -1
@viewport1 = Viewport.new(0, 0, 640, 480)
@moved = false
end
def main
if BlizzCFG::MAP_BACKGROUND
@spriteset = Spriteset_Map.new
elsif BlizzCFG::CMS_EDITION
@spriteset = Sprite.new
@spriteset.bitmap = RPG::Cache.picture("CMS/#{BlizzCFG::CMS_EDITION}/CMSFullscreen")
end
continue = ((1..BlizzCFG::SAVE_FILES_NUMBER).any? {|i|
FileTest.exist?("#{BlizzCFG::SAVE_NAME}#{i}.#{BlizzCFG::SAVE_EXTENSION}")})
@command_window = Window_CMSCommand.new(@menu_index, continue)
(0...5).each {|i| @command_window.disable_item(i)} if $game_party.actors.size == 0
@info_window = Window_CMSInfo.new
@status_windows, @target_windows = [], []
$game_party.actors.each {|actor|
@status_windows.push(Window_CMSMenuStatus.new(actor))}
@help_window = Window_Help.new
@help_window.x, @help_window.y, @help_window.z = 0, -368, 9999
Graphics.transition
loop do
Graphics.update
Input.update
update
break if @scene != nil || $scene != self
end
loop do
Graphics.update
(@status_windows + [@command_window, @info_window]).each {|win| win.update}
move_da_outro
break if @status_windows[0].x <= - 512
end
Graphics.freeze
(@status_windows + @target_windows + [@command_window, @info_window,
@help_window, @spriteset]).each {|obj| obj.dispose if obj != nil}
del_sort if @sort_window != nil
del_status if @playerstatus_window != nil
del_equip if @left_window != nil
del_skill if @skill_window != nil
del_end if @end_window != nil
del_items if @item_choose_window != nil
del_equipment if @equips_window != nil
del_options if @options_window != nil
if @scene.is_a?(Scene_Title)
Graphics.transition(25)
Graphics.freeze
end
$scene = @scene
end
def equip_refresh
if @item_window.active
item = @item_window.data
last_hp = @actor.hp
last_sp = @actor.sp
@left_window.current = [@actor.maxhp, @actor.maxsp, @actor.atk,
@actor.pdef, @actor.mdef, @actor.str, @actor.dex, @actor.agi,
@actor.int, @actor.eva]
@left_window.changed = @actor.test_equip(@right_window.index, item == nil ? 0 : item.id)
elements = (item.is_a?(RPG::Weapon) ? item.element_set :
(item.is_a?(RPG::Armor) ? item.guard_element_set : []))
states = (item.is_a?(RPG::Weapon) ? item.plus_state_set :
(item.is_a?(RPG::Armor) ? item.guard_state_set : []))
@actor.hp = last_hp
@actor.sp = last_sp
@left_window.set_new_parameters(elements, states)
else
@left_window.current = @left_window.changed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
@left_window.set_new_parameters([], [])
end
end
def del_sort
@sort_window.dispose
@sort_window = nil
end
def del_status
@playerstatus_window.dispose
@playerstatus_window = nil
end
def del_equip
@left_window.dispose
@right_window.dispose
@item_windows.each {|win| win.dispose}
@left_window = @right_window = @item_window = @item_windows = nil
end
def del_skill
@skill_window.dispose
@skill_window = nil
end
def del_target
@target_windows.each {|win| win.dispose}
@target_windows = []
end
def del_end
@end_window.dispose
@end_window = nil
end
def del_items
@items_window1.dispose
@items_window1 = nil
@items_window2.dispose
@items_window2 = nil
@item_choose_window.dispose
@item_choose_window = nil
end
def del_equipment
@equips_window.dispose
@equips_window = nil
del_target
end
def del_options
@options_window.dispose
@options_window = nil
end
def update
@status_windows.each {|win| win.update(@actor_index)}
@target_windows.each {|win| win.update(@target_index)}
@info_window.update
unless @status_windows[0].x < 0 || @status_windows[0].dir != 0 ||
@target_windows[0] != nil && @target_windows[0].dir != 0
@command_window.update
[@help_window, @equips_window, @item_choose_window, @sort_window,
@skill_window, @left_window, @right_window, @playerstatus_window,
@options_window, @end_window].each {|win| win.update if win != nil}
end
move_da_main if @status_windows[0].x < 0
move_da_selection if @status_windows[0].dir != 0
move_da_targeting if @target_windows[0] != nil && @target_windows[0].dir != 0
move_da_status if @playerstatus_window != nil && @playerstatus_window.y > 0
move_da_equip if @left_window != nil && @left_window.x > 0
move_da_skill if @skill_window != nil && @skill_window.x < 256
move_da_target if @target_windows[0] != nil && @target_windows[0].x < 0
move_da_items if @item_choose_window != nil && @item_choose_window.y < 0
move_da_sort if @sort_window != nil && @sort_window.y < 64
move_da_equipment if @equips_window != nil && @equips_window.y < 64
move_da_options if @options_window != nil && @options_window.y > 0
move_da_end if @end_window != nil && @end_window.y > 336
if @moved
@moved = false
return
end
if @equips_window != nil
update_equipment
elsif @command_window.active
update_command
elsif @status_windows[0].active
update_status
elsif @item_choose_window != nil
if @item_choose_window.active
items_refresh
update_items_choose
elsif @sort_window != nil && @sort_window.active
update_sort
elsif @items_window1 != nil && @items_window1.active
@items_window1.update
update_item
elsif @items_window2 != nil && @items_window2.active
@items_window2.update
update_item
elsif @target_windows[0] != nil && @target_windows[0].active
update_item_target
end
elsif @skill_window != nil && @skill_window.active
update_skill
elsif @target_windows[0] != nil && @target_windows[0].active
update_skill_target
elsif @right_window != nil
if @right_window.active
update_right_equip
elsif @item_window != nil && @item_window.active
@item_window.update
update_eitem
end
elsif @playerstatus_window != nil && @playerstatus_window.active
update_playerstatus
elsif @options_window != nil && @options_window.active
update_options
elsif @end_window != nil
update_end
end
end
def move_windows(wins, border, mdiff, lead, xy, acc = false)
if acc
diff = [[((xy ? lead.x : lead.y)-border).abs, mdiff].min, 1].max
else
diff = [[((xy ? lead.x : lead.y)-border).abs/2, mdiff].min, 1].max
end
wins[0].each {|win| win.x += diff if win != nil}
wins[1].each {|win| win.x -= diff if win != nil}
wins[2].each {|win| win.y += diff if win != nil}
wins[3].each {|win| win.y -= diff if win != nil}
@moved = true
end
def move_da_main
lead = @status_windows[0]
x_plus = @status_windows
x_minus = [@command_window]
y_minus = [@info_window]
move_windows([x_plus, x_minus, [], y_minus], 0, 128, lead, true)
end
def move_da_outro
@flag = true
lead = @status_windows[0]
x_plus = [@command_window]
x_minus = @status_windows + @target_windows + [@skill_window, @help_window]
y_plus = [@info_window]
y_minus = [@item_choose_window, @items_window1, @items_window2, @help_window]
move_windows([x_plus, x_minus, y_plus, y_minus], 0, 128, lead, true, true)
end
def move_da_selection(lead = @status_windows[@actor_index])
if lead.dir == 1
move_windows([[], [], [], @status_windows], 360, 32, lead, false)
else
move_windows([[], [], @status_windows, []], 0, 32, lead, false)
end
end
def move_da_targeting(lead = @target_windows[@target_index])
if lead.dir == 1
move_windows([[], [], [], @target_windows], 376, 32, lead, false)
else
move_windows([[], [], @target_windows, []], 64, 32, lead, false)
end
end
def move_da_sort(win = @sort_window)
move_windows([[], [], [win], []], 64, 32, win, false)
end
def move_da_status(win = @playerstatus_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
def move_da_equip(win = @left_window)
x_minus = [@left_window, @right_window, @help_window] + @item_windows
move_windows([[], x_minus, [], []], 0, 64, win, true)
end
def move_da_skill(win = @skill_window)
x_plus = [@skill_window, @help_window]
move_windows([x_plus, [], [], []], 256, 64, win, true)
end
def move_da_target(win = @target_windows[0])
move_windows([@target_windows, [], [], []], 0, 32, win, true)
end
def move_da_items(win = @item_choose_window)
y_plus = [@item_choose_window, @items_window1, @items_window2, @help_window]
move_windows([[], [], y_plus, []], 0, 64, win, false)
end
def move_da_equipment(win = @equips_window)
y_plus = [@equips_window, @help_window]
move_windows([[], [], y_plus, []], 64, 64, win, false)
end
def move_da_options(win = @options_window)
move_windows([[], [], [], [win]], 0, 64, win, false)
end
def move_da_end(win = @end_window)
move_windows([[], [], [], [win]], 336, 64, win, false)
end
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.actors.size == 0 && @command_window.index < 5
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_ITEM_SCENE
@scene = Scene_Item.new
else
@item_choose_window = Window_CMSChooseItem.new
@items_window1 = Window_NormalItem.new
@items_window2 = Window_QuestItem.new
@items_window1.help_window = @items_window2.help_window = @help_window
@command_window.active = false
@help_window.x, @help_window.y = 0, -576
@help_window.set_text('')
@help_window.visible = false
items_refresh
end
when 1..4
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_windows.each {|win| win.active = true}
@actor_index = 0
when 5
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_OPTIONS_SCENE
@scene = Scene_Options.new
else
@options_window = Window_CMSOptions.new
@command_window.active = false
end
when 6
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_END_SCENE
@scene = Scene_End.new
else
@command_window.active = false
@end_window = Window_CMSEndCommand.new
end
end
end
end
def update_status
@actor = $game_party.actors[@actor_index]
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@status_windows.each {|win| win.active, win.index = false, -1}
@actor_index = -1
@command_window.active = true
elsif Input.trigger?(Input::C)
case @command_window.index
when 1
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_EQUIPMENT_SCENE
@scene = Scene_Equipment.new(@actor_index)
else
@equips_window = Window_EquipmentItem.new(@actor)
@equips_window.help_window = @help_window
@target_windows.push(Window_CMSTarget.new(@actor, true))
@status_windows.each {|win| win.active = false}
@help_window.visible = true
@help_window.x, @help_window.y = 0, -612
end
when 2
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_EQUIP_SCENE
@scene = Scene_Equip.new(@actor_index)
else
@left_window = Window_CMSEquipLeft.new(@actor)
@right_window = Window_CMSEquipRight.new(@actor)
@right_window.help_window = @help_window
@item_windows = []
(0..4).each {|i| win = Window_CMSEquipItem.new(@actor, 4-i)
win.help_window = @help_window
@item_windows.unshift(win)}
@item_windows[0].visible = @help_window.visible = true
@help_window.x, @help_window.y = 640, 0
@status_windows.each {|win| win.active = false}
end
when 3
if @actor.restriction >= 2
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_SKILL_SCENE
@scene = Scene_Skill.new(@actor_index)
else
@skill_window = Window_CMSSkill.new(@actor)
@skill_window.help_window = @help_window
@help_window.visible = true
@help_window.x, @help_window.y = -768, 0
@status_windows.each {|win| win.active = false}
end
end
when 4
$game_system.se_play($data_system.decision_se)
if BlizzCFG::CUSTOM_STATUS_SCENE
@scene = Scene_Status.new(@actor_index)
else
@playerstatus_window = Window_CMSStatus.new(@actor)
@status_windows.each {|win| win.active = false}
end
end
elsif Input.repeat?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@actor_index = (@actor_index+1) % $game_party.actors.size
if @status_windows[@actor_index].y < 0
@status_windows.each {|win| win.y += ($game_party.actors.size-4)*120}
elsif @status_windows[@actor_index].y >= 480
@status_windows.each {|win| win.dir = 1}
end
elsif Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
if @status_windows[@actor_index].y < 0
@status_windows.each {|win| win.dir = -1}
elsif @status_windows[@actor_index].y >= 480
@status_windows.each {|win| win.y -= ($game_party.actors.size-4)*120}
end
end
end
def update_items_choose
if Input.trigger?(Input::B)
del_items
$game_system.se_play($data_system.cancel_se)
@command_window.active, @help_window.x, @help_window.y = true, 0, -612
elsif Input.trigger?(Input::C)
items_refresh
@item_choose_window.active = false
$game_system.se_play($data_system.decision_se)
case @item_choose_window.index
when 0
@items_window1.active = @help_window.visible = true
@items_window1.index = 0
when 1 then @sort_window = Window_CMSSortCommand.new
when 2
@items_window2.active = @help_window.visible = true
@items_window2.index = 0
end
end
end
def update_sort
if Input.trigger?(Input::B)
del_sort
@item_choose_window.active = true
$game_system.se_play($data_system.cancel_se)
elsif Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
@items_window1.mode = case @sort_window.index
when 0 then @sort_window.index
when 1 then @items_window1.mode == 1 ? 2 : 1
when 2 then @items_window1.mode == 3 ? 4 : 3
end
@items_window1.refresh
end
end
def items_refresh
index = @item_choose_window.index
@items_window1.visible = [0, 1].include?(index)
@items_window2.visible = (index == 2)
end
def update_equipment
if Input.trigger?(Input::B)
del_equipment
$game_system.se_play($data_system.cancel_se)
@actor_index = -1
@command_window.active = true
@help_window.visible = false
@help_window.x, @help_window.y = 0, -612
elsif Input.trigger?(Input::RIGHT) || Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::RIGHT)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::LEFT)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@target_windows[0].update_actor($game_party.actors[@actor_index])
@equips_window.update_actor($game_party.actors[@actor_index])
unless @equips_window.item_max > @equips_window.index
@equips_window.index = 0
end
end
end
def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@item_choose_window.active = true
@help_window.set_text('')
@items_window1.active = @items_window2.active = @help_window.visible = false
@items_window1.index = @items_window2.index = -1
elsif Input.trigger?(Input::C)
win = (@item_choose_window.index == 0 ? @items_window1 : @items_window2)
@item = win.data
unless @item.is_a?(RPG::Item) && $game_party.item_can_use?(@item.id)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_party.actors.each_index {|i|
@target_windows.push(Window_CMSTarget.new($game_party.actors[i]))}
@target_index = 0
$game_system.se_play($data_system.decision_se)
if @item.scope.between?(3, 6)
win.active = false
@target_windows.each {|win| win.active = true}
if [4, 6].include?(@item.scope)
@target_windows.each {|win| win.index = -2}
else
@target_windows[@target_index].index = 0
end
elsif @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
win.draw_item(win.index)
end
(@status_windows + @target_windows).each {|win| win.refresh}
@scene = Scene_Map.new
elsif @skill.scope == 7
$game_system.se_play($data_system.buzzer_se)
end
end
end
def update_item_target
if Input.trigger?(Input::B)
del_target
$game_system.se_play($data_system.cancel_se)
@target_index = -1
@items_window1.refresh unless $game_party.item_can_use?(@item.id)
@items_window1.active = true
elsif Input.trigger?(Input::C)
if $game_party.item_number(@item.id) == 0
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_windows[0].index == -2
used = false
$game_party.actors.each {|actor| used |= actor.item_effect(@item)}
elsif @target_index >= 0
used = $game_party.actors[@target_index].item_effect(@item)
end
if used
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@items_window1.draw_item(@items_window1.index)
end
(@status_windows + @target_windows).each {|win| win.refresh}
if $game_party.all_dead?
@scene = Scene_Gameover.new
elsif @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
@scene = Scene_Map.new
end
else
$game_system.se_play($data_system.buzzer_se)
end
else
update_target
end
end
def update_target
return if @target_windows[0] == nil || @target_windows[0].index == -2
if Input.repeat?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@target_index = (@target_index+1) % $game_party.actors.size
if @target_windows[@target_index].y < 64
@target_windows.each {|win| win.y += ($game_party.actors.size-4)*104}
elsif @target_windows[@target_index].y >= 480
@target_windows.each {|win| win.dir = 1}
end
elsif Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
@target_index += $game_party.actors.size-1
@target_index %= $game_party.actors.size
if @target_windows[@target_index].y < 64
@target_windows.each {|win| win.dir = -1}
elsif @target_windows[@target_index].y >= 480
@target_windows.each {|win| win.y -= ($game_party.actors.size-4)*104}
end
end
end
def update_skill
if Input.trigger?(Input::B)
del_skill
$game_system.se_play($data_system.cancel_se)
@help_window.x, @help_window.y = 0, -768
@help_window.visible = false
@command_window.active = true
@actor_index = @target_index = -1
elsif Input.trigger?(Input::C)
@skill = @skill_window.data
if @skill == nil || !@actor.skill_can_use?(@skill.id)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_party.actors.each_index {|i|
@target_windows.push(Window_CMSTarget.new($game_party.actors[i]))}
@target_index = 0
$game_system.se_play($data_system.decision_se)
if @skill.scope.between?(3, 6)
@skill_window.active = false
@target_windows.each {|win| win.visible = win.active = true}
if [4, 6].include?(@skill.scope)
@target_windows.each {|win| win.index = -2}
else
@target_windows[@target_index].index = 0
end
elsif @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
$game_system.se_play(@skill.menu_se)
@actor.sp -= @skill.sp_cost
(@status_windows + @target_windows).each {|win| win.refresh}
@skill_window.refresh
@scene = Scene_Map.new
elsif @skill.scope == 7
$game_system.se_play($data_system.buzzer_se)
end
elsif Input.trigger?(Input::R) || Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::R)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::L)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@actor = $game_party.actors[@actor_index]
@skill_window.update_actor(@actor)
@skill_window.index = 0
end
end
def update_skill_target
if Input.trigger?(Input::B)
del_target
$game_system.se_play($data_system.cancel_se)
@skill_window.active = true
@target_index = -1
elsif Input.trigger?(Input::C)
unless @actor.skill_can_use?(@skill.id)
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_windows[0].index == -2
used = false
$game_party.actors.each {|actor| used |= actor.skill_effect(@actor, @skill)}
else
used = $game_party.actors[@target_index].skill_effect(@actor, @skill)
end
if used
$game_system.se_play(@skill.menu_se)
@actor.sp -= @skill.sp_cost
(@status_windows + @target_windows).each {|win| win.refresh}
@skill_window.refresh
if $game_party.all_dead?
@scene = Scene_Gameover.new
elsif @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
@scene = Scene_Map.new
end
else
$game_system.se_play($data_system.buzzer_se)
end
else
update_target
end
end
def update_right_equip
@item_windows.each_index {|i|
@item_windows[i].visible = (@right_window.index == i)}
@item_window = @item_windows[@right_window.index]
newmode = [@right_window.index, 1].min
if newmode != @left_window.mode
@left_window.mode = newmode
@left_window.refresh
end
if Input.trigger?(Input::B)
del_equip
$game_system.se_play($data_system.cancel_se)
@help_window.x, @help_window.y = 660, 0
@command_window.active = true
@actor_index = -1
elsif Input.trigger?(Input::C)
if @actor.equip_fix?(@right_window.index)
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@right_window.active = false
@item_window.active, @item_window.index = true, 0
equip_refresh
end
elsif Input.trigger?(Input::R) || Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::R)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::L)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@actor = $game_party.actors[@actor_index]
@right_window.update_actor(@actor)
@left_window.update_actor(@actor)
@item_windows.each_index {|i| @item_windows[i].update_actor(@actor, i)}
end
end
def update_eitem
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@right_window.active = true
@item_window.active, @item_window.index = false, -1
equip_refresh
elsif Input.trigger?(Input::C)
$game_system.se_play($data_system.equip_se)
item = @item_window.data
@actor.equip(@right_window.index, item == nil ? 0 : item.id)
@right_window.active = true
@item_window.active, @item_window.index = false, -1
@right_window.refresh
@item_window.refresh
(@item_windows + @status_windows).each {|win| win.refresh}
equip_refresh
elsif Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN) ||
Input.repeat?(Input::R) || Input.repeat?(Input::L)
equip_refresh
end
end
def update_playerstatus
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@actor_index = -1
del_status
elsif Input.trigger?(Input::R) || Input.trigger?(Input::RIGHT) ||
Input.trigger?(Input::L) || Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
if Input.trigger?(Input::R) || Input.trigger?(Input::RIGHT)
@actor_index = (@actor_index+1) % $game_party.actors.size
elsif Input.trigger?(Input::L) || Input.trigger?(Input::LEFT)
@actor_index += $game_party.actors.size-1
@actor_index %= $game_party.actors.size
end
@actor = $game_party.actors[@actor_index]
@playerstatus_window.update_actor(@actor)
end
end
def update_options
if Input.trigger?(Input::B)
del_options
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
return
end
case @options_window.get_option
when 'BGM Volume'
if Input.repeat?(Input::RIGHT)
$game_system.bgm_volume += 5
$game_system.bgm_volume = 100 if $game_system.bgm_volume > 100
$game_system.bgm_play($game_system.bgm_memorize)
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.bgm_volume -= 5
$game_system.bgm_volume = 0 if $game_system.bgm_volume < 0
$game_system.bgm_play($game_system.bgm_memorize)
@options_window.refresh
end
when 'SFX Volume'
if Input.repeat?(Input::RIGHT)
$game_system.sfx_volume += 5
if $game_system.sfx_volume > 100
$game_system.sfx_volume = 100
else
$game_system.se_play($data_system.cursor_se)
end
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.sfx_volume -= 5
$game_system.sfx_volume = 0 if $game_system.sfx_volume < 0
$game_system.se_play($data_system.cursor_se)
@options_window.refresh
end
when 'Battle BGM'
if Input.repeat?(Input::LEFT) || Input.repeat?(Input::RIGHT) ||
Input.repeat?(Input::C)
if $game_switches[BlizzCFG::BGM_Lock] || BlizzCFG::BATTLE_BGMS.size <= 1
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
ind = $game_variables[BlizzCFG::BGM_Variable]
if Input.repeat?(Input::RIGHT) || Input.repeat?(Input::C)
ind = (ind+1) % BlizzCFG::BATTLE_BGMS.size
elsif Input.repeat?(Input::LEFT)
ind = (ind+BlizzCFG::BATTLE_BGMS.size-1) % BlizzCFG::BATTLE_BGMS.size
end
$game_variables[BlizzCFG::BGM_Variable] = ind
$game_system.reset_battle_bgm
@options_window.refresh
end
end
when 'Battle Cam'
if Input.repeat?(Input::LEFT) || Input.repeat?(Input::RIGHT) ||
Input.repeat?(Input::C)
if BlizzCFG::CAM_AVAILABLE
$game_system.se_play($data_system.decision_se)
$game_system.cam = ($game_system.cam+1) % 2
$game_system.get_cam
@options_window.refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
when 'Bar Style'
if Input.repeat?(Input::RIGHT)
if $game_system.bar_opacity == 0
$game_system.se_play($data_system.buzzer_se)
else
$game_system.bar_style = ($game_system.bar_style + 1) % 7
$game_system.se_play($data_system.decision_se)
@options_window.refresh
@status_windows.each {|win| win.refresh}
end
elsif Input.repeat?(Input::LEFT)
if $game_system.bar_opacity == 0
$game_system.se_play($data_system.buzzer_se)
else
$game_system.bar_style = ($game_system.bar_style + 6) % 7
$game_system.se_play($data_system.decision_se)
@options_window.refresh
@status_windows.each {|win| win.refresh}
end
end
when 'Bar Opacity'
if Input.repeat?(Input::LEFT) || Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.decision_se)
$game_system.bar_opacity += (Input.repeat?(Input::RIGHT) ? 64 : -64)
@options_window.refresh
@status_windows.each {|win| win.refresh}
end
when 'Font'
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.decision_se)
@options_window.current_font += 1
@options_window.current_font %= BlizzCFG::CMS_FONTS.size
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.decision_se)
@options_window.current_font += BlizzCFG::CMS_FONTS.size - 1
@options_window.current_font %= BlizzCFG::CMS_FONTS.size
@options_window.refresh
elsif Input.repeat?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_system.fontname = @options_window.font_name
@command_window.refresh
@info_window.refresh
@status_windows.each {|win| win.refresh}
@help_window.refresh
@options_window.refresh
(0...5).each {|i| @command_window.disable_item(i)} if $game_party.actors.size == 0
@command_window.disable_item(6) if $game_system.save_disabled
@command_window.disable_item(7) unless @command_window.continue
end
when 'Windowskin'
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.decision_se)
@options_window.current_skin += 1
@options_window.current_skin %= BlizzCFG::CMS_SKINS.size
@options_window.refresh
elsif Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.decision_se)
@options_window.current_skin += BlizzCFG::CMS_SKINS.size - 1
@options_window.current_skin %= BlizzCFG::CMS_SKINS.size
@options_window.refresh
elsif Input.repeat?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_system.windowskin_name = @options_window.skin_name
end
end
end
def update_end
if Input.trigger?(Input::B) || Input.trigger?(Input::C) &&
@end_window.index == 0
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
del_end
elsif Input.trigger?(Input::C)
Graphics.freeze
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
@end_window.index == 1 ? @scene = Scene_Title.new : $scene = nil
del_end
end
end
end
#==============================================================================
# Scene_CMSSave
#==============================================================================
class Scene_CMSSave < Scene_Save
def on_cancel
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(6)
end
end
#==============================================================================
# Scene_CMSLoad
#==============================================================================
class Scene_CMSLoad < Scene_Load
def on_cancel
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(7)
end
end
This should work, but tell me if it doesn't.
YES! That works just perfect! :haha:
Thank you once again Stripe for helping me ^^
Level++
will it be possible for Hot keys to work too?
You'd have to implement that yourself.
ah, thanks. Just needed to know. Since I hardly have any scripting knowledge, I'll cross that out for a bit.
Hi there!
Been trying out several CMS for my project, but this one stood out the most. It's an absolutely amazing CMS, and I love you for making it. =P
I do have two quick questions though;
1:
Is there any easy way to change the "battle portrait" seen in the status screen to a custom image? For example... I'm using the FFX-style CBS by Charlie Fleed ( sideview system ). Rather than having a scaled up sideview battler appear in the status screen, I'd like to use a set of custom images (portraits that look more similar to the battlers used in the standard battle system).
I figured I'd have to change the line under Window Base looking like this: def draw_actor_battler(actor, x, y) ...to something else in order to load the associated images, but I'm not sure to what (if I'm even at the right track).
2:
Is there any way to make multi-slots work with the Equip screen used in the CMS? This one is a lot less important, as it's possible for me to skip out on Guillaume777's multi-slot for this script.
Switching to the multi-slot version of the equip screen just makes the equip screen look way too simple and non-detailed when compared to the other screens. But like I said, I can manage without multi-slot if this one's too much trouble.
Thanks in advance. Your scripts rule.
1. I don't remember if I added "Face" option in there or if you can use Tons of Add-ons's "Face" add-on. Just check the options you have in the script.
2. I think I actually made a piece of script that is supposed to make it compatible. I just don't remember if I ever posted it. Try searching through the forum a bit, you might be lucky.
First problem solved!
I had already looked into what you said, and the Face = true option only makes the facesets appear on the main menu of the CMS. The "status menu" will still display the battlers. However, I did scroll through the script again in case I had missed something, and...
...while it took a while since I'm no scripter, I was able to find the line that draws the battler under:
# Window_CMSStatus
Line: draw_actor_battler(@actor, x, y)
...and just changed that line to: draw_actor_face_st_cms(@actor, x, y)
So now it works. I'll just go without main menu facesets and make the faces into the full-body portraits I wanted. Thanks a lot. =)
As for the multi-slot thing, I've been searching both on these forums and on google, without finding any script like the one you mentioned.
There are no crashes or anything. It's just that I've replaced sheild and helmet with two additional accessory slots. But the CMS equip screen turns them back to sheild and helmet, meaning I can't equip accessories to those two slots.
...if you still have the script you mentioned stored somewhere, I'd be very grateful if you could upload it. =O
^ What about the CUSTOM_EQUIP_SCENE configuration option? Setting it to G7's scene will allow you to use it without problems, I think.
QuoteCUSTOM_EQUIP_SCENE - set this to true if you want to use a different
# equip scene and make this CMS compatible even with
# exotic Equipment Systems
decided to scap this. Blizz-abs and this are enemies.
I made it work in CoSLAL just fine.
It works fine, but without the hotkeys, skills don't exist.
Is it possible to skip the selection scene if you have only one actor in party?(I mean like opening Item window you don't have to select any character for showing items...I have only one actor and I would like to skip the selection scene when opening Status scene for example)
Sorry for the necroposting, but I was just wondering if it's possible to make edits and add in extra equipment slots on the equip scene?
I've tried adding in extra equipment slots with mixed results. Ideally what I want to do is add in two extra accessory slots. I'm only here asking cuz of my own failed attempts :C
I know my way around the script well enough at this point that I can make the edits myself, but...I think I just need a point in the right direction.
My main reason for not just using, say, Guil's multi slot equipment script is the status update it shows on the left with the HP, evasion, SP boosts and even elemental resistances. It's very in depth.
If it'd be simpler, I'd be happy with just a default equip screen edit with that info but this isn't exactly the right topic for that kinda request now is it :C
Regardless, if anybody's read this, thank you for taking the time to listen and thanks in advance if anybody helps me out!
Sorry for the necrobump. Love the script but I've got a game breaking bug I need help squashing. Whenever I try and use an item that doesn't have an affect (like a key item or something) then the game crashes with this error message.
Script ' (*) STCMS - Hybrid Edition' line 2432: NoMethodError
occurred.
undefined method 'scope' for nil:NilClass
EDIT: I am aware that if I just put the occasion as "Never" then it's a non issue, but I don't like that work around because then the item is always grayed out. But if that's what I have to do than it's a small price to pay. I'd just like to know if there is a way to fix the crash or not.
QuoteAugust 20, 2015, 07:10:40 AM Blizzard: Sure, just post in the topic if you have questions. Or add me on Skype if you want to actually talk about it.
OK, here it goes!
I've contacted you before about this combo of mods, and you fixed what was wrong at the time, but I have found a few new things.
I am using Equipment Upgrade System 1.2 and Stormtronics 1.51b. They get along pretty well, except for the following:
Photo/Explanation
(http://www.black-ogre.com/unrelated/storm vs default - status screen.jpg)
As you can see the status screen doesn't recognize any kind of weapon or armor type that is "enhanced", ie accepts the crystal upgrades. Whenever an enhanced weapon or armor is equipped, it says, "Nothing Equipped" in red in your status screen.
(http://www.black-ogre.com/unrelated/storm vs default - equipment screen slots.jpg)
In the default menu screen, the number of slots show up in the item description at the top (indicated by a small square for each slot), in yours they do not.
(http://www.black-ogre.com/unrelated/storm vs default - equipment screen slotted gems.jpg)
In the default menu screen, the gems/crystal/stones (whatever you want to call them) that enhance the weapon/armor, that have been equipped in the weapon/armor, show up in the small square in the description. In yours they do not.
I was wondering if there was a workaround for this. I really like your cms mainly for having a whole section just for quest items, and also your equip screen is awesome.
So I guess what I'm asking is could you please make your cms show the boxes on enhanced weapons/armors, show the crystals that are attached to those weapons in the boxes, and have the weapon/armor name show up in the character status screen.
I know I have messaged you a few years ago when I was making my game originally, but then I got sidetracked, and I'm starting to get back into it. I know I sent you a link to the combo of your cms and the equipment upgrade combined into 1 game so you could playtest it, but you probably don't have that anymore, so here is another link:
http://www.black-ogre.com/unrelated/equipplusstorm.zip (http://www.black-ogre.com/unrelated/equipplusstorm.zip) 1.17mb
Thank you very much for your help, time and patience!
Replace Stormtronics with this: http://pastebin.com/t5Z8SQcv
Was not pleased with how Fleed did the slots. So I made it where Window_Help always creates an instance of Window_EnhanceSlots_Help and modified a bunch of windows' update_help methods to assign to the equipment in question.
The "nothing equipped" error was an easy fix. I just changed
if @actor.equippable?(equips[i])
to
You, sir, are a gentleman and a genius! I don't know how long or how hard it was to fix this, but whatever you did, it worked!!! You have no idea how great this is! I am so happy! Thank you so very much!!!