I'm trying to customise the tips/tricks scenes to better fit my mod. It's slow going but I'm making progress.
Before I dive too far into it though, is it possible to have my mod's control.lua run at all? The reason I ask is because I have entities being built that trigger additional things with events, but they aren't working.
I also quickly discovered that I can't use "require" to get access to things I would normally use - notably require("util"). Presumably my only option there is to copy-paste the functions I need directly into the simulation.
I've also noticed there seem to be some undocumented functions being used in these simulations, particularly surface.create_entities_from_blueprint_string, game.create_test_player and a few others. Are these exclusively available in simulations? I imagine the documentation will be updated at some point but are there any particular features that would be useful to know about?
And just in general, any tips on editing these simulations or creating my own would be much appreciated
[1.1.0] Control scripts in tips/tricks
Re: [1.1.0] Control scripts in tips/tricks
Over in another thread I had the idea to use scenario code in the save file for this, and it seems to work. So, essentially you just make a custom scenario for your tips and tricks save files that requires your mod's control.lua.
They are indeed simulation only. Afaik these aren't planned to be documented; currently they are marked as "internal" which excludes them from the pages on lua-api.factorio.com.PFQNiet wrote: ↑Tue Nov 24, 2020 2:58 pm I've also noticed there seem to be some undocumented functions being used in these simulations, particularly surface.create_entities_from_blueprint_string, game.create_test_player and a few others. Are these exclusively available in simulations? I imagine the documentation will be updated at some point but are there any particular features that would be useful to know about?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: [1.1.0] Control scripts in tips/tricks
Since the "internal" functions are rather essential to making good tips/tricks sims (ie. mouse cursor movement, camera position...) I feel like they should be documented somewhere.
Thanks for the pointer on scenario scripts. I'll take a look at that.
Thanks for the pointer on scenario scripts. I'll take a look at that.