RockinHarry -> Mine field data in section 9 (editing for the pros) (9/27/2004 6:11:54 PM)
|
I´ve finally figured out where minefield data is stored in the *.dat scenario files and how to edit minefield density figures with Freds WaWEditor and an external Hex editor. Load your scenario in Freds WaW Editor. Open "Tools", then "Dump File" window. Mark Sect 9 in the list with a mouse click, then hit "Section" button and when "file save" window opens... ...save file with name and location of your choice and make sure it´s with a *.s9 extension! (Minefield data is stored in Section 9 of the scen file) This saves an "uncompressed" data section from your scenario file that can be edited in a hex editor. Now load this file into a Hex Editor that enables you to "Find" certain values and lets you replace them with different figures, preferably with a single step. (I´m using HEX WORKSHOP, a 9 years old german shareware program for example) Example: A density 10 minefield shows up in hexadecimal format as "0A" (where = 0 is a ZERO!). Now hunt for any 0A value in the just saved *.s9 file and replace it with another figure of your choice (between 0-50 decimal is valid I think) in hexadecimal data. Easy for figures between 00-09, then translate for anything above. For testing purposes, just replace any 0A data with 01 (thus making a 1 density minefield). Once changed, save the file with just a "Save" command to preserve data structure. (a "save as.." from your editor might destroy the data structure that is needed for loading the file successfully back into Freds WaW Editor!) Go back to Freds WaWEditor and with "Dump File" window still open, load the edited file with the "Ld Sec" button back into the scenario file. Close the "Dump File" window and save the scenario file as usual with the "Files/Save WaW Scen" command, preferably with a different scenario file name to a different scenario slot. (..just in case something went wrong and your original scenario file does not get lost!) As far as I can tell, the mentioned data section 9 only holds mine data, not AT obstacles nor barb wire. Also side 1 minefields appear to be marked with a "11", while side 2´s with a "19" when the data is view in the ehx editor. (Looks like 0A 00 00 00 11 or 0A 00 00 00 19) If you´re aquainted to the method, "converting" of mine fields is a matter of 1-2 minutes from my experience. What´s it all good for? My preferred use is to mark certain map hexes with AI purchased minefields in order to tell the AI where it is not allowed to go. Example: Swamps, Marsh..or when just tanks are used maybe additionally particular "dense" forests ect. This eases channeling the AI movements, as it normally avoids moving into its own known minefields (Exception: shallow water). A density of "1" is just sufficient for this purpose and normally chances for blowing up this single minefield factor is scarce, so that human player movements are not hindered that much as well. Another use would be to create less than density=10 mine fields which is the minimum density when placed in the scenario editor. Here´s an excerpt from Fred Chlanda´s "readme05b.txt" file (to be found in Chlanda folder): <<<A new feature for hackers has been added to Version 0.30. Standard SP2 and SP3 files are compressed and it makes it hard to investigate their structure or change things which aren't available in FSPSEd. After loading a file you can now go to the Tools|Dump File. The compressed file is written in sections, for example, section 1 is the unit data. The table shows the size and address when uncompressed of each of the sections. You can save an individual section to file by clicking on a section number in the list then clicking the Section Button or you can save the entire uncompressed version of the file by clicking the ALL button. You can also Load a dumped file. If you are careful, you can load a compressed file, save a dump file, edit the dump file with a hex editor (like FRV), load the dump file then save it as a regular scenario file. Obviously, there are ample opportunities to make a MISTAKE. Consider yourself warned. The data shown in the section table can also be saved as an aid to studying the dump file. Added 0.050b The dump file for a single section can be pasted into a scenario. To do this use Tools|Dump File, select the section you want and click the Ld Sec button. This can be used in conjuction with WAW Map to make modifications to a map in a finished scenario. >>> [image]local://upfiles/2345/Ay753169233.jpg[/image]
|
|
|
|