PinkDot on 5/2/2020 at 11:34
Quote:
;used for FM translators, reload the readable file (including subtitle file) each time you click on a readable in the game.
That would be useful not only for translators. It could potentially open a possibility to create dynamic content of readables, by modifying the text files directly. Not sure if this would work for the New Dark, of course, but Squirrell allows for I/O operations, so theoretically this could work...
Apiai on 6/2/2020 at 15:17
Quote Posted by PinkDot
It could potentially open a possibility to create dynamic content of readables, by modifying the text files directly. Not sure if this would work for the New Dark, of course, but Squirrell allows for I/O operations, so theoretically this could work...
Not sure of that. The trigger routine would be the player action (use key) and not the file modification itself. I imagine the easiest way to code would be something like this :
If Selected.object.type = Readable and Player.Action = Use_Key
[INDENT]reload_readable(Selected.object)
display(Selected.object)[/INDENT]
Endif.
Text file would be refreshed in memory ONLY when player is clicking on a book in game.
I don't think he would use a routine that would check every 100ms if any text file has been modified.
What exactly do you have in mind ? I don't see what could be the result by using dynamic readables in game... Ascii animations ?
PinkDot on 6/2/2020 at 15:39
Quote:
What exactly do you have in mind ? I don't see what could be the result by using dynamic readables in game... Ascii animations ?
I didn't mean realtime updates. More like level randomization. Let's say, a code to a safe is randomized on a game start. And there exists a scroll, that contains this code or some hint at least. And the text of that scroll would be changed along with the randomized code, by the same script.
Or maybe some kind of a log with entries added based on the player actions...
Or a magic book, that displays a different content after certain events...
I'm sure people would come up with some interesting applications. I've seen somebody mentioned dynamic readables before.
Having said that, I do see how unsafe it could become to allow Squirrel to change game files on the fly... I wonder if anyone tried that already...
Apiai on 10/2/2020 at 13:51
@PinkDot : Ok I see now with your examples what could be done.
@vfig : I've tested and it worked, really nice feature.
I didn't test with
test_book_ex command.
Instead I've put command
toggle_book_autoreload in StartUp.cmd :
- you don't have to type this command each time you open DromEd
- every readable is reloaded in DromEd when you activate the book in game mode. (seems not working with on screen text, only book/scroll)
thanks to Lady R and Sensut post : (
https://www.ttlg.com/forums/showthread.php?t=140892)