673f33d5f0a62

673f33d5f18ac
2 Guests are here.
 

673f33d5f22a5hank morgan

673f33d5f230c
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 »

673f33d5f244exdiesp_

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

673f33d5f2618Judicator

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

673f33d5f28e3hank morgan

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
673f33d5f2933
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]

673f33d5f2a85icemann

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
673f33d5f2ad0
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.
673f33d5f2c0b
Excellent work! UU and SS in IDTech4 would be absolutely great one day, and fully modifiable!

Keep it up man.

673f33d5f2d3dhank morgan

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
673f33d5f2d87
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.
673f33d5f30bb
on that end with automatic scripting of level events and triggers.

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

673f33d5f32dfDrone-Dragon

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
673f33d5f3332
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!

673f33d5f3421icemann

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
673f33d5f346c
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.

673f33d5f3a1ahank morgan

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
673f33d5f3a72
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.

673f33d5f3bd4icemann

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
673f33d5f3c1f
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.

673f33d5f3e0chank morgan

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
673f33d5f3e58
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.
673f33d5f3faa
Sorry I've missed this project before.

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

673f33d5f4038xdiesp_

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

673f33d5f4184voodoo47

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

673f33d6000afhank morgan

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
673f33d600100
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.

673f33d6001b5icemann

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

673f33d6002a3Judicator

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

673f33d6003b7hank morgan

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

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

673f33d60048bicemann

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

673f33d600563franz4ever

Re: Tool for converting Ultima Underworld and Shock 1 Levels into D3/DarkMod.
673f33d6005ad
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.
673f33d600888
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.
2 Guests are here.
If I were a rich man? ...Yubby dibby dibby dibby dibby dibby dibby dum~
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
673f33d601564