Build and install
Installing on your server
Start the resource, add the snippet for your appearance script, and apply the tattoo in game. Every name you need is already filled in.
What is in the resource
The zip holds one folder named after the collection of your account, sw_, eight characters of your account and _overlays: sw_user3jwr_overlays for the docs account. This is the pack with three designs:
sw_user3jwr_overlays/README.md
sw_user3jwr_overlays/client_test.lua
sw_user3jwr_overlays/exports/fivem-appearance.json
sw_user3jwr_overlays/exports/illenium.lua
sw_user3jwr_overlays/exports/rcore.json
sw_user3jwr_overlays/exports/xntattoos.json
sw_user3jwr_overlays/fxmanifest.lua
sw_user3jwr_overlays/lint.json
sw_user3jwr_overlays/names.lua
sw_user3jwr_overlays/preview.png
sw_user3jwr_overlays/shop_tattoo.meta
sw_user3jwr_overlays/stream/sw_user3jwr_overlays_eagle_patch.ytd
sw_user3jwr_overlays/stream/sw_user3jwr_overlays_mountains.ytd
sw_user3jwr_overlays/stream/sw_user3jwr_overlays_swallow.ytd
sw_user3jwr_overlays/sw_user3jwr_overlays.xmlfxmanifest.luaRegisters the overlay file and the shop list with the game, and loads names.lua and client_test.lua.sw_user3jwr_overlays.xmlThe overlay collection: per design a male and a female entry (_M and _F) with zone, kind and placement.shop_tattoo.metaThe shop list: two rows per design with price, zone and label, for menus that read the game’s tattoo shop list.names.luaRegisters the display name of each design for the shop label.stream/One texture dictionary per design, named sw_user3jwr_overlays_<name>.ytd.exports/illenium.lua, fivem-appearance.json, xntattoos.json and rcore.json: the snippet for each appearance script.client_test.luaThe test commands /tattest and /tatclear; see Applying a tattoo in game.README.mdThe designs with their male and female overlay names.preview.png, lint.jsonThe preview from the result page and the check report of the build. Not used by the game.
The manifest registers the two game files with these lines:
data_file 'PED_OVERLAY_FILE' 'sw_user3jwr_overlays.xml'
data_file 'TATTOO_SHOP_DLC_FILE' 'shop_tattoo.meta'Note
The README and the comments in the files of the pack are currently in German. The snippets and names themselves are the same in every language.
Install the resource
- 1
Unzip the download
Unzip
sw_user3jwr_overlays.zip. You get the foldersw_user3jwr_overlays. - 2
Copy it into resources
Put the whole folder into your server's
resourcesdirectory. Keep the folder name;fxmanifest.luamust sit directly inside it. - 3
Add it to server.cfg
Add the line above the line that starts your appearance script, so the tattoos exist when it loads:
ensure sw_user3jwr_overlays - 4
Add the snippet for your appearance script
Copy the entries from
exports/into your appearance script; see the next section. - 5
Restart and reconnect
Restart the server, or the pack and then the appearance script, and reconnect.
Appearance scripts
Appearance scripts keep their own list of tattoos, so the pack ships one snippet per script in exports/. Every entry carries the collection, the male and female overlay names, the zone, the label and your shop price. The examples show the swallow of the quick start.
Used on most QBCore and Qbox servers. Open illenium-appearance/shared/tattoos.lua and add each line of exports/illenium.lua to the list of its zone in Config.Tattoos. The file marks the zone above each group, for example -- ZONE_TORSO:
{ name = "SW_USER3JWR_OVERLAYS_SWALLOW", label = "Swallow", hashMale = "swallow_M", hashFemale = "swallow_F", zone = "ZONE_TORSO", collection = "sw_user3jwr_overlays", cost = 250 },The tattoos then show in the tattoo menu of the clothing shop, under their zone.
For forks of fivem-appearance with tattoos, such as the ESX fork by wasabirobby with files/tattoos.json. Add the entries of exports/fivem-appearance.json to the array of the same zone:
"ZONE_TORSO": [
{
"name": "SW_USER3JWR_OVERLAYS_SWALLOW",
"label": "Swallow",
"hashMale": "swallow_M",
"hashFemale": "swallow_F",
"zone": "ZONE_TORSO",
"collection": "sw_user3jwr_overlays"
}
]Used on many ESX servers. Add the rows of exports/xntattoos.json to the tattoo list of xnTattoos, AllTattoos.json:
{
"Collection": "sw_user3jwr_overlays",
"Name": "SW_USER3JWR_OVERLAYS_SWALLOW",
"HashNameMale": "swallow_M",
"HashNameFemale": "swallow_F",
"Zone": "ZONE_TORSO",
"Price": 250
}The display names come from names.lua in the pack, so keep the pack running.
exports/rcore.json has the rows in the format rcore_tattoos uses for add-on tattoos. Add them where your version of rcore_tattoos keeps its add-on tattoo list; rcore's own documentation has the place.
{
"price": 250,
"zone": "ZONE_TORSO",
"name": "SW_USER3JWR_OVERLAYS_SWALLOW",
"hashMale": "swallow_M",
"hashFemale": "swallow_F",
"collection": "sw_user3jwr_overlays"
}Menus that read the game's own tattoo shop list find the designs through shop_tattoo.meta without a snippet. Scripts with their own list need the collection and the male and female names from README.md.
Good to know
Leave the collection and overlay names in the snippets as they are. A changed name makes the tattoo invisible without an error.
Applying a tattoo in game
The pack has two test commands in client_test.lua, for a freemode ped with the top off:
/tattestApplies every design of the pack, the male or female version for your ped./tattest swallowApplies only the designs whose overlay name contains swallow./tattest mApplies every design as the male (m) or female (f) version./tatclearRemoves all tattoos from your ped.
Each applied design is printed to the F8 console with its collection and overlay name. In your own scripts, one design is applied like this:
local ped = PlayerPedId()
local female = GetEntityModel(ped) == GetHashKey('mp_f_freemode_01')
local overlay = female and 'swallow_F' or 'swallow_M'
AddPedDecorationFromHashes(ped, GetHashKey('sw_user3jwr_overlays'), GetHashKey(overlay))Careful
Every player on the server can use /tattest and /tatclear on their own ped. To remove them on a live server, delete the line 'client_test.lua', from fxmanifest.lua.
Several packs on one server
Every pack of an account has the same name
All packs you build use the same folder and collection, sw_user3jwr_overlays for the docs account, and number their shop entries the same way. Two packs cannot run side by side: the second replaces the first.
- Put every tattoo you want on the server into one pack. That also means a server can carry up to 12 designs from the Tattoo Studio for now.
- To add designs later, build a new pack with the old and the new designs together, and replace the folder on the server.
- Update the snippet in your appearance script to the new
exports/files at the same time.