a simple map tool

04/05/2017 20:29 Isoline*#1
Heya all !
been trying to work on a simple program when you feed it in-game coordinates (x,y) it will print a mark on the map, just liket the rev6 maps, which is currently un-available.

anybody know form where to the the pictures of the maps?
should it be based on in-game cords / pixels conversion?
and if so? its a constant one? or based on specific images.
please shed some light on the matter, yours truly.
04/07/2017 10:41 Isoline#2
Rly? Nobody ?
04/07/2017 11:25 qqdev#3
Get the map from the client. PK2 Extractor will help you with that. Too get up with a mapping formula should not be too hard.

Greetings,
qqdev
04/07/2017 15:04 florian0#4
Quote:
Originally Posted by eitai123 View Post
should it be based on in-game cords / pixels conversion?
and if so? its a constant one? or based on specific images.
Silkroads coordinates exist in two different representations:
Internally, the world is split into squared Regions. The coordinates are stored as relative offset to the regions 0,0.
Note: The region size the engines calculations are based off is different from the ground-texture size for the region!
Since the majority of the playerbase of SRO would not be able to understand this, they made a simple representation of X and Y where the formular is something like:

Code:
SimpleX = (RegionX * RegionSize + RelativeX) + StaticOffsetX
SimpleY = (RegionY * RegionSize + RelativeY) + StaticOffsetY
The Region is often stored as a combined 16 bit value. But its actually two 8 bit values.

Your tool should be able to handle both representations.
04/08/2017 22:46 existenz333#5
This can be usefull [Only registered and activated users can see links. Click Here To Register...]
04/11/2017 07:20 cardoso125874#6
Quote:
Originally Posted by eitai123 View Post
Heya all !
been trying to work on a simple program when you feed it in-game coordinates (x,y) it will print a mark on the map, just liket the rev6 maps, which is currently un-available.

anybody know form where to the the pictures of the maps?
should it be based on in-game cords / pixels conversion?
and if so? its a constant one? or based on specific images.
please shed some light on the matter, yours truly.
anybody know form where to the the pictures of the maps?

media minimap or you can download from phbot minimap

should it be based on in-game cords / pixels conversion?

yes it based in cords
05/09/2017 16:01 Isoline*#7
Quote:
Originally Posted by cardoso125874 View Post
anybody know form where to the the pictures of the maps?

media minimap or you can download from phbot minimap

should it be based on in-game cords / pixels conversion?

yes it based in cords
ofc its gonna be based on in-game cords that the point !
the tricky thing is to pin point the chords on a map form, so it will point to a specific location, easier said then done.
could anybody show an example for just 1 region?
please help.

Quote:
Originally Posted by florian0 View Post
Silkroads coordinates exist in two different representations:
Internally, the world is split into squared Regions. The coordinates are stored as relative offset to the regions 0,0.
Note: The region size the engines calculations are based off is different from the ground-texture size for the region!
Since the majority of the playerbase of SRO would not be able to understand this, they made a simple representation of X and Y where the formular is something like:

Code:
SimpleX = (RegionX * RegionSize + RelativeX) + StaticOffsetX
SimpleY = (RegionY * RegionSize + RelativeY) + StaticOffsetY
The Region is often stored as a combined 16 bit value. But its actually two 8 bit values.

Your tool should be able to handle both representations.
i can get my X,Y cords from the game easily, i just cant figure out how by those, it will pin point a (mark) location on the map images.
can you help a wee bit, please?
05/11/2017 15:07 florian0#8
Absolute to Relative
Code:
xPosition = (x % 192) * 10;
yPosition = (y % 192) * 10;
xSector = (x - xPosition / 10) / 192 + 135;
ySector = (y - yPosition / 10) / 192 + 92;
Relative to Absolute
Code:
realXCords = (xSector - 135) * 192 + x / 10;
realYCords = (ySector - 92) * 192 + y / 10;
(C) As found in every bot source code around
05/11/2017 17:20 Isoline*#9
Quote:
Originally Posted by florian0 View Post
Absolute to Relative
Code:
xPosition = (x % 192) * 10;
yPosition = (y % 192) * 10;
xSector = (x - xPosition / 10) / 192 + 135;
ySector = (y - yPosition / 10) / 192 + 92;
Relative to Absolute
Code:
realXCords = (xSector - 135) * 192 + x / 10;
realYCords = (ySector - 92) * 192 + y / 10;
(C) As found in every bot source code around
i have these formulas but how could i convert those to the map picture pixels
05/22/2017 02:05 existenz333#10
Quote:
Originally Posted by eitai123 View Post
i have these formulas but how could i convert those to the map picture pixels
Code:
MouseX.value=tempX;
MouseY.value=tempY;
		
if (b=="0"){tempXX = 68;}
else if (b=="1"){tempXX = 189;}
else if (b=="2"){tempXX = 190;}
else if (b=="3"){tempXX = 191;}
else if (b=="4"){tempXX = 192;}
XX = (mX - tempXX) * 256;
YY = (mY - 88) * 256;
PosX.value=Math.round((((tempX + XX) - 16896) * 0.75) - 192);
PosY.value=Math.round((((tempY - YY) + 768) * -0.75) + 384);