6622dd993ee30

6622dd993f33c
1 Guest is here.
 

6622dd993fd8chank morgan

6622dd993fdf5
https://github.com/hankmorgan/UnderworldExporter for code and sample map releases.

So this is a tool I've been working on that converts Ultima Underworld and System Shock level maps into .map files. .Map being the format used by IDTech4 (Doom3 and The Dark Mod). I've been documenting my progress with the tool in this thread over at the Dark Mod forums and it was suggested I cross post my work over here for anyone who might be interested.

At the moment the tool does the following.
-Extract and generate level geometry (DarkMod/Doom3 .map format) from Underworld 1&2 and from System Shock
-Pull back object lists from Underworld and spawn place-holder NPC's and objects in the level (Underworld 1 only)
-Texture an entire level using stock DarkMod textures (hard coded at the moment)
-Extract Underworld Textures
-Extract Underworld strings
-Dump various ASCII info tile-maps such as tile types, height maps and object lists (object support for UW at the moment).

I have only tested the maps with the Dark Mod but since the Dark Mod is an offshoot of Doom3 then I would assume that with the correct texturing the .map files would also work with Doom3.

The idea for it grew out of an experiment I did with the Dark Mod and with an old map viewer that allowed you to export the level geometry of Ultima Underworld into a vrml 1.0 file and and with a few intermediate steps you could import the level into Dark Mod level editor. That method however was too cumbersome so after diving into the uw-formats.txt and ss-specs.txt files and a bit of cribbing from various UW/Shock projects I was able to bash this tool together. The tool is still a bit user unfriendly at the moment so you'll have to compile your own version (I'm using VS 2005) with your own file paths and parameters yourself.

Here are some screen-shots to give you an idea of what the tool does so far. There are more shots over in the DarkMod thread. Note that everything you see is automatically generated except for the lighting and the player start position.
Image: http://www.imagebam.com/image/a3919a289663265
Image: http://www.imagebam.com/image/c6895e289663208
Image: http://www.imagebam.com/image/a99ec8289663215

Shock screen-shots with ugly default texturing.
Image: http://i.minus.com/iP2YGscJ81k8x.jpg
Image: http://i.minus.com/igaCYGKuaruAt.jpg
Image: http://i.minus.com/ib0rjLGePT33u4.jpg

I have mainly being focused on Underworld and I have only recently added support for System Shock so that side of the tool is still a bit bare-boned but I hope to expand on it in the near future.

Downloads (code and sample levels)
Latest code release is at http://www.mediafire.com/download/3sq85v8i6k7cz4t/Underworld%20Exporter%2020131130.zip (30/Nov/2013). Texturing is currently geared towards UW1 levels may randomly have nodraw textures in them. The next release will pass off texture lookups to a file.
 
I have obviously drawn from previous projects including some from this site. I give credit to those projects in the "code credits.txt" file with the code and extend my gratitude to anyone who has contributed to those projects down the years.

Latest version of Underworld Level 1 http://www.mediafire.com/download/dyxr5x4101lt7g8/Uw0.zip

Latest version of Shock hospital level http://www.mediafire.com/download/6nc6qu5ge4pu2po/shock_lvl1.zip

This beginner's guide to dark mod editing should be able to guide you through getting the maps running in game

If you have any questions or constructive criticism I would be happy to answer and hear what you have to suggest.
« Last Edit: 24. August 2016, 18:06:20 by Kolya »

6622dd993ff70xdiesp_

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd993ffde
Wow, that looks great. Well done!
Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9940123
I'm not sure where this project will end up, but it seems very interesting.

6622dd9940215Judicator

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd994026b
Wow! Thanks.

6622dd994059bhank morgan

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9940601
Okay. I haven't done too much on the System Shock side of the program since I posted last but I have been concentrating on the Underworld 1 side of things but hopefully when I return to SS1 the work I did with UW will carry forward. Basically what I have done since is stuff with customisable object properties and textures. I now define each object in a config file and use that to tell the tool how to handle the object. So far I have coded AIs, doors, keys, bridges, containers, working door switches, wall decals and for the rest I currently use a place-holder model. Texturing config is just a mapping of which texture I should use (and it's alignment) for which particular index of the master texture list I need. The fun upshot of doing that is that I now have a "retro mode" config file where I use the original game textures. I've only set up the table for UW1 so far but I see no reason why a similarly formatted table won't just work straight away for SS1.

