Need help using addon terrain tiles.
Moderator: Forum Moderators
-
- Posts: 2
- Joined: October 26th, 2024, 10:38 am
Need help using addon terrain tiles.
I installed the umc resource pack but I don't think I can use the the tiles from it. Whenever I try to load a game using the custom tiles I get a message saying it can't find the terrain tile. First time map maker here.
- Pentarctagon
- Project Manager
- Posts: 5730
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Need help using addon terrain tiles.
Is it when you're loading it in the editor or when starting a game?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
- lhybrideur
- Posts: 454
- Joined: July 9th, 2019, 1:46 pm
Re: Need help using addon terrain tiles.
What do you mean by "I try to load a game using the custom tiles"? Did you just use the terrain code in your map and that's it?
If so, you need to add the terrain code to your add-on to. You can for example create a terrain.cfg file with the [terrain_graphics] and the [terrain_type] of the relevant terrain in it and link it in your _main.cfg.
You can have a look at how other add-ons do that to help you.
If so, you need to add the terrain code to your add-on to. You can for example create a terrain.cfg file with the [terrain_graphics] and the [terrain_type] of the relevant terrain in it and link it in your _main.cfg.
You can have a look at how other add-ons do that to help you.
Re: Need help using addon terrain tiles.
The issue is that for the editor all addons are active and for a game only those that are explicitly used. Which means all addons that contain the selected era, scenario, campaign or enabled modifications.
Since the UMC_Terrain_Pack addon contains none of that you either need to copy what you want from it as lhybrideur mentioned or include what you need from it (and declare it as a dependency if you're making an addon yourself).
If you want to include all terrains you can add
Since the UMC_Terrain_Pack addon contains none of that you either need to copy what you want from it as lhybrideur mentioned or include what you need from it (and declare it as a dependency if you're making an addon yourself).
If you want to include all terrains you can add
{~add-ons/UMC_Terrain_Pack/load_UTP.cfg}
to your scenario (not inside [scenario] or [multiplayer] but next to) or _main.cfg
of your addon."If gameplay requires it, they can be made to live on Venus." -- scott
Re: Need help using addon terrain tiles.
alternativeley you could ask the author of the umc reousrce pack to include a
This of course needs the involvement of the other addons author, but it avoids a common problem with the other approach: Including anoher addons code via macro inclusion can lead to dublicate defintion erros when multiple addons that do it are used together
( Also The proproceccor cache cannot handle it that well when one addon includes another addons code, but imo this is a minor problem)
[resource]
in your addon that your add-on can then load with [load_resource]
which will let the engien know that your scenario uses that other addons stuff.This of course needs the involvement of the other addons author, but it avoids a common problem with the other approach: Including anoher addons code via macro inclusion can lead to dublicate defintion erros when multiple addons that do it are used together
( Also The proproceccor cache cannot handle it that well when one addon includes another addons code, but imo this is a minor problem)
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- lhybrideur
- Posts: 454
- Joined: July 9th, 2019, 1:46 pm
Re: Need help using addon terrain tiles.
You can use an #ifndef to prevent that though.
Re: Need help using addon terrain tiles.
I don't think so
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- lhybrideur
- Posts: 454
- Joined: July 9th, 2019, 1:46 pm
Re: Need help using addon terrain tiles.
Ah yes, my bad, I misread your post.
I though you wrote duplicate definition of macros instead of duplicate definition of terrains.
Although it could still work if the included add-on has macros in it. You could then use an #ifndef looking for one of the add-on macros.
I though you wrote duplicate definition of macros instead of duplicate definition of terrains.
Although it could still work if the included add-on has macros in it. You could then use an #ifndef looking for one of the add-on macros.