Splicing CSBWin Recordings

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Antman
DMwiki contributor
Posts: 517
Joined: Fri Nov 14, 2003 9:05 am
Location: Lost in TOC

Splicing CSBWin Recordings

Post by Antman »

Hi Paul, I've downloaded SpliceCSB.exe but I don't understand how to use it. I get the message "no file specified on the command line!". I have 300+ files and the vast majority are deaths, does this program splice multiple logs files at a time? If so does it remove the deaths? Or do I need to go through them manually to remove the unwanted logs? There is also an unexplained crash amongst them somewhere.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Do you want to record a maleficient guild conflux run? ;)

edit : just read it, nevermind. Good luck in making it work,
I would watch it!!
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

I think you must put the last log as a parameter, SpliceCSB.exe proceeds backwards to constitute the log.
User avatar
Antman
DMwiki contributor
Posts: 517
Joined: Fri Nov 14, 2003 9:05 am
Location: Lost in TOC

Post by Antman »

I how I put a log as a parameter? I don't really understand how it could work backwards, wouldn't it need to work from the first log forward? And does it automatically detect other logs in the same folder? If so, how do I make it work when I have four folders of logs?

Cheers for any help in advance! I really have no idea what I'm doing.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

LOgs are n't created with knowledge of what you will do, but continued games witll then carry on the logging from where you left off, I believe, hence it needed to work backwards along this chain. Hence I was worried if you have any branched deviations the log might twinge.

You can create a .bat file that simple has CSBSplice's name and then a -<path> to the last log. I think that's how you do it.

You won't be able to make it work with four folders of logs, you will need to take the chain of logs that are relevant and put them in one folder/ I am not sure if a log knows internally what number it is. If it does, I do not know if number gaps would cause a problem. If it doens't know, then maybe making them one continuous set of numbers could be advantageous

Open a log in notepad and see if it references its own file name anywhere
User avatar
Antman
DMwiki contributor
Posts: 517
Joined: Fri Nov 14, 2003 9:05 am
Location: Lost in TOC

Post by Antman »

How do create a .bat file and a path to it? There are some deviations in my logs, I remember at once stage I had to reload because my character was poisoned and I couldn't cure it before he died, even though he at least half his health. So I had to load a back up save from a while back. It seems a log doesn't internally keep it's number from what I saw. Making them into one continuous numbers will take a while, once I get the .bat file working I'll experiment and see how it works.

If it gets too complicated I might try remaking a new game, I could do it with an awful lot less logs now that I know what to do. But anyway I'm going for a couple of weeks soon so I'll have to put it all on hold soon.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

a bat file is a text file called .bat, windows recognises it as an executable

Put the logs in the same place as the csbsplice. Not sure what the command is, buf it you try putting simply the name of thre last log after the csbsplice.exe then go on from there
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Right now CSBsplice expects ALL of the
logs to be in the same directory. Obviously,
this is not going to work for Antman because
he has several with the same name. I will
modify CSBsplice to look in subdirectories
named 'logs00' through 'logs99'. Then you can
have up to 10,000 log files. Will that suffice?

It starts with the LAST log.

It looks to see where the log file started.
It started from a saved game, of course.
Then it examines all the other log files to
find the one that created that saved game.
Then it repeats this paragraph.

Think about it with various kinds of save/
backup/restart actions. You will see that
it works (in theory).
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Get SpliceCSB20.exe.

It allows logs to be in subdirectories
of the last log.

So....To make it simple. Put the
last log and SpliceCSB in a directory
together. Put other logs in the same
directory or in sub-directories named
"Logs00", "Logs01", ... "Logs99".

Then drag the last log onto SpliceCSB.

A tracefile will be produced that duplicates
everything printed in the execution window.
The tracefile can be useful to see what
went wrong.

SpliceCSB20 also fixed a bad problem with
sequencing the log files.
User avatar
Antman
DMwiki contributor
Posts: 517
Joined: Fri Nov 14, 2003 9:05 am
Location: Lost in TOC

Post by Antman »

