Introduction to .uri
Welcome to .uri language. Here you will find all the necessary information to understand what it's about, comprehend its features, and learn how to unleash its full potential.
The .uri language was created with the goal of facilitating content creation for servers in a simple and accessible way. This language has been specifically designed to enable the construction of complex elements, such as NPCs, quests, and items, that can interact with each other in various enriching ways.
The structure of .uri is based on a tree-oriented paradigm, where each element created is represented as a branch within a tree, forming a variety of constructors that make up different entities in the game, like characters, quests, and more.
The .uri project originated in 2024, when the foundation known as uri-core was developed. This core solves a common problem in content development for servers: the high entry barrier due to the need for advanced programming knowledge.
Traditionally, adding high-quality content to a server required highly skilled personnel. However, .uri democratizes this process, lowering the skill level needed to participate in content creation.
Thanks to .uri, anyone with a basic interest can start creating their own NPCs, quests, and other interactive elements. This language allows you to easily define the interaction, unique characteristics, and even the behavior of these elements within the game world, making content creation more accessible and open to a larger community of users.
Example
To better illustrate how the .uri language works and how you can use it to create content on a server, let's examine a simple example. Imagine an NPC that interacts with players when they approach it. When the interaction begins, the NPC welcomes them to .uri and tells them that their dreams come true here. This is the example you see above in the gif, and below is the code that brings it to life.
Example Code
NPC
name welcome
model a_m_y_hipster_02
position -1056.683 4775.971 235.807 0.0
interaction
say "Welcome to .uri!"
say "Where your dreams come true"
behaviour
nothing
Although you might not fully understand it yet, you can get a sense of how easy it is to understand and see that the logic and behaviors of NPCs can be defined effortlessly.
Development Environment
To start working with the .uri language, it's essential to have a suitable development environment. Below, we explain how to set up Sublime Text so that you can develop efficiently, with full support for syntax, keyword highlighting, and autocomplete.
Step 1: Install Sublime Text
-
Download the latest version of Sublime Text: Go to the official Sublime Text website and download the free community version: Download Sublime Text. Select the appropriate version for your operating system (Windows, macOS, Linux) and follow the installation instructions.
-
Install Sublime Text: Once you’ve downloaded the installer, open it and follow the steps to install Sublime Text on your machine. After installation, open Sublime Text to verify that everything is working correctly.
Step 2: Configure Sublime Text for .uri
-
To configure Sublime Text on Windows to work with the .uri language, you need to place four key files in the
Packages/User
folder, which you will find in the download below. -
First, open Sublime Text and, in the top menu bar, select
Preferences
and thenBrowse Packages...
. This will open the file explorer in thePackages
folder. Inside this folder, you will find a subfolder calledUser
, which is where you should place all the files. -
The typical path for this folder on Windows is
C:\Users\YOUR_USERNAME\AppData\Roaming\Sublime Text 3\Packages\User
. It's important to note that theAppData
folder is hidden by default, so if you don’t see it, make sure to enable the viewing of hidden files and folders in Windows File Explorer.
Step 3: Activate the Configuration
-
Select the Syntax: Once the files are configured, open a file with the
.uri
extension in Sublime Text. From the bottom-right menu in the editor, selectSyntax
and thenOpen all with current extension as...
to choose the syntax you just defined. -
Test the Configuration: Open a
.uri
example file and verify that the syntax highlighting and autocomplete work correctly with theexample.uri
file.
Download Files
You can download each of the files needed to configure Sublime Text to work with .uri using the following button:
Usage
To use .uri in your Fivem server, start by creating a resource with an fxmanifest
file. In the files
section of the fxmanifest
, include your .uri file as you would with any regular file, but make sure to add uri_addon
inside this section to indicate that the file is an .uri addon. You can then create your .uri file with any name you like and write the code you want to execute within it. When you're ready to load the content, use the following commands: refresh
, followed by buildaddons
, and finally ensure uri-core
. This process will ensure that your .uri content is properly integrated into your Fivem server.