Merging a few scripts.

Started by Ophiuchus, November 07, 2009, 05:23:02 am

Previous topic - Next topic

Ophiuchus

http://forum.chaos-project.com/index.php?topic=2365.0 - Ryex's Collapsing CMS
http://forum.chaos-project.com/index.php?topic=114.0 - Blizzard's Stat Distribution System
http://forum.chaos-project.com/index.php?topic=116.0 - Blizzard's Easy Party Switcher
http://forum.chaos-project.com/index.php?topic=1688.0 - Legacyblade's Class Changer

Long story short, I need the the other three added in such a fashion that they can be accessed off of Ryex's CMS.

Short story long, I managed to do this with an old ring menu I was using, but Ryex is undoubtedly better at scripting than that author was.  To be more clear, I just need the menu options expanded to include the party and class changers, and the status option changed to the stat distribution system.

The custom scene setup in Ryex's CMS works for the stat distribution, but it only opens at the first actor in the party regardless of which you choose.  I guess I could suffer that if I had to, but that's a bit tacky and I don't want to put these scripts in a project that won't do them any justice.

I know it's probably a lot to ask of someone, but until it's confirmed that there's no hoping of using all four together in harmony, I'm dead-set on using them.  So, any help at all would be greatly appreciated.  I'd really like to hear what the creators think about it, but I do respect the possibility of them being busy with other things.

Blizzard

Actually adding menu options in the CMS should be a 5-minutes job. I'm pretty sure somebody will do that for you. :)
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ophiuchus

I hope so.  I feel kind of dumb that I couldn't manage it myself, but then again I don't really know RGSS that well.

Great scripts, by the way.  Exactly what I needed, especially the stat distribution.


Ophiuchus

I can't seem to access that.  I don't have permission, it says.

Starrodkirby86

Let's look inside the CMS.

  PLUGINS = []
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Do you have a scene or menu that you want to link to the option menu?
# A plug-in perhaps? To add an option on the option menu that
# will call your scene simply use this format.
=begin
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if $RyexCOLCMS
  desc = '<insert description of the plugin to be displayed in the help window here>'
  RyexCFG::PLUGINS.push(RyexCMS::Plugin.new('<name of plugin>', desc) do
    $Scene = <scene you want to call>.new
  end
  )  #don't forget this line
end
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=end
# its that simple
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


So follow his format to a T. You do have to know what scenes those scripts are though.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Ophiuchus

Unfortunately that only adds to the "Options" menu, the part with the sfx and music volumes.  While I do plan to use that, it's not what I'm needing.

Jackolas

the script is to big to post here :S

am waiting for google docs to approve the document and than you should be able to view it with the link i posted

unless you have a better way of sharing it

Ophiuchus

I don't, sorry.  But no worries, I'm patient.

Ryex

I really need to add a plug in system for the main menu it seems

any way here is a quick solution for your status screen replaced with stat distribution system edit
Spoiler: ShowHide


first off replace def load_scene_status with the following method

  #--------------------------------------------------------------------------
  # * Loads the Status Screen
  #--------------------------------------------------------------------------
  def load_scene_status(actor_index = 0)
    if RyexCFG::CUSTOM_STATUS_SCENE != nil
      $actor_index_status = actor_index
      RyexCFG::CUSTOM_STATUS_SCENE.call
    end
    @Scene_Status_active = true
    @status_intro == nil
    @actor_index_status = actor_index
    # Get actor
    @actor_status = $game_party.actors[@actor_index_status]
    # Make status window
    @status_window_status = Window_Status_Ryex.new(@actor_status)
    @status_window_status.back_opacity = 180
    @status_window_status.y = - 480
  end


all this dose is add the $actor_index_status variable and set it equal to the actor index

then
then in the custom scene status selection configuration use
$scene = Scene_Points.new($scene, $actor_index_status)

as the scene command


then go into the stat distribution script and find these lines

#==============================================================================
# Scene_Points
#==============================================================================

class Scene_Points
 
  def initialize(classe = $scene.class)
    @scene = classe
  end
 
  def main
    @command_window = Window_Command.new(224, BlizzCFG::DistroCommands)
    @command_window.y = (BlizzCFG::WINDOW_MODE ? 256 : 0)
    actor = $game_party.actors[0]



replace
 def initialize(classe = $scene.class)
    @scene = classe
  end

with

