Part 4 - Basic Asset Creation 2
In this part, we’ll be covering:
- Placing assets in CodeWalker
- Creating simple map mods
- Basic mod structure overview
Step 1: YMAP Creation
- In the CodeWalker World View, navigate to the top-left corner, and open the project panel.
- Once open, go to File -> New -> Ymap File.
- Select your new YMAP in the project, and to add a new entity to it, go to Ymap at the top and click New Entity
- You can now transform your entity as you wish.
- Find the entity/model name you wish to place in the YMAP, and change the Archetype setting for the entity.
- To duplicate entities, hold SHIFT and drag the 3D Gizmo.
- Once you are happy with your YMAP, select it and click the Calculate Extents and Calculate All Flags buttons.
- You can now save your YMAP file to your FiveM map resource. Ensure you name the file something that makes sense as good practice.
- Next, in the project window, go to Tools -> Manifest Generator, then click Generate and save _manifest.ymf. This is necessary to load the models correctly.
Step 2: FiveM Map Resource
- Set up a new folder in your resources folder, for example, “map_mod”.
- Inside map_mod, create a new folder named “stream”.
- Create a new text file and name it “fxmanifest.lua”.
- Paste the following contents into your fxmanifest.lua file:
fx_version 'cerulean'
game 'gta5'
lua54 'yes'
this_is_a_map 'yes'
- Move any game asset files into the stream folder to ensure the files load properly.
- Make sure your new resource is included in your server configuration file.