Importing a server
Importing a server
An existing server in the studio as a copy, the import report, the database and sending changes back to the original.
Any FiveM server (a folder with server.cfg and resources/) comes into the studio without changes to the original. The studio does not need to know the framework: what it can do comes from the adapters of the server’s resources.
Importing
On the start screen choose Import server and pick the server folder. A txAdmin folder (txData/<name>.base) works too.
- Copy (default): the studio copies the server to the folder you choose and works on the copy. It works from a network share as well; the window shows progress. The server’s
cachefolder is not copied. - In this folder: the server folder becomes the project. The studio writes its files there, adds its resources to
server.cfgand changes the license check in the framework’s resources for Player 2. Choose it only when nobody else works on that folder.
The studio’s settings win over server.cfg
The studio’s server connects to the studio’s database, uses the studio’s key and stays off the Cfx.re server list, even when server.cfg sets something else. The studio runs a copy of server.cfg (and of the files it runs with exec) without those lines, in .studio/run/. Your server.cfg stays as it is and goes to production that way.
Import report
The report shows the first time the project opens; later it is in the command palette and in the project menu (status bar).
- gamebuild, port and OneSync from
server.cfg; - how many capabilities the adapters of the server’s resources give, and which adapters they are;
- resources without an adapter, each with Make adapter. Most resources need no adapter: make one for those that do something the studio should carry out (characters, inventory, notifications, targeting);
- SQL files of the resources and of
db/, with Run; - notes: absolute paths in
exec, letter case that differs betweenensureand the folder name (such a resource does not start on a Linux server), a port another server uses.
Database
Data from the server’s database does not come over by itself. Dump the server’s database to a .sql file, put it in the project’s db/ folder and run it from the report while the server runs. Without a dump you can run the resources’ SQL files to create their tables.
Save changes to original
With a copy the studio remembers what each file of the original looked like. Save changes to original (command palette or project menu) lists the files you changed in the copy:
- your changes are ticked;
- the studio’s files (scene, adapters, studio.json, its
server.cfglines) are not ticked, because the original runs without them; - the Player 2 changes in the framework’s resources do not show at all;
- conflict means the original changed that file since the import too. The studio overwrites such a file only after you confirm.
The other way to a server is the shared server and deploy.
Claude
project_import (with target for a copy, or inPlace), import_changes, import_apply, import_sql.