I've attached the latest version of my code.

Image: http://i.imgur.com/19V1LwO.jpg
Image: http://i.imgur.com/kV4jrAW.jpg
Image: http://i.imgur.com/dcgVRvn.jpg
Image: http://i.imgur.com/fhVW0pC.jpg
Image: http://i.imgur.com/1tkxRkV.jpg
Image: http://i.imgur.com/aFmlYD5.jpg


[Underworld Exporter 20131208.zip expired]

6622dd99407b5icemann

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9940808
And this is why I love the internet. Projects like this one :).
Acknowledged by: RocketMan
Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd994098a
Excellent work! UU and SS in IDTech4 would be absolutely great one day, and fully modifiable!

Keep it up man.

6622dd9940b0fhank morgan

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9940b61
I've mainly been working on the Underworld side of things and made a fair bit of progress on that end with automatic scripting of level events and triggers. I decided to take a break from that and return to the System Shock side of things and get textures working with that as shown in the attached screen-shots. There are still a good few weird things I need to fix with some texture adjacency flags and alignments but I'll take the small victories when I can.





« Last Edit: 30. December 2013, 18:45:17 by Kolya »
Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9940f19
on that end with automatic scripting of level events and triggers.

Am I in the virtual presence of a genius? :)

6622dd99411f3Drone-Dragon

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9941243
Am I in the virtual presence of a genius? :)

Actually, if I have read this correctly, if Hank has created a program that can auto-script a game by taking the script from the old dos version and applying the script to the new windows version, or even old windows games to modern windows versions, this guy REALLY needs to make money off of this. This, as you said, is pure GENIUS. This could be a way to ease the process of remaking old games to work on modern systems.

 :stroke: You should be :proud: Hank!

6622dd9941340icemann

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd994138c
Have to say, I completely agree. Looking at the screenshots.

As far as Underworld / System Shock 1 projects go. This ones pretty damn advanced.

Though I foresee things getting difficult once things get onto implementing enemies and on the SS1 end, cyberspace. Decorations (ie tables, desks, lamps etc etc) shouldn't be hard in theory.

Either way, I eagerly look forward to future updates.

First SS1 related project since TSSHP and the Citadel conversion to have me half excited.

6622dd99419eahank morgan

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9941a7f
Actually, if I have read this correctly, if Hank has created a program that can auto-script a game by taking the script from the old dos version and applying the script to the new windows version, or even old windows games to modern windows versions, this guy REALLY needs to make money off of this. This, as you said, is pure GENIUS. This could be a way to ease the process of remaking old games to work on modern systems.

 :stroke: You should be :proud: Hank!

Not exactly. I explained how I do this over in the Dark Mod forums thread. Basically in Underworld (and I think in SS1 as well) level events are carried out by a system of triggers and traps. So for instance if you pull a lever that sets off a trigger which in turn sets off a trap which can set off a whole chain of other triggers and traps. All of these triggers and traps are in game objects and are no different from any visible object in a level so I can just export that list of triggers/traps into a list in the following format for each particular set.
Code: [Select]
588    366       special_tmap_obj    52    12    3    7    96    0    40    152    586    0
{
586    419         a_look_trigger    -1    -1    3    3    3    0    52    13    587    6
587    389    a_change_terrain_trap    52    13    0    0    96    0    23    63    620    1
620    400      a_text_string_trap    -1    -1    0    0    96    0    4    2    585    0
585    395    a_delete_object_trap    -1    -1    0    0    0    0    52    12    588    0
}
That is the sequence of events and properties in Underworld for activating a wall which changes the state of some terrain, gives you a text message in the log, and finally deletes the wall you activated. I can then parse this sequence in to the c like script language used by D3.
Code: [Select]
void start_special_tmap_obj_052_012_588()
{
$a_change_terrain_trap_initial_052_013_587_000.remove();

$a_change_terrain_trap_final_052_013_587.show();

sys.println("You move the vines aside...");

$special_tmap_obj_052_012_588.hide();
}

At the moment I've implemented Underworld traps that delete objects, activate cameras, check and set variables, open locks and doors, raise moving platforms, hide and reveal blocks of terrain that occupy the same space and string messages and teleports for both within a level and moving between levels (no persistence yet).

