More methods to interact with tutorials
More methods to interact with tutorials
I would be nice if the following things were added:
Tutorials can be unlocked by script (and maybe also locked again) instead of just by placing entities/researching something/crafting something.
Hidden property for the prototype. Would be nice if that were writable + readable runtime, but it doesn't have to be.
game(player?).start_tutorial("tutorial-name", ignore-locked-status): Drops the player into the tutorial as if the player clicked on the "start tutorial" button in the gui. Second param is an optional boolean that can be set to true to ignore the fact that the tutorial is locked, otherwise when the tutorial is still locked, start_tutorial won't do anything (except return false or something like that).
Some questions about the current tutorial implementation: Does the main map get paused when a player enters a tutorial? What happens in multiplayer? Are remote functions from mod accessible within tutorials? If not, it would be nice if that were possible.
Tutorials can be unlocked by script (and maybe also locked again) instead of just by placing entities/researching something/crafting something.
Hidden property for the prototype. Would be nice if that were writable + readable runtime, but it doesn't have to be.
game(player?).start_tutorial("tutorial-name", ignore-locked-status): Drops the player into the tutorial as if the player clicked on the "start tutorial" button in the gui. Second param is an optional boolean that can be set to true to ignore the fact that the tutorial is locked, otherwise when the tutorial is still locked, start_tutorial won't do anything (except return false or something like that).
Some questions about the current tutorial implementation: Does the main map get paused when a player enters a tutorial? What happens in multiplayer? Are remote functions from mod accessible within tutorials? If not, it would be nice if that were possible.
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: More methods to interact with tutorials
I can add a method to LuaGameScript that will put a player in a tutorial but it's only going to do anything in single player.
Tutorials don't work in multiplayer - they're disabled. In single player the map is paused and the tutorial runs. In 0.15 mods run as normal in the tutorial but in 0.16 they will be disabled scripting wise.
Tutorials aren't part of the game state and as such mods can't have access to anything about them being run/unlocked.
Tutorials don't work in multiplayer - they're disabled. In single player the map is paused and the tutorial runs. In 0.15 mods run as normal in the tutorial but in 0.16 they will be disabled scripting wise.
Tutorials aren't part of the game state and as such mods can't have access to anything about them being run/unlocked.
If you want to get ahold of me I'm almost always on Discord.
Re: More methods to interact with tutorials
Does this mean the tutorial has to always run the same way (be sandboxed entirely)? Or could there be the one way street of being able to read something from within the tutorial?Rseding91 wrote:Tutorials aren't part of the game state and as such mods can't have access to anything about them being run/unlocked.
For the unlocking thing: Can't I just simulate that by creating a hidden tech that I research using script to unlock the tutorial? If that is possible, what would be the problem with doing it directly from script?
Also, what about
?Bilka wrote:Hidden property for the prototype. Would be nice if that were writable + readable runtime, but it doesn't have to be.
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: More methods to interact with tutorials
I feel like you're trying to do something with tutorials, what they were never intended to do
If you want to teleport them to some magic surface for them to build blueprints or something, then you should do it with the standard script interface
If you want to teleport them to some magic surface for them to build blueprints or something, then you should do it with the standard script interface
Re: More methods to interact with tutorials
That:Klonan wrote:I feel like you're trying to do something with tutorials, what they were never intended to do
If you want to teleport them to some magic surface for them to build blueprints or something, then you should do it with the standard script interface
- Doesn't pause the main game (HUGE concern)
- Allows saving while on the surface, contrary to tutorials (Big concern)
- Can't use a blueprint.dat (Slightly smaller concern but still very inconvenient)
I basically want to make puzzles that the player can get teleported into and then completes and the player gets teleported out and I know that the player went through the puzzle. The three points I listed are the reasons why I am looking into using tutorials instead of surfaces.
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: More methods to interact with tutorials
You won't be able to use tutorials for what you're trying to use them for. You can't transfer anything between a tutorial and a normal game and in fact in 0.16 mods just won't run in tutorials at all.
If you want to get ahold of me I'm almost always on Discord.
Re: More methods to interact with tutorials
Oh well.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: More methods to interact with tutorials
Haven't looked at tutorials much yet...but i guess this implies that modders can't make custom tutorials for their mods either?Rseding91 wrote:You won't be able to use tutorials for what you're trying to use them for. You can't transfer anything between a tutorial and a normal game and in fact in 0.16 mods just won't run in tutorials at all.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: More methods to interact with tutorials
I believe you can, just not using control.lua in a standard mod. They're done as scenarios.eradicator wrote:Haven't looked at tutorials much yet...but i guess this implies that modders can't make custom tutorials for their mods either?Rseding91 wrote:You won't be able to use tutorials for what you're trying to use them for. You can't transfer anything between a tutorial and a normal game and in fact in 0.16 mods just won't run in tutorials at all.
If you want to get ahold of me I'm almost always on Discord.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: More methods to interact with tutorials
That sounds like i'd have to port all of the logic (event-handlers etc) from control.lua into the scenario? Which is pretty unfeasible as soon as a mod depends on other mods to also be present and working correctly. Well. I wasn't planning to do tutorials any time soon, and this sounds like i'm not going to either. Thanks for the answer though.Rseding91 wrote:I believe you can, just not using control.lua in a standard mod. They're done as scenarios.eradicator wrote:Haven't looked at tutorials much yet...but i guess this implies that modders can't make custom tutorials for their mods either?Rseding91 wrote:You won't be able to use tutorials for what you're trying to use them for. You can't transfer anything between a tutorial and a normal game and in fact in 0.16 mods just won't run in tutorials at all.
/me stops derailing the topic
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: More methods to interact with tutorials
At some point we might add better support for mod tutorials, but for now the goal is to make the tutorials work properly in the base game
Allowing any random installed mod script to run sometimes breaks the tutorials, and we were receiving bug reports about it,
We might allow mod scripts for a mod which adds a tutorial, IE if upgrade planner adds a tutorial, it will also allow the upgrade planner control.lua (and maybe any dependencies)...
Allowing any random installed mod script to run sometimes breaks the tutorials, and we were receiving bug reports about it,
We might allow mod scripts for a mod which adds a tutorial, IE if upgrade planner adds a tutorial, it will also allow the upgrade planner control.lua (and maybe any dependencies)...