Create a mod
Useful links
In-game names with English names
Temperate biome rules
Some voxel models used in Urbek as reference
Make your mod
Making mods in Urbek is very easy, and best of all, you can draw in the same style using MagicaVoxel, a very fun and easy to use program.
If you want to make a mod simply and quickly, go here.
Otherwise, if you want to make more complex mods and want to understand how, read on.
Let's first start by looking at what a mod is.
A mod is a folder in C:\Program Files (x86)\Steam\steamapps\common\Urbek\Urbek_Data\StreamingAssets
You can get to the exact location by looking at where it sends you when you press this button on the game:
This folder must have certain elements.
Look at the 4 mods that already come in the game, ignore the .meta files, you will see that they have:
Folder name, this defines the name of your mod, we recommend: modName_author
Short description stored in description.txt
3D models, in the folder 3dModels
Rules, one or more .txt files that must start with replace, add3dModels, or newBuilding, what comes after that doesn't matter, it's only useful for you to organise yourself.
Draw a 3d model
Download MagicaVoxel, last version
Draw your construction (one tile in the game is 40x40 voxels)
If it's a corner building it should be to the right and down, you can check it by loading the file again, it should look like this
If you want some elements to go over the edges, you can make it 46x46, for example, and then you have 3 voxels for each side.
Export file as .obj
If you use the old version of magicavoxel 0.92, the file must have "mv92" in its name.
The file should be in a subfolder called 3dModels, inside your mod folder.
Every time you save an .obj file, 3 files actually appear (.obj, .png. .mtl), all three of which are useful. It would looks like that
Types of Mods
There are three types of modifications possible. The mods Urbek already has use all three types, so you can learn by seeing what's in them.
Replacing models
This is the easiest one, you can replace some existing models of the game with other ones.
You must create a file called replace.txt (the important thing is that it starts with replace, it can also be called replace_testing.txt or replace_firstattempt.txt, for example).
First you must recognize the name of the model, check the Temperate biome rules and look for the construction you are interested in, in "codeName:" you will see the name I use inside the game, if you want to see the equivalent of the name in English with the names inside the game, go to In-game names with English names). So to modify the farms look for "codeName": "campo" in the file.
A few lines below that, in "models": you will see that there is one called KCampo_2x3. to replace that model, you must write in your replace.txt file
code_name_of_the_build,old_model_name,your_model_name
So, for example, one line of the onlyFarms mod says:
campo,KTrigo,KCampo_1x1_mod_mv92
it means: replace the KTrigo model of the farms (campo) with one of yours called KCampo_1x1_mod_mv92
I added mv92 to the model because I did it in magicavoxel 0.92, which is different from the others, I'm very used to that version, but if you do it in any more advanced version, you don't need to add mv92 to the file name.
Add model
You can only add buildings and cars, not roads or nature (or maybe it is possible but I haven’t tried :P ).
If you use a mod that adds new models and then delete the mod, there will be problems loading the game where you have already used it.
The file must start with add3dModels and each line must have 4 or 5 values:
inGame name of the building, name of the new model, width, length, if it's a corner. For instance:
cabanha,KCasa0020_mv92,1,1
In case it is corner, you add an E at the end, like this
cabanha,KCasa0020_mv92,1,1,E
Adding construction
This is the most difficult thing, the best way to learn is to check in the game rules what each thing means, the only different with respect to existing buildings is the UpgradesFrom field, in case you want the construction be an upgrade from another, it is a vector whose elements have 2 or 3 fields:
original_construction,mode,reference,
For example, if we want our new building to be one of the possible upgrades of the downtown house (inGame name: ciudad) as second priority,
First let's check what a downtown house can be upgraded with
"updates": ["pechonhos", "ciudad2", "ciudad", "parking", "pobla", "poblaPobre", "villa", "pueblo", "puebloPobre", "callampa", "cabanha"],
It means it will upgrade first to pechonho (religious neighbourgood) as first priority, then ciudad2 (2-storey downtown house), then it appears itself, i.e., if it does not satisfy the requirements, it will downgrade to parking lots, and so on.
We then set
UpgradesFrom: ["pobla,after,city2"],
In this case it would be equivalent to putting
UpgradesFrom: ["pobla,before,pechonhos"],
And if we also want it to be the first priority for the upgrades of the suburban house (poblaPobre), we will put
UpgradesFrom: ["ciudad,before,pechonhos", "poblaPobre,first"],
The other values of the constructions like requirements, prices, etc, you can check other constructions to compare, for now let's continue with the lights.
Lights
If you have a 3d model that has the same name as your building but also has a " luz" (with space) at the end of the name (in the same folder) then the game will automatically recognise it as the places that should be the yellow light.
If it ends in " luzRoja" it will be the red lights.
7 notes
·
View notes