Need help with adding building to mod!

GregFred187

Chieftain
Joined
Jul 27, 2023
Messages
75
Hello there!

I have some problems with my mod SoIR.

I wanted to add a UB to Portugal, the Marine Academy. It seems to work correctly, it shows it in the civilopedia with all changes to barracks, with all graphics and texts. And when I add it through the WorldBuilder, it works correctly too.
But when I play as Portugal, i am neither able to build the UB, nor the standard building. It just isn't schown in the building list. When I conquer other cities with barracks, they are deleted. When I delete the UB from the code again, the barracks work again. I also have added two other UBs before, and they worked correctly.

If anyone has an idea what there could be wrong, I would be very thankfull!
 
If the building appears in the pedia and can be added via the WB then that sounds like the XML is valid and the graphics are there. If it is a UB that replaces the Barracks and that is no longer available then it sounds like you probably have the civ XML updated.

My next thought would be to ensure that you haven't inadvertently set a prereq for the building that is not being met by the city or set the bGraphicalOnly flag or similar. Have you done a diff (using WinDiff or similar) to see what exactly you have changed from the Barracks rather than just what you think you have changed?

I don't know your techinal level so setting debugging code might not be an option for you.
 
Last edited:
Thanks Archid for your quick response!

If it is a UB that replaces the Barracks and that is no longer available then it sounds like you probably have the civ XML updated.
I have restarted civ and my computer, if this is what you mean. It didn't change anything.

Have you done a diff (using WinDiff or similar) to see what exactly you have changed from the Barracks rather than just what you think you have changed?
I have just compared the barracks and the UB with WinMerge. I have changed the descriptions, the artDefines, gave it a free promotion and 3 XP for naval units, additionally to the 3 XP for land units. I did not change the prereqs. The bGraphicalOnly is not set.

Could it be the answer, that I give XP to naval units although the building is not only for coastal citys?
 
Top Bottom