Recent content by keirathi

  1. K

    How to program new UA and UU?

    http://modiki.civfanatics.com/index.php/Main_Page Has references for most of the modding stuff. XML/Lua/etc.
  2. K

    ModBuddy: Where to Find VS2010 Isolated Shell?

    This is really strange. I just downloaded it on Thursday (August 22nd). Now when I go to my history to grab the link, it gives the "File not found" stuff.
  3. K

    Help with Lua. (Again.)

    Yea, sorry I got super busy yesterday and didn't feel like working on it last night after I got home. Anyways, fixed the problem: function CheckReligion(playerID) local player = Players[playerID] local era = player:GetCurrentEra() local eraUnits = { [0] = {...
  4. K

    Help with Lua. (Again.)

    I'll look into it in a little while. I think i know what the problem is. Never noticed it because I always tested by founding a religion on turn 0 and it worked how I expected it to.
  5. K

    Help with Lua. (Again.)

    Absolutely no idea. Sorry. I've never messed with anything having to do with UI or notifications or anything of the sort. Basically I just happened to have already done a unit spawning thing before so I knew the basics, but I'm not very good with Lua in general. Yep.
  6. K

    Help with Lua. (Again.)

    Okay this works: function CheckReligion(playerID) local player = Players[playerID] local era = player:GetCurrentEra() local eraUnits = { [0] = { GameInfoTypes.UNIT_WARRIOR }, [1] = { GameInfoTypes.UNIT_SWORDSMAN, GameInfoTypes.UNIT_COMPOSITE_BOWMAN }...
  7. K

    Help with Lua. (Again.)

    Hmm, that's odd. table.getn is a core lua function. Sorry, I'm not at home right now. I'll play around with it some when I get home and see what I can figure out.
  8. K

    Help with Lua. (Again.)

    No. Sorry Edit: The only thing that I can think of that might work is something like this: function CheckReligion(playerID) local player = Players[playerID] local era = player:GetCurrentEra() local eraUnits = { [0] = { GameInfoTypes.UNIT_WARRIOR }, [1] = (...
  9. K

    Help with Lua. (Again.)

    No, that wouldn't work at all. I'm not sure if it would crash, though. But an index of an array can only have one value. Not unless you changed something. It works correctly for me.
  10. K

    Help with Lua. (Again.)

    It "works" as is, for me. I just tested. But it's spawning units from an era behind (and settlers in the Ancient era. Apparently Lua arrays start with 1, but GetCurrentEra starts at 0.) Anyways, to fix: Change the "eraUnits" line to this local eraUnits = {[0] =...
  11. K

    Help with Lua. (Again.)

    I'm not positive, but I kind of doubt it. "GameInfoTypes.UNIT_MARINE" returns an index (basically...the row number) from the Units table in the game database. "GameInfoTypes.UNITCLASS_MARINE" would return a different index from a different table (actually, i'm not even sure you can do...
  12. K

    Help with Lua. (Again.)

    function CheckReligion(playerID) local player = Players[playerID] local era = player:GetCurrentEra() local eraUnits = {GameInfoTypes.UNIT_WARRIOR, GameInfoTypes.UNIT_SWORDSMAN, GameInfoTypes.UNIT_LONGSWORDSMAN, GameInfoTypes.UNIT_MUSKETMAN, GameInfoTypes.UNIT_RIFLEMAN...
  13. K

    Help with Lua. (Again.)

    I tested it. After checking the Lua log, I realized that I put != instead of ~=. function CheckReligion(playerID) local player = Players[playerID] local pCiv = player:GetCivilizationType() if (pCiv == GameInfoTypes.CIVILIZATION_AMERICA) then local pReligion =...
  14. K

    Help with Lua. (Again.)

    The line that says: "for id, tempPlayer in pairs(Players)" Should be: "for id, tempPlayer in pairs(Players) do" Need the do at the end. The way I pasted it works too. IE, declaring your function, then using add on the function name. The way he has it set up will run every turn...
  15. K

    Help with Lua. (Again.)

    That's way more complicated, and beyond my Lua knowledge.
Top Bottom