• 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

I have this error :/
I made all the necessary modifications, including the @Animera

36724750_1807606019325406_5022343569768185856_n.png
 
I Using TFS :C 0.3.6 :/
Didn't knew it was compatible with older TFS versions...

- Also checked the code below this line "If you are using 0.3.6 then you will also need to change this:"?
- Are you sure you've changed everything correctly? like tried compiling several times from 0?
- Also compiled otclient with the changes in map.cpp?
 
Didn't knew it was compatible with older TFS versions...

- Also checked the code below this line "If you are using 0.3.6 then you will also need to change this:"?
- Are you sure you've changed everything correctly? like tried compiling several times from 0?
- Also compiled otclient with the changes in map.cpp?
Yes, I've made all of these changes including the one you mentioned about Creature thinking it would fix :/
 
Yes, I've made all of these changes including the one you mentioned about Creature thinking it would fix :/

Can you show me your map.cpp of otclient?
protocolgame.cpp / const.h / map.h of distro source?
Perhaps any error in otclient console? Tried walking north/south/west/east? tried to teleport yourself? Any (positive) changes?
It should work, also tried this on a other distro (like tfs 1.0+)?

I trust flatlander if the tutorial says it also would work on older TFS sources.
I've tried it several times on OTX never worked. it succeeded right the first time i've made the changes on TFS 1.3

