• 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!

[Tutorial] Adding more tiles to game window - Updated 7/6/2018

Any update for this for tfs 1.4 and otclient from mehah?

In tfs 1.4.2 this is already being implemented, you just need to change it in SERVER/SRC/map.h, at line: 160.

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

And in Mehah 2.0 release, in CLIENT/SRC/map.cpp, at line 40

C++:
MAX_VIEWPORT_X = 8, MAX_VIEWPORT_Y = 6;

And done...
I tested this today at twice the normal size:
1661055686141.png
Hope this helps!
 
In tfs 1.4.2 this is already being implemented, you just need to change it in SERVER/SRC/map.h, at line: 160.

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

And in Mehah 2.0 release, in CLIENT/SRC/map.cpp, at line 40

C++:
MAX_VIEWPORT_X = 8, MAX_VIEWPORT_Y = 6;

And done...
I tested this today at twice the normal size:
View attachment 70005
Hope this helps!
thank you for your response! question: i believe you are using the regular modeview, what if you change to viewmode 2? like to remove the side gray bars and just have the whole map? like this. and which values do you recommend?
1661057236351.png
 
thank you for your response! question: i believe you are using the regular modeview, what if you change to viewmode 2? like to remove the side gray bars and just have the whole map? like this. and which values do you recommend?
Like This ?
1661071362014.png
In this print above, I put the X = 16 and the Y = 9, but you can put it smaller, I put these values to get as close to the 16:9 aspect ratio, which is the most used by monitors today.

If you disable 'Limit Visible Dimension', you can see with ctrl -, a better view of the aspect ratio.
1661071714363.png
 
Like This ?
View attachment 70013
In this print above, I put the X = 16 and the Y = 9, but you can put it smaller, I put these values to get as close to the 16:9 aspect ratio, which is the most used by monitors today.

If you disable 'Limit Visible Dimension', you can see with ctrl -, a better view of the aspect ratio.
View attachment 70014
Do you know why it is like this?
1663357115370.png
1663357129526.png
 
You need to edit ServerSide too, like this:

ServerSide:
C++:
static constexpr int32_t maxViewportX = 17; //min value: maxClientViewportX + 1
static constexpr int32_t maxViewportY = 10; //min value: maxClientViewportY + 1
static constexpr int32_t maxClientViewportX = 16;
static constexpr int32_t maxClientViewportY = 9;
ClientSide:
C++:
MAX_VIEWPORT_X = 16, MAX_VIEWPORT_Y = 9;
Note*: It is for Mehah OTC 2.X and TFS 1.4
 
You need to edit ServerSide too, like this:

ServerSide:
C++:
static constexpr int32_t maxViewportX = 17; //min value: maxClientViewportX + 1
static constexpr int32_t maxViewportY = 10; //min value: maxClientViewportY + 1
static constexpr int32_t maxClientViewportX = 16;
static constexpr int32_t maxClientViewportY = 9;
ClientSide:
C++:
MAX_VIEWPORT_X = 16, MAX_VIEWPORT_Y = 9;
Note*: It is for Mehah OTC 2.X and TFS 1.4

do u think is possible only gm have this view?
and i'm thinking if 16x9 is a nice choice to pvp..
 
can someone explain why im getting these 3 checkboxes showing up when i enable sidebars in viewmode2?

Skärmbild 2023-07-10 000048.png
Skärmbild 2023-07-10 000043.png
wierd checkbox.png

only changes ive done in gameinterface.lua from latest mehah-otclient is forcing viewmode2 and put gameMapPanel:setKeepAspectRatio(false) under mode == 2 then
 
For anybody trying to implement that on TFS 1.5:

Remeber you should also edit setup.otml
 
Whenever I try to move an item that is further than the standard view range it gives an error 'there is no way.'
Any idea? Tried to fix it but failed.
 
I took it to make this customization now, I managed to implement it. but I noticed significant increased cpu usage:

if I put it in map.h
something like:


static constexpr int32_t maxViewportX = 161; //min value: maxClientViewportX + 1
static constexpr int32_t maxViewportY = 91; //min value: maxClientViewportY + 1
static constexpr int32_t maxClientViewportX = 160;
static constexpr int32_t maxClientViewportY = 90;

1727975297577.webp

CPU usage, which used to be around 4~6%, is now using 30%+,

If I use values like 250+ the machine crashes when opening the server.
and like 25/13 usage about 15%+

My idea was to put the enlarged view only for my game master, for my player checks.
You can set a lower value and use less CPU but I would like to try something different.

What could be causing this stress?

Maybe remove the MoveCreature since they don't need to see the gm, leaving just the CanSee?
Or does anyone know where this function call is located through the player so I can only put it if the player is gm sending the larger view?
 
1728128729959.webp
So guys, can anyone help me? I want to implement it, but the calls of the creatures on the map are weighing them down, preventing a view larger than 100x100...
I tried to search the entire source code, which is why I noticed that every creature also has a range around it on the entire map during each onthink, I would like to find this specific location and keep it normal. or put the view only for the gamemaster but I still haven't been able to find how.
 
Back
Top