I'm trying to determine in lua which techs a given civ can research (ie which techs they have met all the preqs for, but do not have yet). From the looks of it Player:CanResearch sounds like the function I need, but it seems to simply return false all the time.
Case in point: after setting pHB=Players[0], running
in the LiveTuner just returns false for each tech, and the same is true for other players.
So is this function as broken as it seems to be? And if yes, is there anything I can use instead?
Case in point: after setting pHB=Players[0], running
Code:
for tech in GameInfo.Technologies() do print(pHB:CanResearch(tech.ID)) end
So is this function as broken as it seems to be? And if yes, is there anything I can use instead?
Well. On trying it again it does work as it should. I suspect when I last tested it was before either me or the AI had founded a city. (It returns false if you don't have one.) Also I was being sloppy with conditions and uses of "not" which explains why I didn't see the debugging print statements I had put in the mod I was testing.