Editing levels for mods (Galaxy)?

Anything related to Keen Modding.
Post Reply
Cel
Posts: 7
Joined: Sun Dec 03, 2017 6:29 pm

Editing levels for mods (Galaxy)?

Post by Cel »

Hi,

Is it possible to edit levels for existing keen galaxy mods? I've been making so called 'Legendary mode' for the keen games and I'm looking to do it for a set of mods as well. I'm really just looking to be able to place more sprites and possibly make minor edits to the tiles. If it is possible, how would I go about doing it? I tried opening the maphead in Keen:Next and it says that the file type is incorrect.
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Re: Editing levels for mods (Galaxy)?

Post by Fleexy »

Welcome to Keen Modding!

Yes, you can edit existing mods using any level editor. I might be a little biased, but I recommend my own editor Abiathar. Its main benefit in this situation is that it can use the EGA graphics files without requiring you to extract the tile images with any other tool. A while back, I made a video about Abiathar's New Project Wizard that includes a section on opening Dead in the Desert as an example. (Please excuse my overenthusiastic commentary.) If you run into any trouble opening a mod, just let me know and I'd be happy to provide the appropriate NPW settings.

Happy modding!
User avatar
Nisaba
Posts: 320
Joined: Fri Jan 01, 2016 11:15 pm
Location: patch.pat
Contact:

Re: Editing levels for mods (Galaxy)?

Post by Nisaba »

...and it might be a good idea to get used to Abiathar (level editor) before you move on in order to tweak graphics and stuff. there are many things one can do, but remember: one step at the time. otherwise, if you try to do too much at once you might get overwhelmed. that being said, working with Abiathar is so much fun, you gonna enjoy it!

out of curiosity: please tell us a bit more about your 'Legendary mode'.
Cel
Posts: 7
Joined: Sun Dec 03, 2017 6:29 pm

Re: Editing levels for mods (Galaxy)?

Post by Cel »

Fleexy wrote: Sun Dec 03, 2017 6:58 pm Snip
This looks very helpful, there's only a few things I can't seem to figure out. The first is when I place entities (ie. creatures) it places a black tile behind them as well, whereas existing entities don't seem to have that there. I'm not sure if its a layer issue or what. The other thing is I'm not entirely sure how I export the maps for playing. I know you have to update the maphead, but I'm not entirely sure about the process of that.
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Re: Editing levels for mods (Galaxy)?

Post by Fleexy »

Ah, indeed, plane management is the issue here. Since all three planes are Active and the default tile for each plane is the zero tile, the background and foreground got overwritten with blankness. You can use the 1 through 6 keys on your keyboard to manage plane state. For example, pressing 1 toggles the background between Active and Locked, which keeps it visible but not editable. 2 does that for the foreground, 3 for the infoplane. 4 through 6 toggle visibility. For an intro to Abiathar, see this video (don't worry about the project setup or patch emission, since you already have the NPW handled and the mods already have suitable patching equipment).

Since Abiathar reads and writes the native game formats directly, all you need do to export your changes is click File | Save (or tap S). Then you're ready to play!
Cel
Posts: 7
Joined: Sun Dec 03, 2017 6:29 pm

Re: Editing levels for mods (Galaxy)?

Post by Cel »

It worked, thanks a million!

My only last question, I ran into one mod which I'm unable to open. The Commander Keen 4 mod Terror from Outer Space. It couldn't locate the correct type of level files.
User avatar
Nisaba
Posts: 320
Joined: Fri Jan 01, 2016 11:15 pm
Location: patch.pat
Contact:

Re: Editing levels for mods (Galaxy)?

Post by Nisaba »

here you go: https://www.dropbox.com/s/mtpm9obsb47kw ... adeps?dl=1
simply paste the file into the mods folder and open it with Abiathar [File | Open (or tap O)]. else, Fleexy will surely tell you how to do things manually.

happy modding
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Re: Editing levels for mods (Galaxy)?

Post by Fleexy »

Ah, I can see how that mod would be confusing to open. There are quite a few extra levels-related files, most of which are artifacts of various level editors and not necessary for gameplay. The correct level files are GAMEMAPS.CK4 and MAPHEAD.CK4. Trying to load others would likely result in a mismatch between the main map file and the map header, and Abiathar would not be able to proceed. Sometimes a mod's patch file can help clarify what files are relevant; other times it's tricky. Fortunately, there are plenty helpful people like Nisaba around to work things out!
Cel
Posts: 7
Joined: Sun Dec 03, 2017 6:29 pm

Re: Editing levels for mods (Galaxy)?

Post by Cel »

Thanks for the information. Another question though!

When modding Keen 8 (Dead in the Desert), I came across an issue when placing the 'snoz' (Bobba replacement) in some levels. I'd get an error that says there is an uncached sprite (usually 428 or 430). This is weird because it only happens in some levels, and not others. I was wondering if there was something else it was relying on which happened to be in the other levels which I'm aware of.
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Re: Editing levels for mods (Galaxy)?

Post by Fleexy »

Oh, that's tricky. Due to some patching used in that mod, the Bobba replacement relies on some sprite frames that are provided (cached) by a different sprite, specifically the Bip-controlled platform. You can read more about sprite caching on KeenWiki. To avoid the crash, add a yellow-arrow-path-following platform to the level. In the original mod, for example, Lava Lake has one hidden in the middle of the bottom map edge at (103, 44).
Cel
Posts: 7
Joined: Sun Dec 03, 2017 6:29 pm

Re: Editing levels for mods (Galaxy)?

Post by Cel »

Got a new inquiry!

Got around to touching Terror from Outer Space and I noticed right away that if I ever modify a level then save, I get a crash when starting a new game that says "RF_NewMap: Map too tall!". Not sure what the meaning of this is. I also noticed I can't find the world map in the levels list.
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Re: Editing levels for mods (Galaxy)?

Post by Fleexy »

Ah, this one is particularly tricky. Apparently this mod uses nonstandard Carmackization (the process that converts from TED5-style MapTemp maps to GameMaps), and it ends up placing the header for the world map (level 0) at the beginning of the GameMaps file. The beginning is position 0, which in the MapHead usually means "level doesn't exist", so Abiathar thinks there is no level 0, so using it to resave the levels effectively deletes level 0, which causes the game to hit junk memory and keel over when it tries to load that level. I'll have to see about improving the heuristics that distinguish "level at position zero" from "no level zero." In the meantime, you can start from these level files that I tweaked with a hex editor.
Cel
Posts: 7
Joined: Sun Dec 03, 2017 6:29 pm

Re: Editing levels for mods (Galaxy)?

Post by Cel »

Thanks for that! I appreciate it.

I don't mean to be a pain, but I've got one that really confused me. When beating a station level on Keen 9 Battle of the Brains (the Ice Station in this case), I get this weird crash:
https://i.gyazo.com/eb170a9ee1523d3f4df ... 42c5cd.png
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Re: Editing levels for mods (Galaxy)?

Post by Fleexy »

Interesting. Does that only happen in modified levels? Does the crash still happen on Easy difficulty? It's possible the game is running out of memory from too many sprites. (The Level Inspector tool might have some insight here.)
Cel
Posts: 7
Joined: Sun Dec 03, 2017 6:29 pm

Re: Editing levels for mods (Galaxy)?

Post by Cel »

I haven't tested on other difficulties, as I can't seem to use cheat codes in Keen 9, meaning it's hard to get back to a specific level at times. It only happens once I save the project files on the level though.
Post Reply