Pocket Plane Group

Miscellany, Inc. => Infinity Engine Modding Q&A => Topic started by: -Triangle- on April 19, 2004, 10:22:00 PM

Title: command-line WMAP parser & editor
Post by: -Triangle- on April 19, 2004, 10:22:00 PM
**Originally posted on the FWP forums on: Sunday Mar 02, 2003, 01:01:51**

I'm curious if anyone besides me sees value in a distributable WMAP file builder that could be used to add or remove locations to/from a .WMP file, and could be run during installation of a standard WeiDU mod.

As we all know, distributing new .WMP files with mods doesn't allow them to play too well in the sandbox together.  Ghreyfain did some very promising research a while back regarding adding locations to the world map via XNEWAREA.2DA, and I've tried to continue in that vein.  Unfortunately there are a couple major drawbacks which I haven't found a way around yet:

1.  The approach requires a player to start a new game.
2.  It doesn't allow re-definition of existing areas to support things like pseudo-random encounters.
3.  Therefore, it doesn't support "on the fly" installation of new or updated mods that affect the world map.

As an intellectual exercise, I've written some C++ classes that define the behaviors & elements of the WMAP format.  It would be *fairly* straightforward to build a vanilla console application that could parse the WMAP and provide a basic CRUD interface that could be passed a command file to parse, append and edit the WMAP as a component of a mod install script.  The real hurdle is the several years it's been since I've written in C++, but that's my problem 

I'd be happy to keep working on it and distribute the tool & source when it's complete; however, if someone can suggest a better way to fit this in with existing toolsets, I'm all ears.

Obviously there are major similarities between this function and what WeiDU does for many other file types today; but I figured weimer's got his hands full with requests, life, etc.

Any feedback?
Title: Re: command-line WMAP parser & editor
Post by: -Triangle- on April 19, 2004, 10:23:03 PM
**Originally posted on the FWP forums on: Friday Mar 14, 2003, 09:09:50**

Thought I'd give a short update of where I am with this project:

The tool is about 50% complete, but the hard part (parsing & managing an entire WMAP structure) is done.  If I get enough time over the weekend, I should have version 1.0 out early next week.

Version 1.0 will allow you to add entries into any WMP file so that a mod can "plug in" new areas into the game without forcing the player to start over, and is a callable command-line EXE, meaning it should be easily spawnable from a WeiDU-based mod installation.  Basically all you need to do is create a text file containing new entry information and pass that to the executable along with the WMP file to update, and the EXE does the rest.

Later versions:
Version 1.1 will allow you to "edit" existing WMAP areas by putting "redefined" existing areas in the text file.

Version 1.2 will allow you to pass more flexible runtime parameters like "update all WMP files in the save folders" or "don't change existing areas even if there's an entry in the text file", etc.  This is about when I'll get around to some reasonable documentation.
Title: Re: command-line WMAP parser & editor
Post by: Ghreyfain on April 20, 2004, 12:02:16 AM
Hey, wow, whoa!  Is Triangle back, or is that you Icelus?

What's going on here?
Title: Re: command-line WMAP parser & editor
Post by: icelus on April 20, 2004, 12:05:33 AM
Uh... yeah, sorry.  I reposted it.  I have a pipe dream that Triangle will finish the program and announce it.  If it helps, the email link for him is valid!  :)