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

Extended View TFS 1.4 OTCV8

Watchdog87

Member
Joined
Mar 2, 2014
Messages
30
Solutions
1
Reaction score
5
Hello people! I have a big problem.

I have successfully edited OTCv8 to show zoomed out view. The problem I have now is that the monsters and my exploring view is still small. I have been looking for a solution for about 5+ hours now. I have tried to change the maxclientview in the TFS sources, but it only makes my game buggy as if it messed up the floor levels. I have enabled GameChangeMapAwareRange in the OTCv8 client, both in the features and added after the IP. I have tried to use Flatlander's code but it's years old and the code is not the same, it seems like someone has added his code and refined it already. Here is the link to that thread Add more tiles.

Please help me with this. Thanks in advance!
 
After applying these changes on map.h, try increasing NETWORKMESSAGE_MAXSIZE value in const.h file as well.
 
Thanks for the responses, everyone!

I have tried all suggestions, but it's still the same.

otclientv8init.PNGotclientv8features.PNG
tfsnetworkmessage.PNGotclientv8moretilesscrambled.PNG
 
All? Including this? Added extended map size · OTCv8/forgottenserver@266a569 (https://github.com/OTCv8/forgottenserver/commit/266a569d25468a82b3c4cc7b3d5f19a057a729f6)

V8 is handling extended map view different way so you don't have to edit anything in the client.

Unfortunately that repo is over a year old and I'm using TFS 1.4. I have tried to apply all those changes and keeping the rest of the code untouched, but I get errors compiling and when I solved the error and managed to compile it the game looks scrambled like before even when I disable the features in Otcv8. I think the code has changed too much for it to be applicable.
 
Unfortunately that repo is over a year old and I'm using TFS 1.4. I have tried to apply all those changes and keeping the rest of the code untouched, but I get errors compiling and when I solved the error and managed to compile it the game looks scrambled like before even when I disable the features in Otcv8. I think the code has changed too much for it to be applicable.
It's not to follow 1:1, only important parts. I guess without C++ knowledge it won't be as easy as copy-pasting.
 
It's not to follow 1:1, only important parts. I guess without C++ knowledge it won't be as easy as copy-pasting.

I added everything from those committed changes. Fixed all the errors that it was spitting out and compiled without errors. However, I change the maxClientViewport and now there's no scrambled tiles, but there's also no wider view. I'm thinking I need to change something in the client now.
 
I added everything from those committed changes. Fixed all the errors that it was spitting out and compiled without errors. However, I change the maxClientViewport and now there's no scrambled tiles, but there's also no wider view. I'm thinking I need to change something in the client now.
Client requires only game feature enabled. View range is configured server side. Try changing these values Added extended map size · OTCv8/forgottenserver@266a569 (https://github.com/OTCv8/forgottenserver/commit/266a569d25468a82b3c4cc7b3d5f19a057a729f6#diff-6ed2a49bb4f08e3cbe0be799d582b4d314a15df6b10b9b8836271056402f7851R340-R341)
 
Hello @Watchdog87, I had the same problem and I kinda solved it following the commits from this last Oen Reply.

There are still not as many tiles being seen as I want, and it seems like changing them on map.h has no effect. I'm still trying to figure it out. Will reply here if I succeed.
 
Hello @Watchdog87, I had the same problem and I kinda solved it following the commits from this last Oen Reply.

There are still not as many tiles being seen as I want, and it seems like changing them on map.h has no effect. I'm still trying to figure it out. Will reply here if I succeed.
modules/game_interface/interface.lua
You have to edit setVisibleDimension and changeMapAwareRange. You can also set default zoom to higher value (so it zooms out and shows more tiles).
 
I managed to make the monsters see me from a really far range, but client still not showing farther awareness.
 
I managed to make the monsters see me from a really far range, but client still not showing farther awareness.
So, after many many attempts, I finally figured it out:

I had to implement the packet compression (you can find it on the otcv8 forgotten server source), and it solved everything.

I had already made configs according to what I wanted on "VisibleDimension", "MapAwareRange" and default zoom. Yet, I still had black borders (left and right, about 5sqm to each side missing tiles). After implementing packet compression, I got every tile I wanted.
 
So, after many many attempts, I finally figured it out:

I had to implement the packet compression (you can find it on the otcv8 forgotten server source), and it solved everything.

I had already made configs according to what I wanted on "VisibleDimension", "MapAwareRange" and default zoom. Yet, I still had black borders (left and right, about 5sqm to each side missing tiles). After implementing packet compression, I got every tile I wanted.

This one? Added packet compresion, fixed visual studio compilation errors · OTCv8/forgottenserver@0ad4a30 (https://github.com/OTCv8/forgottenserver/commit/0ad4a30dfc4888f9f8811a21de973c1a63738de4)

I tried adding this one but when I enable GamePacketCompression in features, the client can't connect.

I tried changing VisibleDimension, MapAwareRange etc. in gameinterface.lua to extremely low and it has no effect at all. The only thing that has effect is monster's viewrange by changing maxClientViewportX and maxClientViewportY in source(map.h).
 
This is my configuration. No packet compression needed or anything, added only extended view code.
protocolgame.h
C++:
        struct AwareRange {
            int width = 17;
            int height = 13;

            int left() const { return width / 2; }
            int right() const { return 1 + width / 2; }
            int top() const { return height / 2; }
            int bottom() const { return 1 + height / 2; }
            int horizontal() const { return width + 1; }
            int vertical() const { return height + 1; }
        } awareRange;

map.h
C++:
        static constexpr int32_t maxClientViewportX = 14;
        static constexpr int32_t maxClientViewportY = 10;

gameinterface.lua
Lua:
  gameMapPanel:setVisibleDimension({width = 27, height = 15})
  g_game.changeMapAwareRange(25, 15)
  gameMapPanel:setKeepAspectRatio(true)
  gameMapPanel:setLimitVisibleRange(false)
  gameMapPanel:setZoom(13)
Before and after
1652781455044.png
1652781388057.png
 
Back
Top