Hi,
I am trying to get a sort of one way visibility on a player using lua i.e. like a permanent alliance whereby player A sees player B but player B doesn t player A.
I tried to use SetVisibilityOn but it doesn t seem to affect the vision at all ... Any help?
Hi,
I am considering making an anti-cheat system in lua.
two questions:
a. Is there a lua fucntion to return the size of a particular file ?
b. SetProperty() is saving a value but can I ask for a value from another player in MP ?
thnaks !
Hi,
Any idea on how to force a player's turn to end in lua ? either from the gameplay or UI end ?
I tried to call Events.EndTurnDirty() but it doesn't seem to work.
Best,
When I tested the mod I'm making, none of the Lua-based mechanics were working; I checked Lua.log and sure enough, there were errors:
[372622.484] InGame: Loading MOD InGameUIAddin
__________________________________________________________________________________________
Civ - The...
Hi,
Civ has "3 levels of map visibility":
1: Visible
0: Revealed (fog of war)
Those two are easy to switch to using RevealAllTiles() or VisibilityCount to 0 or 1
I m interested in the 3rd level: before we reveal the tile when it is covered by the map parchement.
I have seen Reveal.HIDDEN in...
Hi,
I am working on something relatively simple: allowing a player to change his view to another player by pressing a specifc key.
Using a gameplay script I can easily shift a specific player's view using:
PlayerManager.SetLocalPlayerAndObserver(i)
Using a UI script I can easily trigger a...
Hi guys,
I tried to play aroudn with plot:GetContinentType() hoping to get a continent's name (in order to allocate luxuries from a particular continent).
I failed. Any idea on how to do that ?
Hi,
I am running a script during OnGameTurnStarted() using TerrainBuilder.SetTerrainType() to change some of the terrain around the player.
The script change the terrain without any problem e.g. Grasslands becoming Plains except the 3D graphics are not updated (they are updated in the...
I'm trying to incorporate a custom league resolution for an overhaul mod I'm working on. The idea of this custom resolution is to act as if all players researched the Satellites tech and the map is revealed accordingly. I see two ways of doing this.
1. Make a dummy tech and set it to hidden...
Hi Everyone,
New to Civ modding and trying to fix the UI for ultrawidescreen. Have a lot of the pieces in place, but running into trouble re-positioning elelemts without an ID. I am mostly using "ContextPtr:LookUpControl("/InGame/Screens/TechTree/")" to set size and offset for elements and...
The Munitions Library is a module that provides some functionality for generating munitions or recruiting units based on a key press when a "spawning" unit is active.
Feel free to post requesting extra features or bug fixes, or even to implement extra features or bug fixes.
An example of usage...
Edit: Go to this thread for updates to the General Library.
The General Library is a collection of relatively basic functions with wide potential use. The standard usage will be
gen.generalLibraryFunction(input1,input2)
The General Library is currently under construction, so go to the last...
Hi all, I have a small mod with some configuration settings in a lua script. I would like to move these configuration settings to a separate file, so they can be easily edited without opening the main script. It can be another lua file, an xml file, or whatever other format that can be used...
A simple mod that allows granting a free starting promotion to a civilization’s first warrior (or warriors if you are using a mod that allows starting with more than one warrior). As built it grants Mystic Blade to the first Indonesian warrior, Buffalo Horns to the first Zulu warrior, and Desert...
I made a builder identical to the vanilla Builder, except he only has 1 build charge. I gift him to players (human and AI) with a lua script. Everything is working fine, except the AI refuses to use the custom Builder unless he is both able to be trained in a city and cheaper than the vanilla...
I making a mod where a button should show up based on the type of unit is selected.
I "borrowed" some code to display the button from another mod:
If correct unit is detected it calls two functions
First:
function CreateHurryProductionButton()
hurryProductionIM:DestroyInstances()...
Some code
local player = Players[playerId];
local unit = player:GetUnits():FindID(unitId);
local plot = Map:GetPlot(unit:GetX(), unit:GetY());
local city = Cities:GetCityInPlot(unit:GetX(), unit:GetY());
This code gets triggered OnUnitSelectionChanged. The unit is currently at a city but no...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.