Speculation on how to launch mods

Request patches for Keens 4-6.
Post Reply
User avatar
Nisaba
Posts: 320
Joined: Fri Jan 01, 2016 11:15 pm
Location: patch.pat
Contact:

Speculation on how to launch mods

Post by Nisaba »

General speculation on possibilities:

I was wandering whether one of the following thoughts might actually be realizable. And if so in which way?
  1. Is it possible - while in a game/mod - to trigger a quit/shutdown of the current one and - at the same time - startup another mod.
    In other words: How to trigger to start a mod while already playing one?
  2. Is it possible to switch tilesets while playing a mod?
  3. if non of this is doable within gameplay (what I assume), I was thinking about a batch-routine which launches a following mod directly after quitting the previous one. BUT:
    Is there a way of creating different-game-quits in order to trigger a concrete variable of the batch-file?
    Let's say depending on whether or not you have collected a special item the batch command launches you directly into one or another "waiting" mod. therefor maybe the batch routine is looking into the highscore values or something...
KeenWiki Patch:Executable_Maps
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

a.) Triggering a shutdown is simple enough.

b.) No, graphics are loaded at the game start. I have demonstrated a mod that can use two types of graphics depending on how it's started.

c.) With some patching and possibly a bridging DOS executable it would be possible to have one mod that, if quit a certain way, would immediately launch a new mod.
User avatar
Nisaba
Posts: 320
Joined: Fri Jan 01, 2016 11:15 pm
Location: patch.pat
Contact:

Post by Nisaba »

thanx for the response!

that sounds promising, doesn't it? so let's talk about option c) a little bit.

first of all: is there any 'batch-script-file-specialist' around who can share some knowledge concerning this concrete problem?!
what I need is a batch routine which checks (after quitting the game) for a certain value in that CONFIG.CK4 file. this value could be a certain score point (let's say 20.000 for eg). if so, a batch command loads instantly the next patch-file from mod #2. how to script this?

secondly: some special items need to be patched, with certain values (again 20.000 points for eg). this collectibles should trigger:
  • a dialogue box like the janitor conversation
    automatically register the value into the highscore listing
    end the game
    and immediately quit the mod
importantly the last three steps should happen in background without popping up or loading into menu-screens!



in short:

to all you canny and bright people, can somebody please help and provide some batch and patch knowledge?!
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Ok, got a rough idea of how to set up c, is there any episode you want for me to try and work an example on?
User avatar
Nisaba
Posts: 320
Joined: Fri Jan 01, 2016 11:15 pm
Location: patch.pat
Contact:

Post by Nisaba »

well, let's say Keen 4 (for a start). but this is a thing which should get triggered by all episodes. (the idea is to switch episodes/creatures/environments and stuff.)
Currently I'm working on a batch-routine myself, but I guess I need some time to get things done right.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

So this basic patch causes the game to create a different CONFIG file if Keen exits the mod after starting a new game. (Specifically 'DONFIG.CK4') This will not overwrite the existing CONFIG file and can be used by a batch file as a check. (Basically run the mod, when the mod exits check for the modified file, if it exists run the next mod.)

Code: Select all

#Scan\Create both use same text
%patch $1966D  $468CW
%patch $334FC "CONFIG.CK4" $00

#Change file on new game
%patch $5CBB $468CW $4F44W

It is also possible to trigger the creation of this file at any time during the game or when a special 'crash exit' is called. (In this case something would happen, the screen would turn black then the next mod would begin.)
User avatar
Nisaba
Posts: 320
Joined: Fri Jan 01, 2016 11:15 pm
Location: patch.pat
Contact:

Post by Nisaba »

Yauz, this is fantastic!
I was looking for something like this. Especially the crash-sequence sounds promising. Fortunally I haven't either got the time nor the possibility to check things out, but I'am excited to do so later on. Thanx a lot for providing this patch anyway.
Post Reply