xMod - A level editor for Xargon
xMod - A level editor for Xargon
I have been asked if it would be possible to edit Xargon levels in jMod, my level editor for the Jill of the Jungle series (and Onesimus). Xargon differs a bit from Jill, both in terms of the level file format and also the enemy code. The objkind to sprite mapping code in jMod wouldn't work for Xargon at all.
So I ended up creating a modified version of the editor that works for Xargon (but not Jill).
Here is xMod: Download
The download link will expire after 30 days of inactivity. If the file doesn't get a single download for 30 days in a row, it will be deleted. Feel free to re-upload this file anywhere, pass it to all your friends, copy it onto a floppy disk and sell it via mail order or whatever else you can think of.
I have bundled the editor with two bonus gimmicks:
1. Two command-line CMF music players for DOS that play CMF files exactly like certain versions of Jill and Xargon would play them. These might be useful for letting your composers hear what their music will sound like in the game. And they're useful if you just want to listen to the game's music without playing the game, of course.
2. Compiled executables for all three volumes of Xargon, with the built-in editor enabled. This also includes a step-by-step guide for how to compile the Xargon source code yourself, so that you can modify the level messages much more freely (and add more than the default 16 messages if you want) instead of hex-editing the executable to overwrite the original level messages.
I still have a couple of ideas for features that I'd like to implement in the future, like an option to scan the object links for triggerable objects that aren't linked to any triggers or triggers that aren't linked to any triggerable objects. And I guess being able to edit the shape file (graphics), the tile info file (tile attributes) and the voc file (digitized sounds and text messages) would be nice as well.
Disclaimer:
I am not exactly the world's biggest Xargon fan. I haven't even finished a full playthrough of any of the original volumes yet. My knowledge comes mostly from reading the source code, not from playing the game. If there are any bugs in the editor, let me know and I'll try to fix them.
I had not played Xargon before it was released as freeware, so I have no nostalgia for it. And I have to say that I don't think it is a particularly good game. For example, some things that can fire projectiles will do so purely based on random chance without any visible indication that a shot is about to be spawned. There is no pattern to it that you can learn to avoid getting shot, it's just random. The weird mercy invincibility system that only protects the player from taking additional damage from the object that just hit the player, but not from other objects, makes this even worse. It means getting shot by 3 projectiles at the same time will take away 3 points of health at once. This system was okay for Jill, since most of the enemies (except for the demon) don't spawn any projectiles in that game and Jill has more health than Malvineous does (8 instead of 5). The ability to use emeralds to buy temporary invincibility helps a bit, but only if you know what's coming and you save your emeralds for the more frustrating levels. It probably wasn't possible to foresee in 1993/1994 what the industry would degenerate into over the next three decades, but I couldn't help feeling that if the game was released today, it would probably try encourage players to buy in-game emeralds for real money.
I also don't like the fact that you cannot save at all when you're not on the map level. If you enter a level and cannot beat it before you have to quit the game for real life reasons, you are forced to lose all of your progress if you didn't save your game before you entered the level. Jill allowed you to save at any time in any level, so why can't Xargon?
So I ended up creating a modified version of the editor that works for Xargon (but not Jill).
Here is xMod: Download
The download link will expire after 30 days of inactivity. If the file doesn't get a single download for 30 days in a row, it will be deleted. Feel free to re-upload this file anywhere, pass it to all your friends, copy it onto a floppy disk and sell it via mail order or whatever else you can think of.
I have bundled the editor with two bonus gimmicks:
1. Two command-line CMF music players for DOS that play CMF files exactly like certain versions of Jill and Xargon would play them. These might be useful for letting your composers hear what their music will sound like in the game. And they're useful if you just want to listen to the game's music without playing the game, of course.
2. Compiled executables for all three volumes of Xargon, with the built-in editor enabled. This also includes a step-by-step guide for how to compile the Xargon source code yourself, so that you can modify the level messages much more freely (and add more than the default 16 messages if you want) instead of hex-editing the executable to overwrite the original level messages.
I still have a couple of ideas for features that I'd like to implement in the future, like an option to scan the object links for triggerable objects that aren't linked to any triggers or triggers that aren't linked to any triggerable objects. And I guess being able to edit the shape file (graphics), the tile info file (tile attributes) and the voc file (digitized sounds and text messages) would be nice as well.
Disclaimer:
I am not exactly the world's biggest Xargon fan. I haven't even finished a full playthrough of any of the original volumes yet. My knowledge comes mostly from reading the source code, not from playing the game. If there are any bugs in the editor, let me know and I'll try to fix them.
I had not played Xargon before it was released as freeware, so I have no nostalgia for it. And I have to say that I don't think it is a particularly good game. For example, some things that can fire projectiles will do so purely based on random chance without any visible indication that a shot is about to be spawned. There is no pattern to it that you can learn to avoid getting shot, it's just random. The weird mercy invincibility system that only protects the player from taking additional damage from the object that just hit the player, but not from other objects, makes this even worse. It means getting shot by 3 projectiles at the same time will take away 3 points of health at once. This system was okay for Jill, since most of the enemies (except for the demon) don't spawn any projectiles in that game and Jill has more health than Malvineous does (8 instead of 5). The ability to use emeralds to buy temporary invincibility helps a bit, but only if you know what's coming and you save your emeralds for the more frustrating levels. It probably wasn't possible to foresee in 1993/1994 what the industry would degenerate into over the next three decades, but I couldn't help feeling that if the game was released today, it would probably try encourage players to buy in-game emeralds for real money.
I also don't like the fact that you cannot save at all when you're not on the map level. If you enter a level and cannot beat it before you have to quit the game for real life reasons, you are forced to lose all of your progress if you didn't save your game before you entered the level. Jill allowed you to save at any time in any level, so why can't Xargon?
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
http://k1n9duk3.shikadi.net
Re: xMod - A level editor for Xargon
Oh wow! I'm also not a huge Xargon fan, but I'm gonna check this out! Thanks for this surprise release. Not sure yet, if I'm gonna make anything out of it though. But we'll see. I have to say that I enjoyed the Xargon Uncharted Isle mod and that it motivates me to check out what's possible and what not. That mod is definitely more easier and enjoyable than the original games, so you might find it more enjoyable as well.
Re: xMod - A level editor for Xargon
Uncharted Isle is the only Xargon game I've finished, so yes, it's definitely worth checking out.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
http://k1n9duk3.shikadi.net
Re: xMod - A level editor for Xargon
This is huge for Xargon modding! I am very interested to dig into all of this. Thank you as well for enabling the editor in Xargon episode 2 and 3. As I understand from talking with the original dev and from experience, there are some differences in graphics between the episodes, such as objects/enemies whose graphics only exist in ep 2 or 3, and while the ep1 editor enabled you to place those enemies in your custom level, they would be invisible or have corrupted graphics when played using the ep 1 executable.
I am going to disseminate this further so it can reach people who may be interested, as the Xargon fanbase and fans of the old epic games are these days, fairly unorganized and spread across many places such as Facebook groups, discord chatrooms, YouTube channels, etc.
I am also eager to check out the guide for setting up a compilable tool chain. I am not a programmer but I did give this a shot when working on uncharted isle to give more control over editing text such as the journal entries, but was not successful with my casual efforts. It seems to me, if someone has the ability to make custom in-level events with text such as the journal entries or the conversations with the eagle that occur in the regular game levels, it would be possible to add those elements to a series of custom levels/mod of the game that flow into each other without an over world map, and to make something that feels more like a story driven metroidvania a la Cave Story. That is a concept I would like to explore in a potential future mod.
I am going to disseminate this further so it can reach people who may be interested, as the Xargon fanbase and fans of the old epic games are these days, fairly unorganized and spread across many places such as Facebook groups, discord chatrooms, YouTube channels, etc.
I am also eager to check out the guide for setting up a compilable tool chain. I am not a programmer but I did give this a shot when working on uncharted isle to give more control over editing text such as the journal entries, but was not successful with my casual efforts. It seems to me, if someone has the ability to make custom in-level events with text such as the journal entries or the conversations with the eagle that occur in the regular game levels, it would be possible to add those elements to a series of custom levels/mod of the game that flow into each other without an over world map, and to make something that feels more like a story driven metroidvania a la Cave Story. That is a concept I would like to explore in a potential future mod.
-
- Meep
- Posts: 1
- Joined: Sun Sep 01, 2024 3:30
Re: xMod - A level editor for Xargon
K1n9_Duk3, Wie geht's? Thank you so much for creating this. A friend of mine told me about it and I'm excited to try it out. I really appreciate it.
-Allen Pilgrim, Game Designer/Programmer of Xargon
-Allen Pilgrim, Game Designer/Programmer of Xargon
Re: xMod - A level editor for Xargon
If you load the BOARD_07.XR1 from Uncharted Island mod, there's a tile called "FIXME". But if you press 1 to activate the grid and move the camera to see it, the editor crashes:
When you play that level, there's that weird glitching block in the game. Perhaps it's a tile from episode 2 or 3?
When you play that level, there's that weird glitching block in the game. Perhaps it's a tile from episode 2 or 3?
Re: xMod - A level editor for Xargon
I have mirrored XMod on Archive.org so the download may be available for longer than the link to the filesharing site in K1n9_Duk3's post. https://archive.org/details/xmod_1000/
I have investigated this tile in the old editor and there is nothing in particular that looks wrong about it when viewed in that editor. However, I think I found out today what could be the cause of this - there is a quirk in the old editor, where if you go to place a tile (hit enter to place a tile) and then instead of entering a valid number for a tile (every tile in the game has a specific number, such as 313 or 257) - you leave that field blank and then hit enter again to place the tile, you wind up with some corrupted graphics that look like this:
Anyone who has played around with the old editor will come across this at some point as it happens every time you try to place a tile without entering a numerical value. Since you enter the add tile menu as simply as pressing enter, it is easy to accidentally enter the add tile menu and then try to back out of it and wind up leaving these corrupted tiles (this happened periodically when working on my levels). Generally, once these corrupted tiles are laid down, you can get rid of them by moving the cursor over them with the arrow keys, or by copying and pasting some other tiles over them. I just did a test of laying these corrupted graphics into a level, saving it, and then playing the level, which resulted in a flickering tile identical to how the corrupted tile in the cave looks. In my test case, the new corrupted tiles I laid did not show up with the fixme flag in the new editor, but I'm willing to bet that is how the corrupted fixme tile winds up in Board_07 of my mod, that I accidentally put down some corrupted tiles like these and didn't fully clean them up.
Very interesting Roobar. K1n9_Duk3 just pointed this out to me recently. I actually did not notice this sketchy tile until the mod was done and I was watching someone's youtube playthrough of it. I don't think the tile always flickers when its on screen. I do not think it is an episode 2 or 3 tile, because in my experience, Xargon episode 1 seemed to contain all scenery/platform tiles used in episode 2 and 3 (but ep 1 does not include all of the ep 2/ep 3 objects such as monsters).
I have investigated this tile in the old editor and there is nothing in particular that looks wrong about it when viewed in that editor. However, I think I found out today what could be the cause of this - there is a quirk in the old editor, where if you go to place a tile (hit enter to place a tile) and then instead of entering a valid number for a tile (every tile in the game has a specific number, such as 313 or 257) - you leave that field blank and then hit enter again to place the tile, you wind up with some corrupted graphics that look like this:
Anyone who has played around with the old editor will come across this at some point as it happens every time you try to place a tile without entering a numerical value. Since you enter the add tile menu as simply as pressing enter, it is easy to accidentally enter the add tile menu and then try to back out of it and wind up leaving these corrupted tiles (this happened periodically when working on my levels). Generally, once these corrupted tiles are laid down, you can get rid of them by moving the cursor over them with the arrow keys, or by copying and pasting some other tiles over them. I just did a test of laying these corrupted graphics into a level, saving it, and then playing the level, which resulted in a flickering tile identical to how the corrupted tile in the cave looks. In my test case, the new corrupted tiles I laid did not show up with the fixme flag in the new editor, but I'm willing to bet that is how the corrupted fixme tile winds up in Board_07 of my mod, that I accidentally put down some corrupted tiles like these and didn't fully clean them up.
Re: xMod - A level editor for Xargon
Mir geht's gut, danke. Thanks for your kind words. I hope you'll have some fun playing around with it.malvineous999 wrote: ↑Sun Sep 01, 2024 3:37 K1n9_Duk3, Wie geht's? Thank you so much for creating this. A friend of mine told me about it and I'm excited to try it out. I really appreciate it.
-Allen Pilgrim, Game Designer/Programmer of Xargon
That image looks more like the editor is placing a tile that hat t uses the vga palette image for the main game. The palette is stored as an image in the shape file and the "empty" tile slots use this image by default. The empty tile slots also don't have a name, which means entering no name when selecting a tile in the game's editor will select one of the empty tile entries. You will see the same image several times in the tileset in xMod.
The FIX ME tile is something else. The tile number placed in the level is outside the tile info range. The tileinfo file only contains information for 900 tiles in Xargon. This level used to crash xMod in any draw mode, which is why I made the editor display a FIX ME image for these tiles. Looks like I forgot to make it work with the tile attribute display. I'll fix that for the next version.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
http://k1n9duk3.shikadi.net
Re: xMod - A level editor for Xargon
I'm playing around with the editor and it is fantastic. One thing that confused me a bit when creating Uncharted Isle is whether the color used for the sky can be edited or if that is hard coded. For instance, Board01 of ep 1 features a blue sky, but Board05 features a red sky with the same tiles. I think in some of my discussions with Allen, this might have been something that is actually hard coded into the game, so if you want a red sky, you should edit Board05 that is already flagged in the code to feature one... But just checking if I'm right or if that palette change for these tiles is something that is editable in the new editor? [EDIT: never mind, I found the answer in the instructions, which are great btw. Yes, the sky can be changed by the user via the invisible Effects object, which can generally be found in all of the original levels immediately beneath where the player rises out of the ground.]
Re: xMod - A level editor for Xargon
So I've made like 1/4 level or less and already ran into a memory problem. The game crashed with that error:
"Sorry, error <9> has occurred.
Problem: Not enough free RAM to run Xargon."
Sorry, I think I'm done with Xargon modding. Not fan of some tiles collisions and tiling anyway.
"Sorry, error <9> has occurred.
Problem: Not enough free RAM to run Xargon."
Sorry, I think I'm done with Xargon modding. Not fan of some tiles collisions and tiling anyway.
Re: xMod - A level editor for Xargon
I would enjoy playing around with your draft to make it work. I see nothing that out of the ordinary with it and I think a few small tweaks would fix the ram issue. Please feel free to send it to me to play with.
When working on my levels I discovered that combining tiles from certain different scenery types were more likely to result in the out of RAM error. Running out of ram was much more related to the diversity of tiles in a level than the actual size of the level with a caveat... it wasn't simply a matter of, "oh there are 40 different tiles in the level that's too much", it was more like, "oh, I have tiles from the grass/dirt set, the beach set and the cave set, and if I get rid of the tiles from the cave set and replace them with tiles from the grass/dirt set (even if it is new types of tiles from that set I hadn't already used in the stage) then that would solve the ram issue. Over time I got this feeling that Xargon's tiles are arranged within groups, and that if you put in even only one tile from that group, then the whole group is loaded into ram when loading the level. For instance, I had a level where I used a few pieces from the roman column scenery, and when troubleshooting ram issues, simply removing those few pieces from the roman column scenery fixed everything... That's not to say you can't combine scenery from different areas of the game and must make only simple levels... the original game combines scenery in several levels (e.g., grass/dirt and cave tiles in ep2 lv1), as do several levels in my mod... its just that it might fix the ram issues to do a little bit less of that than you otherwise would be inclined to, and to look for ways to do less of it if you are getting the ram error.
For the draft level in your picture, I have a hunch that simply changing the grass topper on your dirt areas from the particular one you chose that is used in later stages in episode 3 only, to the grass topper that is usually associated with those dirt tiles (the one used in ep 1 level 1) might fix things. If there's still an issue, I would either: (a) remove the cracked stone horizontal area under the small red fish, and replace it with the stone tiles that are on either side of that pool instead, or, more drastically, (b) remove the sand related tiles and replace them with tiles from the dirt set, and see if that fixes the ram issue. For what its worth, I didn't have good luck mixing the sand tiles and the dirt tiles in the same level (that seemed to give me the ram issue), yet ep 1 lv 3 of the original game does it, so it should be possible subject to some constraints.
When working on my levels I discovered that combining tiles from certain different scenery types were more likely to result in the out of RAM error. Running out of ram was much more related to the diversity of tiles in a level than the actual size of the level with a caveat... it wasn't simply a matter of, "oh there are 40 different tiles in the level that's too much", it was more like, "oh, I have tiles from the grass/dirt set, the beach set and the cave set, and if I get rid of the tiles from the cave set and replace them with tiles from the grass/dirt set (even if it is new types of tiles from that set I hadn't already used in the stage) then that would solve the ram issue. Over time I got this feeling that Xargon's tiles are arranged within groups, and that if you put in even only one tile from that group, then the whole group is loaded into ram when loading the level. For instance, I had a level where I used a few pieces from the roman column scenery, and when troubleshooting ram issues, simply removing those few pieces from the roman column scenery fixed everything... That's not to say you can't combine scenery from different areas of the game and must make only simple levels... the original game combines scenery in several levels (e.g., grass/dirt and cave tiles in ep2 lv1), as do several levels in my mod... its just that it might fix the ram issues to do a little bit less of that than you otherwise would be inclined to, and to look for ways to do less of it if you are getting the ram error.
For the draft level in your picture, I have a hunch that simply changing the grass topper on your dirt areas from the particular one you chose that is used in later stages in episode 3 only, to the grass topper that is usually associated with those dirt tiles (the one used in ep 1 level 1) might fix things. If there's still an issue, I would either: (a) remove the cracked stone horizontal area under the small red fish, and replace it with the stone tiles that are on either side of that pool instead, or, more drastically, (b) remove the sand related tiles and replace them with tiles from the dirt set, and see if that fixes the ram issue. For what its worth, I didn't have good luck mixing the sand tiles and the dirt tiles in the same level (that seemed to give me the ram issue), yet ep 1 lv 3 of the original game does it, so it should be possible subject to some constraints.
Re: xMod - A level editor for Xargon
The game's shape manager groups some images together and has to load all images of that group at the same time. That's why using two tiles from different groups makes a big difference. Pay attention to the shape number displayed in xMod when you move the mouse over a tile. The first two hex digits are the group number, the last two hex digits are the image number inside that group. You should try not to use too many tiles from different groups.
Enemy variety can also be a factor. You really need to limit yourself to very few different enemy types for each level. On the plus side, you can use up to 256 objects in a level, so you can have many enemies of the same type without using up any extra memory.
- - -
Bug warning:
I noticed that the editor will display the wrong sprites for the boxes that contain red or green keys. The box with a red key will show a green key and the box with the green key will show a red key. This will also be fixed in the next release.
Enemy variety can also be a factor. You really need to limit yourself to very few different enemy types for each level. On the plus side, you can use up to 256 objects in a level, so you can have many enemies of the same type without using up any extra memory.
- - -
Bug warning:
I noticed that the editor will display the wrong sprites for the boxes that contain red or green keys. The box with a red key will show a green key and the box with the green key will show a red key. This will also be fixed in the next release.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
http://k1n9duk3.shikadi.net
Re: xMod - A level editor for Xargon
I knew it! That explanation is helpful for debugging. Beats the wild guess method I've been using in any caseK1n9_Duk3 wrote: ↑Wed Sep 04, 2024 8:41 The game's shape manager groups some images together and has to load all images of that group at the same time. That's why using two tiles from different groups makes a big difference. Pay attention to the shape number displayed in xMod when you move the mouse over a tile. The first two hex digits are the group number, the last two hex digits are the image number inside that group. You should try not to use too many tiles from different groups.
Re: xMod - A level editor for Xargon
Maybe you could add WASD movement in the next version as well.
Re: xMod - A level editor for Xargon
I have found a relatively easy way to make the game much less likely to crash when loading some of the more memory-demanding levels. It requires a source code change and new executables, but it'll make modding Xargon much less frustrating. I will include the modified source files and new executables in the next version of the editor.
I can add WASD movement, that's easy.
I can add WASD movement, that's easy.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
http://k1n9duk3.shikadi.net