[BNW] Unique building that yields luxury resource?

Corndog Ninja

Chieftain
Joined
Dec 9, 2014
Messages
2
I'm working on a mod and have an idea for a unique building that provides a luxury resource. I'm not sure if it can be implemented, though.

I've added a resource to the game. This new resource is technically not unique to the new civ, but it does not spawn on the map. Now, the way to get copies of this resource is to build the unique building. This is a building that is constructed in a city, not on a tile, and yields one copy of the resource. Therefore, the new resource is effectively unique, but rather than being free like the Indonesian ones (Nutmeg, Cloves, and Pepper) a building is required; this also means that they can have more of it if more cities are built.

I'm not sure if this is possible, though - looking at the XML the only YieldTypes are food, production, gold, science, culture, and faith. Is there some way I could swing this to work?
 
It is possible, there are a few mods (including mine) which do this.
The table you're looking for is <Building_ResourceQuantity> -- this will let you tell the building to provide a specific resource, normally used by the Recycling Center to give Aluminum, but you can use it to tell your building to give a luxury as well.
 
As DarkScythe mentioned, there are many many World Wonder mods that do this very thing. But as far as the game is concerned a building is a building is a building. It does not know or care whether the building that has a <Row> entry in the <Building_ResourceQuantity> is a World Wonder or a unique replacement for a Shrine (as example). It just knows that when Building-X is built by player_X, it should give a resource (as specified in <Building_ResourceQuantity>) to player_X.

Refer here for a bit more information. Bottom of the referenced post.
 
Then it's confirmed that Building_ResourceQuantity works for all resources, not just strategic resources (the only way they're used in-game)?
 
Then it's confirmed that Building_ResourceQuantity works for all resources, not just strategic resources (the only way they're used in-game)?

Yes. My Belgium provides Praline through a building.
 
Yeah, and my Holo gets her unique Apples luxury through a hidden building, so it doesn't matter that the building isn't "visible."
 
Then it's confirmed that Building_ResourceQuantity works for all resources, not just strategic resources (the only way they're used in-game)?
Mmmm...based on your comment I probably need to re-word the section on <Building_ResourceQuantity> to be a bit more straightforward and clear to the potential user. :(
 
Mmmm...based on your comment I probably need to re-word the section on <Building_ResourceQuantity> to be a bit more straightforward and clear to the potential user. :(

Let the edits begin!
 
Mmmm...based on your comment I probably need to re-word the section on <Building_ResourceQuantity> to be a bit more straightforward and clear to the potential user. :(
Honestly... I've never really given your thread more than a quick skim, so even if it was worded wrong I wouldn't have caught it. So there's no need to edit it. Or maybe there is, I wouldn't know.

EDIT: But going back and reading that section, no, it's very clear.

But I completely forgot about JFD's Belgium, a civ I've actually played a whole game as and still forgot about its UB... :cringe:
 
Top Bottom