lack of function signatures driving me MENTAL!!!!!

Discussion in 'Civ5 - SDK / LUA' started by lemmy101, Oct 26, 2010.

  1. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
    WHY OH WHY OH WHY does the Lua SDK reference have NO INFORMATION on what the bloody parameters are for a function????? therefore rendering them completely POINTLESS.

    I've sat here for about five hours trying to bloody work out how to call ONE FUNCTION.

    Player:Found

    Given the functions around it, suggests to me this founds a city. How? What on God's Green Earth would I put as parameters to this function? Lua certainly doesn't tell me.

    I've searched the net, apparently the way to figure out a function signature is to do debug.getinfo(function) but no, of course that functionality is disabled in the Civ 5 lua. Why all these road blocks? Would it be that hard to have given a list of functions with what bloody parameters they use? :( I'm starting to feel like they don't want us to mod anything and are purposefully withholding or breaking bits to stop us. Paranoid I know, but after all the stuff with nexus, munged dds files and now this... grrr.

    Ridiculous.
     
  2. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    I quit modding for these reasons. I'll start back up when Firaxis decides we're worth a damn.
     
  3. lemmy101

    lemmy101 Emperor

    Joined:
    Apr 10, 2006
    Messages:
    1,064
    This is the first time since release I'm bloody angry, I've defended Firaxis to the hilt with the game, which I genuinely feel was unfairly slated by a lot of people. But I'm finally angry.

    I mean they printed out HTML documentation so why not go that one extra step of providing the parameters?? When the hour or two work to generate that list would mean the differences of thousands of hours of modder work and the difference between a few UI and balance mods and full blown gameplay feature additions.

    It defies logic.

    It doesn't make any sense. Since I've started modding Civ be that art related or now with the shambles of lua documentation, it genuinely feels like intentional attempts to slow us down. :( NO programmer would look at that Lua documentation file and genuinely think 'that'll do', surely??
     
  4. JeBuS27

    JeBuS27 Heretic

    Joined:
    Sep 21, 2005
    Messages:
    321
    They did layoff 20 people a couple of months before release. Maybe that affected their crunch more than they thought it would.
     
  5. smellymummy

    smellymummy King

    Joined:
    Jul 31, 2002
    Messages:
    705
    or maybe it returns true/false if a unit can found a city, seeing how found is a column in units (or maybe that's CanFound(void))

    Code:
    player:InitCity(plot:GetX(), plot:GetY());
    
    is probably a better function to make a city just because there's already examples available (ie live tuner-map-city plopper)
     
  6. Whys

    Whys Between the Lines

    Joined:
    Oct 20, 2007
    Messages:
    456
    I'm sorry to hear that. Looking forward to your return.
     
  7. rezaf

    rezaf Warlord

    Joined:
    Dec 3, 2003
    Messages:
    179
    Apart from the obvious searching the game files for possible calls of a function, I found it's always a good idea to just look at the documentation for Civ4's python functions.
    Almost all LUA functions I've used are basically 1:1 copies of Civ4 functions.

    So try looking at the Civ4 python reference.

    In CvPlayer there's a found function which looks like that:
    Code:
    VOID found(INT iX, INT iY)
    Still no idea what it actually does, though...
    _____
    rezaf
     
  8. Supercheese

    Supercheese Zeppelin Commander

    Joined:
    Aug 2, 2009
    Messages:
    378
    Location:
    Idaho
    Founds a city at the plot specified by the {iX, iY} map coordinates? That's my best guess...
     
  9. Whys

    Whys Between the Lines

    Joined:
    Oct 20, 2007
    Messages:
    456
    I found It! I found It! It has one population. :D

    Function names with double meanings. Lovely.
     
  10. Mannu

    Mannu Warlord

    Joined:
    Sep 23, 2005
    Messages:
    230
    Nice tip! That helps alot.
     

Share This Page