[!] Help with location. Details inside! (S.T.A.L.K.E.R.: Call of Pripyat)
Hello, I have a problem with the locations.The location itself works fine and the map shows that he runs for this location, but when you look in KPK then he walks on the map on the wrong location and the backwater. What to do, tell me, really need to solve it.
Platform: SN
If I can throw screenshots and location.
Yra Levkovich
Too lazy to describe, so skopipastil like it :)
How to attach map locations on the global map in PDA
Will spoilerphobes first understand what is global card and how it works. Where all of the map locations, and how opening the PDA section of the card we see the marks of the Cordon at the site indicating the Border and the label such as Warehouses – where they should be.
So... the Folder gamedata\config file game_maps_single.ltx. Open it. Let me explain what's inside is responsible for what.
[level_maps_single]
L01_escape
L02_garbage
L03_agroprom
L03u_agr_underground
l04_darkvalley
l04u_LabX18
L05_bar
L06_rostok
l07_military
l08_yantar
l 10_radar
l11_pripyat
l12_stancia
l12_stancia_2
l12u_control_monolith
l12u_sarcofag
l08u_brainlab
This section lists all the levels that are in the game. As can be seen from the Cordon to the NPP-2, including all underground levels. This is a list of PM, the original game.
[level_music_tracks]
music\amb01 = 0, 12, 0.5, 10,20
music\amb03 = 0, 12, 0.5, 10,15
music\amb07 = 12,24, 1.0, 5, 25
Have no idea what it is, but probably something about music... We do not need.
[global_map]
texture = ui\ui_global_map
bound_rect = 0.0,0.0, 1024, 2634.0
max_zoom = 6.0
But the most important thing. This defines the texture – it lies at the gamedata\textures\ui, called ui_global_map – note texture with no extension specified. bound_rect is a game of texture coordinates, something like a grid of coordinates on the global map. Four numbers represent the extreme points of coordinates is the upper left corner of the global map has coordinates 0,0 and the bottom right corner of the global map has coordinates 1024,2634. PLEASE NOTE, this is not the pixels! The texture has a size of 1024*2048, but may be any other – but for the game map height is set equal to 2634 points, despite the fact that the width remains 1024. This is very important – its importance explain further. Max_zoom – then I think it is clear that the maximum allowed increase. That is, the most how you can "zoom" the image in the PDA by opening the global map it 6 times. Try to put other values – sometimes it turns out interesting.
Then the file filled with the same type of sections that describe the levels and location of their cards on the global map. Take a few to parse, say, Cordon, Agroprom, I Pripyat.
[l01_escape]
texture = map\map_escape
bound_rect = -317.164, -633.718, 404.880, 811.627
global_rect = 355.0,2011.0, 576.0,2453.000000
weathers = default
music_tracks = l01_escape_musics
[l03_agroprom]
texture = map\map_agroprom
bound_rect = -266.505, -355.611, 331.388, 213.838
global_rect = 161.0, 1834.0, 344.0,2008.293945
weathers = default
;music_tracks = l03_agroprom_musics
music_tracks = l01_escape_musics
[l11_pripyat]
texture = map\map_pripyat
bound_rect = -529.399, -457.516, 574.854, 769.050
global_rect = 457.0, 586.0, 798.0, 964.770996
weathers = pripyat
music_tracks = l11_pripyat_musics
Now the details about each parameter.
Texture – a texture map locations. It shows on the mini-map in the game, it also OVERLAPS (Yes, she superimposed) on the global map in the place where we want.
bound_rect is a description of the extreme coordinates of the locations WITHIN the locations. There probably need to explain. Anyone who has dealt with the coordinates of the levels, I have noticed that the x and y (the height will not take into account) are not only positive but also negative. Point level with the coordinates (0,0) is not a corner of the map, as you might expect, but somewhere around its middle. For example, in the Cordon the coordinates 0,0 are located near the post Kuznetsova under the bridge.
But outside the bunker Sidorovich x coordinate of the player (or anything else, any object in the game) will be negative And near the military checkpoint (the one to the South, down the road from the village newcomers) coordinate y will be negative. So, in line bound_rect consistently provided the most minimal coordinates of the location and the maximum. That is, the smaller x, then the least y, then the largest x, and the fourth number is the largest y. Please note, these coordinates are not where you can run. No. We are talking about the CORNERS of the area, where the land ends and the emptiness begins. The cordon South-West corner has coordinates -317.164, -633.718, and the North-Eastern 404.880, 811.627. The accuracy is specified to hundredths.
Global_rect – that's exactly what we need. These are the coordinates of the rectangle on the global map, where the piece will be added (superimposed) map of locations, and where they will be given the scope to display all label locations. Method specify the coordinates of the same, come from two angles, the first North-WEST, the second South-EAST. Please note, the determination of the coordinates on the location of the count y's comes from the bottom up, and then Vice versa, top to bottom. That is the point with coordinates 50, 100 will be HIGHER than point 50, 200. And the point with coordinates 50, 0 – all at the top. While the point with coordinates 50, 2634 – at the very bottom of the global map. A General rule of reference coordinates from the upper left corner of the texture is characteristic of a Stalker, I do not know for other games using the dds format, can also. Look at the global map coordinates of the Cordon on a large, global map.
global_rect=355.0,2011.0,576.0,2453.000000
It turns out the rectangle which will be entered the map of the Cordon is defined by two points. The first coordinate (on the global map!) 355.0,2011.0, and the second with coordinates 576.0,2453.000000. Why so many zeros – don't ask. I do not know. But these coordinates shows that the map of the Cordon will be inscribed in a rectangle that starts from 355 x 2011 to y and ends with 576 for x and y at 2453. Total on the global map, the map size of the Cordon will be 221*442 points. Again – it's not pixels and points, the number of which is defined in the second section of the configuration file that we are examining.
Interestingly, dungeons Agricultural industry, for example, on the global map is also there – but they occupy only 2*3 points, and they are almost in the middle of the map Agribusiness! Therefore, when the player is in the subway, its mark always glows in the area of the plant where I was hiding the Mole in the first entry to the location, and almost motionless. In a similar way done with the lab X18 – she's on the global map located to the right of the screen but the size of the rectangle is just 2*2 points.
How to position map location on the global map in PDA
So, we have available a location which includes maps textures\map\map_lost_villiage.dds for example.
bound_rect already known, if not re-read the theory.
We need to place it on the global map.
Open the file ui_global_map.dds using Stalker Icon Viewer and remove the coordinates of the upper left corner of the future locations locations:
So we got the coordinates: x=180, y=370
From the theory you may have learned that in the config global map has coordinates 1024,2634, at a time when only the texture is 1024x2048.
What do we do? Run the calculator and divide 2634 2048, we get 1.2861328125
Next, multiply the y-coordinate(370) on the resulting value(1.2861328125), we get 475.86.... (round)
Then everything is simple, say our map locations 100на100 asked in global_rect our locations 180.0, 475.86, 280.0, 575.86
180.0 - x-coordinate of the left edge of the texture location
475.86 is the number that we received, the coordinate of the top edge of the texture location
280.0 the x – coordinate of the right edge of the texture location. Added to the coordinate of the left border of the location map width
575.86 - the y coordinate of the bottom edge of the texture location. Added to the coordinate of the top border of the location map height
That's all.
The author of this article: Xmk