1. F

    How we can create a Unit Upgrade Tree UI mod?

    Hi everybody! It's Flammie, I'm new and I hope you all be okay. I want to create an "Upgrade Unit Tree" UI mod for the upgrade lines from the Units ingame, very possibly in a Lua format, and like a visible list with their respective icons (kinda the Promotion Tree mod by Whoward69, but with...
  2. B

    How to dynamically add map tacks/pins using LUA?

    Hi, i'm new here. I was wondering if anyone here knows of a way to dynamically ADD map tacks/pins in a LUA script. Or if someone has some reference of how to do this. Say I'm trying to add a map tack to the plot on iX, iY, how one would do this? Is there a method? Thanks in advance :)
  3. T

    Displaying yields from Unit Kills after the battle (should be simple *in theory)

    So I've successfully implemented a feature where a player gains Science from enemy unit kills equal to their combat strength, and it does indeed update the progress toward the next technology like I want it to. I want the amount of Science gained to display on the screen after the battle...
  4. S

    PopupDialogInGame not openingt

    Hi, I have the following lua code to check the nuclear reactors and give the age of them to the player: include("SupportFunctions.lua"); include("PopupDialog.lua"); function GoToCity(pCity) UI.LookAtCity(pCity:GetOwner(), pCity:GetID()) end function ShowNuclearReactorAgingPopup(pCity...
  5. T

    [BNW] Adding global yields with Lua scripts?

    Hello, I am relatively new to Civ V modding and the Lua programming language, but I am familiar with XML and coding in other languages. For a mod I am making I am adding a Founder Belief that gives science per some number of followers of your religion, but only in your own cities not counting...
  6. N

    Lua setting modifier property!

    Hey guys, I just found this does work - to read or change properties set up by modifiers in XML: Here is the relevant property in XML I wanted to change by script: <GameModifiers> <Row ModifierId="SECRET_SOCIETIES_ENABLE_VAMPIRE_COMBAT_STRENGTH_FROM_PROPERTY"/> </GameModifiers> <Modifiers>...
  7. W

    Civ VI Environment Emulation - VScode Plugin

    Civ VI Environment Emulation ( Perhaps this is an unfortunate time to have made this, it's been over 6 years since Civ VI came out now and its modding scene is certainly past its prime. Nevertheless, I present to...
  8. R

    Bulk Map creation tools?

    I am looking for a way to run map generation outside of the game context. Ideally I could have my machine create thousands of maps with different seeds and then rank them by all kinds of metrics. Then when starting a new single-player game, filter through a list of maps made where I could rank...
  9. O

    Question about lua debugging, constructing a building immediately when a district is completed

    Hello! In the mod I'm working on I'm having a trouble accomplishing something that seems like it should be fairly straightforward to do, but I'm having some issues with it. In the mod, I have created a new district, let's call it Foo. I have also created a new building, let's call it Bar. I...
  10. B

    [Lua] disable building from production queue

    I recently tried on UB function that allows extra specialist slot to technology buildings (public school and laboratory 1->2) What I did was creating a copy of original building with extra slot and used lua to replace the original building into specialized version when created in city. It...
  11. B

    [BNW] How can I create UB that adds extra specialist to every building with specialist slot?

    I want to make my UB to have function that creates extra one specialist slots to every building with specialist slots when constructed. I guess I will need help from Lua but I haven't learned long enough to figure that out. I tried to refer similar mods but their codes are too complicated for...
  12. R

    [BNW] LUA to remove a building

    Hi I'm working on a mod where a wonder uses the "FreeBuilding" xml to give a lesser version of itself to all cities but this means it also gives it to the city the wonder is built in. I would like to use a lua script to remove the lesser version from the city the wonder is but have no idea how...
  13. M

    Remove Owned Territory

    Hi, I am looking for a way to remove a player owned land after the event SerialEventImprovementDestroyed(). The Improvement creates a 'comptoir' on a resource with a cultural boom of only 1 radius. And the new territory is removed when the improvement is pillaged or canceled.
  14. TheOneHitPupper

    Building nuclear weapons after WC Ban?

    Is there anyway to reenable nuclear weapons if a Civ is embargoed at the World Congress? Specifically thinking rogue states like North Korea would be a real world example. It would be a nice counterweight to barring nations from world trade imo. I'm poking around some of the lua events but I'm...
  15. Pablostuka

    The Spanish Civil War v4 for ToT + ToTPP + Lua - Development Thread [ON HOLD]

    Introduction to SCW v4 I first started designing and creating the Spanish Civil War scenario for Civ2 MGE back in 2002 when I was just a teenager. Back then I reached José Pellón (a.k.a. @Kramsib) in the Spanish Apolyton Site for permission to use his wonderful Iberian Peninsula map. The first...
  16. P

    The Great Lua Library

    This thread is meant to serve two related purposes. The first is to provide a general Q&A thread for Lua and related topics. The second is to provide a link index for questions and their answers, as well as other resources. I'll edit this post periodically to add links to the questions and...
  17. TheOneHitPupper

    City Resistance?

    How would I go about coding Resistance in a city in lua? I have pCity defined, but can't find the proper lua method to implement city resistance there. I am also using the Community Patch DLL, if that helps. The only relevant information I've found are these two links: unhappiness revolt...
  18. B

    Little Python script to help find mod conflicts

    I wrote a little Python script that helps find colliding .lua's in mods. I don't guarantee I got the logic right as my knowledge of Civ modding is limited to the fact that it is done mostly in LUA :). I've just assumed that VP .lua's can be overwritten by .lua's in other mods (that's why their...
  19. S

    [NFP] LUA: Need help accessing combat object attributes

    I am trying to write a small mod that targets the issue with the combat experience of aircraft carriers. I got a mod set up, got the event hook for the combat initialized but the object that the event provides is not really helpful at the moment. Thanks to this event documentation I have an...
  20. F

    Map script based on tectonics lines

    I've made a map script that is based on tectonics lines, here is the algorithm: Put random tectonic lines on the map Put random volcanoes on the map (to-do) Iterate through X iterations and raise the land using averaging of sibling plots Iterate through Y iterations and lower the land using...
Top Bottom