Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Can anyone edit this small part of this script for me, please?

The script itself is the TOS CMS that Vash made and I've edited it myself to my liking. However, with my limited knowledge of Ruby I can't for the life of me figure out how to do this:

I want it so that you can have up to eight party members in your team at a time and switch them on the fly in the menu... however, when I do this, the battles explode. I have to set it so that both the battles and the menu have eight characters or else it doesn't work... and this isn't to my liking because then four characters are on screen while the other four characters appear off screen during battles and I only want four members in the battle anyway.

I've read on the original topic that you can leave both numbers at four and still add party members without any trouble... this does work, however I can't switch the characters on the menu. It won't let me scroll down to see the other members when I want to switch.

This is the part of the script that that edits the limit of characters during battle:
Code:
class Scene_Battle
alias vash_tos_remove_main main
def main
@saved_actors = []
if $game_party.actors.size > Vash_ToS::PARTY_BATTLE
for i in ToS::PARTY_BATTLE...$game_party.actors.size
@saved_actors << $game_party.actors[i].id
$game_party.remove_actor($game_party.actors[i].id)
end
end
vash_tos_remove_main
end

alias vash_tos_add_battle_end battle_end
def battle_end(result)
for actor_id in @saved_actors
$game_party.add_actor(actor_id)
end
vash_tos_add_battle_end(result)
end
end

I'm pretty sure that needs to be edited in there somewhere for it to work... however, this looks very complicated to me, X_X. I don't know what anything means to me. Can any advanced scripter edit this so that my eight-members-in-menu-while-there-is-only-four-in-battle idea will work? I'll really appreciate it!
 

khmp

Sponsor

There is a module or class named Vash_ToS & ToS could you post those? And from the code given it doesn't seem like it should crash if a larger party existing. So I'm guessing that either the other class is not compatible with this script and in that case we'll need to see the script you are using to get a party larger than the standard maximum, or there is a problem with the above code which I doubt. Perhaps you should just post a demo of the project.
 
Hmm... strange. I searched the entire script for "Vash_ToS" and I found where it gets initialized. Then I searched for just regular "ToS" and guess what... that part in the code is the ONLY time that's mentioned! I though, "Hmm... that's strange." I then added "Vash_" in front of that ToS... and well, it SEEMS to fix the problem... but only sometimes. It like, depends on the party members. o_O

If you want to look at the script, here's the demo:

http://rapidshare.com/files/71622565/mmmrpg.zip.html

The script is called "ToS Menu" and the line where that particular code that I posted starts at line 452. Thanks for taking the time to help me out with my project. :D

Hmm... wow, my game's 12MBs!? There's no MP3... o_O Huh... well, that's irrelevant anways...
 
Hmm, well, you know what? I request this topic to be locked. I got my problem fixed by getting another script and merging the two myself and now it works beautifully. Ah well, thanks anyway khmp.
 

khmp

Sponsor

Sorry mate I looked and couldn't generate the problem ':| However I will say congrats on solving it yourself. Hopefully if you ever have any trouble in the future I will be able to provide more help than with this problem.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top