Cool, and also extremely clever. I guessing it does not matter what order I name the folder containing the extra logs? So it wouldn't matter if the first bunch of logs I created were in folder logs00 or logs02. A problem arises when I run the program though, not sure what is going wrong, it gets at least half way through I believe so it is correctly using some of the logs in the folders. It says some logs precede other logs. I'll email you my logs plus my faulty playback file and trace file.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Got them. It appears you got anxious
and started clicking before the game was
completely loaded. The resulting logs
had 'click' entries in places that
SpliceCSB did not expect.

As I said, "The tracefile can be useful
to see what went wrong". I figured
SOMETHING would go wrong in a project
this large.

I'll do some repairs to SpliceCSB and see
if I can create a complete Playback file
for you.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I have a complete Playfile.log.

Now I need the:

Dungeon.dat
Graphics.dat
CSBGraphics.dat

that you used.

I tried a few but none are the same as
the ones you used.

Edit: Never mind....I found them...

I posted SpliceCSB21.exe which assembles
your logfiles correctly (I hope).
User avatar
Antman
DMwiki contributor
Posts: 517
Joined: Fri Nov 14, 2003 9:05 am
Location: Lost in TOC

Post by Antman »

Cool, I think it is very close. It created a playfile that gets very far through but has a sequence timing error after a while. Even though a playfile was created which worked SpliceCSB21 had a problem with some logs preceding other logs. I've sent you the trace and playfile.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Antman wrote:SpliceCSB21 had a problem with some logs preceding other logs.
I don't see any problem in the trace. What
do you see?

I got the Sequence/Timing error too, In
Logs01/Record083.log. These are difficult
problems. I have been handicapped by the
fact that nobody seems willing to keep
the recordings and try them. So I have
few examples of failures. You are the first.

I am also handicapped by the fact that you
cannot produce a "Trace" file because the
game is encrypted.

I am looking at it. But I fear the chance of
fixing anything is terribly small. And fixing
the recordings so that they can be played
back is even less likely. But I will work at
it for a while because success would be very
valuable.
User avatar
Antman
DMwiki contributor
Posts: 517
Joined: Fri Nov 14, 2003 9:05 am
Location: Lost in TOC

Post by Antman »

My mistake, I believe the preceding I mentioned was the program telling me which logs it didn't need, the games in which I died in etc.

So it isn't possible for you to playback my game on a non-encrypted version of Conflux and create a trace? I'm willing to keep recordings and will do so from now on. I can play games doing specific things in specific versions etc if you want. I've been a little bored recently anyway, but I'm away for about 2 and a half weeks from tomorrow. I think a regular game of Conflux might have around 1000 logs for the first time through, in fact my first Conflux III game was probably well over that, and it's awfully easy to select 'delete logs' when the option appears once you have reached the 100 limit. Perhaps a 1000 log limit will make it easier for people to take care of. And when the message pops up, have it ask you to keep them and send them on to you.

No biggie if it doesn't work, the amount of saves in the section of the game I watched were embarrassing! And making a new game should be an awful lot easier without getting the SAR keys, and I think I over trained a bit so I don't need to fully unlock all the guilds.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

I beleive the point is that the logs need to run for exactly the version that was played on. If you didn't play the un-encrypted version of conflux, then he can't play it in that.

It's like expecting your saved game files to be unencrypted from an encrypted dungeon.dat
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

If you provide me the encrypted version of conflux you used, I can decrypt it.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

The playback problem has nothing to
do with encryption. The encryption
only prevents players from producing
trace files which would be very helpful
when things go wrong.

So encryption only makes debugging
more difficult. I can decrypt Conflux files
but the original player cannot and therefore
cannot provide me with traces of the
original game. They would be so huge that
people might complain about creating
them, anyway.

I have a theory about what might have gone
wrong in this case. Antman, did you
often 'restart' a game rather than exiting
the program and 'Resuming' at the dungeon
entrance? Perhaps there is a difference! :cry:
User avatar
Antman
DMwiki contributor
Posts: 517
Joined: Fri Nov 14, 2003 9:05 am
Location: Lost in TOC

