The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: modern algebra on October 06, 2009, 10:44:30 PM

Title: Phantasia-esque CMS 1.0
Post by: modern algebra on October 06, 2009, 10:44:30 PM
Phantasia-esque CMS
Version: 1.0
Author: modern algebra
Date: October 6, 2009

Version History



Description


This script gives you a menu design that is inspired by a mix between the Tales of Phantasia Menu and my own Full Status CMS. Like Tales of Phantasia, each actor gets their own window and their sprite is shown walking in the top right corner. Like FSCMS, the command window and optional windows are hugely customizable, allowing you to relatively easily add new scripts to be accessible from the menu (with an automatic index finder so that you don't need to modify the return_scene methods of the respective scripts that you add to the menu), call common events from the menu (including the ability to select an actor and have your common event operate only on the actor chosen) and you can use any of the five optional windows that are in the FSCMS - Location, Playtime, Gold, Steps, and Variable.

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg197.imageshack.us%2Fimg197%2F3763%2Ftpcmsscreen.png&hash=0337bc2569dffc9bdc8b37ca8d7666567df3da37)

Instructions

Place this script in the Script Editor (F11) above Main and below other custom scripts. Please note this will not work with other CMSes.

See the header of the script and Editable Regions A & B for configuration instructions.

Script


Please see the attached text document (http://rmrk.net/index.php?action=dlattach;topic=35085.0;attach=18085).

Spoiler for Max Level Bug Fix:
Note that there is a bug that will occur once a character reaches max level. To fix it, paste the following code into its own slot in the editor BELOW the CMS, but still above Main.

Code: [Select]
#==============================================================================
# ** Window_TPCMS_MenuActor
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  This window displays basic status information on a party member.
#==============================================================================

class Window_TPCMS_MenuActor < Window_Base
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Actor EXP Gauge
  #    actor : the actor to draw exp of
  #    x, y  : coordinates to start drawing
  #    width : the total width of guage
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_actor_exp_gauge (actor, x, y, width = 120)
    gw = width
    gw *= (actor.exp_progress / actor.next_rest_exp_s.to_i) if actor.next_rest_exp_s.to_i > 0
    # Get colors
    if Phantasia_CMS::EXP_BAR_COLOR1.is_a? (Fixnum)
      gc1 = text_color (Phantasia_CMS::EXP_BAR_COLOR1)
    else
      gc1 = Color.new (*Phantasia_CMS::EXP_BAR_COLOR1)
    end
    if Phantasia_CMS::EXP_BAR_COLOR2.is_a? (Fixnum)
      gc2 = text_color (Phantasia_CMS::EXP_BAR_COLOR2)
    else
      gc2 = Color.new (*Phantasia_CMS::EXP_BAR_COLOR2)
    end
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
end

Credit



Thanks


Support


Please post in this topic at RMRK for support

Known Compatibility Issues

It won't work with other CMSes. It may work with some scripts that add themselves to the menu (such as my Diary script), but it won't give it an icon in that case. It is recommended when using those scripts, to place them ABOVE the CMS and set it up as you would any other script inside the CMS itself.

Demo


The demo is attached (http://rmrk.net/index.php?action=dlattach;topic=35085.0;attach=18084). Please note that most of the scripts in the demo are unnecessary. The only one you need is the one titled Phantasia-esque CMS 1.0. However, it is recommended that you get the script from the text document (http://rmrk.net/index.php?action=dlattach;topic=35085.0;attach=18085) as the demo one is set up with other scripts (for the purpose of examples), while the text document is clean and has no special other scripts pre-setup


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
Title: Re: Phantasia-esque CMS 1.0
Post by: Grafikal on October 06, 2009, 11:10:03 PM
Whooooooshhhh, very cool man, looks like you've been busy on dem CMS's lately lol.
Title: Re: Phantasia-esque CMS 1.0
Post by: modern algebra on October 06, 2009, 11:28:38 PM
:)

This one only took a few hours since it's pretty much the same basic engine as FSCMS but with a different layout and with some particularities removed.
Title: Re: Phantasia-esque CMS 1.0
Post by: SuperMega on October 07, 2009, 12:09:52 AM
Woah, I'm really liking the layout!  Nice work Modern Algebra! :D
Title: Re: Phantasia-esque CMS 1.0
Post by: Lazer Ki on October 07, 2009, 12:41:06 AM
Holy shit, this looks awesome.

I have to learn to be a scripting god like MA ._.
Title: Re: Phantasia-esque CMS 1.0
Post by: Irock on October 07, 2009, 12:41:49 AM
This looks like a nice menu.

Good work, Modern Algebra. :]
Title: Re: Phantasia-esque CMS 1.0
Post by: Cascading Dragon on October 07, 2009, 12:44:47 AM
Amazing work.
Now if I could figure out how to do stuff like this. lol
Title: Re: Phantasia-esque CMS 1.0
Post by: modern algebra on October 08, 2009, 03:46:03 AM
Thanks guys :)
Title: Re: Phantasia-esque CMS 1.0
Post by: tSwitch on October 08, 2009, 03:59:33 AM
that's pretty badass MA.
Title: Re: Phantasia-esque CMS 1.0
Post by: EliasD15 on October 25, 2009, 10:32:15 PM
Code: [Select]
Script 'Phantasia CMS by Modern Algebra' line 784: NoMethodError
occured.


