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:
Copy the above part and replace the one in the newer version...
//=============================================================================
// 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();
}
}
};
}
//=============================================================================
// 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();
}
}
};
}
//=============================================================================