• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Adding more tiles to game window - OTCv8

MatCollier

Member
Joined
Apr 28, 2019
Messages
11
Reaction score
6
So, I followed a lot of tutorials about adding new tiles to the game window.

I made the required changes on my source.

Currently using:

Lua:
        static constexpr int32_t maxViewportX = 11 + 4; //min value: maxClientViewportX + 1
        static constexpr int32_t maxViewportY = 11 + 4; //min value: maxClientViewportY + 1
        static constexpr int32_t maxClientViewportX = 8 + 4;
        static constexpr int32_t maxClientViewportY = 6 + 4;

On my map.h. All the changes were made on protocolgame.cpp and protogolgame.h aswell.

On OTCv8 game features I added:

Code:
    g_game.enableFeature(GameExtendedOpcode)
    g_game.enableFeature(GameChangeMapAwareRange)

But my screen looks like this:

As you can see, there's a little "black gap" on the left end of the window. I don't know why that happens. I've tried changing the values on map.h countless times already, to every possible combination. If I walk to the right, the black gap is "filled" and just disapears. If I walk to the left, the tiles that are supposed to be there will appear, but the gap will still be on the extreme left.

Note: the client is "zoomed out". I haven't figured out yet how to keep it that way, I always need to press ctrl - so I can zoom out again.

otclient_dx_YYLfdaf2eN.jpg

otclient_dx_nPGtHE3FR1.jpg

otclient_dx_bO4wKOfLPJ.jpg



Solution:

Since I wanted to keep the classic view, the solution was to change the changeMapAwareRange inside the gameinterface.lua
 
Last edited:
Wha value do you use? I want to do 1 zoom out. What value should i put here?


Lua:
if classic then 
    g_game.changeMapAwareRange(19, 15)
    gameMapPanel:addAnchor(AnchorLeft, 'gameLeftActionPanel', AnchorRight)
    gameMapPanel:addAnchor(AnchorRight, 'gameRightActionPanel', AnchorLeft)
    gameMapPanel:addAnchor(AnchorBottom, 'gameBottomActionPanel', AnchorTop)
    gameMapPanel:addAnchor(AnchorTop, 'gameTopBar', AnchorBottom)
    gameMapPanel:setKeepAspectRatio(true)
    gameMapPanel:setLimitVisibleRange(false)
    gameMapPanel:setZoom(11)
    gameMapPanel:setOn(false) -- frame
Post automatically merged:

I want that view with setzoom(14)
Lua:
if classic then 
    g_game.changeMapAwareRange(19, 15)
    gameMapPanel:addAnchor(AnchorLeft, 'gameLeftActionPanel', AnchorRight)
    gameMapPanel:addAnchor(AnchorRight, 'gameRightActionPanel', AnchorLeft)
    gameMapPanel:addAnchor(AnchorBottom, 'gameBottomActionPanel', AnchorTop)
    gameMapPanel:addAnchor(AnchorTop, 'gameTopBar', AnchorBottom)
    gameMapPanel:setKeepAspectRatio(true)
    gameMapPanel:setLimitVisibleRange(false)
    gameMapPanel:setZoom(14)
    gameMapPanel:setOn(false) -- frame

But im getting black border like this img:
1692583065310.png
 
Last edited:
Back
Top