The two files have unrelated functions so that's not a concern. My issue turned out to be with how I did include("TableSaverLoader016.lua"). Thanks though.
Here I'll just explain what I'm using and see if that raises any problems. I have one function using GameEvents.TeamSetHasTech as the hook and Player:CanBuild within it. This file doesn't use TableSaverLoader at all. In a separate file I have:
gT = {} -- defining the master table to be saved...
Ok. I decided to try TableSaverLoader, but I'm having trouble getting it to work. I added the TableSaverLoader file to my mod and imported it into VFS. I'm using the Lua hook. After trying to implement it, I've been unable to save my game. The Save and Quicksave buttons behave as if they are...
Hi,
What playerID numbers are assigned to civ's that people added to the game? I'm working on a mod that utilizes playerIDs and I want to make it compatible for the civ's that people added to the game.
Thanks.
Thanks whoward69. I'll also look into those files. Would a two dimensional boolean array (a table of boolean values within a table i.e. bTable[50][12]) constitute a few simple values?
Hi,
I wrote a function in Lua which uses a boolean variable. This variable is initially defined as false and is defined outside of the function. When the function is called by a game event, if the conditions are met, it will update this value to true. This works fine when used in a single...
Ok, everything is working except the game lets me place my improvements on top of features if I set the underlying terrain as a valid terrain type. How do I require the building of these improvements to clear a feature such as a forest, jungle, or marsh(this would be in xml)?
Ok. I think I see where I went wrong. I use an if statement to check if the improvement that was built is the dummy improvement. Currently I am using pPlot:GetImprovementType() . What exactly is the value it returns? I'm pretty sure that I'm comparing incompatible types (right now I'm comparing...
Thanks Nutty,
I've done some coding and everything seems to work up until the point where the improvement isn't being removed... What value do I need to put in pPlot:SetImprovementType() to remove the improvement?
I've tried nil, 0, -1, different improvement types, and none of these seem to...
Hi,
I'm working on a mod that would allow players to plant a luxury or strategic (only ones like wheat or deer) once they have access to that resource. Bear in mind that I have a c/c++ and javascript background, but I'm thinking that I could create new improvements in xml that would mock the...
Hi,
I've only lightly used/ looked over lua, but I have a fair amount of experience of coding in c/c++. I've read that you can call a C function while using lua, but is this possible when writing a civ V or civ BE mod?
Thanks.
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.