[v2.11.3] Abiathar: The superior Keen Galaxy editor

Here is where to post about the latest Commander Keen fangame or modification you've finished, a new website you've made, or another Keen-related creation.
User avatar
Nisaba
Janitress
Posts: 1597
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Post by Nisaba »

dear fleex,

I'm seeking advice! having problems opening keen meets the meats via abiathar. I truly have no idea, how to handle the MapHead/MapDict etc. I even consulted the PATCHES.KDR which confuses me even more.
If it weren't for my stupidness I wouldn't ask for help. so please advice...

Thank you in advance. yorp, yorp, yorp!
out now (link) : Image
User avatar
Fleexy
Tool Smith
Posts: 1432
Joined: Fri Dec 12, 2008 1:21
Location: Abiathar C&C

Post by Fleexy »

KMTM is tricky to open because Levellass chose to put several resources into one file, specifically, KDREAMS.CNK. To get the data out and separated, I used the XVI32 hex editor and pulled out these ranges:
  • The EGAHEAD starts the file and is 12072 bytes long.
  • The MAPHEAD starts at byte 12080 and, including tileinfo, is 11824 bytes long.
  • The AUDIOHED (though you don't need this to open the levels) starts at byte 23904 and ends at byte 24127, or possibly at byte 24243.
  • Texts follow.
Patches were used to disable the Huffman compression, so you'll need to use Abiathar's File Emitter to spit out NULL.DCT, which you'll use in place of MAPDICT and EGADICT.

Interestingly enough, it seems that there's some patch to shift the MAPHEAD offsets by 8 after level 5 and by 16 after a couple more levels. I don't know what's up with that (maybe it was intended to make level inspection difficult?) but I've manually repaired the offsets. The compressed header length for level 17 was zeroed as well; I unilaterally decided it should actually be 0x26.

Download KMTM extracted data and ADEPS

Proof that it works:
Image
the screenshot is in a super-secret up-and-coming version (hence the "BETA" text) but it works in v2.8.2 as well
User avatar
Nisaba
Janitress
Posts: 1597
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Post by Nisaba »

Fleexy wrote:KMTM is tricky to open because Levellass chose to put several resources into one file, specifically, KDREAMS.CNK. To get the data out and separated, I used the XVI32 hex editor and pulled out these ranges:
  • The EGAHEAD starts the file and is 12072 bytes long.
  • The MAPHEAD starts at byte 12080 and, including tileinfo, is 11824 bytes long.
  • The AUDIOHED (though you don't need this to open the levels) starts at byte 23904 and ends at byte 24127, or possibly at byte 24243.
  • Texts follow.
Patches were used to disable the Huffman compression, so you'll need to use Abiathar's File Emitter to spit out NULL.DCT, which you'll use in place of MAPDICT and EGADICT.
Interestingly enough, it seems that there's some patch to shift the MAPHEAD offsets by 8 after level 5 and by 16 after a couple more levels.
...I did perceived something strange over there, too. indeed, I tried to manage that KDREAMS.CNK thing with some Hex-Editors but without any findings.
been on the ropes, I'm so glad you managed a way thru. thanks a lot for that ADEPS-file. again you saved my way to the fridges.

what a nice achievement:
Image
the screenshot is in a none super-secret up-and-coming beta version, but works as well
Last edited by Nisaba on Mon Oct 22, 2018 23:25, edited 1 time in total.
out now (link) : Image
User avatar
Nisaba
Janitress
Posts: 1597
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Post by Nisaba »

if you don't mind, I do have another request for your fleexieness.

all I know by now is, that abiathar is a powerful, excellent tool. in fact it is the godfather of map-making.
but what about the sprites.
pardon my mortal inattentiveness. maybe I overlooked one hint or another. but as far as I can ascertain, there is no such thing implemented. of course I know how to handle modkeen and stuff. but this little extra would be so neat. my vote for that.
Last edited by Nisaba on Fri Feb 05, 2016 22:13, edited 2 times in total.
out now (link) : Image
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

Heh, yeah, the severe memory issues forced me to be... creative with the level stuff. It's a unique setup but I do wish my mods ended up being more stable.
What you really need, not what you think you ought to want.
User avatar
Nisaba
Janitress
Posts: 1597
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Post by Nisaba »

I was wondering: Is there a way of presetting the name of the Export-Image-files respectively the aslev-files with the actual level properties (for e.g.: Name = "ID Number"+"Map Name").
this wouldn't be a necessary edit but it might make life a little bit easier, especially for some lazy folks.
out now (link) : Image
User avatar
Fleexy
Tool Smith
Posts: 1432
Joined: Fri Dec 12, 2008 1:21
Location: Abiathar C&C

Post by Fleexy »

There is, actually! Look in editor.aconf and you'll find a BitmapExporter section that controls the behavior of the Export Image command. If you fill in the AutoFilename field, no save-file prompt will be shown and the file will be named automatically. Look in the comment above AutoFilename for macros you can use in it. For example, "%n" is replaced with the level number. Note that you should end this name with ".png", since the exported files are actually in PNG format despite the save-file dialog naming them BMP. This glitch will be fixed in the next version, coming soon, hopefully.

So, you might replace the AutoFilename line with something like this:

Code: Select all

 AutoFilename: %n %l.png
In regard to graphics editing: That's a very big sort of thing, but I do have some plans. FleexCore2 (FMod.dll) actually contains the code to load, save, and replace resources from the EGA files, but I have not yet put any UI on it. I'll keep you posted.
User avatar
Nisaba
Janitress
Posts: 1597
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Post by Nisaba »

yorp, yorp, yorp.
fleexy, you are a beast. fantastic!
out now (link) : Image
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

We are getting slowly close to an all-in-one Keen mod creator tool.


*Vibrates intensely*
What you really need, not what you think you ought to want.
User avatar
Nisaba
Janitress
Posts: 1597
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Post by Nisaba »

...tiny bashful question...
can I export all level images at the same time? is there a one click solution?
...
out now (link) : Image
User avatar
Fleexy
Tool Smith
Posts: 1432
Joined: Fri Dec 12, 2008 1:21
Location: Abiathar C&C

Post by Fleexy »

Hey Nisaba, sorry I forgot to reply. There's not currently a one-click solution, and I'm struggling to think of away to put that in without it getting in the way of something else. It is a good idea though. Until I figure out how to accomplish that, you can turn off the confirmation message box and repeatedly press PgDn and ] to go through all the levels.

And celebrating two years of Abiathar:

UPDATE
Abiathar v2.8.3

Despite not having accomplished everything I had planned, I've decided to finally release these useful changes:
  • Rendering is a lot faster thanks to my having abandoned the normal GDI+ functions in favor of doing some byte twiddling
  • A bug in the edit mode of the New Project wizard was fixed
  • The Export Image routine now actually creates BMP files when the extension you specify is BMP; otherwise it makes PNGs
  • The scrolling position is now remembered for each tileset (no longer thrown away when the selected tile palette is changed)
  • There's a new configuration option called SnapToSelTiles that, when enabled, causes Abiathar to automatically scroll the tile palette to make sure the newly-selected tile is visible
  • Some non-user-visible issues in FMod.dll were addressed
Get it through the auto-updater, or download ZIP.

Happy Keen Day 2016!
User avatar
troublesomekeen
Vorticon Elite
Posts: 1245
Joined: Fri Feb 03, 2012 8:01
Location: Three-Tooth Lake
Contact:

Post by troublesomekeen »

The SnapToSelTiles function in this version is working even more beautifully then my personalized update you made for me. 8)
Image
Commander Keen in... Canteloupe Quest!
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

