GunFright - The Map Editor V1.0 ------------------------------- Written by Matthew Carrier, 5th June 2004 In good old Sinclair Basic using X128(PC DOS) V0.93 by James McKay ----------- What is it? ----------- It`s a map editor for game GunFright by Ultimate. You can edit the position of the buildings within the game and create your own wild west town. Yeee-haw! ------------- Requirements. ------------- 1. ZX Spectrum emulator that supports TAP and TZX data formats. 2. TZX of GunFright by Ultimate that was released for the Sinclair ZX Spectrum. Original release!!! 3: Knowledge of loading a TZX file Knowledge of loading and saving TAP files If you do not know how to load or save a TAP or TZX file then read the instructions that came with your emulator. I cannot give help on this. Notes: Extracting the map data from Z80 or SNA edition of the game will not work due to the way the game alters the map data once it has started. This is why a TZX file of the game is required. The Map data might not work on a re-release/compilation version as some of the coding/loading system may have been changed. ------------- Not included. ------------- 1. I cannot and will not supply a `mapdata.tap` file to anyone that requests it as the mapdata is part of the WoS/Ultimate/US Gold DISTRIBUTION DENIED collection. 2. That also means I will NOT supply a copy of GunFright to anyone that requests it. 3. The world, moon on a stick, Alyson Hannigan. 4. Line dancing tapes, cowboy hats and a copy of This Town Ain`t Big Enough For The Both Of Us by Sparks and Wild West Hero by ELO. ------------- Distribution. ------------- 1. This editor must not be distributed with mapdata or a copy of GunFright in any shape or form - ie Z80, SNA, TZX, TAP or any other data format. --------------- With thanks to. --------------- 1. Jame McKay - for the best ZX Spectrum emulator on the PC. Any hints and tips that are included with the editor program are based only on X128 (PC DOS) v0.93 by James McKay. 2. Threlfal & Hodgson and Hisoft for Colt ZX Basic Compiler Used For speeding up the editing part and mainly for the `draw map on screen` routine. 3. Vladimir Kladov - for EmuZWin 256 Colour Spectrum Emulator. Also for the disasembler part of his emulator that helped as to just how Ultimate protected the game and hid that map! --------- Warranty. --------- This program is supplied `as is`. It won`t screw up your hard drive, computer or dump things where it shouldn`t do. PLEASE work on a back up copy of your all important TAPs,TZXs and SNA files as you may corrupt them - you shouldn`t, but you might overwrite the wrong file by mistake - if you do make a complete balls up, then don`t come running to me about it. ---------------------------------------------------------------- You will need to have knowledge of your favourite emulator and to the way it handles TZX, TAP and SNA files. Read the instructions that came with your emulator! Extracting the map data ----------------------- Following this to the letter should get things going in the right direction. 1) Select 48K mode type this into 48K mode: FOR n=1 TO 7 : LOAD "" CODE : NEXT N (press enter) 2) Select your gunfright.tzx file This will not load the original loader, but it will put the ULTIMATE logo on the screen and colour it in. It will then load in the compressed screen data, but not display it. Then it will load the main code, then the data decoder followed by 2 short blocks. It will then halt with an OK message. 3) Type in POKE 23457,201 : PRINT USR 23424 (press enter) This decodes the Gunfright game data and returns back to BASIC 4) Type in SAVE "map" CODE 24497,258 (press enter) Keep the "Start tape, press any key" message on screen. Open/prepare a TAP file in your emulator. Press any key. Once the TAP file has been saved remember to close the TAP file! That`s the mapdata saved. Well done! You might need to quit your emulator and restart to clear any stray variables! ================================================================ Loading your map data back into GunFright ----------------------------------------- It is a long winded process to get the data into the game. Following this to the letter should get things running properly. 1) Select 48K mode type this into 48K mode: FOR n=1 TO 7 : LOAD "" CODE : NEXT N (press enter) 2) Select your gunfright.tzx file This will not load the original loader, but it will put the ULTIMATE logo on the screen and colour it in. It will then load in the compressed screen data, but not display it. Then it will load the main code, then the data decoder followed by 2 short blocks. It will then halt with an OK message. 3) Type in POKE 23457,201 : PRINT USR 23424 (press enter) This decodes the Gunfright game data and returns back to BASIC 4) Now for the inteesting bits Select your saved map TAP file type in LOAD "" CODE 24497 (press enter) This should load your map data into the correct area. 5) This section is very important, so do it! Reselect the Gunfright.TZX file type in (exactly as shown) LOAD "2" CODE : LOAD "3" CODE : PRINT USR 24064 (press enter) If your emulator allows you to select data blocks then highlight the file named 2 (There should be a file named 3 afterwards) OTHERWISE Play the TZX file and it will then skip the unwanted code and reload the last two short data blocks and start Gunfright with your map data in it. Play the game! ---------------------------- Using the Gunfright Editor ---------------------------- Before the map can be edited, it must be loaded, via a TAP file. So, select the map TAP file, press 1 to load, read what is on the screen and it should load in. Loading will take a few seconds. Once loaded, press a key and the main menu will reapper. The map can now be edited. Enter the editor. Instructions are given on screen. Map Editing Mode: QAOP move the cursor around the screen KL will select a room type WS will select a building type Z will remove (when possible) an object from the map SPACE BAR or M will place the current selected object on the map. D will return to the main menu ------------------------- Limitations of the editor ------------------------- Gunfright uses 25 different room types within the game which are spread over 7 different building types. Gunfright is coded so that the exits to each room type is linked to a building type. The exit direction cannot be changed What it can do. --------------- Place a building anywhere within the map. Select a preset room type for that building. What it can`t do. ----------------- Place solid walls within the map. Remove the cacti Edit the preset room exits. Examples. --------- The Jail has only one room type. There is only one exit to the room. The direction of the exit is preset within the data of the game. Bank has seven room types. As you may have already noticed, some of the exits are duplicated - there are two that contain 4 exits. Look at the windows of each wall also the upper levels of the building. This will become clear when the game is played and studied. -------------- Start Location -------------- This is hard coded into the game and cannot be changed. It is your choice if the hero starts outside or inside the jail building. It is marked on the map with a big S. -------------- Cactus / Cacti -------------- Cactus plants are also hard coded into the game system. They are overlayed onto the map during game play. A room can be placed over a cactus location and the cactus will still be there. If you want a cactus inside a building then you can have one. Just don`t expect me to water it for you. --------------------- Town boundery / Walls --------------------- The town boundery cannot be edited. This is due to the game corrupting the graphics if a gap is made. It also means that solid buildings cannot be added within the map. Characters will generate within the walls and become trapped. This will also mean that you won`t be able to have a showdown with the baddie! ------------------------- Selecting A Building Type ------------------------- Use the W and S keys to select the building type you wish to use. The room type will automatically update to show the variations that can be used. Bank - has THe Bank printed on the upper level. Jail - has Jail upon the upper level . Saloon - has Saloon printed on the lower level. Store - Has Store printed on both levels * Safe House - looks like a bank but has a different upper level Wanted House - Has WANTED posters on lower level. House - general collection of the left over buildings. * - due to a flaw in the data collation, the programmers placed the wrong upper level on one side, so it doesn`t read Store - just Ore. (Trivia fans love this shit!) --------------------- Selecting A Room Type --------------------- Use K and L to select the room type you wish to use for your building. You can only use the room types that have been given due to the game having only that style programmed into it. The number printed in the top right hand corner relates to the room/building that is used. -------------- Cursor object -------------- Shows what room type and building type is currently under the cursor. The number relates to the room/building type that is printed there. Helps when you ain`t got a clue as to what building type you placed last time. ------------- Linking exits ------------- You need to make sure that the exit of each room line up with the next room. The game will not crash if you get it wrong, it will just look stupid and you will be known as an ultimate cowboy builder. --------------------------- Frequently asked questions. --------------------------- Q: Why is the map editor upside down? A: Because it is. Why is PRINT at 0,0 at the top of the screen and why is PLOT 0,0 at the bottom left of the screen? Because it is... exactly! Q: Can you write a graphic editor for the game? A: No, write it yourself. or Use SGE (Spectrum Graphic Editor) by RAJ It`s on the internet somewhere. Q: Can you write a map editor for... ? A: If you can provide every scrap of data for the game as to where the map is stored in memory, how it stored in memory, how it is decoded, how it is used and examples of changes that can be made, how the data can be extracted from and later inserted into the game then I might take a look. All memory locations have to be in DECIMAL and not hex. I won`t even touch Atic Atac, Bubbler, Pentagram, Alien 8, Knightlore, Underwurlde or Cyberun so don`t ask. Oh, and £1000 upfront in a non-refundable payment. --------------- Known Problems. --------------- Sometimes the menu screen will freeze and not accept any input from the number keys. I think that this may be down to a memory conflict with the compiler overwriting some of the BASIC variables. it happens randomly. Solution: Just `break out` of the program and RUN it again - it should clear the problem - save your map data often. Any suggestions and updates for this editor are welcome. Have fun and enjoy. Mat