Brunds
Member
- Joined
- Sep 2, 2014
- Messages
- 33
- Reaction score
- 7
My source used: 0.3.6 TFS
OTClient - Redemption 1.0 rev 0.000 (desenv) built on Jul 3 2023 for arch x64
Guys, the idea of this topic is to clarify information that I found in several places to compose the content that already exists and not leave room for common mistakes like what happened to me. Based on everything I've researched and found I'm going to clear up some information about installing the increase map view change on OTC Mehah and the Server
First thing is this tutorial is super valid and functional, as long as if you have something different from your source you need to adapt it and not just copy and paste the code
Now I'm going to talk about the list of things you should pay attention to when installing this modification
In the server part (source or src)
The value 24590 can be changed however it cannot be too high and also not below this suggested value so it is recommended to find a value that corrects the problem of errors in the OTC but do not be exaggerated I recommend something between 24590 - 40000 still judging that 40000 is too much in my case 24590 is working smoothly
Now in the part of configuring the new view size where the default is 8x6 in the topic it presents the code this way
But the code in Mehah's OTC is like this
But it seems that even changing the values in gameconfig.h doesn't work or the values are not sent correctly so I just changed them to unique values like this leaving 16x9
Remember that the values must be the same in the source of the server in my case it was like this
The problem I was having specifically was that on my server the distanceEffect is also changed to u16 and the feature was not enabled on the otclient so here are the features that I have enabled on mine
Of course this is not a default setting but I didn't remember that I needed to enable the distanceEffect feature in u16 so I'm leaving on record the importance of remembering to activate the features correctly in OTC
Warning: finally, I would like to highlight the importance of configuring the view limit value in the source and in the OTC equally
OTClient - Redemption 1.0 rev 0.000 (desenv) built on Jul 3 2023 for arch x64
Guys, the idea of this topic is to clarify information that I found in several places to compose the content that already exists and not leave room for common mistakes like what happened to me. Based on everything I've researched and found I'm going to clear up some information about installing the increase map view change on OTC Mehah and the Server
First thing is this tutorial is super valid and functional, as long as if you have something different from your source you need to adapt it and not just copy and paste the code
[Tutorial] Adding more tiles to game window - Updated 7/6/2018
This is a tutorial showing how to add more tiles to the OTClient window. (Make the screen bigger) Update: in const.h #define NETWORKMESSAGE_MAXSIZE 24590 I was notified increasing this number could resolve some issues. This is actually a bigger problem than it should be, because TFS...
otland.net
In the server part (source or src)
XML:
#define NETWORKMESSAGE_MAXSIZE 24590
The value 24590 can be changed however it cannot be too high and also not below this suggested value so it is recommended to find a value that corrects the problem of errors in the OTC but do not be exaggerated I recommend something between 24590 - 40000 still judging that 40000 is too much in my case 24590 is working smoothly
Now in the part of configuring the new view size where the default is 8x6 in the topic it presents the code this way
C++:
void Map::resetAwareRange()
{
AwareRange range;
range.left = 8;
range.top = 6;
range.bottom = 7;
range.right = 9;
setAwareRange(range);
}
But the code in Mehah's OTC is like this
C++:
void Map::resetAwareRange() {
setAwareRange({
static_cast<uint8_t>(g_gameConfig.getMapViewPort().width()) ,
static_cast<uint8_t>(g_gameConfig.getMapViewPort().height()),
static_cast<uint8_t>(g_gameConfig.getMapViewPort().width() + 1),
static_cast<uint8_t>(g_gameConfig.getMapViewPort().height() + 1)
});
}
But it seems that even changing the values in gameconfig.h doesn't work or the values are not sent correctly so I just changed them to unique values like this leaving 16x9
C++:
void Map::resetAwareRange() {
setAwareRange({16, 9, 17, 10});
}
Remember that the values must be the same in the source of the server in my case it was like this
C++:
static const int32_t maxViewportX = 17; //min value: maxClientViewportX + 1
static const int32_t maxViewportY = 10; //min value: maxClientViewportY + 1
static const int32_t maxClientViewportX = 16;
static const int32_t maxClientViewportY = 9;
The problem I was having specifically was that on my server the distanceEffect is also changed to u16 and the feature was not enabled on the otclient so here are the features that I have enabled on mine
Lua:
if version >= 860 then
g_game.enableFeature(GameSpritesU32) -- To extended the sprites
g_game.enableFeature(GameMagicEffectU16) -- effects aumentados.
g_game.enableFeature(GameDistanceEffectU16)
g_game.enableFeature(GameExtendedOpcode)
g_game.enableFeature(GameChangeMapAwareRange)
g_game.enableFeature(GameAttackSeq);
end
Of course this is not a default setting but I didn't remember that I needed to enable the distanceEffect feature in u16 so I'm leaving on record the importance of remembering to activate the features correctly in OTC
Warning: finally, I would like to highlight the importance of configuring the view limit value in the source and in the OTC equally