Customize Preview Coordinates
Character preview positions determine the positions from which players view characters on the character selection screen. By customizing these coordinates, you can create a unique character selection experience unique to your own server.
How Preview Locations Work ?
Enhances the experience of players choosing their characters by displaying characters in specific locations. These locations are defined in the previewlocation.lua file and used by the character preview interface.
How to Find the Location File
To edit location information, you need to access the following file:
sw-multicharacter/preview/previewlocation.lua
Custom Location Addition
To add a new preview location, open the previewlocation.lua file and add a new entry to the PreviewLocations table:
-- Example location addition
PreviewLocations = {
secret1 = {
label = "SECRET 1",
pedCoords = vector4(897.29, -3163.55, -98.12, 170),
camCoords = vector4(897.01, -3165.09, -96.62, 350),
thumbnail = "location/secret1.png"
},
secret2 = {
label = "SECRET 2",
pedCoords = vector4(886.10, -3200.18, -99.20, 276),
camCoords = vector4(888.48, -3199.40, -97.38, 96),
thumbnail = "location/secret2.png"
},
}
secret1andsecret2are the keys for the new locations.labelis the name of the location to be displayed in the user interface.pedCoordsis the location where the walking will end and the character will stop.camCoordsare the coordinates of the location where the camera will be located.thumbnailis the path to the image to be displayed in the user interface.
Location Photo Addition
For each location, you need to add a preview image that will be displayed in the UI. Images should be stored in the following location:
sw-multicharacter/web/build/img/location
Note:
The image file name must be the same as the key in the location table. For example, for the "Bahama" location, the image file should be "bahama.png".