[XP] Custom Resolution Compatibility Plug-Ins

Started by ForeverZer0, December 18, 2010, 01:41:22 pm

Previous topic - Next topic

CountVlad


hyuugacln

August 12, 2012, 09:57:08 am #21 Last Edit: August 12, 2012, 10:02:01 am by hyuugacln
Hello good sir,
I have trouble with making the Chrono Trigger CMS compatible with your script.

I have absolutely no experience with ruby. however, I tried to figure out how to offset the x-position of the elements manually. so that the menu stays in the middle of the screen:
Spoiler: ShowHide


This worked fine so far, but I have two problems I see myself unable to solve.
First problem:
Spoiler: ShowHide

As you can see, the list of the skills are not positioned in the right window as they are supposed to.
I was unable to find the line where the position is set.

Second problem:
Spoiler: ShowHide

For some reason the cursor is behind everything else. Without the script it is at the front.
I cannot really see what the problem is. :(

The code I have so far:
http://velima.lima-city.de/code.txt

As you can see, I di not change the absolute values but I added a "241+" to every x-position so I can change it afterwards more easily.

I am looking forward to your support and I apologize for any grammar mistakes I might have made :/

Greets,
hgcln

Zexion

Have you tried playing around with the script position. I too have a custom menu and this script did mess it up (as expected). Some errors were fixed on their own when i moved my menu script above it. I am referring to the cursor part, because if the code on the menu script isn't wrong and it works without this script, it might just be a placement issue, otherwise it could be just incompatibility :P

Sin86

Found an error with the custom script.

If I use the RPGXP editor for my project, I get an error that says "script hanging" after I start a preview of the game.

If I use Game.exe I do not get that error and the title screen does show up but it doesn't stretch out. If I hit new game I get this error.

"Script'Custom Resolution' line 342: NoMethodError occured. undefined method '[]' for nil:NilClass"

KK20

Is there a script conflict or are you just talking about the Custom Resolution script in general (in which case, your post should have been posted in that thread)?

The error points to updating autotiles. Did you make sure to run the game in debug first to create a cache file?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Sin86

I went as far as I can go by making a copy of my project and deleting all custom scripts such as Blizz ABS, Tons, Advance Weather etc. I still get the "Script is hanging" error after I preview the project.

I even went to do the same by using Game.exe and getting that error code that I previously posted. Also, because I got the error, I couldn't make my own data file that is needed for this to run so instead I had to try and get the data file from the resolution demo


Now, in the demo for the resolution script, I can do a preview just fine but of course, I do not get a title screen, it just goes straight to the game. In my project, I can get to the title screen with game.exe but after I hit new game, I get that error code that I just posted.

KK20

Google searches say that it's most likely the computer. Restart the computer and see if that does anything first.

Do you have a lot of map files in your game?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Sin86

I got alot of map files but I need to go look and see them again. My project is on another computer but I think it was near 760. I could be wrong, it is definatly above 760 or something close.

KK20

That's probably the reason. When you start the game in debug mode, does it show a black screen for a few seconds before popping up "Script is hanging"? Doing this will probably help:

Find this line near the bottom of the script
priority_data[map_id], autotile_data[map_id] = table, animated

And put
Graphics.update

just below it but within the bracket, like so

      priority_data[map_id], autotile_data[map_id] = table, animated
      Graphics.update
    }

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Sin86

Thank you KK20, it worked!

Unfortunatly, there is another error. Zexion posted it and I thought I should also say that I encountered the same too and I haven't seen any solutions of his and my error yet.


"Script:'Custom Resolution' line 551: NoMethodError occurred.
undefined method 'width' for nil:NilClass"

I get this error only when I have an event that deals with changing panoramas. If there is nothing involving changing a panorama, then the error doesn't appear.

KK20

In the script, find the Plane class. Then find the method def bitmap=

It should now look like this (I added the return if tile.nil?):

  def bitmap=(tile)
    @bitmap = tile
    return if tile.nil?
    # Calculate the number of tiles it takes to span screen in both directions.
    xx = 1 + (SCREEN[0].to_f / tile.width).ceil
    yy = 1 + (SCREEN[1].to_f / tile.height).ceil
    # Create appropriately sized bitmap, then tile across it with source image.
    plane = Bitmap.new(@bitmap.width * xx, @bitmap.height * yy)
    (0..xx).each {|x| (0..yy).each {|y|
      plane.blt(x * @bitmap.width, y * @bitmap.height, @bitmap, @bitmap.rect)
    }}
    # Set the bitmap to the sprite through its super class (Sprite).
    super(plane)
  end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