Though I foresee things getting difficult once things get onto implementing enemies and on the SS1 end, cyberspace. Decorations (ie tables, desks, lamps etc etc) shouldn't be hard in theory.

Yeah. I haven't even considered things from a game-play point of view and I haven't a clue how to extract original models from the games so I just use place-holder models. At this stage I'll just be very happy to build something that forms a solid modders resource.

I fixed most of the broken texturing from what I posted yesterday and once I fix alignments on sloped tiles and texture height offsets I'll share the current version of the level and my up to date code.

6622dd9941be7icemann

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9941c3b
Enemy models, AI and gameplay are things that are best left till the end anyway.

I've done some earlier projects of similar-ish type stuff. Though mine was all from the ground up programming from scratch in C++ in my own engine and not in an existing one and was of just NES and Atari 2600 games, so I completely get the process from a development perspective of starting from the beginning, taking out the tasks 1 by 1.

Of note I followed a very similar process that from reading your dev notes here and on the other forums you appear to go by of attacking each level one by one.

I would go in the order of:

1. Converting over texture related graphics (in my case it was tile based 2d stuff)
2. Sprites (enemies, items and objects)
3. Sounds
4. Setting up some sort of test environment for the intended level
5. Coding up the AI for the enemies
6. Coding up the unique game elements for that level
7. Developing music or porting over the music used in the original game
8. Fully develop the intended level

Then take a break for a few weeks, then move onto the next level. Worked for me.

6622dd9941e87hank morgan

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9941edb
Annoyingly vertical texture alignments in Shock are getting the better of me. The solution is probably very simple. The SS-specs.txt mention a texture offset but does not mention what it is offsetting from (the ceiling, floor, or the absolute max height of the level?). I have some code that changes the vertical offset ratio of the texture based on that value but it only works for about half the textures. It's not a major problem and I'm just missing something obvious but it's annoying to see things out of place. Regardless I've made some progress in getting out a big dump of game strings (including logs) so when I start implementing objects in a few weeks I'll have a handy road map for knowing exactly what I'm looking at.

I've also set up a github repository for my code at https://github.com/hankmorgan/UnderworldExporter
I've also included maps - level 1 of Underworld and Hospital level of shock on that site along with the assets needed to load them. I've only tested using DarkMod's Dark Radiant editor so no guarantees it will work with Doom3's tools. Just copy all the files in the sample maps folder to your installation. In game open a console and type dmap [mapname] and once that has finished processing type map [mapname] to load the level or just open them in Radiant just to look at them.
Acknowledged by: Briareos H
Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd994206b
Sorry I've missed this project before.

Very promising and extremely interesting! Thanks for sharing, hank morgan!

6622dd9942154xdiesp_

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd99421a5
Don't give up Hank, this thing rocks. :D

6622dd99422d1voodoo47

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd994232d
yeah, as mentioned before, "play a fully working SS1 opengl port/remake" is on my "to do before I die" list.

6622dd994245chank morgan

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd99424ac
Thanks for the encouragement.

I've fixed the vertical texture alignment issue to my satisfaction. As well as that I've managed to add support for the really tall levels in the game which I had a feeling was going to bite me in the ass later on since I had previously used a fixed height for the absolute top ceiling of the level. Luckily I was able to copy the Abysmal project solution to that issue so I'm happy to report that the level geometry and texturing is looking okay except for a few edge cases and slopes that should be easy enough to resolve down the line. I've also opened up some Cyberspace levels in the tool and they look okay except for the wrong textures but I assume that's down to how cyberspace is a different mode in SS1.

6622dd9942556icemann

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd99425a4
Treat that as more of a flight sim mode, than standard fps.

6622dd994263cJudicator

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9942689
Wow! Looks promising, please keep up.
Thanks.

6622dd9942749hank morgan

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd99427a2
Here's a screenshot gallery of a few other levels

http://imgur.com/a/iJiux#0

6622dd9942838icemann

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9942893
Very nice

6622dd994295ffranz4ever

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd99429c9
This is looking very good! Love both games, keep up the great work and thank you!
Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
6622dd9942ce6
Hey, nice work.

A question though - why do you do this?
Code: [Select]
#ifndef gameobjects_h
        #define gameobjects_h
        #include "gameobjects.h"
#endif
Usually the guard is placed in the include file itself, not in the files including it.
1 Guest is here.
Through the looking glass, nothing is what it seems.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6622dd994380b