English Amiga Board


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 05 December 2021, 16:36   #181
UnnamedCourier
Registered User
 
Join Date: Jul 2020
Location: UK
Posts: 76
An observation while going through the source code/files:

The most obviously broken thing in the AGA version is the "static" screens when loading a level. Looking in data/static.dat/ the makefile actually contains code to convert the new ham8 versions of these screens into the raw .pic file format used by the game. It does this by invoking an Arexx script, Ham8_2_Pic.rexx. It's not clear what program is being called here, looking in the script it has the line
Address "SI2R1"
And I have no idea what software that is, possibly some custom developed image convertor? It doesn't seem to anything amazing, just convert the image to raw planar format and then append the palette to the end. Other images in the release seem to be either from DPaint IV or AD Pro.

Anyway, what is weirder is the actual line that calls this script. It's called twice, for only two of the 15 files it needs to be used for. An example:
rx ham8_2_pic.rexx 3dgame:data/static.dat/world.ham8 3dgame:test/hiredgunscd32/static/static09.pic

Now there's something obvious here - the file "world.ham8" is being saved as static09.pic. 09 is the graphic with the monorail as most famously seen in the demo. Checking the actual files in the built directory for the CD32 version you can see this is actually the case - static09.pic and world.pic are both the exact same size and CRC.
So umm, what was going on here!?
One thing I wonder is that the world.pic (it's the horrible new picture of the CD and "World map" written on it) displays.....somewhat correctly in the game (the palette is wrong but close). Therefore was a known good image being displayed to try and troubleshoot the screwed up static screen? I tried loading that level, but they all seem screwed up in the same way, and interestingly they do all seem to have what looks like the new "world" screen in the background on them.
The rest of the static images are the same as the ones from the OCS game, they are just decompressed so are bigger. I might try and convert some of them myself and see if it makes a difference, but I get the feeling something more fundamental is broken...
UnnamedCourier is offline  
Old 05 December 2021, 19:40   #182
Cherno
Registered User
 
Cherno's Avatar
 
Join Date: Dec 2011
Location: Dortmund, Germany
Posts: 1,054
Interesting. The answers are probably lost in the mist of a protracted development history

I am still working on the map editor and am making good progress. The basic features are all in there, along with lots of functionality that should improve useability, such as browsers for doors, buttons, and lifts (maybe I will add an item and monster browser as well). Today was also the first day that I loaded a map saved by my editor into Hired Guns, and everything worked flawlessly.

On the side, I am looking for a way to make use of the original Hires Guns files for assets like the map tile graphics as shown by the DTS in-game, the sky graphics, panel graphics, and also compressed maps. I don't know if any unpackers or converters for these things have been developed or if there is any information on their file structures. So far, I am limited to converting ilbm images to png manually, and not being able to load compressed maps from the original game.

Last edited by Cherno; 05 December 2021 at 19:45.
Cherno is offline  
Old 05 December 2021, 21:10   #183
Doomer
Registered User
 
Join Date: Dec 2010
Location: Enclosed City of Ghule
Posts: 61
https://github.com/lab313ru/rnc_propack_source
Doomer is offline  
Old 06 December 2021, 20:55   #184
Cherno
Registered User
 
Cherno's Avatar
 
Join Date: Dec 2011
Location: Dortmund, Germany
Posts: 1,054
Out of curiosity, and because it is an unused feature, I created a fitness boost block on a test map. The block can be chosen in the editor, but there is no way to set the healing value, so I had so manually edit the map file's bytes at the right position. A value of 2560 restores 6 % of Miyriel's fitness, so a value of ~426 equates to one point of restored fitness. I chose Miyriel because she has a Physique rating of 100, which I assume to be equal to the maximum amount of fitness/health.
As for using a fitness boost block: It appears like a forcefield/teleport/exit, and when stepping into it, there is a quick green flash on the character's screen, as if using certain Psi-Amps or possibly teleporting, the teleport sound effect, and the character remains on the cell he or she entered from (or is moved back there). The character's fitness is restored as described above.

Now with that figured out, I can simply add a field in my editor that lets the user set the amount of restored fitness.

Last edited by Cherno; 07 December 2021 at 12:42.
Cherno is offline  
Old 08 December 2021, 12:49   #185
UnnamedCourier
Registered User
 
Join Date: Jul 2020
Location: UK
Posts: 76
Ahh awesome, I forgot all about the fitness boosters. Do you have an example map you could share? I'd like to document how it works on the Cutting Room Floor.
UnnamedCourier is offline  
Old 08 December 2021, 14:54   #186
Cherno
Registered User
 
Cherno's Avatar
 
Join Date: Dec 2011
Location: Dortmund, Germany
Posts: 1,054
I attached a replacement 07.map (Abandoned Depot, first campaign mission) in the zip file. Make sure to create a backup copy of your original 07.map

The map has a fitness boost block with a value of 6100 (contradicting my previous calculation of 426 per point of health; the actual value is ~610). 6100 heals about 10 points of fitness per use. Use Miyirel to get accurate results, since she has a physique stat of 100.

Another mapping trick I didn't know about before is also demonstrated: A roof doesn't have to be a solid block in order to walk on it; If a cell above a walkable (non-solid) cell is also non-solid, but has a floor (like grass), a thin platform is created that can be traversed as usual, and shows the chosen floor graphic on the top and bottom side. I can't think of any map that utilized this feature in a way that allowes character to actually walk on thin roofs (apart from lifts and Psi-Amp-summoned platforms), but some maps do use this for some reason, in inaccessible places, like the hallways in the Abandoned Depot (not the CD32 version though, as this one has no roof at all for the hallways for some reason!).

Request: Can anyone explain the necessary steps to fully import custom maps into the game? I refer to editing the locations.dat file so the replaced maps have the correct descriptions, graphic style etc. during gameplay.
Attached Files
File Type: zip fitnessboosttest.zip (1.0 KB, 47 views)

Last edited by Cherno; 08 December 2021 at 15:09.
Cherno is offline  
Old 08 December 2021, 16:48   #187
UnnamedCourier
Registered User
 
Join Date: Jul 2020
Location: UK
Posts: 76
Thanks! Yes, I've created new locations.dat files before, all the things needed to do it are in the dev files and it does work. When I've got some time I will write it up for you, If I remember rightly it's basically just replace the map files in the right directory (the central map repository in the files, not the game directory), and then run a script. I think it uses the build tools from Devpac for this but I think you could replace it with just a regular AmigaDOS script easily enough, it runs a few commands to strip certain bits of info from all the maps and bung them into the locations file (I think it gets run by the main buildfile for the game, you just delete locations.dat from the game directory and it recreates it for you with the new names. It also compresses them if you're building for OCS, and not if CD32).

