[GS] Checking file size / CRC?

__jack__

Warlord
Joined
Dec 29, 2009
Messages
141
Hi,

I am considering making an anti-cheat system in lua.
two questions:
a. Is there a lua fucntion to return the size of a particular file ?
b. SetProperty() is saving a value but can I ask for a value from another player in MP ?

thnaks !
 
(a) none I am aware of, at least that is implemented as part of the version of lua API that civ6 uses

(b) PlayerObject:GetProperty("PropertyName")

Since both SetProperty() and GetProperty() work from a player object all that is needed is to use the player-objects for each player in turn who is part of the game. But since SetProperty() and GetProperty() are merely adding text string data which is then saved by the game as part of that player's "data" you can't use SetProperty() or GetProperty() to see if for example they've cheated their way to an extra five settlers or whatever, at least not without a lot of rather complicated code.

There is also PlayerObject:GetStats() but I have not experimented with it to determine what all data it can really give you nor the exact syntax arguments for each of its sub-methods
Code:
Player:GetStats():GetMilitaryStrength			
Player:GetStats():GetNumBeliefsInReligion			
Player:GetStats():GetNumCitiesFollowingReligion			
Player:GetStats():GetNumDistrictsFollowingReligion			
Player:GetStats():GetNumFollowers			
Player:GetStats():GetNumForeignCitiesFollowingReligion			
Player:GetStats():GetNumForeignFollowers			
Player:GetStats():GetNumMyCitiesFollowingSpecificReligion			
Player:GetStats():GetNumProjectsAdvanced			
Player:GetStats():GetNumTechsResearched			
Player:GetStats():GetTourism			
Player:GetStats():GetTourismToolTip
 
Last edited:
Back
Top Bottom