undefined method`each' for nil:Class

How can I fix this?
Title: Re: Phantasia-esque CMS 1.0
Post by: modern algebra on October 25, 2009, 11:08:16 PM
I think it's probably an incompatibility with another script. Try putting it below any other custom scripts you have in the editor but keep it above Main. Also, don't PM me again; I always read my topics when somebody posts in them.
Title: Re: Phantasia-esque CMS 1.0
Post by: EliasD15 on October 25, 2009, 11:58:03 PM
Sorry about that, I didn't know. I PM'd you again  :-[
By the way, it worked in the demo and not in my game.
The script list I sent you, should help reveal any incompatibilities.
Title: Re: Phantasia-esque CMS 1.0
Post by: modern algebra on October 26, 2009, 12:25:34 AM
Not really. I'm not familiar with most of those scripts.

If it's the line that I'm thinking of (line 784 without any modifications to the script whatsoever), then the only way (unless you deleted stuff you shouldn't have - I'm assuming you haven't modified the script) for that error to occur is if the initialize method of Game_System is overwritten or if you're using an old save file.

But if it's below every custom script, than the error should be occuring in the incompatible script. I can't do any more than that without seeing the project itself.
Title: Re: Phantasia-esque CMS 1.0
Post by: EliasD15 on October 26, 2009, 12:31:37 AM
Not really. I'm not familiar with most of those scripts.

If it's the line that I'm thinking of (line 784 without any modifications to the script whatsoever), then the only way (unless you deleted stuff you shouldn't have - I'm assuming you haven't modified the script) for that error to occur is if the initialize method of Game_System is overwritten.

But if it's below every custom script, than the error should be occuring in the incompatible script. I can't do any more than that without seeing the project itself.

I am seriously considering removing the script do the issues.
Title: Re: Phantasia-esque CMS 1.0
Post by: modern algebra on October 26, 2009, 12:34:52 AM
OK, do so then; I don't appreciate the implication that I'm being dishonest about my ability to diagnose the problem with only the limited information you've given me and I don't see why you think that threatening to not use my script will change my ability to help you with this problem. I can't do any more unless I can actually see the project. I'm not a magical being who can divine the exact structure of a script from its name and I'm not going to hunt down 10 scripts and put them in a project just to figure out which script is causing the error. If you want my help, upload your project or your Scripts.rvdata and send it to me. If you don't want to do that then remove it or figure it out on your own.
Title: Re: Phantasia-esque CMS 1.0
Post by: EliasD15 on October 26, 2009, 01:00:08 AM
I didn't mean to imply that you were being dishonest in your diagnoses. I meant to say that the constant issues I was having were not worth wasting yours and my time with something as benign as this.
Title: Re: Phantasia-esque CMS 1.0
Post by: modern algebra on October 27, 2009, 01:42:38 AM
Yeah, sorry if I sounded harsh. It's totally your call.
Title: Re: Phantasia-esque CMS 1.0
Post by: modern algebra on January 03, 2010, 05:04:56 PM
It has come to my attention that there is a bug with this script that will crash the game if a character in the menu reaches maximum level. To fix it, paste the following code into its own slot in the editor BELOW the CMS, but still above Main.

Code: [Select]
#==============================================================================
# ** Window_TPCMS_MenuActor
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  This window displays basic status information on a party member.
#==============================================================================

class Window_TPCMS_MenuActor < Window_Base
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Actor EXP Gauge
  #    actor : the actor to draw exp of
  #    x, y  : coordinates to start drawing
  #    width : the total width of guage
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_actor_exp_gauge (actor, x, y, width = 120)
    gw = width
    gw *= (actor.exp_progress / actor.next_rest_exp_s.to_i) if actor.next_rest_exp_s.to_i > 0
    # Get colors
    if Phantasia_CMS::EXP_BAR_COLOR1.is_a? (Fixnum)
      gc1 = text_color (Phantasia_CMS::EXP_BAR_COLOR1)
    else
      gc1 = Color.new (*Phantasia_CMS::EXP_BAR_COLOR1)
    end
    if Phantasia_CMS::EXP_BAR_COLOR2.is_a? (Fixnum)
      gc2 = text_color (Phantasia_CMS::EXP_BAR_COLOR2)
    else
      gc2 = Color.new (*Phantasia_CMS::EXP_BAR_COLOR2)
    end
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
end
Title: Re: Phantasia-esque CMS 1.0
Post by: Draco on December 14, 2010, 10:06:21 PM
Well I downloaded this script, and at first i loved it. Now I was wondering If you could make the script with a Face graphic, where the actor's sprite walks. I pm'd you before this, so  ya...
Thanks
          ~Draco
Title: Re: Phantasia-esque CMS 1.0
Post by: yuyu! on December 15, 2010, 07:24:11 PM
MA, your scripts are really awesome :)
Title: Re: Phantasia-esque CMS 1.0
Post by: Infinate X on December 28, 2010, 10:04:16 PM
This is awesome! Good job :tpg:!
Title: Re: Phantasia-esque CMS 1.0
Post by: crow5derlock on August 03, 2011, 06:01:41 PM
sorry for resuming a topic but, could you add a map button that loads an image called IGmap, i'm new to scripting and i don't know how to make much more than a script that runs a message when you open the game.
Title: Re: Phantasia-esque CMS 1.0
Post by: modern algebra on August 03, 2011, 06:25:13 PM
Well, you have two options:

(1) wait for Pacman to write a scene for it in that topic
(2) have it call a common event instead and show the picture in the common event.

If the latter, you would simply make a common event that should look essentially like (Note: if already using Picture Label 1 to show something else, use a different label):

@>Show Picture: 1, IGMap
@>Loop
  @>Set Move Route: Player
    :                      $>Wait: 6 Frames
  @>Wait: 6 frames
  @>Conditional Branch: Button B is pressed
    @>Break Loop
    @>
   : Branch End
  @>Conditional Branch: Button C is pressed
    @>Break Loop
    @>
   : Branch End
  @>
 : Repeat Above
Erase Picture: 1
Open Menu Scene
@>

Then, in the script, just follow the instructions to add a common event call. In other words, do this (assuming it has not already been edited in any way. If it has, you need to pic an ID for the new one that isn't already used -- again, as per the instructions):

Code: [Select]

    0 => ["Vocab::item", 144, "$game_party.members.empty?", false, Scene_Item],
    1 => ["Vocab::skill", 128, "$game_party.members.empty?", true, Scene_Skill],
    2 => ["Vocab::equip", 51, "$game_party.members.empty?", true, Scene_Equip],
    3 => ["Vocab::status", 137, "$game_party.members.empty?", true, Scene_Status],
    4 => ["Vocab::save", 133, "$game_system.save_disabled", false, Scene_File,
            "true, false, false"],
    5 => ["Vocab::game_end", 179, -1, false, Scene_End]

And you would change it to this:

Code: [Select]
    0 => ["Vocab::item", 144, "$game_party.members.empty?", false, Scene_Item],
    1 => ["Vocab::skill", 128, "$game_party.members.empty?", true, Scene_Skill],
    2 => ["Vocab::equip", 51, "$game_party.members.empty?", true, Scene_Equip],
    3 => ["Vocab::status", 137, "$game_party.members.empty?", true, Scene_Status],
    4 => ["Vocab::save", 133, "$game_system.save_disabled", false, Scene_File,
            "true, false, false"],
    5 => ["Vocab::game_end", 179, -1, false, Scene_End],
    6 => ["Map", 153, -1, false, X]

(NOTE how I added that comma after the 5 => line)

The X before the bracket you would replace with the ID of the common event you made. IE, if you made the common event in the first slot of the common event tab, that line would be:

Code: [Select]
6 => ["Map", 153, -1, false, 1]

If in the second:

Code: [Select]
6 => ["Map", 153, -1, false, 2]

ETC...

Note that this method would stop the player from moving but other events on the map would still be active. If you wanted to prevent that, wait for Pacman to finish the script you requested.
Title: Re: Phantasia-esque CMS 1.0
Post by: crow5derlock on August 03, 2011, 07:02:04 PM
Ok thank you for telling me this, i think i'll just wait for Pacman to finish, but i might try this on a blank project.
Title: Re: Phantasia-esque CMS 1.0
Post by: modern algebra on August 03, 2011, 10:49:36 PM
  • Each actor gets his own window

it should probably say his/her own window

sorry but im a little picky with certain things

Then shouldn't your protest be: "Each actor/actress gets his/her own window"? :P

I kind of think that whole issue is more or less moot at this point. It's obvious that texts which use the male pronoun to refer to humanity are meant to include women and do not have any intended implication that women are inferior or irrelevant. Whatever its historical origins, imputing to someone who uses the male pronoun in that way a sexist or patriarchal attitude which defines human experience only through the male perspective seems dishonest. It is such a high level of abstraction that I doubt it ever (or at least not since the 1950s) really functioned to reinforce those patriarchal attitudes even on a subconscious level. At least, not any more than using the word "holiday" implies and reinforces a sense of the "holy" or the supernatural in society that disadvantages atheists.

Anyway, I'll change it since it ultimately makes no difference and I'd prefer not to be misunderstood in that way; I normally do use gender-inclusive language but I guess the non-gender-inclusive "actor" term threw me off.

The English language would benefit from a singular gender-neutral pronoun though; the whole "his or hers; him or her; etc" is so inconvenient and breaks flow. :P I think it should have a z or an x in it since I think those letters are underused. Is there a way to lobby a dictionary? I suppose we would also need to make them for all the other gendered words in the English language though so it would be hard to really get read of the "X or Y" construction.
Title: Re: Phantasia-esque CMS 1.0
Post by: pacdiggity on August 04, 2011, 06:07:18 AM
You could use an alternative, their (Z). No need for gender discrimination.
Also, I think MA's eventing idea is better. Scene work isn't my best area and he's not only a scripting god; he's an eventing genius.
And yours isn't my only request at the moment, it would take me a while to get to it. I think it'd be better for everyone if you event it.
Title: Re: Phantasia-esque CMS 1.0
Post by: modern algebra on August 04, 2011, 05:27:03 PM
"Their" is still not gramatically correct (at least not in Canada), though it has been making some headway in recent years. In any case, "actor" would still not be gender-neutral, and since I'm already using actor/actress then, it is more consistent style to use his/her.
Title: Re: Phantasia-esque CMS 1.0
Post by: pacdiggity on August 04, 2011, 08:39:13 PM
This is a topic about one of your amazing CMSs, not a debate about the development of modern grammar. Shall we take that elsewhere?
Title: Re: Phantasia-esque CMS 1.0
Post by: crow5derlock on December 06, 2011, 07:31:29 AM
Well, you have two options:

(1) wait for Pacman to write a scene for it in that topic
(2) have it call a common event instead and show the picture in the common event.

If the latter, you would simply make a common event that should look essentially like (Note: if already using Picture Label 1 to show something else, use a different label):

@>Show Picture: 1, IGMap
@>Loop
  @>Set Move Route: Player
    :                      $>Wait: 6 Frames
  @>Wait: 6 frames
  @>Conditional Branch: Button B is pressed
    @>Break Loop
    @>
   : Branch End
  @>Conditional Branch: Button C is pressed
    @>Break Loop
    @>
   : Branch End
  @>
 : Repeat Above
Erase Picture: 1
Open Menu Scene
@>

Then, in the script, just follow the instructions to add a common event call. In other words, do this (assuming it has not already been edited in any way. If it has, you need to pic an ID for the new one that isn't already used -- again, as per the instructions):

Code: [Select]

    0 => ["Vocab::item", 144, "$game_party.members.empty?", false, Scene_Item],
    1 => ["Vocab::skill", 128, "$game_party.members.empty?", true, Scene_Skill],
    2 => ["Vocab::equip", 51, "$game_party.members.empty?", true, Scene_Equip],
    3 => ["Vocab::status", 137, "$game_party.members.empty?", true, Scene_Status],
    4 => ["Vocab::save", 133, "$game_system.save_disabled", false, Scene_File,
            "true, false, false"],
    5 => ["Vocab::game_end", 179, -1, false, Scene_End]

And you would change it to this:

Code: [Select]
    0 => ["Vocab::item", 144, "$game_party.members.empty?", false, Scene_Item],
    1 => ["Vocab::skill", 128, "$game_party.members.empty?", true, Scene_Skill],
    2 => ["Vocab::equip", 51, "$game_party.members.empty?", true, Scene_Equip],
    3 => ["Vocab::status", 137, "$game_party.members.empty?", true, Scene_Status],
    4 => ["Vocab::save", 133, "$game_system.save_disabled", false, Scene_File,
            "true, false, false"],
    5 => ["Vocab::game_end", 179, -1, false, Scene_End],
    6 => ["Map", 153, -1, false, X]

(NOTE how I added that comma after the 5 => line)

The X before the bracket you would replace with the ID of the common event you made. IE, if you made the common event in the first slot of the common event tab, that line would be:

Code: [Select]
6 => ["Map", 153, -1, false, 1]

If in the second:

Code: [Select]
6 => ["Map", 153, -1, false, 2]

ETC...

Note that this method would stop the player from moving but other events on the map would still be active. If you wanted to prevent that, wait for Pacman to finish the script you requested.

i seem to be bothering you allot on this one topic, and i tested this, its awesome, but anyway is there a way to insert a button on the menu that calls the common event in this, or do i just have to live with putting map billboards up everywhere?
Title: Re: Phantasia-esque CMS 1.0
Post by: modern algebra on December 07, 2011, 12:48:38 AM
i seem to be bothering you allot on this one topic, and i tested this, its awesome, but anyway is there a way to insert a button on the menu that calls the common event in this, or do i just have to live with putting map billboards up everywhere?

Umm, that's what you quoted. It's:
Code: [Select]
[quote author=modern algebra link=topic=35085.msg494092#msg494092 date=1312395913]
Then, in the script, just follow the instructions to add a common event call. In other words, do this (assuming it has not already been edited in any way. If it has, you need to pic an ID for the new one that isn't already used -- again, as per the instructions):

[code]

    0 => ["Vocab::item", 144, "$game_party.members.empty?", false, Scene_Item],
    1 => ["Vocab::skill", 128, "$game_party.members.empty?", true, Scene_Skill],
    2 => ["Vocab::equip", 51, "$game_party.members.empty?", true, Scene_Equip],
    3 => ["Vocab::status", 137, "$game_party.members.empty?", true, Scene_Status],
    4 => ["Vocab::save", 133, "$game_system.save_disabled", false, Scene_File,
            "true, false, false"],
    5 => ["Vocab::game_end", 179, -1, false, Scene_End]

And you would change it to this:

Code: [Select]
    0 => ["Vocab::item", 144, "$game_party.members.empty?", false, Scene_Item],
    1 => ["Vocab::skill", 128, "$game_party.members.empty?", true, Scene_Skill],
    2 => ["Vocab::equip", 51, "$game_party.members.empty?", true, Scene_Equip],
    3 => ["Vocab::status", 137, "$game_party.members.empty?", true, Scene_Status],
    4 => ["Vocab::save", 133, "$game_system.save_disabled", false, Scene_File,
            "true, false, false"],
    5 => ["Vocab::game_end", 179, -1, false, Scene_End],
    6 => ["Map", 153, -1, false, X]

(NOTE how I added that comma after the 5 => line)

The X before the bracket you would replace with the ID of the common event you made.
[/quote]

All you would then need to do is put 6 in the Command List. So, instead of:

Code: [Select]
  COMMANDLIST = [0, 1, 2, 3, 4, 5]

It would be something like:

Code: [Select]
  COMMANDLIST = [0, 1, 2, 3, 6, 4, 5]
Title: Re: Phantasia-esque CMS 1.0
Post by: Wimpy on December 18, 2011, 12:31:49 PM
Would it be possible to modify this script to mimic Phantasy Star III's menu? ^^;; It's very close to what I've been looking for.

Screenshot:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Flparchive.org%2FPhantasy-Star-3%2FUpdate%252013%2F10-ps3_1056.png&hash=af3e24fd115a4d9a6b53d169743c5535e06dde52)

Adan would be the first character, then Mieu, Wren, and followed by Gwyn. The last (empty) box is reserved for the fifth character.
Title: Re: Phantasia-esque CMS 1.0
Post by: DoctorTodd on December 18, 2011, 05:28:06 PM
It would require a lot of windows to be moved as well as delete the part with characters and add faces instead which could take a while. Not only that but this is not the place to request this, try here http://rmrk.net/index.php/board,101.0.html (http://rmrk.net/index.php/board,101.0.html).
Title: Re: Phantasia-esque CMS 1.0
Post by: Wimpy on December 18, 2011, 09:37:43 PM
Oh, I understood that. I meant no offense, but this just struck a cord with me, or so to speak. ^^; More or less, it was a question asked out of curiosity since the two systems look incredibly similar to me (and I wouldn't have been offended if I was told a simple, "No, it's not something that interests me," or "It can't be done."). =P

However, I'll give requesting the script I had in mind a shot. :) Thank you very much.


EDIT: Is it possible to move the windows/actor positions, or would that be a bit of work to modify this script?
Title: Re: Phantasia-esque CMS 1.0
Post by: DoctorTodd on January 01, 2012, 06:55:30 PM
I'm pretty sure that this script is in compatible with Omega 7's world map script. When I add the menu option to it I get an error message at start up stating a no method error involving the players location on the world map. If the menu option is not there how ever then I receive no error. Though I have not tried to open it via event.