Talk:Witcher Script

ActionScript 3
Witcher Script? ==

There are numerous indications as to why the mysterious Witcher Script is either based on or identical to ActionScript 3.


 * 1) Several mentions of ActionScript (e.g. ACTIONSCRIPT3 ) in the witcher3.exe:
 * 2) * http://adobe.com/AS3/2006/builtin as DTD/schema URL
 * 3) * Failed loading SWF "%s": ActionScript version mismatch
 * 4) * Scaleform AS3 Socket
 * 5) * AS3 socket buffer
 * 6) * ActionScript Memory leaks in movie '%s', including %d string nodes
 * 7) * ActionScript version mismatched between main and import '%s' files
 * 8) Several clear references to Shockwave Flash as a file format, most notably:
 * 9) * Tag 'DefineBinaryData' (87) is not supported, potentially 'TLF text' fields are used. Switch to 'Classic Text'.
 * 10) * GFx_DoActionLoader - DoAction tag shouldn't appear in AS3 swf. Tag is skipped.
 * 11) * GFx_DoInitActionLoader - DoInitAction tag shouldn't appear in AS3 swf. Tag is skipped.
 * 12) * file extensions .swf and .redswf respectively

--— Gqxidzjqmj (talk) 11:30, 16 July 2019 (UTC)
 * Scaleform is using ActionScript, so parts about GFx_ are about that. — Gilrond (talk) 14:29, 16 July 2019 (UTC)
 * Yeah, I came across mentions of Scaleform and it makes sense that this is the actual implementation used. But unlike with ActionScript 3 and SWF for which I even wrote some RCE tools some time ago, I never had any firsthand experience with Scaleform. Of course this also makes analysis of witcher3.exe harder than it would be if I had source-level access to most libs. But it's good to see that we're getting somewhere. As a first exercise I am attempting to extract somewhat of a call graph and class hierarchy (AS3 side only) in order to be able to scour the .ws files for useful information such as what debug commands are available, how to use them and what effects they have (some are trivial, but doing this manually - as I tried - seems to take ages). If you could point me to other places where TW3 fans congregate, it'd be most helpful also. --— Gqxidzjqmj (talk) 09:14, 18 July 2019 (UTC)
 * You can try TW3 forums, but they aren't so active these days. — Gilrond (talk) 23:31, 18 July 2019 (UTC)
 * Hmm thanks. Not sure that something hosted by CDProjekt is going to work out for these topics. After all they'll want to keep it all hush hush while for us fans it's more important to share findings. Guess in the end I might end up publishing my findings in GitHub or so and hope for them to be found. — Gqxidzjqmj (talk) 08:18, 19 July 2019 (UTC)
 * I don't think they care to keep it hidden specifically. So do post on the forums. — Gilrond (talk) 17:21, 19 July 2019 (UTC)

Some further notes
It's clear that many people when thinking of ECMAScript (ECMA-262) think immediately of JavaScript as we know it now. However, in case of ActionScript 3 this is but half the truth. ActionScript 3 is indeed closely related to JavaScript and in fact ActionScript 3 was based on a now abandoned proposal for the fourth edition of ECMA-262 (aka ECMAScript, on which JavaScript in turn is based). The VM churning away in the guts of Adobe Flash is called Tamarin and available as open source (MDN page here). A version of this VM can still be found here.

Independent tools that may be able to tokenize and parse ActionScript3 (and therefore Witcher Script) are:


 * as3compile from SWFTools (GitHub project)

— Gqxidzjqmj (talk) 11:30, 16 July 2019 (UTC)