Post by Antman »

Yes, I did that more often than exiting and resuming, which was why I often had to find elaborate ways of killing myself. There should be a restart option inside the game rather than having to commit suicide.....
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Bad news.

About 1-1/3 hours into the game
you did one of those restarts and
before the game was fully loaded
you clicked in the viewport area.
Very Bad. First some background.

The Atari code did not do a full
reset and reload when the game was
restarted. It attempted to keep as
much of the game as possible in
memory so as to reduce the floppy
disk access,

When you died, you were standing
in front of an Alcove in which was
resting a Bag. You restarted from a
saved game a few steps away. But
you clicked in the viewport before
the game was fully loaded. It thought
you were still positioned to pick up
that bag from the Alcove. So it gave
you the bag but attempted to remove
from the place adjacent to where you
were standing after the restart. It
discovered that things were not right
and the debug version of the program
crashed at that point. But the release
version gamely attempted to proceed.

I fought to recreate the exact same
error during playback. But there is no
way to know exactly what happened.
After about 10 hours of work I succeeded
in getting the thing to play for another
1/2 hour. But then the damage done by
the original problem caused a second
problem that turned out to be much more
difficult to work around. I am very sorry
I cannot fix your recording. I tried hard.

But I quit trying. I bit the bullet and
rewrote the program to clear everything
out and start over when you "Restart".

I am testing it now. The Record/Playback
is a very delicate operation. I hesitate to
add another way of dying/restarting. I just
timed myself. While playing the game, I
pressed the 'Close window' button. double-
clicked CSBwin, pressed 'Dungeon', pressed
'CSBGAME.DAT', and pressed 'PLAY'. The
entire operation took six seconds.

I automated the process by creating a batch
file name Game1.BAT:

Code: Select all

CSBwin10_061 RECORD DIRECTORY="D:\Projects\CSB\ConstructTorch" PLAY="G1.LOG"
And a G1.Log file:

Code: Select all

#CSB for Windows/Linux Version 10.061
00000000 00fc 0052 00c9 0000629e
00000000 0000 0000 0add 0000629e
00000000 007f 006b 00d2 0000629e
00000000 e450 615c 6669 0000629e
0000005c 009f 006c 00d2 9b9ae11e

Now, when I want to die, I press the
window close button (or Alt-F-X) and
double-click on the Game1.BAT file.
It still takes six seconds but I save a
few clicks. It would be easy to create
batch files to restart from any saved
game (with any name) by first copying
to CSBGAME.DAT.

How much time can you save with a
'Restart-within-the-game option? Perhaps
a second or two? I could add a
command-line option to skip the animations
and make it quicker if that would really
be useful.
User avatar
Antman
DMwiki contributor
Posts: 517
Joined: Fri Nov 14, 2003 9:05 am
Location: Lost in TOC

Post by Antman »

I'm back! A long and testing trip it was too....

Anyway, no worries about the game and I appreciate the time you spent fixing it. It's good to get another bug fixed especially. I'll make a new game over the next couple of days as I have nothing on four the next four days pretty much.

Six seconds? Christ I am lazy, for some reason waiting at the blue screen for the restart option to appear really bugs me after a while. But don't worry about doing anything else about it, it would probably be only me which would notice/appreciate it anyway.

Also, I'm guessing now that the restart bug is fixed the long and complicated get every character bug will cease to work. Shame, I liked that bug.

Is the latest version on CSBWin including with the latest Conflux Bugfix?
User avatar
Antman
DMwiki contributor
Posts: 517
Joined: Fri Nov 14, 2003 9:05 am
Location: Lost in TOC

Post by Antman »

In fact, can I carry on with my game from before where the bug occurs? That would save time by being able to skip the tedious training early on.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Yes, you can carry on. But wait until
I can produce the exact savegame and
logfile that you will need. Sometime
today, I hope.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

At dianneandpaul.net/CSBwin you will find
restart.zip. Put the individual files into
the proper places in your folders.
I'll PM you the password for the zip file.
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”