Ultra Mode 7 [RMMV & RMMZ]

● ARCHIVED · READ-ONLY
Started by bblizzard 1291 posts Page 39 of 65 View original ↗
  1. HintonR said:
    what does map borders mean?

    also Hi Bblizzard.

    I found an issue I'm having on larger maps and large objects where objects near the bottom of the map are getting zoomed when I'm on the upper half of the map.

    Spoiler
    View attachment 125236
    View attachment 125237
    I've tried adjusting some parameters but I'm not getting any luck with getting it fixed within the plugin manager.

    Update: So right now, I've made a workaround using a fade-in/fadeout sensor comment using a different plugin so that beyond 15 tiles the object fades out.

    But just giving a heads up about the issue of zooming large objects.

    That is just how it works, there has been a lot of posts on the subject xD
    Your work around is pretty clever though, thanks for sharing!
  2. @HintonR set Near Z to 0
  3. Chef said:
    @HintonR set Near Z to 0

    seems to have worked. does that change anything else btw? thanks!
  4. HintonR said:
    seems to have worked. does that change anything else btw? thanks!
    Nope, only tells UM7 when to pull up events.
  5. The last update (map borders) allows you to set up the camera so it won't get past the distance specified by the parameters. For example, if you include <UltraMode7_BorderHorizontal:8> as a map note, the camera won't follow the player when it is 8 horizontal tiles away from the horizontal borders of the map (the player will move to the border of the screen instead of always being centered by the camera).
  6. Yeah, this map borders thing was requested a few times in the recent weeks and TheNewSon PM'd me also asking about it. So since there was a "high demand" for that feature, I sat down and implemented it. It's basically the same as with normal maps when you get to a map border and the screen stops centering on the player.

    @HintonR The near-Z coordinate defines how close to the camera objects have to be to stop being rendered. Since UM7 works with 3D coordinates rather than map coordinates, it's not possible to have a reliable near-Z value for all situations (e.g. different pitch values work better with different near-Z values). I opted for a default setup that should work for most games, but if you use a different pitch value, you definitely have to tweak the near-Z value as well. I agree that the fade-out sensor is a clever workaround, but that's exactly the same what UM7 does when objects get beyond the near-Z and far-Z coordinates. xD So just try out other values for near-Z if you run into more issues.

    If it's any consolation, I've been playing Octopath Traveler recently and I noticed a few times objects (usually trees and bushes) that were too close to the screen like that over the course of almost 80h of gameplay. So even AA and AAA devs have this issue and might not be able to reliably solve it. xD
  7. Hey @bblizzard, is it possible to change the white fade parameters on a per-map basis?

    I would really like to have different values on different maps.
  8. @bblizzard a few months ago (if it isn't a year already) you made the function to bend a map. Do you still want to keep that for yourself or maybe publish it against payment?
    The only thing I want to solve is the visibility of map borders, the straight line looks ugly. The last update already helped a lot on all sides except for north. Since my pitch is 64 degrees it's almost always visible. I looked for a way to solve it and saw Animal Crossing New Leaf which uses a bend map to hide its rough edges. Funny enough I noticed AC also has the Near Z problem, but with events popping invisible instead of moving into the camera. So I don't need the cilinder and weird forms you showed earlier, but just a "bump" like Animal Crossing has.

    @EthanFox isn't that in the last update already? Thought I read about it...
  9. Chef said:
    @EthanFox isn't that in the last update already? Thought I read about it...
    I think that was just the colour? I want to change the near/far fade distances.
  10. @EthanFox You're right, I only added color to be modifiable. Sure thing, I'll add it tomorrow.

    @Chef Nope, not even for sale, sorry. :) I wanna keep a bit of custom stuff for myself. But my code actually wouldn't help you much. The horizon is still a straight line with my extra code. It requires more changes in the formula to have a curved horizon and that would mean that the click raycasting would also need changing. And it took me 25h to get that nasty piece of code right in a curved space.

    EDIT:

    @EthanFox Done. :)
  11. @bblizzard well that sucks, then I'll find another way around :) . Thank you for still updating the plugin!
  12. Chef said:
    Maybe I'm being a bit dense here but is it possible to change the Z-value of the player (and maybe events) with the camera following the player?

    *to achieve the same effect as KMS with his/her mode7 demo a few years back. The one with the airship.

    I'm curious if anyone ever found a worthy solution to this. I'm less interested in the z value and more interested in the camera following the player's back and an ability to turn 1 degree at a time instead of 90. Definitely think Super Mario Kart and F Zero.
  13. @HeyLookAnotherQuest You can do that with events. Use the script calls mentioned in the help section. Edit: Eh nvm, that ain't very smooth.

    @bblizzard Is there a way to move the camera closer to the actor1? Currently the camera is the closest to the last follower.
    gif
    movie_2019-10-18_125923-2.gif
    Look at the distance between the player and the camera and all that green grass in between... TT Is there any way to change that? Also, can the camera be shifted a bit up so not so much of the ground is showing?
  14. @HeyLookAnotherQuest Read on from this post: https://forums.rpgmakerweb.com/index.php?threads/ultra-mode-7.94100/page-26#post-959951 You need Altimit Movement and a bit of extra code that I explained in the following posts.

    @Hyouryuu-Na Change the camera distance Z parameter. I suggest changing it in the plugin settings to it applies globally for your game. You can, however, use custom values for certain maps and even change them on the fly.

    I don't have a vertical offset really supported in the plugin for camera. I'll add it now. It's obviously useful to some people and it probably only takes 15-20 minutes.
  15. Thank you! That'll be very helpful! I actually had a question too, is the latest version not compatible with Khas Ultra lighting? I found that it's not... but it could be that it's a problem on my end because I did change some things in khas plugins to make it compatible with QMovement. Now I'm using version 1.3.7 :/
  16. v1.5.2 is out, I added camera Y.

    IDK, I remember that it worked just fine. Definitely try the newest version. Maybe there was an issue with Khas Ultra Lighting that I fixed later. And make sure put UM7 below Khas Ultra Lighting in the plugin manager. If you still have issues, you might want to apply the same changes to UM7 that you did to Khas's plugin to make it work with QMovement. The code is somewhere at the bottom and it's not too complex.

    Oh BTW, you might wanna play around with BASE_SCALE_Z as well as CAMERA_DISTANCE. Usually those two values go hand in hand.
  17. @bblizzard @Chef @seaotter @Hyouryuu-Na

    Thanks so much for the quick reply. Sadly I'm still very new at this so I'm still quite unsure how to proceed, but I appreciate the incredible support this community offers.

    In my attempt to position the camera behind the character for a Super Mario Kart like experience...

    I downloaded the Altimit movement plugin to allow for 360 degree movement.

    After creating a new map, should I define <UltraMode7_Yaw:> in the map notes? Or do I just leave it in UltraMode7 and deal with the yaw later in an event somewhere on the map.

    Where and how do I use the movement vector coordinates Math.cos($gameMap.ultraMode7Yaw), Math.sin($gameMap.ultraMode7Yaw) and how do I multiply them by 48/60 or any number for that matter?

    Thanks again for your help. I feel a lot of the variables will be easier to play with but I'm really struggling to get started here.

    Thanks!
  18. @Chef Didn't I fix that one demo for you? You think you could share that code?
  19. The newer version of UltraMode7 isn't compatible with Khas ultra lighting v4.2. I could solve the problem by copying the fix from the old version onto the newer one. The fix was made by bblizzard .IF the newer version doesn't work for you, I'm pasting it below:
    click me!
    //=============================================================================
    // KhasUltraLighting compatibility
    //=============================================================================

    if (Khas && Khas.Graphics && Khas.Graphics.version >= 1.1 && Khas.Lighting && Khas.Lighting.version >= 4.2)
    {
    //=============================================================================
    // Game_CharacterBase
    //=============================================================================

    Game_CharacterBase.prototype.lightScreenUltraMode7X = function()
    {
    return Math.round((this.scrolledX() + 0.5) * $gameMap.tileWidth() + $gameScreen.shake());
    };

    Game_CharacterBase.prototype.lightScreenUltraMode7Y = function()
    {
    return Math.round((this.scrolledY() + 0.5) * $gameMap.tileHeight());
    };

    var UltraMode7_Game_CharacterBase_prototype_lightScreenX = Game_CharacterBase.prototype.lightScreenX;
    Game_CharacterBase.prototype.lightScreenX = function()
    {
    if (!$gameMap.useUltraMode7)
    {
    return UltraMode7_Game_CharacterBase_prototype_lightScreenX.call(this);
    }
    var x = this.lightScreenUltraMode7X();
    var y = this.lightScreenUltraMode7Y() + $gameMap.tileHeight() / 2;
    return UltraMode7.mapToScreen(x, y).x;
    };

    var UltraMode7_Game_CharacterBase_prototype_lightScreenY = Game_CharacterBase.prototype.lightScreenY;
    Game_CharacterBase.prototype.lightScreenY = function()
    {
    if (!$gameMap.useUltraMode7)
    {
    return UltraMode7_Game_CharacterBase_prototype_lightScreenY.call(this);
    }
    var halfTileHeight = $gameMap.tileHeight() / 2;
    var x = this.lightScreenUltraMode7X();
    var y = this.lightScreenUltraMode7Y() + halfTileHeight;
    return UltraMode7.mapToScreen(x, y).y - halfTileHeight * this.screenScale();
    };

    //=============================================================================
    // Game_LightTile
    //=============================================================================

    Game_LightTile.prototype.scrolledX = function()
    {
    if (!$gameMap.useUltraMode7 || !$gameMap.isLoopHorizontal())
    {
    return $gameMap.adjustX(this._realX);
    }
    return $gameMap.adjustUltraMode7X(this._realX);
    };

    Game_LightTile.prototype.scrolledY = function()
    {
    if (!$gameMap.useUltraMode7 || !$gameMap.isLoopVertical())
    {
    return $gameMap.adjustY(this._realY);
    }
    return $gameMap.adjustUltraMode7Y(this._realY);
    };

    Game_LightTile.prototype.lightScreenUltraMode7X = function()
    {
    return Math.round(this.scrolledX() * $gameMap.tileWidth() + $gameScreen.shake());
    };

    Game_LightTile.prototype.lightScreenUltraMode7Y = function()
    {
    return Math.round(this.scrolledY() * $gameMap.tileHeight());
    };

    Game_LightTile.prototype.screenScale = function()
    {
    if (!$gameMap.useUltraMode7)
    {
    return 1.0;
    }
    var x = this.lightScreenUltraMode7X() + $gameMap.tileWidth() / 2;
    var y = this.lightScreenUltraMode7Y() + $gameMap.tileHeight() / 2;
    return UltraMode7.mapToScreenScale(x, y);
    };

    Game_LightTile.prototype.isUltraMode7Visible = function(z)
    {
    if (!$gameMap.useUltraMode7)
    {
    return true;
    }
    if ($gameMap.ultraMode7Fov <= 0)
    {
    return true;
    }
    if (!z)
    {
    var x = this.lightScreenUltraMode7X() + $gameMap.tileWidth() / 2;
    var y = this.lightScreenUltraMode7Y() + $gameMap.tileHeight() / 2;
    z = UltraMode7.mapToScreen(x, y).z;
    }
    return (z > UltraMode7.NEAR_CLIP_Z && z < UltraMode7.FAR_CLIP_Z);
    };

    var UltraMode7_Game_LightTile_prototype_lightScreenX = Game_LightTile.prototype.lightScreenX;
    Game_LightTile.prototype.lightScreenX = function()
    {
    if (!$gameMap.useUltraMode7)
    {
    return UltraMode7_Game_LightTile_prototype_lightScreenX.call(this);
    }
    var x = this.lightScreenUltraMode7X();
    var y = this.lightScreenUltraMode7Y() + $gameMap.tileHeight() / 2;
    return UltraMode7.mapToScreen(x, y).x;
    };

    var UltraMode7_Game_LightTile_prototype_lightScreenY = Game_LightTile.prototype.lightScreenY;
    Game_LightTile.prototype.lightScreenY = function()
    {
    if (!$gameMap.useUltraMode7)
    {
    return UltraMode7_Game_LightTile_prototype_lightScreenY.call(this);
    }
    var halfTileHeight = $gameMap.tileHeight() / 2;
    var x = this.lightScreenUltraMode7X();
    var y = this.lightScreenUltraMode7Y() + halfTileHeight;
    return UltraMode7.mapToScreen(x, y).y - halfTileHeight * this.screenScale();
    };

    //=============================================================================
    // Sprite_Light
    //=============================================================================

    var UltraMode7_Sprite_Light_prototype_refreshScreenPosition = Sprite_Light.prototype.refreshScreenPosition;
    Sprite_Light.prototype.refreshScreenPosition = function()
    {
    UltraMode7_Sprite_Light_prototype_refreshScreenPosition.call(this);
    if (!$gameMap.useUltraMode7)
    {
    return;
    }
    // some safety guards to ensure compatibility with custom objects
    if (this._character)
    {
    if (this._character.screenScale)
    {
    var scale = this._character.screenScale();
    this.scale.x = scale;
    this.scale.y = scale;
    }
    if (this._character.isUltraMode7Visible)
    {
    this.visible = this._character.isUltraMode7Visible();
    }
    }
    };

    }

    //=============================================================================
    Copy the above part and replace the one in the newer version...
  20. Hm, I'll update the plugin and add this tomorrow.

    EDIT: Ok, I checked the code differences and I see what might have been causing the issue for you. There's something with newer versions of MV that triggers when trying to check non-existent variables so I had to first make that variable if it didn't exist so avoid this crash (this is needed to check if Khas was installed as plugin). But if you were having issues with that, I changed the code to a variant that should avoid both problems altogether in v1.5.3.