lua

  1. G

    LUA Help - Plot:SetOwner() Function Not Working as Expected

    CULTURE BOMB IMPLEMENTATION in Lua - City unable to work the new tiles. I have exhausted all avenues of trying to figure out how this function works in LUA. The code I am writing implements a Culture Bomb functionality in LUA and works without problem, apart from this: When the ownership of...
  2. G

    LUA Code Help - Generating Great Persons

    Following on a recent thread about a creating a civilization trait granting a great persons upon construction of a district (after a specific technology is researched), I tried and ultimately gave up coding this in XML. The Modifier available in XML...
  3. RoxyRiku94

    [BNW] Lua Hook for Expending Units (Like Missionaries or Settlers)

    Is there an existing Lua Hook when expending non-Great People units? I've looked within the GameEvents from Modiki, but to no avail (and making a Unique Missionary a Great Person just to use one function is also not a very good idea).
  4. greyTiger

    Persisting custom data with saves

    Has anyone been able to persist custom data when a game is saved, and then have that same information loaded when the game is reloaded? I was trying this using the SetValue and GetValue of the GameConfiguration object but it appears that the data is cleared when the game is reloaded. I use a...
  5. richardsvensson

    SQL and/or XML and/or LUA ?

    Hello everyone, I'm just learning how to mod civ vi, (I haven't really been modding any previous versions of Civ) so I need a short introduction to the relationship between SQL, XML and LUA. I have been able to make a few changes to the game with SQL scripts, and some time ago I also made a...
  6. blacknight678

    LUA Multiplayer Human Shared Sight - Advice?

    Looking to make a LUA mod that will enable shared sight for all humans in a multiplayer game (like being on a team without being on a team). I am competent in C++/Python, but am new to Lua. I am aware of this (https://www.reddit.com/r/civ/comments/49yr85/civ5_shared_vision_mod/) but I want it...
  7. FieryCharizard7

    LUA Function like when a forest is cleared, but when a unit dies

    Hello all, I've been learning LUA for about a week now, and I think I have a handle on it, but I am unsure about making a LUA function. It will be an ability from a wonder that will increase a city's production on whatever it is currently constructing (whether a unit, building, wonder, etc.)...
  8. FieryCharizard7

    LUA Function that only occurs on Wonder Completion

    Hello all, I am working on a Wonder that was said to have "given birth to the Renaissance" so I was planning on this wonder giving the player the Acoustics tech upon completion if not already discovered. I am unsure where to implement this function as it only needs to run once, so Running it on...
  9. greyTiger

    Create Building in City from lua code?

    Has anyone been able to create a building in a city from a lua script? I would like to create a building when a certain set of criteria is triggered by the player or ai opponent. I have seen a few possible options: 1) CityManager().CreateBuilding(city, buildingType, constructionCost, plot)...
  10. Civitar

    Replacing the main menu's background image

    I'm trying to replace the background image of the pregame menus for Warhammer. FramedArchitect has pulled this off somehow in Faerun, but looking at his code I can't for the life of me figure out how. As far as I can tell, in Faerun he adds an <Image> control to the AdvancedSetup.xml...
  11. S

    Help with forcing a nuke mission!

    Hey guys, I'm trying to make a mod which adds the Chernobyl Nuclear Power Plant (as part of a larger mod that l'm making), and l thought it would be really interesting to have it blow up and recreate the disaster. A friend from this forum suggested that I should use a LUA script with the...
  12. L

    [BNW] Lua and external java program communication

    Hello,I wrote a Java program that takes user inputs and moves Civ V camera using a series of keyboard inputs. I would like to extend this program such that it can call more specific Civ V Lua functions. Would it be possible to do this? I thought using networking with LuaSockets would work...
  13. L

    [BNW] Camera skip to newly found cities

    Hello, I am trying to create a mod where the camera jumps to locations whenever a new city has been founded. I have spent many hours trying to do this but with no success. My idea was to add the UI.LookAt method after any Player:InitCity method calls. Unfortunately, the InitCity calls at...
  14. PoundedChicken

    Mod Request: Hotkey to Reveal All

    I'm just trying to do this to test mapscripts. I have no real experience with LUA or scripting in a Civ game. I just want to create a simple mod that uses a hotkey to trigger the "Reveal All" action without using Debug. Was just doing for my own sake in the quickest way possible. So far...
  15. Angryr

    Some sort of global value storage location?

    Alright, so right now I'm trying to make a slider option for the hex-tile tooltip delay. I've got them working independently, however I need a place to put the value from the slider in Options.lua so that PlotToolTip.lua can read it. I've tried doing "Options.SetUserOption("Interface"...
Back
Top Bottom