• 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

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
View attachment 67906
View attachment 67905
Hi, could you please tell exactly where this files you have changed for noobs like me ?
I dont know if i have to change it in tfs engine src or in otc.
Many thanks
 
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.
Would you mind sharing what steps you took to achieve this? I've been banging my head against it for quite some time.
 
Would you mind sharing what steps you took to achieve this? I've been banging my head against it for quite some time.

Here it is. Just made the changes on this fork of the forgotten server. Tested and it's working fine for me, with otcv8.
Post automatically merged:

Worked for you @UberLerd ?
 
Last edited:

Here it is. Just made the changes on this fork of the forgotten server. Tested and it's working fine for me, with otcv8.
Post automatically merged:

Worked for you @UberLerd ?

You're a legend! I applied it to my source code and it works perfectly with 10.98. Thanks man!
 

Here it is. Just made the changes on this fork of the forgotten server. Tested and it's working fine for me, with otcv8.
Post automatically merged:

Worked for you @UberLerd ?
It did thank you. Now I'm banging my head trying to figure out how to host the changes as a docker.
 
Is this the same adjustments to TFS 1.4 and if I use a regular otclient not v8? how would that be?
I believe that using regular otclient you don't need to do those changes on your source. It's much easier tbh. Try just changing the maxViewports on map.h:

1659674681182.png
 
I believe that using regular otclient you don't need to do those changes on your source. It's much easier tbh. Try just changing the maxViewports on map.h:

View attachment 69700
Its not even close to being easier than doing this in v8, where you just enable game feature and configure your view in game_interface. In both cases you will need server side changes but for v8 they are better because you are controlling these values from the server side.
 

Here it is. Just made the changes on this fork of the forgotten server. Tested and it's working fine for me, with otcv8.
Post automatically merged:

Worked for you @UberLerd ?

I'm using tfs 1.4 and otcv8, tried all the changes from your fork, still getting the same errors in the client.
any advice, anything on client side maybe besides enabling the feature?

I also tried enabling the packet compression feature on the client, but then i can't login
 
I'm using tfs 1.4 and otcv8, tried all the changes from your fork, still getting the same errors in the client.
any advice, anything on client side maybe besides enabling the feature?

I also tried enabling the packet compression feature on the client, but then i can't login
You dont need compression etc, only extended map size commit :p
 
You dont need compression etc, only extended map size commit :p
i've tried that as well, the commit with only the map extended size, without the packet compression, still the same errors
is there any tricks with the sizes of the screen i should know? any rules for them? or there isn't anything like that? Or can I use anything i want on the maxClientViewportX , Y?
 
i've tried that as well, the commit with only the map extended size, without the packet compression, still the same errors
is there any tricks with the sizes of the screen i should know? any rules for them? or there isn't anything like that? Or can I use anything i want on the maxClientViewportX , Y?
I Tried following that same commit sometime ago, and got some problems as well... After sometime I noticed that in following this commit 1:1 I was removing some features from my source (like wings and auras), in Protocolgame.cpp at the function void ProtocolGame::sendFeatures()

Then instead of following that part 1:1 I just added what was new.

You should be careful and check if you are not removing anything that could mess your server
 
I made the font changes like this and it worked when I press (ctrl -), but when I do (ctrl +) it doesn't go back to the previous one. How do you know which view the client is in? and it is possible to work on a view without enabling this setting for players.

Another thing I noticed is that when moving away from a point and returning to it again, the map loads again, it is not saving the places that have already been discovered.
 
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
View attachment 67906
View attachment 67905

Hey @oen432 How are you ? Do you know how can I figure it out ?View attachment 73091
 

Attachments

Everything worked fine here, but when I log in the tiles are black and after I relog it is normal. It looks like the config doesn't save, this could definitely be something from OTClient. How to proceed?

First login after open the client:
1687751315300.png

Relogin:
1687751346266.png
 
Back
Top