KobaltBlu / KotOR.js

A remake of the Odyssey Game Engine that powered KotOR I & II written in JavaScript
GNU General Public License v3.0
93 stars 9 forks source link

Unable to complete opening TSL cutscene #37

Closed noahlange closed 4 months ago

noahlange commented 4 months ago

Hi—this is a really cool project!

Issue I'm unable to progress through the first TSL cutscene on Windows or Mac. I cloned the repo locally and was messing around but wasn't able to get past this first part. I assumed it was due to config issues on my part, so I opened it on the public version of the player and had the same issues.

To Reproduce Start game in TSL mode, create character. Opening cutscene begins, the first two camera shots sorta work, but before the narration starts, the game throws a variety of errors and is unable to continue.

Context

Console log starting from the beginning of the cutscene attached.

onEnter t.NWScriptInstance {name: 'a_bet3m4', instructions: Map(281), actionsMap: {…}, globalCache: null, _disposed: false, …} s {helperColor: Yt, combatOrder: undefined, combatRoundTimer: undefined, controlled: undefined, id: 13, …}
KotOR.js:2 TypeError: Cannot read properties of undefined (reading 'playSound')
    at t.NWScriptInstance.action (KotOR.js:2:1558330)
    at t.CALL_ACTION (KotOR.js:2:2010043)
    at t.NWScriptInstance.runScript (KotOR.js:2:2002388)
    at t.NWScriptInstance.run (KotOR.js:2:2001263)
    at w.runOnEnterScripts (KotOR.js:2:1145615)
    at w.runStartScripts (KotOR.js:2:1145707)
    at w.initAreaObjects (KotOR.js:2:1145348)
    at KotOR.js:2:203689
KotOR.js:2 Disguise applying Z {helperColor: Yt, combatOrder: undefined, combatRoundTimer: undefined, controlled: undefined, id: 207, …} l {creator: w, duration: 0, expireDay: 0, expireTime: 0, spellId: -1, …}
KotOR.js:2 SetGlobalFadeOut 0 0 0 0
KotOR.js:2 ActionStartConversation (15) [v, 'intro', 0, 0, 0, '', '', '', '', '', '', 0, -1, -1, 0] v {helperColor: Yt, combatOrder: undefined, combatRoundTimer: undefined, controlled: undefined, id: 98, …}
KotOR.js:2 ModuleArea: ready to play
KotOR.js:2 Disguise applied Z {helperColor: Yt, combatOrder: undefined, combatRoundTimer: undefined, controlled: undefined, id: 207, …} l {creator: w, duration: 0, expireDay: 0, expireTime: 0, spellId: -1, …}
KotOR.js:2 ModuleTrigger tr_sign_cockpit enter 2
KotOR.js:2 ModuleTrigger tr_sign_cockpit enter 1
KotOR.js:2 ModuleTrigger tr_sign_cockpit tr_sign_enter enter running
KotOR.js:2 AudioLoader.LoadStreamSound : read
KotOR.js:2 TypeError: Failed to execute 'getFileHandle' on 'FileSystemDirectoryHandle': Name is not allowed.
  LoadStreamSound @ KotOR.js:2
  await in LoadStreamSound (async)
  LoadSound @ KotOR.js:2
  playSound @ KotOR.js:2
  impact @ KotOR.js:2
  onApply @ KotOR.js:2
  addEffect @ KotOR.js:2
  action @ KotOR.js:2
  t.CALL_ACTION @ KotOR.js:2
  runScript @ KotOR.js:2
  run @ KotOR.js:2
  onSpawn @ KotOR.js:2
  initAreaObjects @ KotOR.js:2
  (anonymous) @ KotOR.js:2
  setTimeout (async)
  (anonymous) @ KotOR.js:2
  Promise.then (async)
  O.TextureLoader.LoadQueue.t @ KotOR.js:2
  (anonymous) @ KotOR.js:2
KotOR.js:2 AudioEmitter Sound not found ****
KotOR.js:2 NWScriptStackVariable Undefined INTEGER
  t.NWScriptStackVariable @ KotOR.js:2
  push @ KotOR.js:2
  t.CALL_ACTION @ KotOR.js:2
  runScript @ KotOR.js:2
  execute @ KotOR.js:2
  tick @ KotOR.js:2
KotOR.js:2 AssignCommand (2) [undefined, {…}]
  action @ KotOR.js:2
  t.CALL_ACTION @ KotOR.js:2
  runScript @ KotOR.js:2
  execute @ KotOR.js:2
  tick @ KotOR.js:2
  Update @ KotOR.js:2
KotOR.js:2 ApplyEffectToObject GameEffects must be applied to ModuleObjects
  action @ KotOR.js:2
  t.CALL_ACTION @ KotOR.js:2
  runScript @ KotOR.js:2
  action @ KotOR.js:2
  t.CALL_ACTION @ KotOR.js:2
  runScript @ KotOR.js:2
  execute @ KotOR.js:2
  tick @ KotOR.js:2
