Help with Unique Improvement-

Silvermyr

Chieftain
Joined
May 15, 2019
Messages
22
I have been trying to make a unique improvement (black market) for a mod civ I am writing. The idea is an improvement that does not alter any yields, but instead give2 25% extra combat stregnth to the tile. It can connect any luxury resource on the map and it can be built outside your borders (claiming the tile it is built on for your empire). This is the first time I try to make an improvement, and I have run into some issues, since it can't be built and it also freezes my cities when I try to assign a new building/unit to be built.

Help would be greatly appreciated.

PS
I have a few recources in the improvement file that are added in via the mod "More Luxuries". Will that cause problems with an unmodded game? I tried to remove that snippet of code to see if that caused the issue with this improvement. It did not.
 

Attachments

Correct:
Code:
<ArtDefineTag>ART_DEF_IMPROVEMENT_TRADING_POST</ArtDefineTag>
Incorrect:
Code:
<ArtDefineTag>ART_DEF_FEATURE_trading_post</ArtDefineTag>
The default value for column "CultureBombRadius" is 0. Adding this to your improvement will not accomplish anything:
Code:
<CultureBombRadius>0</CultureBombRadius>
 
The resources from the More Luxuries mod will work fine so long as the More Luxuries mod is enabled and loads before your mod. Otherwise you will get some form of an InvalidReference error.

Generally when compatibility is given for another mod being active at the same time, the code related to the "stuff" from the other mod is better placed within its own XML or SQL file, and a reference in the mod should be made so that the other mod loads 1st.

-----------------------------

By definition, if someone is running the game using your civ-mod, then the game is not unmodded.
 
Thank you for your help. The improvement can be built and it does work as intended. However, for whatever reason no improvement shows up on the map. It is there, since it does connect resources and expands the borders as it should. It just does not show any visible improvement despite having an art tag.

Also a few question:
-There is no simple way to make an improvement claim only the tile it stands on, is there? (That's what I tried to du with the culturebombradius command in the last iteration).
-"A reference in the mod should be made so that the other mod loads 1st." How do you do that practically? As you may have noticed, my knowledge of modding comes from looking at/copying/altering other mods' code. I do not know how to code something I have never seen before.
 

Attachments

In Modbuddy, tick the "ReloadLandmarkSystem" box on the mod properties tab of modbuddy.

Certain Improvement 3d models are tied to the resources they re intended to be built on. Fishing boats for example are subdivided into a model for when they are on Fish, another for when they are on Crabs, etc. If one of the correct resources for that model-set is not on the tile, nothing will show for these types of improvements.

I don't remember whether the Camp is one of those, but it does have multiple resources the Camp Improvement can improve.

Quick Tutorial on adding a reference in Modbuddy:
The Enlightenment Era: Adding a Reference in ModBuddy
 
Back
Top Bottom