added mylog.lua in Lua State//@@util
local logfile
function _G.mylog(text)
if not logfile
logfile = io.open("Mods//mylog.txt", "a")
end
time = os.date("*t")
logfile:write(("%02d:%02d:%02d"):format(time.hour, time.min, time.sec) .. " " .. text .. "\n")
end
function _G.close_mylog()
if ...
Search found 3 matches
- Fri Feb 22, 2019 9:41 am
- Forum: Modding
- Topic: help file log .. and others
- Replies: 3
- Views: 10665
- Mon Feb 18, 2019 6:33 pm
- Forum: General Forum
- Topic: What is your favorite and least favorite ship design?
- Replies: 9
- Views: 18223
Re: What is your favorite and least favorite ship design?
The same is true of the Human missile cruiser. They come with extra munitions built in, but they're fairly underwhelming in terms of potential loadout.
The human missile cruiser IS a slightly more effective missile slinger labor and metal wise than the human heavy cruiser that is also slightly ...
The human missile cruiser IS a slightly more effective missile slinger labor and metal wise than the human heavy cruiser that is also slightly ...
- Mon Feb 18, 2019 9:38 am
- Forum: Modding
- Topic: help file log .. and others
- Replies: 3
- Views: 10665
help file log .. and others
I would like to figure out more about various mechanics . The ability to log various parameters of interest during various game states to a text file would be most helpful.
something like this
logfile = io.open("\Mods\mylog.txt", "a")
logfile:write(growth_text.. " " ..format("%02.2f", 100 * g ...
something like this
logfile = io.open("\Mods\mylog.txt", "a")
logfile:write(growth_text.. " " ..format("%02.2f", 100 * g ...