-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to add more events besides join/leave and chat messages. #6
Comments
Looks like print won't work unless we dump everything with custom startup parameters into a different file..
|
So currently I have an idea for this, it does require a new custom log file, and the user editing their own save zip. It seems to work as it's logging everything needed right now. Only thing left seems to be parsing the ids into actual things if we want to log each placed item as shown in this image. Should work the same for the rest of the events. |
Yeah it might be a nice feature but it is kinda complicated for someone to set up. Why wouldn't it be able to write to the same log file? Might still want to offer this though, perhaps create a small companion mod that does this or allowing this for users who don't want mods. What exactly do you want me to test? To add that custom logger and see what it logs? |
It's not complicated, it's simply opening their save zip, edit And yeah, I'm indeed considering making it a mod for the lazy people. If you check out the |
Also a good thing to mention, add this into |
Sorry for the late reply had a bunch of issues (unrelated) before being able to try it out. Also got config failures but as I build a docker container (and that was not merged) the path was simply not correct haha that was confusing. But I have trouble getting this to work. I unzip the savegame, add those lines to
So it won't load anymore. |
Please ignore the message above, I copied the wrong error and I found the issue, the copy/paste from github included a ` so that was the problem. I do get the log file, let me see if I can compile the bot for it. |
Yes the bot seems happy, should it post messages with this extended output? Not yet right? |
Research should also be possible: Now by seeing this the code you use in the |
Currently the
Yes, it's pretty similar to a mod, it would definitely be great if we make a mod for it. |
Ah, I missed the consoleChannel, will try it again tonight. Also: I will look into the modding part just to see what it takes :) I think for a first version: |
Sure thing! You should also check out the |
Created a small companion mod: https://mods.factorio.com/mod/FactorioChatBot-companion (obviously it requires implementation by this bot but this is just an idea on what we can do) Not 100% perfect yet, the file append is not working (so it logs only the last line). Perhaps you will miss some things now as it might write faster then the bot can read. Do you want me to submit a PR for this? Perhaps to the typescript branch? Or the rewrite one? (edit: found the append problem will make a new release tomorrow) |
Interesting! You could submit a PR, sure. |
It does require manual save editing. The user would need to add custom events for this in
control.lua
which is located in the save file.They would be adding a line like so:
script.on_event(defines.events.on_rocket_launched, function(event) print("A rocket was launched") end)
I'll test it on my own factorio server soon. Will update this issue accordingly.
The text was updated successfully, but these errors were encountered: