LeeS' Dummy Buildings Utilities

There would be no reason you should not be able to. Just bear in mind that the dummy might still not be given depending on the exact method you use to lock it out from being normally available as an item to be constructed/purchased.

So far as doing it via adding the building directly from an lua script, there would really be no need to tie the dummy to a trait. The lua script would be written to never add the dummy for any other civ (or leader) than the desired one.
 
There would be no reason you should not be able to. Just bear in mind that the dummy might still not be given depending on the exact method you use to lock it out from being normally available as an item to be constructed/purchased.

So far as doing it via adding the building directly from an lua script, there would really be no need to tie the dummy to a trait. The lua script would be written to never add the dummy for any other civ (or leader) than the desired one.

@LeeS Thanks for the fast reply.

What I want to use it for is to solve an ancient problem of replacing a district and its buildings (idea is to replace district and add my own buildings, since also replacing buildings does not work, nothing to build that way :( ).
All ok, but I have a duplicated list of buildings to build (other players no problem since I have traits in mine buildings), my idea was to give a dummy building only to my civ to mutually exclusive the original buildings from appearing.

Concrete example: I add a new lighthouse and so forth, and add the new buildings to the Harbor. Harbor replaced by Porto. Then I want to build my own but the original 3 buildings appear + my 3 added.

Can you help? Or how can I use your system do the above?

Many Thanks!!
 
Last edited:
Other than using the part that hides dummy buildings from view the code of the utility won't implement a dummy into a city with DistrictX unless one of the other settings for Number of Adjacent Resources, Mountains, Terrain-Types, Other Districts, etc., are being used.

But you can create an lua script that adds a "locker" dummy-building which is mutually exclusive to the normal three Harbor buildings, and add that dummy building to all the Civ's cities as they are founded/captured. The utility will handle hiding the dummy from view so long as a player is using Vanilla -- the UI files aren't updated for RaF as yet.

Alternatively you can just not worry about hiding the dummy-building for either Vanilla or RaF, and just add it to all cities founded/captured by the civ. The original Lighthouse, Shipyard, and Seaport would not be constructable and purchasable in such a case, but they'd probably still show in the Production Menus as "greyed-out" items.
 
@LeeS, Many thanks for the reminder, actually I don´t need to hide it, just found the perfect solution for that, and thanks for your snippet to add a building to the citycenter :)

Also, with mutually exclusive they don´t appear at production, the only place they appear is at tech/civic tree, as usual (still to find a way to hide them).
 
I solved the problem with a MIX of solutions:
- Created the dummy buildings by LUA.
- Replaced district by mine but assigned my new buildings of that district to the original one instead.
- Original buildings and wonders Mutually Exclusive with my dummy buildings, to original buildings not appear at production panel.
- Replace buildings, to original buildings not appear at tech/civic tree.
 
@LeeS - I know I am dredging up a very old thread, here; but my own efforts to create a fairly wide-ranging mod have led me here.

I would very much like to make use of some of the core principles of the dummy-buildings-system. I am intending to aim for Gathering Storm-onwards compatibility. Is the available dummy-buildings-system a one-stop-shop in terms of including the functionality in my work?

Sorry - I know that is vague; I just want to understand how usable this is as a base. I note you have headlined the OP with a note to say it is under reconstruction - but I suspect that is maybe not the case anymore?

Full disclosure: I haven't digested the contents fully yet. But I think the system gives me a couple of key things that will help with some of what I am trying to achieve for some flavour gameplay.
 
The most recent version of the system is attached. So far as I can see from experimentation it is now R&F and GS compatible, and is compatible with the August Update. It does not however hide the dummy buildings from view of the human player in all the User Interface screens.

One thing it does do is rewrite the ProductionPanel.lua file and the CityPanelOverview.lua file to eliminate any dummy buildings from ever showing in the city panels, and to eliminate from the "Build" selection menu any building which cannot ever be built or which cannot be built at the moment, eliminating thereby a lot of clutter. This however makes it incompatible with any mod that also rewrites the same User Interface files.

One thing I have not had a chance to do lately is look back through the three "toolkit" lua files to ensure that all the custom functions I've dumped within them are all still working properly.
 

Attachments

  • Lees' Dummy Buildings Systems.zip
    236 KB · Views: 145
The most recent version of the system is attached. So far as I can see from experimentation it is now R&F and GS compatible, and is compatible with the August Update. It does not however hide the dummy buildings from view of the human player in all the User Interface screens.

One thing it does do is rewrite the ProductionPanel.lua file and the CityPanelOverview.lua file to eliminate any dummy buildings from ever showing in the city panels, and to eliminate from the "Build" selection menu any building which cannot ever be built or which cannot be built at the moment, eliminating thereby a lot of clutter. This however makes it incompatible with any mod that also rewrites the same User Interface files.

One thing I have not had a chance to do lately is look back through the three "toolkit" lua files to ensure that all the custom functions I've dumped within them are all still working properly.

Brilliant - thank you and thank you for the explanations of the caveats! I will definitely download and have a peruse of what there is.
 
Top Bottom