One thing that is annoying is that the menus for the short action maps are hard coded into the game executable itself. There is lots of talk of making expansions and adding new levels to the game in the development files (and clearly the new maps were inteded for the AGA version as an add on), but the game's written in a way that makes this hard to do unless you overwrite existing levels, sadly.

The thin platform thing is interesting too; I've noticed a few changes in the CD32 maps but not had enough time to sit down and compare them (I doubt I'll ever the time to do that in detail!).
UnnamedCourier is offline  
Old 08 December 2021, 21:35   #188
Cherno
Registered User
 
Cherno's Avatar
 
Join Date: Dec 2011
Location: Dortmund, Germany
Posts: 1,054
Thanks, I'l be looking forward to your detailed writeup.

More interesting tidbits related to the "conversations" (dialogue and messages that play when certain cells of a map are stepped on for the first time):

Only very few campaign maps have these at all (one noteable exception is map 09: Temple (named Tomb in the dev files directory):

HTML Code:
13 03 11    6 "Oops"
11 05 13    5 "Hmm. There must be something useful behind there."
11 17 13    6 "I wonder what's through there..."
11 11 10    6 "Mmmm. Grenades"
05 12 07    6 "Hey, that wasn't there the last time I looked."
06 13 07    5 "What was that noise?"
19 09 07    5 "Something's just clicked into place."
15 09 07    5 "Watch your step."
12 14 13    6 "This'll come in handy for any close encounters."
12 08 13    6 "Just what the doctor ordered."
02 19 07    6 "This must call up a lift from a level below."
19 03 07    5 "Hmm. There must be a lift somewhere else on this level."
10 09 04    5 "Watch yourselves, it sounds like we're surrounded by them."
20 18 04    5 "This looks likes a small arms cache."
21 07 04    5 "Wow! There's enough firepower in here to blow us into orbit!"
05 03 05    6 "Just four steps from the way out!"
02 20 06    5 "This could be just what we're looking for!"
08 04 04    6 "Phew, I smell a rat..."
06 17 02    6 "Those signs weren't joking. This definately smells like a sewer!"
14 02 01    5 "That's the switch we've been looking for..."
14 10 04    6 "This must be the main control panel for this lift."
16 20 04	6 "I think this is the lift control panel."
As you can see, it has a ton of triggered messages. From my own campaign playthrough a few years ago, I can only remember one character saying something when first finding a fusion core one some map, but that might be just my memory playing tricks. It's also easy to disregard the messages outright because of the random chat going on during missions.

Anyway, a few of the short action multi-player missions have these as well, curiously enough.

Related to the conversations: It is possible to insert a code for a character name into the conversations text file to be imported: It is the ASCII character 027: ESC, followed by a value of 1 to 5. This is not displayed correctly in the forum font, but can be inserted into a txt file by holding down ALT and typing 027 on the numeric keypad. 1 to 4 is this character's name, while 5 is a random name from the chosen characters. 6 is 3, 7 is three, 8 is four, and everything above that messes up the chat completely. The example above the uses the ESC6 code (character 2) for some reason, alongside the random character name.

EDIT: Btw, I just found out that the HGViewer program only loads compressed maps (The map editor can load both compressed and uncompressed maps, but only saves to uncompressed maps). Maybe this should be added to the TCRF article as well.

Last edited by Cherno; 09 December 2021 at 16:14.
Cherno is offline  
Old 09 December 2021, 13:10   #189
UnnamedCourier
Registered User
 
Join Date: Jul 2020
Location: UK
Posts: 76
Ahh, that's cool, I hadn't looked into how those messages worked. I know they are pretty sparsely used in the actual game. The Penitentiary map and a few campaign maps use them, but it's very rare.
It's also quite weird, the early files for the game show it was intended to be VERY narrative led with a fair amount of dialogue, but I guess this was abandoned as it doesn't really suit the actual game. I recently redid the Document library page and included the contents of all the text files, and this has all the early dialogue. It's just kind of weird they made something quite different to what this showed, and that they were still talking about the original hostages version of the plot quite late but had already made something totally different (the staffmaps file I posted here previously says all the campaign maps were done by the end of April 1993, so were they going to do a second pass to add in dialogue, or was that idea of the game already long since dead?).

I should really work out what maps actually use dialogue, I got excited because the odd Traveller's Rest map (22) has a dialogue file, but it's actually just a generic one that a few levels have that is not even used in the end.

I think as well the whole random characters saying the same lines thing really kills narrative as you can't give your characters any actual character. It's literally impossible to flesh out individuals that way. The generic lines in game that made it are kind of lame and annoying as they're so generic and repetitive. The planned lines in the development files are also quite dopey and uninteresting apart from when they're referencing lore stuff. It's odd, I actually really like the setting and characters as depicted in the manual/novela, but the dialogue in-game is mostly terrible! It's telling that the MS-DOS version of the game completely rips out all of the dialogue.

I didn't think about the HGViewer needing compressed maps. That's just a really silly oversight, I would have thought the main reason you would use it would be because you are working on an unfinished map and want to see what it looks like from another perspective...
UnnamedCourier is offline  
Old 09 December 2021, 16:33   #190
Cherno
Registered User
 
Cherno's Avatar
 
Join Date: Dec 2011
Location: Dortmund, Germany
Posts: 1,054
A few of the map-specific dialogue bits from the documents were used as random messages in the game, such as "Atmosphere's fine. Nothing toxic in the air. We'll live." and "It's a lot of ground to cover, so let's make this quick.".
Cherno is offline  
Old 13 December 2021, 22:54   #191
UnnamedCourier
Registered User
 
Join Date: Jul 2020
Location: UK
Posts: 76
Rebuilding the locations.dat was easier than I remembered, and doesn't need the full compile envionment working.

What you DO need is this:
  1. Copy all the dev files somewhere the Amiga can get to
  2. Run the "Hired Guns Assigns" script in the root area of the files. This really just makes the assign "3dgame:" to the top level of the files, but all the scripts need this to be set to work. So do it!

Once done, put your uncompressed map files in the corresponding directory in 3DGame:maps/game/ They need to have the same filename as the original map file in that directory (e.g. 14.map or whatever).

Once done, open a new cli and go to 3dgame:scripts/
In here, Execute MakeCD32GameMaps
This will create a new locations.dat file in 3dgame:test/hiredgunscd3d/world/
There is another script just for the original version of the game, but it does lots of other stuff updating the maps in the various disk images folders that you don't need, so it's a waste of time.
The above script is really meant to be ran as part of 3dgame:maps/build_game_maps (and its CD32 equivalent), but this needs the SAS/C environment set up to run, and all it does extra is compress all the maps for you (if you're running the OCS version).

Speaking of which, I should probably document the needed compile envionrment to copy what Scott Johnston was using, but I stumbled through that until it work, and can't remember most of it.

The bottom line is you need SAS/C for its dev environment. I used v6.50 and that works fine.
You also need Devpac as the actual ASM compiler, I used v3.02 and that produced identical binaries to those that came with the compiled versions of the game. One issue I did have was that using the standard amiga includes that came with SAS/C didn't work as it included macros that devpac didn't understand. I had to use the devpac specific ones, but 3.02 did not have the needed files for some of the CD32 functions like lowlevel.library. I got these from somewhere on here, there is a newer disk with the includes.
I also had a lot of fun with the needed assigns, but I forgot what I did now, I would have to go through the user-startup on my computer to check it all.

It's completely possible to build the game based on the source for the CD32 version. You can also build OCS version 39.26 if you overwrite the oldsource.lha archive over the top of the CD32 source. You can't build the OCS version by turning off the CD32 argument in the CD32 code, it seems to have changed too much from the original codebase to work.
I also managed to rebuild 39.26 in no password protection mode, meaning it had no copy protection anymore. However, this also meant the music didn't work, I'm not sure if this was me screwing up/a bug, or something deliberate (would be a good way to identify protectionless dev builds and stop them being sneaked out into the wild).
UnnamedCourier is offline  
Old 14 December 2021, 12:28   #192
Cherno
Registered User
 
Cherno's Avatar
 
Join Date: Dec 2011
Location: Dortmund, Germany
Posts: 1,054
Can't get it to work
Assuming that the dev files are all in a dir "dev":
I copy the new 07.map file into dev/maps/game/Map07_AbandonedDepot, having made a copy of the vanilla 07.map, of course
I run the "Hired Guns Assigns" script in the dev root, and then open Workbench Shell, navigate to dev/scripts, and then "execute makecd32maps", and it returns
strip: Unknown command
strip failed returncode 10
Cherno is offline  
Old 14 December 2021, 13:09   #193
UnnamedCourier
Registered User
 
Join Date: Jul 2020
Location: UK
Posts: 76
Ah, that's because it expects 3dgame:c/ to be in your path. You can either add it as an additional assign to your C: assign, or much easier, just copy the files in there to your C: drive manually. There's only "strip" and a couple of other commands in there, so you could just copy that to C:
UnnamedCourier is offline  
Old 14 December 2021, 15:52   #194
Cherno
Registered User
 
Cherno's Avatar
 
Join Date: Dec 2011
Location: Dortmund, Germany
Posts: 1,054
Ok, I got it to work, thank you. I panicked a little at first because my custom map wouldn't load in the game after creating a new locations.dat file, but then I quickly found out that the file property of the map need to correspond to the map name (map07 = file 7, and so on). A file value of 0 crashes the game, and if an existing file is referenced, that map will actually be the one that gets loaded, with the locations.dat data from the custom one. For the disk property, this has probably also to match, as the map files are on several disks, starting at disk 3. This is apparently only necessary when actually playing from disk.

I wished there was a way to edit/create locations.dat from windows, but the packing code is out of reach it seems. Oh well, good enough! Now I can put the finishing touches to my editor and release it.

Last edited by Cherno; 15 December 2021 at 06:08.
Cherno is offline  
Old 14 December 2021, 23:13   #195
UnnamedCourier
Registered User
 
Join Date: Jul 2020
Location: UK
Posts: 76
Yeah, I had the same problems with map files, they must be setup with the same numbers etc in the map editor, or you get weirdness!

Also I think it would be 100% possible to create new locations.dat files on PC.
If you look at what the script does, it just uses the strip command to strip everything after the first 542 bytes of each map file. This seems to contain the header information/map names for each map. It then joins them all together in order into one big file. Finally it RNC compresses it. I'm not even sure if you have to do the last step, I think it's only needed if running off floppy, on HDD there is enough space and I'm fairly sure the game does not care if it's compressed or not.
I could easily script the above in PowerShell. There's also the DOS binaries for RNC Amiga in the link already posted in this thread here. All the tools are there!
UnnamedCourier is offline  
Old 15 December 2021, 17:27   #196
Cherno
Registered User
 
Cherno's Avatar
 
Join Date: Dec 2011
Location: Dortmund, Germany
Posts: 1,054
I added a function to my editor that writes the Location.dat file as you outlined, by taking the first 542 bytes from all maps from the maps\game\* directories and adding them to the dat file. To check if the file was written correctly, I also made a copy of the MakeCD32GameMaps script and changed tthe last two lines so it does not compress and instead just copies the temp file from RAM: into the world directory. Both the file created by my editor and the one from the script are exactly the same, so far so good. Unfortunately, once I get to the world map, the blinking icon indicating the current (in this case: starting) location is in a random (?) place outside the map area, sometimes I can see part of the blinking icon in the upper left corner, other times it auto-scrolls to the bottom right corner with nothing to be seen. I can't move to/enter any location. When I move the crosshair over where the drop zone should be, the text for it does show (although it's listed as not compromised). Also, when moving the crosshair over the world map, different empty parts of the world randomly show nothing, or either compromised or not compromised.

So it seems like the compressing of the Locations.dat file does something else, but I have no idea what I would have to do to make it work for an uncompressed file .

Here's the script without compressing:
Code:
.key opt1
.bra {
.ket }

if exists ram:makemaps
	delete >nil: ram:makemaps all
endif
makedir >nil: ram:makemaps

list >ram:makemaps/buildfile 3dgame:maps/game files pat "#?.map" all nohead lformat "execute 3dgame:scripts/grablocn %S%S" all
sort from ram:makemaps/buildfile to ram:makemaps/buildfile_sorted
execute ram:makemaps/buildfile_sorted

copy ram:makemaps/temp2 3dgame:test/hiredgunscd32/world/Locations.dat
EDIT: I tried using RNC Propack from the GitHub linked above, but it doesn't work on 64 bit Windows and with DOSBox, nothing happens when executing either the Amiga or IBM programs.

EDIT2: I managed to do it by using temisu's rnc packing tools, download link: rnc_packing_tools.zip. Now I will try to incorporate the packing & unpacking code into my editor.

Last edited by Cherno; 15 December 2021 at 19:45.
Cherno is offline  
Old 16 December 2021, 17:28   #197
Doomer
Registered User
 
Join Date: Dec 2010
Location: Enclosed City of Ghule
Posts: 61
Quote:
Originally Posted by Cherno View Post
So it seems like the compressing of the Locations.dat file does something else, but I have no idea what I would have to do to make it work for an uncompressed file .
Try change Hired Guns icon tool types UNPACK=NO to YES. Probably need unpacked rest files, including executable.
Doomer is offline  
Old 16 December 2021, 18:04   #198
UnnamedCourier
Registered User
 
Join Date: Jul 2020
Location: UK
Posts: 76
I just tested it quickly a minute ago using v39.26 and it did work fine with locations.dat decompressed, so you've probably got an error in the actual file itself. I'll try and take a look myself and make a script to do it, but while I'm on holiday now I seem to have less time for computer stuff than when I was working, thanks to family etc..
UnnamedCourier is offline  
Old 16 December 2021, 20:02   #199
Cherno
Registered User
 
Cherno's Avatar
 
Join Date: Dec 2011
Location: Dortmund, Germany
Posts: 1,054
It's all good, I just call the rnc executables from inside the editor to pack the Locations.dat file, and it works this way. The bonus is that I will now be able to load and save compressed maps as well.
Cherno is offline  
Old 17 December 2021, 16:38   #200
Cherno
Registered User
 
Cherno's Avatar
 
Join Date: Dec 2011
Location: Dortmund, Germany
Posts: 1,054
As far as file operation go, the editor is now done. The development package with it's uncompressed maps isn't needed anymore, I can now write the Locations.dat file by temporarily decompressing each map in the Hired Guns(CD32) maps directory and copying the location data bytes. Loading compressed maps is possible as well. However, compressing maps seems to not be possible, as the rnc packer will just stall for a few seconds without actually compressing the file. This is weird since a Locations.dat file is 25 kb and compresses instantly, while a map file is about 155 kb, so not that much larger, and yet refuses to be compressed. Oh well, no big dea, but it would have been nice to have the option.
Cherno is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hired Guns 2 Altman request.Old Rare Games 12 19 January 2014 19:23
Hired Guns Biddy Oldfella request.Old Rare Games 13 06 November 2006 00:32
Hired Guns Unregistered support.Games 1 04 December 2004 16:49
Hired Guns Petronius request.Old Rare Games 5 13 April 2004 16:19
Hired Guns Slayer request.Old Rare Games 1 27 August 2003 21:55

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:11.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12735 seconds with 14 queries