Posts: 828
Threads: 26
Joined: Oct 2012
Reputation:
113
In original Colobot it was "files/" directory inside the game installation directory. In Gold, for proper multiplatform support, it's stored along with the savegame files somewhere in user's home directory, meaning C:\Users\<username>\colobot\files on Windows or ~/.local/share/colobot/files/ on Linux. I guess we never updated SatCom to mention that.
To access a specific line, you have to loop over all the ignored ones that are before it, there is no other way as far as I'm aware. It's been a while since I used files in CBOT though.
Posts: 157
Threads: 5
Joined: Mar 2013
Reputation:
60
We could probably use seek() and tell() methods in CBot. What do you think?
"After three days without programming, life becomes meaningless."
~The Tao of Programming
Posts: 152
Threads: 7
Joined: Oct 2012
Reputation:
25
If the file contains Windows EOL (CR+NL) there's an additional question mark printed at the end of each line. (where the CR is)
If I have a custom level with bots reading files it would be nice if I could read one from the level directory. Otherwise installing user levels requires an additional step of dumping stuff in "colobot/files/"