Jump to content

Adding maps instead of replacing them.


3371-Alpha

Recommended Posts

I notice there are many map packs available for the various x-com games, but they all have one thing in common. Instead of adding more maps, which you'd probably assume at first, they merely replace them with their own versions. I'm here to ask you if it's possible to add the custom map/tile sets in addition to the originals for more variety?
Link to comment
Share on other sites

The reason why mods typically have 1:1 replacement maps is because the maps which make up a landscape (say, DESERT00-DESERT11.MAP which comprise the desert landscape) are hard-defined in the executable. In order to add more maps to a landscape (or to create an entirely new landscape altogether) you would need to do major executable editing to fit them in. I'm not sure if this is really possible without the source code. Some mods get around this by editing the game while it's in higher memory (think OpenXcom does this). So it's kinda possible, but not really. Hopefully this makes sense. wink.png

 

- Zombie

Link to comment
Share on other sites

Yes, my bad, OpenXcom. Edited my post above to reflect this. wink.png

 

I wouldn't say the simple answer is no though. It's certainly possible to create as many new maps as you want, the issue is getting them to show up in the battlescape. With the quantity of maps for a landscape being defined in the exe, you would need to either:

  • Rewrite part of the code in the exe which handles landscape generation so that it'll pick the new maps. You could just redefine the new maps in the exe like it is now except somewhere else (like the end so it doesn't mess up memory addresses or pointers). The game will have more maps now, but it still will be limited to future modders who want to add even more maps to a given landscape. The other option is to create a new bit of code to have it check a text file with all the maps listed there. This would make it a lot easier for modders to add as many maps as they want. -OR-
  • Write a front end (or reuse an existing one like OpenXcom) to catch the landscape generation routine in higher memory and have it run a new bit of code instead.

So in theory it currently could be done, but would require a fair bit of work. That's something which was out of the scope for modders in the past. wink.png

 

- Zombie

Link to comment
Share on other sites

Without altering the actual code, the game engine itself will limit what can be done within the confines of a single map such as how many graphic tile sets to use, the map dimensions, number of units, etc.

 

What could be done is to create a third party program and insert it into the batch file that runs the game. Whenever the game switches between the Geoscape and the battlescape, this program can intercept the contents of the temporary files in MISSDAT folder and use the information in it to create its own map. As long as the end result is something that will not make the game go wibbly, you could do quite a lot within the limitations of the game engine.

 

This is essentially what XComutil does for its map generation.

 

- NKF

Link to comment
Share on other sites

  • 2 weeks later...

I notice there are many map packs available for the various x-com games, but they all have one thing in common. Instead of adding more maps, which you'd probably assume at first, they merely replace them with their own versions. I'm here to ask you if it's possible to add the custom map/tile sets in addition to the originals for more variety?

 

As already stated above, check Openxcom, and see my Area 51/UFO Redux mod (about 100 new terrains, about to jump to 150 when I publish the new version sometime this weekend)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...