Recent content by KennyTG

  1. K

    Store Variable values between saves LUA

    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.
  2. K

    Store Variable values between saves LUA

    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...
  3. K

    Store Variable values between saves LUA

    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...
  4. K

    What playerIDs are user created civ's assigned?

    Ok thanks. That means my mod should be perfectly compatible.
  5. K

    What playerIDs are user created civ's assigned?

    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.
  6. K

    Store Variable values between saves LUA

    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?
  7. K

    Store Variable values between saves LUA

    Thanks. I'll read up on these.
  8. K

    Store Variable values between saves LUA

    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...
  9. K

    Where are the .lua strategic and luxury resource files located?

    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)?
  10. K

    Where are the .lua strategic and luxury resource files located?

    Ok. This is entirely out of curiosity, but can I hook a single function to multiple game events?
  11. K

    Where are the .lua strategic and luxury resource files located?

    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...
  12. K

    Where are the .lua strategic and luxury resource files located?

    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...
  13. K

    Where are the .lua strategic and luxury resource files located?

    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...
  14. K

    How much is Lua like C/C++? Is it possible to call a C function in Lua in a civ mod?

    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.
Top Bottom