Gauges - Undoing What A Script Changed

Hey all - novice scripter here, with a problem I've had no luck fixing myself. What I mean by that, is that a menu-mod script I was using has changed how HP and MP are written in-game. I no longer use this script, yet this one change remains. In "Example1", you'll see how it changed both HP/MP to look (note: the picture only shows HP, but that is how MP looks as well). What I would like to do is have whatever it changed to be undone, if possible.

The script can be found here: http://www.rpgmakervxace.net/topic/729-msx-scene-menu-mod/

The change only occurs when this script is added to a project. Removing it doesn't get rid of this change - everything else is reverted, though. I haven't found where such a change would be in the games default scripts, and searching around for such the answer has left me with nothing new.

Ultimately, moving all my current progress in the game I've been working on would be the guaranteed fix. It's just a lot of work that I'd like to try and avoid.

Example1.PNG

Example2.PNG
If a change remains even in the case of a "new game", then the script is not completely removed. However, you need to start a new game whenever there are changes in scripts, because some script data is stored in the savefile.


If it's not the savefile, then it's one of the following options:


1)


you still have the script somewhere in your project. This usually happens if you forgot to name a slot, and then added the script a second tome to a new slot.


So please check all "empty" slots in the script editor, one might contain something forgotten


2)


you removed the wrong script, the effect was part of another script that you added


Try disabling all other scripts with Alt-Q until you found the script that causes the change


3)


You manipulated one of the default scripts


Bad choice on your part. It can be repaired, but you need to find out which script was changed. That isn't easy because disabling the default scripts will break the engine, so 2) can't be used.
The menu-mod script is the only thing that causes the change - even in a completely clean project as the only script added. I only looked at the default battle scripts to see if I there was anything I could do myself in them. After reading through them, I found nothing that I could change and continued leaving those scripts alone. However, I have made changes to modify the in-game menu, none of which affecting combat. I've made sure by copying my changes of the default scripts over to a clean project - one by one. They did nothing to make it appear as it did in the first picture.

Alt+Q ended up with nothing changing. I should have mentioned that I use Neon Blacks CP Battle Engine:

http://forums.rpgmakerweb.com/index.php?/topic/4811-cps-battle-engine/

That script was what I first removed when I decided to tackle the issue - nothing changed. I also moved it to a clean project just to be sure, and the default look for the HP and MP gauges remained the same. As I said before, the menu-mod script I linked to in the original post is the only cause. I can't figure out myself what it did to change how HP and MP are drawn. There was no save file as I haven't needed to test anything else aside from in test battles and making sure events and cut-scenes are working properly. Is there no other possibility? Maybe you could take a look at that script? If you'd rather not and no one sees another possibility, I'll just take a day and move everything over to a new project. It's just a lot of work that I'd rather avoid, as I've said before.

Regardless, thank you for your time.
Could you upload the 'Data/Scripts.rvdata2' file somewhere? I could peruse through that and see what exactly is going on.
Did you try copying the Scripts.rvdata2 from a fresh project over yours and see if the problem still persists? Don't forget to take a backup of the file beforehand.
I've put it in my dropbox: https://www.dropbox.com/s/rol7ipe5u016rkq/Scripts.rvdata2?dl=0

@lavra: The problem remains even with the file being brought over to a knew project.
The issue is 'Syvkal Gauges' script, not the 'Scene_Menu MOD' script.
Oh? What did it do to make it the cause, if you don't mind my asking?

I removed it prior to removing the menu-mod script; adding it back after in order to have nicer looking bars. The issue remained even before re-adding it.
Just to clarify, are you talking about the look of the gauge bar, or the look of the text?
The text; how the current HP and total HP are written out.

Bit of background: Normally, I'd love the look. It's just that the spacing is terrible and I couldn't find a way to fix it. After my digging, I gave up and removed the menu-mod. The way the text is written is all that's left from the script. Another side-effect of it I've learned, since starting this thread, is that on the main menu that MP will show up even for those that have none/cannot use it, a feature I changed that works in other projects. I did manage to make it hidden in combat, but it remains on the menu for some odd reason.

If you'd like, I can share what exactly I changed to make it hidden - it was just adding an "if" statement, something I had added after the menu-mod was taken out.
At the moment, you have changed the default font within the project to 'Helvetica' within the 'main' script section. The font simply does not have enough space in the allotted text area near the bottom of the character graphic to retain the thicker lines, so the font must shift toward a thinner version that will fit.

