Jump to content

Use gg script to modify the files.


syang

Recommended Posts

This is a demo that I use gg script to modifies the files of the game. Just a test.

I thinks it will be interesting if the script can read the data of game file.

But I success sometimes...

And I am curious about why sometimes I use io.read() and  maybe get nil /(ㄒoㄒ)/~~

test.lua

Link to comment
Share on other sites

15 minutes ago, syang said:

This is a demo that I use gg script to modifies the files of the game. Just a test.

I thinks it will be interesting if the script can read the data of game file.

But I success sometimes...

And I am curious about why sometimes I use io.read() and  maybe get nil /(ㄒoㄒ)/~~

test.lua

its realy beautifull, but how does this work? I mean I read the script but I don`t understand it all, could you explain me please? I`m just a guy trying to develop my own skilz  and knowledge

thanks for reply.

Link to comment
Share on other sites

  • Administrators
1 hour ago, syang said:

I thinks it will be interesting if the script can read the data of game file.

Only in virtual space. Script run from GG context without root right, so you can not read game files from root mode.

_______________________________________________
added 2 minutes later
1 hour ago, syang said:

I am curious about why sometimes I use io.read() and  maybe get nil

Learn LUA.

https://www.lua.org/pil/21.1.html

Quote

The call io.read("*line") returns the next line from the current input file, without the newline character. When we reach the end of file, the call returns nil (as there is no next line to return).

 

Link to comment
Share on other sites

5 hours ago, Enyby said:

Only in virtual space. Script run from GG context without root right, so you can not read game files from root mode.

_______________________________________________
added 2 minutes later

Learn LUA.

https://www.lua.org/pil/21.1.html

 

Thanks~~ I think I should learn more about lua  :-)

_______________________________________________
added 3 minutes later
6 hours ago, XxhentaixX said:

its realy beautifull, but how does this work? I mean I read the script but I don`t understand it all, could you explain me please? I`m just a guy trying to develop my own skilz  and knowledge

thanks for reply.

this is just a demo, I want to use it to test whether gg script can modify files, and the answer seems like yes.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.