-
Notifications
You must be signed in to change notification settings - Fork 10
Installation guide
There are two options:
- quick and easy installation via AssetLib (stable version);
- manual installation from Github (you can get experimental versions of the plugin).
- Open your Godot project, go to AssetLib tab, click on the GodotVMF and click download:
- Wait until the plugin finishes loading:
- When the download is complete, you will see a window like this with a scary red inscription.
Don't worry, this is completely fine!
Just click the "Install" button.
- After installation you will see a window about successful installation, but at the same time you will see a bunch of terrible red errors in the console.
Don't worry, this is also normal :)
- But that's not all! Now we need to go and enable plugins. Go to the Project -> Project Settings tab.
In the window that opens, go to the Plugins tab and enable the checkboxes you need.
Warning! Material Sync is an experimental tool, use with caution!
You will see windows with reimporting assets - this is normal, wait for the download to finish.
-
Now we save all scenes and restart the project.
-
After restarting the project, the example scene should open without any problems:
- Great, we installed the plugin itself, but unfortunately that's not all. In the console we see an error:
ERROR: core/variant/variant_utility.cpp:1098 - vtfcmd not set in vmf.config.json
This error is related to the plugin config file settings. Read more about Hammer settings and the config file below in this article.
Move the addons/godotvmf
folder into the same folder of your project and activate it in your project settings.
Important
Possibly you'll have errors once you installed the plugin. Just restart the project.
Project -> Reload Current Project
GodotVMF - Material Sync - is a plugin that automatically converts all godot materials in target_folder
into VMT/VTF. Don't turn it on if you don't need this feature. See more
-
Download Source SDK Base 2013 Singleplayer
-
Download Hammer++ and put all files into
SteamFolder/steamapps/common/Source SDK Base 2013 Singleplayer/hl2/bin
-
Download the blank mod folder and put everything inside your project
-
Launch Hammer++ and configure it (Tools -> Options):
- Game Executable Directory -
path_to_your_project
- Game Directory -
path_to_your_project
- Hammer VMF Directory -
path_to_your_project/mapsrc
- usually some Source Engine developers createmapsrc
folder where sources of maps are placed - Prefab Directory -
path_to_your_project/mapsrc/prefabs
- You're all set!
Before work with the plugin you can create in the root of the project a file vmf.config.json
(it's not necessary actually).
Default config:
{
"gameinfo_path": "res://",
"import": {
"scale": 0.02,
"generate_collision": true,
"generate_lightmap_uv2": true,
"lightmap_texel_size": 0.4,
"instances_folder": "res://instances",
"entities_folder": "res://entities",
"geometry_folder": "res://geometry",
"use_navigation_mesh": true,
"navigation_mesh_preset": "res://presets/navigation_mesh.tres",
"entity_aliases": {
"npc_ghost": "res://objects/npc_ghost/npc_ghost.tscn"
}
},
"models": {
"import": true,
"lightmap_texel_size": 0.4,
"target_folder": "res://"
},
"materials": {
"import_mode": 1,
"ignore": [
"TOOLS/TOOLSNODRAW",
"TOOLS/TOOLSSKYBOX",
"TOOLS/TOOLSINVISIBLE"
],
"fallback_material": null,
"default_texture_size": 512,
"target_folder": "res://materials"
}
}
-
gameinfo_path
- The source mod path where resources placed to work with hammer. -
import
-
scale
- In case you need to convert Valve's metrics to yours. -
generate_collision
- Iftrue
then generatesCollisionShape3D
for imported geometry (except brush entities) by using trimesh shape. -
generate_lightmap_uv2
- Iftrue
then generates UV2 to enable light baking. -
lightmap_texel_size
- Size of each texel in the lightmap for more precise light baking (use with caution, very low values can cause crash). -
instances_folder
- Path inside the project where imported instances be placed. -
entities_folder
- Path inside the project where importer will grab entities during import. -
geometry_folder
- Path where the importer will store any mesh or collision resource that is generated. -
use_navigation_mesh
- If true, then generates navigation mesh for the generated geometry -
navigation_mesh_preset
- Path to the NavigationMesh resource that will be used for generated navigation mesh instead of default settings -
entity_aliases
- In case you don't want to place some entities inside the entities folder you can use aliases
-
-
models
-
import
- Iftrue
then importer will try to import models from the mod's folder. -
lightmap_texel_size
- Iftrue
then generates UV2 for static props for light baking (global default value, can be overridden by eponymous keyvalue inprop_static
entity, which can be manually added usingAdd
button in object properties). -
target_folder
- Path inside the project where imported models be placed. In default config it's root because all model paths inprop_static
already havemodels
folder specified
-
-
material
-
import_mode
- The mode of importing materials- 0 - Use existing
- 1 - Import directly from mod folder. Already imported materials will be ignored.
-
ignore
- List of materials that should be ignored during import. -
fallback_material
- Path to the material *.tres that will be used as a fallback for ignored materials. -
default_texture_size
- The size of the texture that will be used in case of missing texture. -
target_folder
- Path inside the project where imported materials be placed.
-