ScottKit (compile/decompile Scott Adams game files)

LOL. I love the way the ghost of Hamlet’s father seems to subtly set up a “fetch the treasures” type adventure.

I think it’s a very compact and clever system that wasn’t really utilized to its full potential. Scott Adams extended the system gradually over the years to add features (like the “continue” command) that greatly extended the potential. It’s a pity that the .dat file format limits the size of games unnecessarily.

1 Like

Yes. Subtlety. Subtlety is definitely a hallmark of the Adventure International house style and something I am trying to replicate.

ahem

1 Like

I’m really looking forward to this! There’s something delightfully perverse about doing Shakespeare Scott Adams style, and you’ve really nailed it! The use of capitals, the lack of full stops and those little double-dashes straight out of Marvel comics, are all so authentically Scott. Can’t wait!

1 Like

It’s a brilliant idea. It could be a whole thing; literary classics as Scott Adams “fetch the treasures” adventures. I can’t wait to play it :slight_smile:

2 Likes

I hear you. The Clojure highlighter served pretty well before Dialog had one, and it makes Scottkit .sck a little more readable too.

(I know nothing at all about Clojure except “whatever it’s like, it seems to be a Better Than Nothing highlighter for obscure IF languages.”)

2 Likes

Some basic syntax highlighting rules were easy enough to get working at least. As soon as I can get my head around the structure of it all, to separate language fields more intelligently, i’ll publish something.

My dream would be something that highlighted errors and unused data items too, but just basic colors can help a bit for now.

1 Like

Alpha build complete if anybody feels like helping bring this 40-years-overdue tragedy to life: Hamlet (Scott Adams style) seeks testers

Maybe a naive question but would it be possible to run ScottKit i CygWin? Have anyone tried it?

I got it working under CygWin!

I installed the following libraries:

ruby-2.6.4-1
ruby-devel-2.6.4-1
zlib-1.2.11-1
zlib-devel-1.2.11-1
libiconv-devel-1.14-3
libxml2-2.9.9-2
libxml2-devel-2.9.9-2
libxslt-1.1.29-1
libxslt-devel-1.1.29-1

And then the following from inside CygWin::

gem install pkg-config -v “~> 1.1”
gem install nokogiri – --use-system-libraries
gem install scottkit

Then I just go to the bin-folder in my home directory and run scottkit with commands like:

$ ruby scottkit …/games/adams/adv01.dat
ScottKit, a Scott Adams game toolkit in Ruby.
(C) 2010-2017 Mike Taylor mike@miketaylor.org.uk
Distributed under the GNU GPL version 2 license,
.
I’m in a forest
Obvious exits: North, South, East, West.
I can also see: Trees
.
A voice BOOOOMS out:
.
Welcome to Adventure number: 1 “ADVENTURELAND”.
In this Adventure you’re to find TREASURES & store them away.
.
To see how well you’re doing say: “SCORE”
Remember you can always say “HELP”
Tell me what to do ?

2 Likes

Hi guys, do you know how the ExchangeTimer code works in the Scott Adams source code? I see numbers from 2 to 7 getting called, is it 7 different timers? How they exchange the value? Im trying to make it work in a different language but i have failed to replicate the behaviour?

Any advise would be appreciate it. Take as example Ghost Town.

Thank you,

Does the Dialog translation clarify things?

Ghost Town uses counter 2 for bonus points, counter 3 for the time until the pianist arrives, counter 4 for the time until the pianist leaves, counter 6 for the number of matches remaining, and counter 7 for the time until nightfall. To manipulate any of these numbers, it uses the swap_counter opcode (aka ExchangeTimer) to swap that variable with the main counter, uses the normal opcodes to manipulate the main counter, then swaps it back.

See this line for a particular example.

This is the implementation in Scott2Zil (Zil):

	;"81 EXm,CT - select_counter - Select a counter. Current counter is swapped with backup counter <arg>"
	<COND (<=? .CODE 81>
		<SET TEMP ,COUNTER-REGISTER>
		<SET ARG1 <GET-NEXT-INSTRUCTION-ARG .ACTION-ID>>
		<SETG COUNTER-REGISTER <GET ,ALTERNATE-COUNTER .ARG1>>
		<PUT ,ALTERNATE-COUNTER .ARG1 .TEMP>
	)>

	;"82 CT+n - add_to_counter - Add <arg> to current counter"
	<COND (<=? .CODE 82>
		<SETG COUNTER-REGISTER <+ ,COUNTER-REGISTER <GET-NEXT-INSTRUCTION-ARG .ACTION-ID>>>
	)>

	;"83 CT-n - subtract_from_counter - Subtract <arg> from current counter"
	<COND (<=? .CODE 83>
		<SETG COUNTER-REGISTER <- ,COUNTER-REGISTER <GET-NEXT-INSTRUCTION-ARG .ACTION-ID>>>

		;"According to ScottFree source, the counter has a minimum value of -1"
		<COND (<L? ,COUNTER-REGISTER -1> <SETG COUNTER-REGISTER -1>)>
	)>

See also my specification doc: Chapter 5: Opcodes

3 Likes

Thank you Daniel, that’s an awesome tool, it help me a lot. Do you have this tool for the Brian Howarth games?

that’s over my paygrade but thanks :slight_smile:

I haven’t run it on those yet, but if you point me to the DAT files I can give it a shot!

I’m not @MauDiaz, but the Mysterious Adventures in DAT format can be found here:

1 Like

Yep, these data files work just fine! Excerpt from adventure 1 (The Golden Baton):

(action [SQUE RAG])
	(carried #oil-sodden-rag)
	~(lamp oil depleted)
	(here #lit-oil-lamp)
	
	Oil flares up! (line)
	(die)
	(show room)
	(now) (message printed)

(action [SQUE RAG])
	(here #empty-lamp)
	(carried #oil-sodden-rag)
	
	(swap #dry-rag with #oil-sodden-rag)
	Lamp is now full (line)
	(now) (message printed)
	
	(if)
		(swap #empty-lamp with #oil-lamp)
		(refill lamp)
		(remove #lit-oil-lamp) %% (Alt)
	(then) (endif)

I’ll toss them in the repository as I update them.

This is also turning up some interesting bugs in these games! For example, the command EXAMINE MUSIC in Arrow of Death Part 2 doesn’t work; it uses the illegal noun number 87 when there are only 82 nouns in the file.

Can anyone confirm what the original game printed for this command?

%% Illegal noun number 87; there are only 83 in the file
(action [EXAM @\s])
	{ (carried #music-sheet) (or) (here #music-sheet) }
	
	It's a dirge! (line)
	(now) (message printed)

There are also some cool discoveries to be made! For example, Escape from Pulsar Seven actually has three different countdown timers to determine when the creature kills you. When any of them hits zero, you die.

The “global pursuit timer” starts at 500 and decrements every turn.

The “unsafe area pursuit timer” starts at 50 and decrements every turn you’re in an unsafe room.

The “awake pursuit timer” starts at 2 and decrements every turn the creature is awake. (Presumably the other two timers are actually determining when the creature wakes up, in-universe, but if you don’t wake it up in the appropriate game way it just slithers in and kills you immediately.)

Remarkably sophisticated NPC behavior for this sort of game!