def initialize(classe = $scene.class, actor = $game_party.actors[0])
  @scene = classe
  @actor = actor
end


also replace
actor = $game_party.actors[0]

with
actor = @actor


and it should work


the rest is a bit complicated as I designed this system differently than the default menu

Spoiler: ShowHide

here is what you need to do for each command you want to add to the menu

FIRST
find the load_scene_menu method

inside it near the top of the method find these lines

        @command_window = Window_HCommand_WI.new(192, [[RyexCFG::MENU_ICONS[1],
        $data_system.words.item], [RyexCFG::MENU_ICONS[2], $data_system.words.skill],
        [RyexCFG::MENU_ICONS[3], $data_system.words.equip],[RyexCFG::MENU_ICONS[4], "Status"],
        [RyexCFG::MENU_ICONS[5], "Save"], [RyexCFG::MENU_ICONS[6],"Options"], [RyexCFG::MENU_ICONS[7],"Exit"]
        ])

this is the array that holds the menu commands
it works like this
@command_window = Window_HCommand_WI.new(192,

starts the creation of the command window but there is still a parameter missing so the rest of the line and the following lines hold the menu commands and it works like this
[[<string for the first menu command's Icon name>, <string for the first menu command>], [<Next menu command's icon>, <next menu command>], ect. ]

to add a new command simply add a new array at the end of the main array that looks like [<icon string>, <command>]

but simply doing this only adds the option's text and icon it dose not make it do any thing so here's how you do that

find the update_command method

note these lines


# 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
        @intro = 0
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @actor_window.active = true
        @actor_window.visible = true
        @actor_window.index = 0
        @actor_select_intro = false
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @actor_window.active = true
        @actor_window.visible = true
        @actor_window.index = 0
        @actor_select_intro = false
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @actor_window.active = true
        @actor_window.visible = true
        @actor_window.index = 0
        @actor_select_intro = false
      when 4  # 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
        if RyexCFG::CUSTOM_SAVE_SCENE != nil
          RyexCFG::CUSTOM_SAVE_SCENE.call
        end
        @intro = 4
      when 5  # Option
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        if RyexCFG::CUSTOM_OPTION_SCENE != nil
          RyexCFG::CUSTOM_OPTION_SCENE.call
        end
         @intro = 5
      when 6  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        if RyexCFG::CUSTOM_EXIT_SCENE != nil
          RyexCFG::CUSTOM_EXIT_SCENE.call
        end
        @intro = 6
      end

this is the basic set up for how to add what to do when a command is selected
right before the last end in those lind add a line like this
when x

where x is the position of your command in the previous array - 1
so for the first command you add x will be 7, the second 8, and the third 9 ect. note that those numbers are entirely dependent on the fact that you did add the options at the END of at array in the command to create the commands window.

now here is where it can get complicated if you want the menu to animate closed before switching scenes. (not recommended for noobs at scripting)

if you DON'T it is really simple (recommended for scripting noobs, also a lot faster)

just add a line like so (use only one of these lines for now dependent of which option you added first to the array

for Class Change script
$scene = Class_Change_Scene.new


for Easy Party Switcher
$scene =  Scene_PartySwitcher.new(<add extra options here according to Blizz's instructions>)


then add another when x line for your next option and add the other line above that your didn't add before

NOTE: be sure you added all the lined befor the last "end" in the code exert form the method

if you DO wan the menu to animate closed PM me but make sure your ready for a bit of work because it could take a while to make the necessary modifications.




I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Ophiuchus

On the status replacement, after making those edits, I get this error when trying to select an actor for status:

Script '(*) Stat Distribution System' line 212:  NoMethodError occurred.
undefined method 'battler_name' for 0:Fixnum

Ryex

oh sorry


def initialize(classe = $scene.class, actor = 0)
  @scene = classe
  @actor = $game_party.actors[actor]
end


that should work
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Ophiuchus


Ophiuchus

November 11, 2009, 07:44:58 am #13 Last Edit: November 11, 2009, 07:57:44 am by Ophiuchus
It seems I spoke too soon.  I opted to not have the new windows animated and just do it the easy way.  The windows work just fine, but the menu is visible through the class changer for some reason.

Edit:  Never mind, I got it all working right now.  And I surprised myself.  I got the new windows to animate.
Thanks again for the help, Ryex.  Also, sorry for the double post.