Ultra Mode 7 [RMMV & RMMZ]

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:
Spoiler: 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...
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.
Hello, yes I do have the demo. I'll link it as soon as I get home. 1 thing though: I'm on vacation right now (first one in 3 years) and for the upcoming weeks I don't have acces to my PC at home, where the demo is.

Besides that Shaz made a Character Anchor plugin, which you can find on the first page of this thread.

Besides besides that, there is the hitbox problem. They turn around at the same angle as the camera. So if the camera is at 180 degrees everything is mirrored. Free flight to travel across a map without precise hitboxes shouldn't be a problem though.
You can actually disable that with CHARACTERS_ADJUST_SPRITE_DIRECTION. But now that I think about it, it probably makes sense so that this can be turned on/off on the fly... >_> Same with PLAYER_ADJUST_MOVE_DIRECTION (though this option only ever adjusts to 4 directions, not full 360°).
@bblizzard Sorry for asking so many times. But is there no way to zoom in while fov is 0? I sort of like the way the map looks when the fov is zero. But I can't seem to take the camera closer to the player.
There is no such thing as zoom from a logical stand-point when using ortho-projection. Because moving the camera "closer" has no effect on how big the characters appear on the screen with ortho-projection. I'm not sure if a normal zoom plugin would work, but if you want to map a different resolution to the screen, you can edit the call "this._ultraMode7ProjectionMatrix.setOrthoProjection" within the "Game_Map.prototype.refreshUltraMode7View" method. Keep in mind that this will likely cause artifacts, because of resolution mismatch.
@Hyouryuu-Na maybe you can move the camera upwards and set it stuck with an event or use Shaz's Anchor plugin and Altimit to change the players' hitbox.
@Hyouryuu-Na maybe you can move the camera upwards and set it stuck with an event or use Shaz's Anchor plugin and Altimit to change the players' hitbox.
:0 I can stick the camera to an event? How do I do that? I didn't have much time to play around eith mode7. Been busy with my current project for so long...
@Hyouryuu-Na yes that is possible with a plugin (which I don't know the name of ofcourse but I do know it exists) but that's not what I meant. Via an event you can move the camera in a certain x and y position, but it's only really useful for specific situations and cutscenes since it doesn't lock in that position.
Guess what I'm on my way home RN.
Shouldn't take _that_ long anymore before uploading the alteret Altimit Movement script.
https://1drv.ms/u/s!AsqbW0RDykVgi8MsVmvCmE4CQwtmkQ
Thanks! How do I use this plugin tho? @Chef
@Hyouryuu-Na put it above ultra mode 7 but under terrax lighting and quasi simple shadows, and turn it on. That's all.
PROVISIONALLY REDACTED. THE EDIT ORIGINALLY POSTED HERE DOES WHAT IT WAS MEANT TO DO, HOWEVER IT IS NOT 100% GUARANTEED FOR SIMILAR SITUATIONS. FOR THIS AND OTHER REASONS, THE CONTENTS OF THIS POST AND ANY LINKED MATERIAL HAVE BEEN PULLED BACK TO ACCOMMODATE THE RESPECTIVE LIMITATIONS.
I'm not sure if I understood this, but does this mean that nwjs crashed on Mac regardless of just canvas being used? Because that means that MV games don't run on Mac anymore. And in this topic I can see the same thing being mentioned: https://forums.rpgmakerweb.com/inde...catalina-update-compatibility-with-mv.114096/
There's no need to mention Mac not being supported in the plugin if MV games don't work on Mac anymore.
PROVISIONALLY REDACTED
What on earth is going on here?
Provisional edits that didn't quite go to plan. Otherwise there's nothing to see here.
It is clearly annoying. Why not some addendums?

ADDENDUM
I meant get notification on an interesting topic post that is all caps and is supposed to say absolutely nothing and then makes me wonder if I am an idiot not understanding what it was all about... twice~! 🙂
It is clearly annoying. Why not some addendums?

ADDENDUM
I meant get notification on an interesting topic post that is all caps and is supposed to say absolutely nothing and then makes me wonder if I am an idiot not understanding what it was all about... twice~! 🙂

Well sometimes things don't work out quite as you expected, however the point in this was that this plugin is one of several which is no longer compatible on macOS (even when using x64 nwjs to accommodate Catalina systems) and which has affected viable support simply by Apple being Apple and settling on however many ecosystem-protection decisions are required to make things worse for the rest of us. The ALL CAPS was simply for emphasizing that I pulled the originally-posted material to avoid further confusion on the subject.

With that said, I am still taking inventory on which visual tricks still work and where (as it's still possible that I may be doing an iPad release at the bare minimum for Apple support) so this may not be the last word I have on the matter.

EDIT: I should probably note at this point that it's still possible for a browser deployment (which is also an option for MV) to be used on macOS without regard for the limitations, and it's the same deal with basically anything that's built off an nwjs core (and that's not just with MV but also Cordova to name an example).

Original thread: https://forums.rpgmakerweb.com/threads/ultra-mode-7-rmmv-rmmz.94100/