sekiraze

got a problem with UMS :/ Neither is the window centered, nor do the scripts work inside :c

wat do?

Spoiler: ShowHide

KK20

Around line 780

class Window_Message < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # x-coordinate depends on justification
    if $game_system.window_justification == RIGHT
      x = 640 - self.width
    elsif $game_system.window_justification == LEFT
      x = 0
    else # center
      x = (640 - $game_system.window_width) / 2
    end
    # y-coordinate depends on height
    y = 480 - $game_system.window_height - 16

Change the 640 and 480 to whatever screen resolution your game is using. And what do you mean by the scripts inside? As far as I can tell, you put /inc when it should be \inc

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

sekiraze

so i did this:

def initialize
    # x-coordinate depends on justification
    if $game_system.window_justification == RIGHT
      x = 1248 - self.width
    elsif $game_system.window_justification == LEFT
      x = 0
    else # center
      x = (1248 - $game_system.window_width) / 2
   
      end
    # y-coordinate depends on height
    y = 704 - $game_system.window_height - 16


i fixed it from /inc to \inc (stupidity)
but still.

Spoiler: ShowHide


Spoiler: ShowHide


i do not understand. it just seems so logical that it should work but i have no clue why it doesnt ._.

this is my textbox:
Spoiler: ShowHide


i would like it to be permanent size when it comes to the talking
(my first idea but i cant figure out how to reposition the text)
Spoiler: ShowHide


and the name should be above the textbox in the greyish area and instead of faces, pictures behind the box.

KK20

Hmm..okay how about CTRL + H and do the following changes:
640 replaced with 1248
680 replaced with 1288
480 replaced with 704

What happens after that?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!


KK20


Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

sekiraze

January 09, 2014, 01:48:34 am #37 Last Edit: January 09, 2014, 03:54:08 am by sekiraze
i feel cursed :I i'll try to fix it and find the solution to the problem!!!

EDIT: ill try to re-insert Window_Message and the Fix for it and the Fix for the UMS and the UMS itself.

EDIT II: dunno how but i got this error now:

Script 'UMS COMP' (the ums fix) line 348: NoMethodError occured.

undefined method `SCREEN' for#<Window_Message:0x98fff18>

Line 348
if ((SCREEN{0} + 40) - (self.y + self.width)) < @input_number_window.width


NVM FIXXED IT. i just deleted the UMS Fix and it works fine. i still changed the coordinates in the original code and it looks fine as hell!

Moshan

 Hello! I would really appreciate if someone can help me with this.
I'm not sure if this is an incompatibility issue (my guess is that ForeverZer0's Complete Climate and Time System is causing the problem), but everytime I run my game with the Custom Resoultion script if I move my character the screen is freezing. This thing happens faster if I use the button for running (Blizz-Abs feature). After 5-10 seconds of freeze I get an error : Script is hanging. Is it because of CCTS? Or is something else that makes it to crash?
Script list in order:
Spoiler: ShowHide

Blizz-Abs Addons
CCTS
GUILLAUME777's Multi-Slot
Zer0_CMS
Blizz-ABS
Z-HUD
LiTTleDRAgo Show event name
Custom Resoultion
Blizz-ABS compatibilty with custom res


Also...the map is moving...I put a video on YT to exemplify my issue:
Spoiler: ShowHide

KK20

Looks like you are using some sort of smooth scroll script. At this time, the only fix to that is to replace all floats in the script to integers. So remove anything after a decimal point in the number (such as change 16.0 into 16). The effect will be reduced, but it still passes.

Reason: The tilemap script currently works on using a bunch of sprites. To make the effect of moving, the tiles' x/y values are changed. The smooth scrolling script will subtract the x/y values with floats.

tile.x -= 3.5623874 #or some odd number like that

The real problem is the rounding that occurs.
If you were to subtract a sprite's X value by, say, 0.2, it will round up to the nearest integer (or 1). Smooth scroll scripts always, on every frame, keep subtracting these X values, even when you are standing still. It's kinda hard to explain, but trust me on that.

So think about it: every frame, you're subtracting the tiles' X/Y value by a number less than 1, but it still treats this number as if it were a 1. That explains the ghostly movement of the tiles disappearing offscreen and, as a result of having the sprites not being in the right coordinates, creates an error.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!