Extended View TFS 1.4 OTCV8

Watchdog87

New Member
Joined
Mar 2, 2014
Messages
27
Reaction score
2
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!
 
OP
OP
W

Watchdog87

New Member
Joined
Mar 2, 2014
Messages
27
Reaction score
2
thanks to @Ramon Bernardo , you only need to edit a single place now:

Thanks for answer! I have tried to do that and look at the result.

1. Before applying change

tibiatfsworksfine.PNG

The changes applied and compiled:
tibiatfsworksfinenot.PNG

The result of changes:
tibiatfsworksfinenot2.PNG
 

Evil Puncker

I know nothing
TFS Developer
Joined
May 30, 2009
Messages
8,397
Solutions
245
Reaction score
4,308
maybe OTCv8 needs additional changes somewhere else, I hope @kondra can help with this
 

drakylucas

Intermediate OT User
Joined
Dec 15, 2015
Messages
232
Solutions
7
Reaction score
114
After applying these changes on map.h, try increasing NETWORKMESSAGE_MAXSIZE value in const.h file as well.
 
OP
OP
W

Watchdog87

New Member
Joined
Mar 2, 2014
Messages
27
Reaction score
2
Thanks for the responses, everyone!

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

otclientv8init.PNGotclientv8features.PNG
tfsnetworkmessage.PNGotclientv8moretilesscrambled.PNG
 

oen432

Legendary OT User
Joined
Oct 3, 2014
Messages
1,546
Solutions
51
Reaction score
1,658
Location
Poland
GitHub
Oen44
OP
OP
W

Watchdog87

New Member
Joined
Mar 2, 2014
Messages
27
Reaction score
2
All? Including this? Added extended map size · OTCv8/[email protected] (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.
 

oen432

Legendary OT User
Joined
Oct 3, 2014
Messages
1,546
Solutions
51
Reaction score
1,658
Location
Poland
GitHub
Oen44
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.
 
OP
OP
W

Watchdog87

New Member
Joined
Mar 2, 2014
Messages
27
Reaction score
2
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.
 

oen432

Legendary OT User
Joined
Oct 3, 2014
Messages
1,546
Solutions
51
Reaction score
1,658
Location
Poland
GitHub
Oen44
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/[email protected] (https://github.com/OTCv8/forgottenserver/commit/266a569d25468a82b3c4cc7b3d5f19a057a729f6#diff-6ed2a49bb4f08e3cbe0be799d582b4d314a15df6b10b9b8836271056402f7851R340-R341)
 
OP
OP
W

Watchdog87

New Member
Joined
Mar 2, 2014
Messages
27
Reaction score
2

MatCollier

New Member
Joined
Apr 28, 2019
Messages
7
Reaction score
1
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.
 

oen432

Legendary OT User
Joined
Oct 3, 2014
Messages
1,546
Solutions
51
Reaction score
1,658
Location
Poland
GitHub
Oen44
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).
 
OP
OP
W

Watchdog87

New Member
Joined
Mar 2, 2014
Messages
27
Reaction score
2
I managed to make the monsters see me from a really far range, but client still not showing farther awareness.
 

MatCollier

New Member
Joined
Apr 28, 2019
Messages
7
Reaction score
1
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.
 
OP
OP
W

Watchdog87

New Member
Joined
Mar 2, 2014
Messages
27
Reaction score
2
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/[email protected] (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).
 

oen432

Legendary OT User
Joined
Oct 3, 2014
Messages
1,546
Solutions
51
Reaction score
1,658
Location
Poland
GitHub
Oen44
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
 
Top