Some scenarios have pop up windows with info or instructions. What is the easiest way to remove these windows from a scenario?
These are triggered events within the scenario - so you will need to edit the scenario in some manner. Find the scenario folder (underneath the folder structure for the route) and then find the scenarioscript.lua. Open this file with Notepad. This will contain this function: Code: function OnEventIntroduction() SysCall ( "ScenarioManager:ShowInfoMessageExt", "1.15pm Tenison Field to Whitemoor", "IntroText.html", 0, MSG_VCENTRE + MSG_CENTRE, MSG_LRG, FALSE ); end You should be able to comment out the ShowinfomessageExt call by putting two dashes in front of it like this: Code: --SysCall ( "ScenarioManager:ShowInfoMessageExt", "1.15pm Tenison Field to Whitemoor", "IntroText.html", 0, MSG_VCENTRE + MSG_CENTRE, MSG_LRG, FALSE ); This should switch off the message without causing any other problem (with luck).
Thanks for your suggestion but it did not eliminate what I am trying to get rid of. See attached pic. These are the messages that I want to eliminate. I opened the script lua for the scenario and placed two dashes in front of the SysCall entries. The message still appeared.
Neither clearing the cache (which refers to Asset blueprints index (blueprints.pak) only) nor restarting the game is required for that. More likely that a compiled .luac version is present in the scenario, which has higher priority. Just delete it and the game will read the changed .lua script. (Compiling scripts is only there for obfuscation and IP protection, not performance.) Needless to say, always work on clones. Career scenarios may stop working when a mismatch between the .luac.md5 and the script checksum is met. You'd need to then recompile it using the editor.
If they are script-triggered like intro.htmls, it won't work, only for instruction triggered (Default, Failed or Succeeded). You can view and compile but not edit a script inside the editor, alt tab to your text editor and then reimport it into the game (Reload in the timetable script window). Of course it's quicker to accept the authors' choice and just close the windows when appearing. (Keyboard: Shift+Backspace)
I thought seeing as the script needed to be triggered by a Trigger Instruction (List with a cog icon) in the timetable list, wouldn't removing that from the scenario list then defunct the .lua from ever being called?
There might be more SysCalls or instructions than only a message inside one specific function call via trigger, which could affect the scenario. So you could deactivate something else by just removing the script call, depending on the script. A function call / OnEvent could be raising a counter (like in JBFried's puzzle scenarios) or changing a ControlValue AND outputting a message. You'd kill all that way.
OK I tried this method, and it works. I then ran the scenario and did not see any performance hit or missing actions, such as signal operations. Interesting that this particular scenario had both script lua and luac files but some other scenarios don't. I removed both of these files from the scenario, but the messages still appeared. At any rate, I now have a solution.
That's because as a scenario author, you need to remove the source .lua yourself for shipping - the game reads the .luac if present. Some authors want to hide their magic and delete the lua before releasing a scenario. It's only needed during development really.
Good point, still, I think most only use it for displaying messages and in days gone by a short video. iirc.
Just found another way to eliminate these info messages. In some scenario folders, I have found a folder titled EN, which is denoting the language within. Opening this folder reveals multiple message files created by the author. Simply delete this folder and the pop up messages are history. This may be old news to most, but new to me.
Yes - if you wanted to remove every message then this would also work. Glad you got a fix that you're happy with.