alias cp_bv2_old_draw_item draw_item def draw_item(index) ## Draws different contents based on the mode. return cp_bv2_old_draw_item(index) if CP::BATTLERS.basic contents.font.size = line_height actor = $game_party.battle_members[index] rect = rect_by_style(index) draw_bv2_face(actor, rect, index) if CP::BATTLERS.style2 draw_basic_area_bv2(rect, actor) draw_gauge_area_bv2(rect, actor) contents.font.size = Font.default_size endAt line 758, the 'CP Battle Engine' script changes the 'default_size' of the current font to 'line_height' (18), which causes the font to adopt a thinner form. If you were to change line 758 to read as follows :

Code:
  alias cp_bv2_old_draw_item draw_item  def draw_item(index)  ## Draws different contents based on the mode.    return cp_bv2_old_draw_item(index) if CP::BATTLERS.basic    contents.font.size = 22    actor = $game_party.battle_members[index]    rect = rect_by_style(index)    draw_bv2_face(actor, rect, index) if CP::BATTLERS.style2    draw_basic_area_bv2(rect, actor)    draw_gauge_area_bv2(rect, actor)    contents.font.size = Font.default_size  end
Then the font would be able to render like the other text in the scene, except that the characters would overflow the gauge boundaries and generally look terrible. So finding a font that renders similarly in both large and small text areas is probably best.

gauge-text-a.png
gauge-text-b.png
 EDIT : A monospace (fixed width) font would probably be a good choice, if you can find one you like. Also note, that not everyone has 'Helvetica' installed on their system, so if you want to ensure the appearance of the game looks the same on other PCs, create the 'Fonts' folder in the main directory of the game and copy the selected font inside. 

gauge-text-c.png
( With 'NK57 Monospace' font )
Thank you for the tip on the font folder, didn't think of doing something like that.

I'll just search around for such a font, or use the one you've suggested (it does look very nice, admittedly). It'll be easy enough to just have my current font as message-font. Thank you for your help, Exhydra - and to both Andar and lavra for taking the time to respond.

The only other issue is something I mentioned once bit before; but not in my original post.

Spoiler
(Found at line 85; the addition I made is on line 89, at "draw_actor_mp" of the Window_Status is in bold)  #--------------------------------------------------------------------------

  # * Draw Basic Information

  #--------------------------------------------------------------------------

  def draw_basic_info(x, y)

    draw_actor_level(@actor, x, y + line_height * 0)

    draw_actor_icons(@actor, x, y + line_height * 1)

    draw_actor_hp(@actor, x, y + line_height * 2)

    draw_actor_mp(@actor, x, y + line_height * 3) if @actor.mmp > 0

  end\
 

That should hide the MP bar entirely for those with 0 MP, yet it doesn't. If I'm supposed to just make a new topic for it, since it wasn't mentioned at the start, I will.
The MP bar is entirely hidden for characters with 0 MP ... on the Status screen only. What you want to edit is 'draw_actor_simple_status' under 'Window_Base'. However, that method is over-written by the 'Menu EXP Gauges' script, so you will find 'draw_actor_simple_status' beginning at line 65 :

def draw_actor_simple_status(actor, x, y) draw_actor_name(actor, x, y + line_height * -0.3) draw_actor_level(actor, x, y + line_height * 0.7) draw_actor_icons(actor, x, y + line_height * 1.7) draw_actor_class(actor, x + 120, y + line_height * -0.3) draw_actor_hp(actor, x + 120, y + line_height * 0.7) draw_actor_mp(actor, x + 120, y + line_height * 1.7) if actor.mmp > 0 draw_exp(actor, x + 270, y + line_height * 1) #<== y * = 2.7 This line adds the exp gauge to "menu" status end The edit on line 71 will hide the MP bar for any character with 0 MP. 
Also, I see a lot of commented out edits in the default code above the 'Materials' line. I would strongly suggest against performing any edits in the default code; treat that area as read-only. Personally, whenever I want to edit any of the default code, I copy and paste an entire class/module underneath the 'Materials' line then start editing. Doing this leaves the default code in pristine order and ensures that the only thing you have to do to get back to the default is to either delete or comment out the copied block. I also clearly mark which methods I have overwritten, created aliases for or have created from scratch. I have saved a lot of time and headaches this way. 

script-window.png
Duly-noted - thank you, again, for all your help.

Original thread: https://forums.rpgmakerweb.com/threads/gauges-undoing-what-a-script-changed.40295/