lua

  1. F

    Add new and remove old civilizations with ruleset.

    I want to make every base game civ unplayable if the right ruleset is selected (gonna replace them with my own). I've already added a ruleset and a new civilization (it can even be played with the wrong ruleset, though). Please help! Thanks!
  2. F

    Remove civilizations from DLC?

    [DELETED] Please delete [DELETED]
  3. pineappledan

    Modding help - lua for trade routes

    Hi there, I'm working on a compatibility patch for the Canadian civ, and I am getting a crash when using a code for their UA What it does: On move, Internal land trade routes claim tiles The Code: function YorkFactoryExpress(iPlayer, iUnit, iX, iY) local pPlayer = Players[iPlayer]...
  4. S

    Add city modifier based on number of suzerains

    Hello there, I want to create a new leader, and as part of his unique ability, every city shall get +1 food and production for every city state he is the suzerain of. The only modifiers I could find that change a yield based on how many city states you control are...
  5. P

    [TOTPP] Get Started With Lua Events

    Note: I've started (but not got too far) a new version here. This thread is meant to be a resource for learning how to use the Lua functionality of the Test of Time Patch Project. The first 10 posts will (eventually) contain "lessons" which are intended to teach enough about programming, Lua...
  6. washy

    Player:GetNumPolicies() Question

    It´s some way of using Player:GetNumPolicies() to get the number of policies of one special branch or is always the total number of policies?
  7. Protok St

    [Lua] Create Improvement by lua of the map, how to? Solved

    How to create Improvement by lua of the map? There is a LUA's scripts for creating a separate maps. In those we can do like this: plot:SetPlotType(PlotTypes.PLOT_LAND); and this: plot:SetTerrainType(TerrainTypes.TERRAIN_PLAINS); and this...
  8. F

    Give all units a promotion as a trait?

    I want to give all units the Amphibious promotion as a trait, is that possible?
  9. 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!
  10. 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?
  11. 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...
  12. 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.
  13. 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...
  14. 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...
  15. 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)...
  16. 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...
  17. 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
  18. 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...
  19. 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:"...
  20. 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...
Back
Top Bottom