KotOR.js:2 NWScript Action DisableHealthRegen not found {comment: '858\nRWT-OEI 09/06/04\nThis function turns off the i…turned back\non by passing FALSE to this function.', name: 'DisableHealthRegen', type: 0, args: Array(1), action: undefined}
  t.CALL_ACTION @ KotOR.js:2
  runScript @ KotOR.js:2
  execute @ KotOR.js:2
  tick @ KotOR.js:2
KotOR.js:2 ApplyEffectToObject GameEffects must be applied to ModuleObjects
  action @ KotOR.js:2
  t.CALL_ACTION @ KotOR.js:2
  runScript @ KotOR.js:2
  execute @ KotOR.js:2
  tick @ KotOR.js:2
KotOR.js:2 AudioLoader.LoadStreamSound : read
KotOR.js:2 TypeError: Failed to execute 'getFileHandle' on 'FileSystemDirectoryHandle': Name is not allowed.
  LoadStreamSound @ KotOR.js:2
  await in LoadStreamSound (async)
  LoadSound @ KotOR.js:2
  playSound @ KotOR.js:2
  impact @ KotOR.js:2
  onApply @ KotOR.js:2
  addEffect @ KotOR.js:2
  action @ KotOR.js:2
  t.CALL_ACTION @ KotOR.js:2
  runScript @ KotOR.js:2
  run @ KotOR.js:2
  runOnEnterScripts @ KotOR.js:2
  runStartScripts @ KotOR.js:2
  initAreaObjects @ KotOR.js:2
  (anonymous) @ KotOR.js:2
  setTimeout (async)
  (anonymous) @ KotOR.js:2
  Promise.then (async)
  O.TextureLoader.LoadQueue.t @ KotOR.js:2
  (anonymous) @ KotOR.js:2
  next @ KotOR.js:2
KotOR.js:2 AudioEmitter Sound not found ****
KotOR.js:2 destroy  s {helperColor: Yt, combatOrder: undefined, combatRoundTimer: undefined, controlled: false, id: 13, …}
KotOR.js:2 spawned T3-M4
KotOR.js:2 saving Prologue{Invis} {T3-M4 Animated Camera}
KotOR.js:2 saving Prologue{Invis} {Placed Camera 6, fade out}
KotOR.js:2 AudioLoader.LoadStreamSound : read
KotOR.js:2 TypeError: Failed to execute 'getFileHandle' on 'FileSystemDirectoryHandle': Name is not allowed.
  LoadStreamSound @ KotOR.js:2
  await in LoadStreamSound (async)
  LoadSound @ KotOR.js:2
  playSound @ KotOR.js:2
  impact @ KotOR.js:2
  onApply @ KotOR.js:2
  addEffect @ KotOR.js:2
  action @ KotOR.js:2
  t.CALL_ACTION @ KotOR.js:2
  runScript @ KotOR.js:2
  execute @ KotOR.js:2
  tick @ KotOR.js:2
  Update @ KotOR.js:2
KotOR.js:2 AudioEmitter Sound not found ****
KotOR.js:2 AudioLoader.LoadStreamSound : read
KotOR.js:2 TypeError: Failed to execute 'getFileHandle' on 'FileSystemDirectoryHandle': Name is not allowed.
  LoadStreamSound @ KotOR.js:2
  await in LoadStreamSound (async)
  LoadSound @ KotOR.js:2
  playSound @ KotOR.js:2
  impact @ KotOR.js:2
  onApply @ KotOR.js:2
  addEffect @ KotOR.js:2
  action @ KotOR.js:2
  t.CALL_ACTION @ KotOR.js:2
  runScript @ KotOR.js:2
  execute @ KotOR.js:2
  tick @ KotOR.js:2
KotOR.js:2 AudioEmitter Sound not found ****
KotOR.js:2 AudioLoader.LoadStreamSound : read
KotOR.js:2 TypeError: Failed to execute 'getFileHandle' on 'FileSystemDirectoryHandle': Name is not allowed.
  LoadStreamSound @ KotOR.js:2
  await in LoadStreamSound (async)
  LoadSound @ KotOR.js:2
  playSound @ KotOR.js:2
  impact @ KotOR.js:2
  onApply @ KotOR.js:2
  addEffect @ KotOR.js:2
  action @ KotOR.js:2
  t.CALL_ACTION @ KotOR.js:2
  runScript @ KotOR.js:2
  execute @ KotOR.js:2
  tick @ KotOR.js:2
KotOR.js:2 AudioEmitter Sound not found ****
KobaltBlu commented 4 months ago

Thanks for taking an interest in the project!

I pushed a change addressing the un-able to continue issue that you mentioned. I haven't play tested TSL as much as the first game. For speed, I mostly rely on using save games to move myself around to various areas.

noahlange commented 4 months ago

Makes sense! Looks like that fix did the trick. Thanks much.