aliens

Author Topic: Maps and city scapes  (Read 42701 times)

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Maps and city scapes
« on: July 25, 2011, 10:50:20 am »
Hello,
 Exactly how are maps generated in X-com. Is there a pre-existing list of buildings that just gets placed in different locations to define a map?  Is this something that can be extracted from the original game so people could try to make MORE different types?

Please forgive my ignorance as im new to open source and modding in general but this project really excites me  :o

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: Maps and city scapes
« Reply #1 on: July 25, 2011, 12:37:06 pm »
https://www.ufopaedia.org/index.php?title=MAPS

As for creating new maps for OpenXcom, i guess that someone will make easier format for that.

Volutar

  • Guest
Re: Maps and city scapes
« Reply #2 on: July 25, 2011, 03:02:34 pm »
Besides "maps" (which are just map blocks of 10x10 or 20x20 tiles) there are different types of terrain. Each type of terrain built by different algorithms. Most of them are pretty straight (random blocks), but some of them, such as alien base and terror mission site - quite complicated. I'd say the most complex is terror mission - it has set of rules of "town" building, like roads, crossings, buildings. Alien Base is like xcom base (which is quite easy to "render"), but with preliminary generation of base structure (also some rules applied).

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Maps and city scapes
« Reply #3 on: July 25, 2011, 11:32:26 pm »
There are already map packs and a great map editor, which works with openxcom as good as it worked with the original game. Which is the advantage of being able to handle old file formats.
If we would use a new format, unfortunatly a new map editor has to be written before anyone would be able to make new maps...

There are a few rules, but not many. Roads have to be constructed in a logical way. And there has to be space on the map to land a plane and a UFO on it (they never crash on buildings or trees, but always on grass or flat ground). Bases are constructed according to their lay out.

In TFTD there are a few more rules on the sites like islands, ships and harbors.

But how these rules will be implemented is not yet decided. Making them external would indeed make it more flexible for mods...

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: Maps and city scapes
« Reply #4 on: July 26, 2011, 12:43:47 pm »
Dailky , Do you have any suggestions for good map editors?

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Maps and city scapes
« Reply #5 on: July 26, 2011, 02:34:55 pm »
There's only one that I know of:  Daishiva's mapview:
https://sourceforge.net/projects/xcmapedit/files/
(download the Release.zip) (requires .NET)
Or you can download the sourcecode and compile it - that worked fine for me.
It isn't actively developed anymore, but if we would have bugfixes or enhancements to be implemented - I guess it could be picked up again, either by daishiva - but more likely by one of us, I would just need to ask him for write access to that repository.

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: Maps and city scapes
« Reply #6 on: July 26, 2011, 03:42:27 pm »
If we would use a new format, unfortunatly a new map editor has to be written before anyone would be able to make new maps...

Maybe not: https://www.mapeditor.org/ it probably would require writing input/output plugins .

It isn't actively developed anymore, but if we would have bugfixes or enhancements to be implemented - I guess it could be picked up again, either by daishiva - but more likely by one of us, I would just need to ask him for write access to that repository.

Why not fork it on github?
« Last Edit: July 26, 2011, 03:51:01 pm by michal »

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: Maps and city scapes
« Reply #7 on: July 27, 2011, 10:08:19 am »
 "maybe not: https://www.mapeditor.org/ it probably would require writing input/output plugins ."

Is anyone even thinking this far ahead yet? If there is plans to do this later? Maybe i could start looking into this "TILED" to see if i can make heads and tails of it as i would like to do something to take my mind off some family problems :(   Be warned i have no previous experience  with anything like this i just want to try :)

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Maps and city scapes
« Reply #8 on: July 27, 2011, 01:53:29 pm »
Is anyone even thinking this far ahead yet?
Yes, but not offcially :p

I'm not sure how that general map editor is going to work with the PCK format and the palettes and stuff...
Also I don't immediatly see a way to create AI path nodes (which is all nicely implemented in Daishiva's editor)
« Last Edit: July 27, 2011, 01:55:09 pm by Daiky »

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: Maps and city scapes
« Reply #9 on: July 31, 2011, 09:57:11 am »
Finally got Daishivas map view working ( i had the wrong dot.net installed) now just got to work out How to use it. Anyone know of a How to guide for this software?

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Maps and city scapes
« Reply #10 on: July 31, 2011, 12:23:21 pm »
I can write a quick how-to guide:
(assuming you already got the correct path settings all set)
In the main screen "Map Editor", you can browse the different maps.
First you make a backup of the MAP file (in the MAPS subfolder if your game) that you want to change.
Click the map you want to change, don't look at the RMPview for now, first we use the TopView and TileView.

In the topview click the cell you want to change. Then click either ground, West, North or Content. Then in the TileView screen, click the corresponding tab with either ground, walls or objects. Then right-click on the sprite you want to place there.
Repeat this for all cells you want to change. Et voila - your map is done.

Now go to the RMP view. This is a bit harder to understand, because it's more behind the scenes stuff.
Ideally, you don't have to edit this. But you might want to check if the nodes are not in places where they cause an issue if a unit would spawn there. (for example on an object)
If that is the case, then you first rightclick on a cell, this will add spawnpoint/patrol-node. Then you fill-in all the data of the original node to this new one, setting by setting. Then you delete the old node.



Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: Maps and city scapes
« Reply #11 on: August 01, 2011, 02:26:12 pm »
For some reason the first couple of UFO cause the software to crash , i  haven't modded anything yet , Have you guys seen this error before?
https://postimage.org/image/88w2qtvo/91648bb9/

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: Maps and city scapes
« Reply #12 on: August 01, 2011, 02:29:21 pm »
Also whilst im looking for good modding tools , How can i extract the alien images into something like GIMP and make changes pixel by pixel to save back?

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Maps and city scapes
« Reply #13 on: August 01, 2011, 08:11:50 pm »
For some reason the first couple of UFO cause the software to crash , i  haven't modded anything yet , Have you guys seen this error before?
https://postimage.org/image/88w2qtvo/91648bb9/
The first UFO entries are bugged leftovers in the game files, just don't click on them and you'll be fine. :P
Also whilst im looking for good modding tools , How can i extract the alien images into something like GIMP and make changes pixel by pixel to save back?
The XCSuite available on the same site lets you extract Xcom images.

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: Maps and city scapes
« Reply #14 on: August 02, 2011, 01:21:17 pm »
On Daishivas map  view ,  when i remove a previously placed object from a tile , it still leaves the GREEN triangle there, judging by How the other Green triangles are paced it appears that this means it blocked can some confirm there coloured triangles meaning and also How do i remove the green ones?