[ACE] [Solved!] (Monogatari) Adding either a scenecall or extra menu

Discussion in 'RGSSx Script Support' started by SlaveOfThaMind, Apr 25, 2015.

  1. SlaveOfThaMind

    SlaveOfThaMind Game Developer / Musician Veteran

    Messages:
    239
    Likes Received:
    23
    Location:
    USA
    First Language:
    English
    Hello everybody, I'm here with a somewhat difficult (for me) problem.

    Now I am no coder, I should say, but I can follow directions perfectly. 

    I am using the Monogatari Menu system and I am attempting to add in a secondary skill system. ( Galv's Magic Shards )

    First of all I have attempted to get this to work and I actually got somewhere before hitting a wall. I placed Galv's script below the menu script and above main.

    I got an error about the cursor. ('Galv's Macig Shards' Line 1227: TypeError occurred. superclass mismatch for class Sprite_cursor.

    Being that Monogatari has a custom cursor as does galv's, what I did was eliminate each code that gave an error about the cursor. I was then able to start a game, open the menu, navigate to the "shards" 

    tab, and open up that menu, however no matter which character was selected, it would only show the main character in the Galv's magic shards scene. Not to mention the cursor was funky.

    I'm sure it wasn't wise to delete any of the lines of code within the Magic Shard script, but hey, it actually solved many of the problems. 

    I am  wondering now if, as I've heard, it would be easier to add a scene call command into the monogatari script? And if so how ( I don't know how) and where exactly in the script would I go about doing so?

    I've uploaded each of the scripts in question ( both clean and untouched )

    Thanks in advance!

    Edit: Realized I uploaded the scripts but did not include links for direct download. Sorry about that!

     | Script Links Below   |

    V                                V

    Both contain a downloadable Demo

    Mog's Monogatari Menu

    Galv's Magic Shards

    Magic Shards.txt

    Monogatari.txt
     

    Attached Files:

    Last edited by a moderator: May 8, 2015
    #1
  2. SlaveOfThaMind

    SlaveOfThaMind Game Developer / Musician Veteran

    Messages:
    239
    Likes Received:
    23
    Location:
    USA
    First Language:
    English
    Bump
     
    #2
  3. SlaveOfThaMind

    SlaveOfThaMind Game Developer / Musician Veteran

    Messages:
    239
    Likes Received:
    23
    Location:
    USA
    First Language:
    English
    I've spoke with Galv directly and he can not help with the issue

    SlaveOfThaMind says:
    April 29, 2015 at 9:41 am
    Curious if there is a way to add this system into Mog’s Monogatari Menu? I’ve tried everything to my knowledge and still await any help via the forums.

    Reply
    Galv says:
    April 29, 2015 at 9:07 pm
    I have not used Mog’s script so I’m sorry I cannot help you there

    Reply
    SlaveOfThaMind says:
    May 1, 2015 at 5:44 am
    Oh alright, that’s fine I’ll keep at it until it works, I need this system for my game! Thank you anyway Galv and for your timely reply to my inquiry!
    There should be a way to do this because with MOG's Monogatari script there are add-ons for a beastiary,music room,and picture gallery. Would it be possible to modify one of these additional scripts to call galv's magic shard system into the menu for use instead of say the enemy compendium?
     
    #3
  4. SlaveOfThaMind

    SlaveOfThaMind Game Developer / Musician Veteran

    Messages:
    239
    Likes Received:
    23
    Location:
    USA
    First Language:
    English
    bump
     
    #4
  5. SlaveOfThaMind

    SlaveOfThaMind Game Developer / Musician Veteran

    Messages:
    239
    Likes Received:
    23
    Location:
    USA
    First Language:
    English
    up
     
    #5
  6. SlaveOfThaMind

    SlaveOfThaMind Game Developer / Musician Veteran

    Messages:
    239
    Likes Received:
    23
    Location:
    USA
    First Language:
    English
    up
     
    #6
  7. SlaveOfThaMind

    SlaveOfThaMind Game Developer / Musician Veteran

    Messages:
    239
    Likes Received:
    23
    Location:
    USA
    First Language:
    English
    up

    edit: 

    SlaveOfThaMind, please do not bump your topic unless it has been 72 hours later since your last post. You can review our forum rules here. Thank you. 

    Sorry about that. Thought it was 24 hours....
     
    Last edited by a moderator: May 6, 2015
    #7
  8. Andar

    Andar Veteran Veteran

    Messages:
    28,611
    Likes Received:
    6,568
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    SlaveOfThaMind, please do not bump your topic unless it has been 72 hours later since your last post. You can review our forum rules here. Thank you.
     
    #8
    SlaveOfThaMind likes this.
  9. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    800
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    Galv and Mog named their cursors the same way, which is your source of the superclass mismatch error.

    But you do not simply remove something which is giving you an error, or you will get more errors coming your way.

    Easy fix for that, rename the cursor in Galv's script to 'Sprite_Cursor2' or something, there are 2 lines in the script where you need to edit that.

    But, because Mog's cursor is named @cursor in the scene itself, there comes another problem... Galv, surprise, named his cursor the same way (why can't people make unique names for their variables? -.-)... So, search for the 'Scene_Shards' class. In this class, search for any @cursor variable, and replace it with any name you like, for example, @cursorshard or something else you want, doesn't really matter, just make sure that it starts with the @ symbol.

    After this, you will need to provide an image for the menu command button. This is needed for Mog's menu system. Put it into Grahics/Menus/Main folder. The name of the image must start with CM_ and after that the name of your command button (by default, it is named Orb Shards, so the name of the image should be this: CM_Orb Shards).

    After this, you are ready to use the shard system.

    But because Galv inherited from SceneMenu_Base for his scene, there might be possible conflicts around, I haven't tested that much to know.

    You will see that Mog's cursor will be shown even when the orb window is active, which kinda looks bad. You can turn off Mog's cursor with the below snippet on Galv's scene if you want:

    module CURSOR_MENU_SPRITE def can_update_cursor_position? return false if !self.active return false if self.index < 0 return false if !self.visible return false if self.close? return false if SceneManager.scene_is?(Scene_Shards) return true endendPut this below Mog's cursor script.Well, test it yourself and see if it works without errors or not.

    Ohh, and the little issue when you are selecting actors on the main menu for the shards scene, you can fix the issue by calling the alias method before the new one in Galv's script in the 'def on_personal_ok' method. You will see a 'galv_shards_sm_on_personal_ok' line just before the end line in the mentioned method. Put that line at the top of the method instead. That will fix the actor selection and will bring up the correct actor in the shard menu upon selection.
     
    Last edited by a moderator: May 8, 2015
    #9
    SlaveOfThaMind likes this.
  10. SlaveOfThaMind

    SlaveOfThaMind Game Developer / Musician Veteran

    Messages:
    239
    Likes Received:
    23
    Location:
    USA
    First Language:
    English
    Quote:

     
    You are a very wonderful individual Sixth! Your first step worked wonders but now I am having an issue with your last two suggestions.
     
    "You will see that Mog's cursor will be shown even when the orb window is active, which kinda looks bad. You can turn off Mog's cursor with the below snippet on Galv's scene if you want:"
     
    Code:
    module CURSOR_MENU_SPRITE def can_update_cursor_position?   return false if !self.active   return false if self.index < 0   return false if !self.visible   return false if self.close?   return false if SceneManager.scene_is?(Scene_Shards)   return true endend
     I'm not certain where exactly to add this in on Galv's script. And honestly without it, I failed to notice Mog's cursor on the Galv Shard menu. Therefore I am not sure I need this?
    And also for:

    "Ohh, and the little issue when you are selecting actors on the main menu for the shards scene, you can fix the issue by calling the alias method before the new one in Galv's script in the 'def on_personal_ok' method."

    I see exactly where you are speaking of ( as shown below )

    if Galv_Shard::ADD_TO_MENUclass Scene_Menu < Scene_MenuBase alias galv_shards_sm_create_command_window create_command_window def create_command_window galv_shards_sm_create_command_window @command_window.set_handler:)shards, method:)command_personal)) end alias galv_shards_sm_on_personal_ok on_personal_ok def on_personal_ok if @command_window.current_symbol == :shards return SceneManager.call(Scene_Shards) end galv_shards_sm_on_personal_ok <------------------------------------------------------ endend # Scene_Menu < Scene_MenuBase class Window_MenuCommand < Window_Command alias galv_shards_wmc_add_main_commands add_main_commands def add_main_commands galv_shards_wmc_add_main_commands add_command(Galv_Shard::MENU_TEXT, :shards, !$game_switches[Galv_Shard::DISABLE_SWITCH]) endend # Window_MenuCommand < Window_Commandendhowever when i try moving this particular line to the top of its method, im pulling up a new error. 

    "undefined local variable or method 'galv_shards_sm_on_personal_ok' for Scene_Menu:Class

    Is there a specific area of the entire method this should be placed? And/Or am I missing an addition to it such as Class/alias/def/etc?
     As it stands the only remaining issue is now selecting which member's shards to edit!
     
    #10
  11. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    800
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    Simply putting the mentioned line at the start of the 'on_personal_ok' method solved the member selection for me.

    It should look like this:

    alias galv_shards_sm_on_personal_ok on_personal_ok def on_personal_ok galv_shards_sm_on_personal_ok # <-- Putting it here works for me. if @command_window.current_symbol == :shards return SceneManager.call(Scene_Shards) end #galv_shards_sm_on_personal_ok <-- This is the line moved to the top. endIf you put that line above the def line, than you will get the error you got. It needs to be put inside the method, so after the def line, but before the end line of the definition.That Mog cursor is shown when you are selecting shard places for equipping/removing the "orbs" at the top left corner of the shard circle window. At least it is there for me.

    Simply putting that little snippet above below Mog's Menu Cursor script will eliminate that visual annoyance.

    If it is not displayed for you, than you can ignore this part.
     
    #11
  12. SlaveOfThaMind

    SlaveOfThaMind Game Developer / Musician Veteran

    Messages:
    239
    Likes Received:
    23
    Location:
    USA
    First Language:
    English
    That did it Sixth! Thank you so much!

    I was popping that mentioned line above Alias so definitely above the def line.

    I'm not using a singular Mog's Menu Cursor Script. Only the Monogatari script. Looked specifically for the mog cursor at the top left corner of the shard circle window and didn't notice anything. I suppose I can ignore that then!

    I deeply and sincerely thank you for your helping me with this, I was beginning to think it was a lost cause! Who knew ( you, obviously ) it was such a simply fix!

    Many many thanks to you and your kindhearted efforts and speedy reply!

    This topic has been solved and may be locked!
     
    #12

Share This Page