Mod Component Requests Thread

Аre there any instructions for creating dummy buildings? I mean hide description, visibility etc.
 
You can't.
It's a native tag of improvements xml file that can be applied to buildings xml file. You need to edit the building schema file and the building file to add the tag.
Use these files in your mod or use them as a template (it's BTS vanilla files). Search for "building_alpha", bGraphicalOnly should be at the end.
You can also have a look at Kael's works, it might help you for other useful things.
 

Attachments

  • Buildings_custom_XML.rar
    19.5 KB · Views: 1
You can't.
It's a native tag of improvements xml file that can be applied to buildings xml file. You need to edit the building schema file and the building file to add the tag.
Use these files in your mod or use them as a template (it's BTS vanilla files). Search for "building_alpha", bGraphicalOnly should be at the end.
You can also have a look at Kael's works, it might help you for other useful things.
It does not work - the building can still be built as a regular building, it is visible in the city interface, the description is on pedia still here :confused:
 
Works fine in my mods... Did you turned graphicalonly tag on?
I made a mod by moving your files to BtS/Mods/ModName/Assets/XML/Buildings and then set "1" for tag <bGraphicalOnly>1</bGraphicalOnly> (its was zero before) in file CIV4BuildingInfos.xml.
 

Attachments

  • BuildingCiv4.jpg
    BuildingCiv4.jpg
    426.9 KB · Views: 5
Does it also appear in pedia?

However, what are you looking for exactly?
This one is for "game-mechanics events". That implies the player is not able to build the said building that would give boni/mali/spawn units/etc... The building is created by ingame event system, triggered by conditions you have to specify, just as if it was a magical spell or the will of gods. This is from my point of view - which is for sure not universal - the only interest of having the graphicalonly property. If the building is buildable, then I don't understand why you need the graphicalonly tag functionnal.
But I probably did not guess what you were looking for. Sorry for that:dunno:.
 
Does it also appear in pedia?
Yes.
However, what are you looking for exactly?
I need dummy-building to use it for Wonder <freebuilding> tag to create different effects in All cities. For example, +2 hammers in every city when wonder is built.
So I need this building to be removed from the pedia, from the city interface and from the world map.
 
I need dummy-building to use it for Wonder <freebuilding> tag to create different effects in All cities. For example, +2 hammers in every city when wonder is built.
So I need this building to be removed from the pedia, from the city interface and from the world map.
I do the same thing in my mod with many wonders.
City: iCost -1 makes it nonbuildable.
Map: search for an artdefine without any model.
Pedia: the tag should work though some additional python or dll work may be needed. I'll try to look after it when I have some time...
 
I do the same thing in my mod with many wonders.
City: iCost -1 makes it nonbuildable.
Map: search for an artdefine without any model.
Pedia: the tag should work though some additional python or dll work may be needed. I'll try to look after it when I have some time...
I forgot one more thing... This building must also be removed when the owner changes.
When capturing, this can be done with <iConquestProb> or <bNeverCapture> tags.
For peaceful transfer or cultural annexation - the onCityAcquired function must be used, right?
 
I think I understand.
You all use Sevopedia don't you? It hides buildings with the GrapicalOnly tag
 
Code:
def onBuildingBuilt(self, argsList):
        'Building Completed'
        pCity, iBuildingType = argsList
        game = gc.getGame()
    
        if iBuildingType == gc.getInfoTypeForString("BUILDING_PETRA"):
            pPlayer = gc.getPlayer(pCity.getOwner())
            (loopCity, iter) = pPlayer.firstCity(false)
            while(loopCity):
                pPlot = loopCity.plot()
                if pPlot.isHills():
                    xPlot = pPlot.getX()
                    yPlot = pPlot.getY()
                    Game.setPlotExtraYield(xPlot, yPlot, YieldTypes.YIELD_PRODUCTION, 4)
                (loopCity, iter) = pPlayer.nextCity(iter, false)

What's wrong with this code?
 
Top Bottom