lua

  1. F

    Give all units a promotion as a trait?

    I want to give all units the Amphibious promotion as a trait, is that possible?
  2. F

    [Vanilla] Give civ great person

    Hi! I want to give a Civilization a great general if the civ enters a new era. How can I do that? And how do I check if the civ has a certain trait? Thanks!
  3. F

    [Vanilla] Make Units 25% cheaper to purchase as a trait?

    How can I make units 25% cheaper to purchase. I want it to cost the normal production quantity, but not the gold quantity. Any tips?
  4. F

    [Vanilla] R&F support, lua scripting & MORE

    Hugh... Where should I begin? So I'm new to Civ 6 modding, and the XML part is relativly easy, but the LUA is a little bit more complicated. So here's my questions? Question 1: My mod doesn't work with R&F So when I'm using R&F my civ won't show up, but if I turn it off it does show up. Do I...
  5. Gh0sT3I7

    Unit/Resource Plopping Trouble

    Hey guys, I'm having trouble with the Firetuner. It's not letting me plop anything on the map, and as inexperienced with coding as I am, I could really use a hand.
  6. H

    [BNW] Dummy Policy via LUA, Anything Wrong?

    First time using/experimenting with LUA to give a civ I'm working on a dummy policy, based on the code provided here (https://forums.civfanatics.com/threads/lua-reference-vault.607316/). The thing is, when I made the build to test the civ out, it didn't show up ingame so I'm wondering if it was...
  7. Angryr

    LUA Event hook for on unit killed?

    1) Is there an event for hooking onto when a unit is killed? If so, what is the function signature? I can't seem to find any examples. 2) What is the event GameEvents.OnUnitRetreated (found in AlexanderScenario.lua) is that when a great person is captured and returns to a city or is that from...
  8. SoehnelS

    Available Objects in LUA

    Hello! I started coding with LUA to get the possibility for more Statistics. (In a far away future I want to create political maps.) Thanks to the helpfull posts of different peoples here! In a first step I want to save data in an external file, without success (only the Lua.log is possible)...
  9. A

    Culture Functions and Tables

    Hi, I tried to make Loyalty and Loyalty Pressure be dependent on Culture instead of Population and unfortunately I stumbled upon a total lack of functions and Loyalty Pressure and Population being hard-coded together. However, I'm going to give the idea one more try with the Summer update...
  10. Gueux

    Is it possible to change Religion pressure with lua? [SOLVED]

    Couldn't find any function like "city:Getreligion():ChangePressure()" ... So if you know one who could help me, I would be grateful
  11. Gueux

    Is it Possible to store data across saved games? (lua) [SOLVED]

    I need a table value to persist through save and load game... is it possible? I found answer for Civilization 5 but nothing for Civilization 6 I searched in https://docs.google.com/spreadsheets/d/1HQSUOmw_pI8dNSr1kmun4qAHj6SsOVfa1vGTbk5mVvs/edit#gid=0 and found "data" and "save" but no idea how...
  12. Gueux

    [R&F] Is it possible to change loyalty with lua? [SOLVED]

    Hello, I am new at modding and I didnt found any lua function that could change the loyalty, I only found some Get.. function but when I try to use Getloyalty and GetCulturalIdentity, it doens't work and in the lua.log I get: "lua:18: function expected instead of nil stack traceback:"...
  13. JPetroski

    Caesar's Gallic Wars 1.2

    CAESAR'S GALLIC WARS A SCENARIO BY JOHN P. PETROSKI AND GRISHNACH FOR THE TEST OF TIME PATCH PROJECT V.0.15.1 2018 "Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur." This is the first new...
  14. A

    [R&F] Modding Loyalty

    I would like advices and tips on how to mod Loyalty in order for it to use Culture and Tourism instead of Population. I have some knowledge of modding, and so far I see that it will either come down to some SQL changes or adding some gameplay scripts to override either the calculation of...
  15. C

    LUA Trait Help

    After battering my head against the wall trying to come up with a way to code my in LUA, I've hit an actual wall... From my limited knowledge of Lua, I cobbled together this 'pretty' piece of code: function CheckPlayerPeaceDeal(iPlayer) local pPlayer = Players[iPlayer] local...
  16. R

    radioactive contamination

    Does anyone know how to add it to a tile in Lua? I've looked through GameInfo.Features(), and GameInfo.Improvements(), and even GameInfo.Resources(). I also can't find any relevant functions in the TerrainBuilder table. (I'm making a map script.)
  17. F

    [Vanilla] Add yield to plot.

    Is it possible to add yields to a plot if the player has a specific trait? For example add +1 food and +1 production to desert tiles.
  18. F

    [Vanilla] Add a formal war?

    Is it possible to add a formal war? And if so, for a specific civilization? For example like India in R&F, where they can declare a "War of Territorial Expansion". So this is what I want to do: * Add a formal war which can only be used by a specific civilization * (lua) Can check if a...
  19. Bangra 7

    Creating a civ leader mod component based of Tropico mod.

    After downloading the Tropico MOD for BNW, I figured I'd edit the Presidente LUA script, to allow a unit class to be chosen. This UNITCLASS_LEADER, will feature different leaders for my fictional nations in the MOD, and I want to be able to let multiple nations use the script. Do I have to...
  20. F

    [vanilla] How to add a mission?

    This is my code, but it doesn't work! And yes, it's from this tutorial: https://forums.civfanatics.com/threads/dll-custom-missions-via-xml-and-lua.494531/
Top Bottom