lua

  1. P

    Over The Reich JPetroski vs. Prof. Garfield

    Here's a new game of Over the Reich: JPetroski (Allies) vs. Prof. Garfield (Germans) JPetroski Turn 1: A few targets hit in the Ruhr and a U-Boat sunk. Prof Garfield Turn 1: Attacked a couple bombers, nothing killed. Other Stuff: I've attached the current OTR scenario; as well as a what...
  2. Cuica

    [BNW] Help making Great Musician award culture, faith, gold, and science when used.

    Hello, all. I'm new to the forum and mod making for Civ5 and I want to make my own civ. I've got a decent understanding of xml but I am new to lua. I am assuming that the feature I'm trying to implement is only possible with a lua script. One of my civ's unique units replaces the Great...
  3. Lenin1870

    [NFP] How to count government policy slots in Lua?

    I found GetNumPolicySlots function in Civ VI Modding Companion. But it should only use UI context and not return integer, 'amount'. I wonder if there is any other way. Is there a function about government slots that returns an integer in the Gameplay context?
  4. bahamut19

    Lua - Change triggers from Civ specific to Trait specific

    I've been working on a personal Mod based on the Koopa Troop Civ made by Typhlomence and calling it the Chameleon Koopa. The idea is when the game loads, it will randomly select from 2 unique buildings, 2 unique units, and 1 unique leader trait. The Civs it chooses from is from a list of all VP...
  5. W

    Where can I find the source code of units?

    I'm new to Civ 5 modding, and I wanted to see how certain actions, such as the Xcom Squads, teleport work. However, I can't seem to find any source code files that show the code for this, which I'm pretty sure is lua correct?
  6. R

    Need Help with Culture per merchant specialists

    I am currently making a civilization that gives 1 culture to every merchant specialists. I made a dummy building that give 1 culture yield and a lua script that should give 1 dummy building per merchant specialist. I adapted this script from the summa mod on steam workshop. However, nothing...
  7. J

    [GS] [XML] Need a hand on adding a new Domain for Leaders

    Hi, I have built an Observer mod (Better Spectator Mod), using an unique leader LEADER_SPECTATOR to trigger the change to an observer in game. Everything is lua based and working. My issue another one. Because LEADER_SPECTATOR is currently a member of the Players:Expansion2_Players domain it...
  8. Scapeh

    Lua Parameters Help

    Hey! I currently have a working mod for razing cities if they are hit by a nuclear weapon, and it works very well, the only issue is, it doesn't work for the AI. This is something that I would like as it would be game changing if it could. A way of "fixing" the issue with the AI nuking the same...
  9. hburak

    New UA - Production Bonus when constructing Factory or Public School

    Hi, I'm creating a new civ, and i want to create an UA that provides produciton bonus when constructing Factory or Public School. Or maybe reducing production cost for factory and public school. (either way ok for me) I think it is not possible with xml. How about Lua ? Basically, i need to...
  10. M

    "DLL - Various Mod Components: Pick'N'Mix Mods" - "Separate GP Counters" Help

    I'm fairly new to LUA and Civ Modding in general, so let me apologize ahead of time if I'm missing something simple here.. I'm using the "Various Mod Components" .dll, along with WHoward's "Pick'N'Mix Mods".. specifically, the "Separate GP Counters" mod. I'm trying to increase the cost of...
  11. G

    How do you edit LUA? Use Notepad++ then switch to ModBuddy?

    There (https://forums.civfanatics.com/threads/modbuddy-extension-better-lua-editor-faster-intellisense.391034/) is a LUA editor improvement for CIV 5 (Visual Studio Shell 2010 or thereabouts), which made modders their day. Someone asked if there is a way to improve the LUA editor for CIV 6...
  12. P

    [TOTPP] Prof. Garfield's Lua Code Thread

    For my current method of code distribution, see this thread instead. I've decided to change the way I 'distribute' the Lua code I've been working on. Until now, I've started a thread for each 'type' of module/library that I've made, with the intention of posting updates to each thread when...
  13. Wobzter

    [BNW] Several questions about whether it's possible with LUA

    Hello, As I'm working out more and more parts of my mod, I'm looking into the following things. Does anyone know if any of the following is possible: (1) Set a city to blockaded (even landlocked cities)? (2) Force a certain amount of citizens in a specific city to a specific type of specialist...
  14. J

    [GS] [Lua] Changing a Player's Name ingame?

    Hi, I was wondering if someone found a PlayerConfigurations:SetPlayerName() equivalent ? (this one doesn't exist) I would like to change a player's name without having to manually change all the labels. PlayerConfigurations:SetHotseatName(text) doesn't work outside of Hotseats.
  15. TheOneHitPupper

    [SOLVED] Help with slavery mechanic

    I'm trying to make a generic notification for the player after an enemy unit is killed and turned into a slave. I have the code necessary for the switch, but don't understand how to tie a notification to it. So far, I can only get it to work when an enemy enslaves the human player's units, which...
  16. Wobzter

    [BNW] [SOLVED] "index global 'Map' (a nil value)" even without mods.

    Hello all, i am trying to work with LUA and I run into the issue as described in the title. For whatever reason I cannot acces the instance "Map". For example, when I do "Map.GetPlot(3,3)" in FireTuner while playing a normal (non-modded!) game, I get the following error: > Map.GetPlot(3,3)...
  17. K

    Can Lua be written differently?

    I've not been wanting to use lua since I came back to Civ 2 modding, I feel dizzy every time I look at it. Cause to take the Napoleon scenario, a lua event looks like this: -- Napoléon administrative bonus if activeUnit.type.name == "Napoléon I" then local...
  18. D

    [GS] World Builder Map Won't Load at Start Up

    Hi, I've been trying to create my own pangaea map because I'm never happy with the one I spawn on. I tried modding a random map but when I try load it (in an actual game, not in the world builder) it won't load and gives the error message "error: one or more of the start up scripts has an...
  19. Red Key

    Lua UI Mod Compatibility

    I need some help understanding how to make UI mods compatible. I use @sukritact 's Simple UI Adjustments and would like to make my mod compatible with it if possible. Simple UI makes some changes to specific functions in CityBannerManager.lua through the use of ReplaceUIScript. I am changing a...
  20. A_Wandering_Man

    Changing UA based on state of war/peace?

    Hi all, So for my next mod I'm looking to make, I want to make the UA have a static part (this will be trivial, as it is part of the existing tables, so will just have to turn it on) and a dynamic part that will rely on switching between two dummy policies. In my previous mod, I used a...
Back
Top Bottom