textadventures / quest

Create text adventure games
http://textadventures.co.uk/quest
MIT License
304 stars 69 forks source link

Fix major bug concerning transcript #1186

Closed KVonGit closed 2 months ago

KVonGit commented 3 months ago

This removes the majority of the code related to the transcript.

Currently, enabling a transcript crashes online games, and it stops all turns scripts from firing while it is enabled in the desktop player.

There is a totally separate, existing function in playercore.js named showScrollback() which handles displaying and printing the transcript all by itself. All I left intact besides that JS function are the commands and templates to view the transcript.

I altered docs\transcript.md to reflect these changes.

I also removed or disabled all the Quest and JS functions to save the transcript to a local file in the desktop version, because this slows the games down tremendously in practice.

I left the code in Player\PlayerHTML.vb to handle it if someone wanted to add the code to Quest and JS to use this feature. That way, no one would have to rebuild the project in Visual Studio just to use that functionality.


Double check me on the Dansk transcript_on_cmd change I made. The internet says it translates correctly everywhere I looked it up.

KVonGit commented 3 months ago

Forgot to reference the Issue: https://github.com/textadventures/quest/issues/1054

KVonGit commented 2 months ago

Perhaps I was a bit rash when I decided to gut most of the transcript stuff.

I am currently testing a build with less changes. Basically, you would have to set game.writetranscripttofile to true for the game to even call SaveTranscript(). And I've added the following to WebPlayer\player.js just as a fallback:

function SaveTranscript(data) {
  console.warn("[QUEST] Ignoring call to SaveTranscript(). Cannot write directly to local file when playing online.");
}

That fixes the issues with the webplayer.


Adding AslCall() to the Quest code and ASLCall() to Player\desktopplayer.js fixes the Turn Script and Walkthrough issues in the desktop player.


I shall be testing thoroughly for at least two days before submitting an Option B.