Aaah just a little too late to test on my current project. Always nice to see something faster, better, stronger, harder.
What you really need, not what you think you ought to want.
User avatar
Fleexy
Tool Smith
Posts: 1432
Joined: Fri Dec 12, 2008 1:21
Location: Abiathar C&C

Post by Fleexy »

UPDATE
v2.8.4: the visibility control update

Since forever, Abiathar's configuration file (editor.aconf) contained a setting called ExtendedTileinfo that causes the Tile Properties overlay to show some special properties, like an X for deadliness and a D for a door. Unfortunately, changing that setting required an Abiathar restart, and you either got all the special letters or none of them.

Therefore, I've added a dialog to control those at runtime. When the Tile Properties overlay is active, there's a link in the status bar that lets you pick which special letters to show. (Or press Ctrl+B.) You can use the keyboard to toggle those checkboxes by letter, so there's no need to touch the mouse at all there! There's a new special letter, S ("switchable"), that calls out tiles that have an animation offset but a zero animation time. The ExtendedTileinfo setting is deprecated and replaced by ShowSpecialTileinfo, a string value which contains the letter of each special letter to show.

Then, I realized that the Links overlay gets really crazy in levels with boatloads of switches and doors. So I added a way to highlight a link for more easy visual tracing. Press the semicolon key while the mouse is over a link's source or destination and all links there will change color (from Colors.Links to Colors.Find). Highlighted links are guaranteed to render on top of all other links. Holding Shift while pressing the semicolon clears all link highlights in the current level. I'll also remind y'all that pressing the adjacent apostrophe key copies the infoplane value that links to the spot under the mouse.

Image

Oh, and I also adjusted the API a bit; IAbiatharLevelSetWrapper was missing a public Exists method. It'll be a little easier for any extensions to check for the presence of a certain level now.

Get the update through the auto-updater, or download ZIP.

Happy modding!
User avatar
Nisaba
Janitress
Posts: 1597
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Post by Nisaba »

oh sweet,
colouring switch-links really helps allot keeping track of how things are organized.
thanx for that!



ps.: but I'm still looking for an indicator which tells the name of the currently opened .adeps file. working on multiple sessions at the same time might cause confusions from time to time.
out now (link) : Image
Post Reply