All i can i do is trying to think with you, or checking your files for possible any errors.
Note: I am underexperienced in c++ compared to lua and others but i do not mind to at least try to give a look ;)
So if you are 1000%, (yes thousand) sure that everything is exactly the same as the tutorial maybe consider moving to a other distro(I've had to do the same..).
 
When I go to the floor below, the character disappears and the screen gets frozen (OTC), if I relog the screen goes black, No error appears.
I use TFS 1.2bug1.PNG bug2.PNG bug3.PNG
 
Last edited:
Hello @Flatlander , I need so much your help, and if you could help me, I'll be so grateful!!
I make all this process, and added more tiles on my screen!!

But now, I want put some zoom out in the screen, like this
My normal client screen
6lRIJRi.png


and below how I want put my client screen
(If you notice, have a zoom out in this screen, and I need put it automatic, a function. Cause for I leave like this, I need click 'ctrl -' every time I enter in my client.

I tried to create a function in ImageView, but I failed, and now I'm asking for your help. Thanks!!

Pe030nR.png
 
gameMapPanel:setZoom(x) - that should do.

Yes, Margoh. But when I put this in gameinterface.lua it doesn't works :(

@Edit: Now it works!!

Lua:
function show()
  connect(g_app, { onClose = tryExit })
  modules.client_background.hide()
  gameRootPanel:show()
  gameRootPanel:focus()
  gameMapPanel:followCreature(g_game.getLocalPlayer())
  setupViewMode(0)
  updateStretchShrink()
  logoutButton:setTooltip(tr('Logout'))

  addEvent(function()
    if not limitedZoom or g_game.isGM() then
      gameMapPanel:setMaxZoomOut(15)
      gameMapPanel:setLimitVisibleRange(false)
      gameMapPanel:setZoom(15)
    else
      gameMapPanel:setMaxZoomOut(15)
      gameMapPanel:setLimitVisibleRange(true)
      gameMapPanel:setZoom(15)
    end
  end)
end
 
Last edited:
Hello @Flatlander , I need so much your help, and if you could help me, I'll be so grateful!!
I make all this process, and added more tiles on my screen!!

But now, I want put some zoom out in the screen, like this
My normal client screen
6lRIJRi.png


and below how I want put my client screen
(If you notice, have a zoom out in this screen, and I need put it automatic, a function. Cause for I leave like this, I need click 'ctrl -' every time I enter in my client.

I tried to create a function in ImageView, but I failed, and now I'm asking for your help. Thanks!!

Pe030nR.png
hi Helliot, can i ask, how you make the spells bars? (f1-f2-f3 etc) i really need that, i know how to solve your problem pm me
 
@Flatlander
I followed the tutorial to 100% on the main post, with exception of the TFS 0.3.6 stuffs because I use TFS 1.0 and my sources didn't have the functions for those anyway.
But other than that, I did everything exactly as it said.. (I even doubled the const.h value)

And it works prefect with default values..
but as soon as I increase how many tiles the screen should contain, it buggs out as hell..

This is my screen using default values:
nKN8zOi.png

src/client/map.cpp
C++:
void Map::resetAwareRange()
{
    AwareRange range;
    range.left = 8; //Change this to = maxClientViewportX
    range.top = 6; //Change this to = maxClientViewportY
    range.bottom = range.top+1;
    range.right = range.left+1;
    setAwareRange(range);
}

And here's my screen adding extra tiles:
sV7dsJL.png

src/client/map.cpp
C++:
void Map::resetAwareRange()
{
    AwareRange range;
    range.left = 9; //Change this to = maxClientViewportX
    range.top = 7; //Change this to = maxClientViewportY
    range.bottom = range.top+1;
    range.right = range.left+1;
    setAwareRange(range);
}

As you can see, it bugs out real good..
But pay attention, and you see that my screen doesn't go bigger at all, it stay same amount of tiles on width and height
(even when I resize the window).
So even if I did change it to be 9x7 in the sources, the client doesn't add the extra rows.

And this is very odd to me, I double checked with previous guys having similar issues, there entire game window buggs out..
But as they buggs out, they can still see the new size of the tiles anyway.. and I can't...

Anyone having any idea what's causing this?
Does/Did OTClient had any other places there you needed to change how many rows of tiles there should be?
 
@Flatlander
I followed the tutorial to 100% on the main post, with exception of the TFS 0.3.6 stuffs because I use TFS 1.0 and my sources didn't have the functions for those anyway.
But other than that, I did everything exactly as it said.. (I even doubled the const.h value)

And it works prefect with default values..
but as soon as I increase how many tiles the screen should contain, it buggs out as hell..

This is my screen using default values:
nKN8zOi.png

src/client/map.cpp
C++:
void Map::resetAwareRange()
{
    AwareRange range;
    range.left = 8; //Change this to = maxClientViewportX
    range.top = 6; //Change this to = maxClientViewportY
    range.bottom = range.top+1;
    range.right = range.left+1;
    setAwareRange(range);
}

And here's my screen adding extra tiles:
sV7dsJL.png

src/client/map.cpp
C++:
void Map::resetAwareRange()
{
    AwareRange range;
    range.left = 9; //Change this to = maxClientViewportX
    range.top = 7; //Change this to = maxClientViewportY
    range.bottom = range.top+1;
    range.right = range.left+1;
    setAwareRange(range);
}

As you can see, it bugs out real good..
But pay attention, and you see that my screen doesn't go bigger at all, it stay same amount of tiles on width and height
(even when I resize the window).
So even if I did change it to be 9x7 in the sources, the client doesn't add the extra rows.

And this is very odd to me, I double checked with previous guys having similar issues, there entire game window buggs out..
But as they buggs out, they can still see the new size of the tiles anyway.. and I can't...

Anyone having any idea what's causing this?
Does/Did OTClient had any other places there you needed to change how many rows of tiles there should be?
bump
 
I recommend to you, repeat all the process again... Read it slowly... Cause it's a simple error, like a code that you forgot to write
I did read it all, I read it 4 times before I actually tried it out.
And once I tried it out, I got the result from above, I backed everything back to start and re-did it again.. same result..
I just need to have a clue about how this could happen so I can research it, because it doesn't feel like something I did, I feel like it's something off with either my TFS or the OTC :(
 
I did read it all, I read it 4 times before I actually tried it out.
And once I tried it out, I got the result from above, I backed everything back to start and re-did it again.. same result..
I just need to have a clue about how this could happen so I can research it, because it doesn't feel like something I did, I feel like it's something off with either my TFS or the OTC :(
Relax bro, tomorrow I can help you in Teamviewer, PM me
 
Back
Top