aliens

Author Topic: Expandable Map  (Read 6474 times)

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Expandable Map
« on: January 04, 2012, 03:25:26 am »
  Is it/ Will it be possible to add extra areas to the map when your already within battle? EG If your half way through a mission and  on a map say 10 squares x 10 squares but then say a second ufo approaches to assist the existing ufo , would it be possible to add some extra blocks along 1 side of  MAP to handle the second ufo landing plus some new terrain ?


My General thought is to allow for new mission types and some Random events into the game to keep things interesting , Also to create some more different map shapes. Of course we will also need more map terrains  so we dont just have the same blocks repeating over and over ( this part i can help with ).
« Last Edit: January 04, 2012, 12:06:50 pm by luke83 »

Offline hsbckb

  • Colonel
  • ****
  • Posts: 275
  • Gill Man
    • View Profile
Re: Expandable Map
« Reply #1 on: January 04, 2012, 09:11:10 am »
Random Question:  Is it/ Will it be possible to add extra areas to the map when your already within battle? EG If your half way through a mission and  on a map say 10 squares x 10 squares but then say a second ufo approaches to assist the existing ufo , would it be possible to add some extra blocks along 1 side of  MAP to handle the second ufo landing plus some new terrain ?

I think adding extra areas to the map is a good idea. This can be act as a transition zone/retreat area for reinforcement of enemy/X-com/friendly unit.  This will be useful for special mission or scenario of Openxcom (after V1.0 ver).

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Expandable Map
« Reply #2 on: January 04, 2012, 10:47:08 am »
Well, the code did not really foresee having more than 1 UFO on a map. It's not like everything has to be rewritten from scratch to implement this, but there are a few things to take into account.
Everything is possible, if you provide the code :)

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: Expandable Map
« Reply #3 on: January 04, 2012, 10:53:05 am »
"Everything is possible, if you provide the code :)"

This is always my biggest issue , i have the dreams but not the skills to achieve them :(

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Expandable Map
« Reply #4 on: January 04, 2012, 12:12:04 pm »
New types of map blocks are perfectly possible. No coding required for that :) You'll just have to add the filename of your new mapblock to the list of mapblocks the system has to choose from, for the specific terrain type.

The link between globe texture/mission type and terrain type(s) will become a ruleset too, so you could add new terrain types too without coding. I will foresee the ability to have multiple terrain types per globe texture/mission type as well.
So you could have one globe texture "forest", which in vanilla will load the forest tileset and forest maps if a UFO lands there. But you could add to the globe texture "forest" maybe a terrain type "forest with barns" that loads the forest and barn tileset and uses new mapblocks that has forest with an occasional barn in it.

I hope that gives some ideas about mods you don't need to do any coding for. Two UFOs in 1 map is just a little different, it affects other parts of the game, like the geoscape (alien activity for the region, what if you abort a mission, etc)

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: Expandable Map
« Reply #5 on: January 04, 2012, 12:45:41 pm »
 " I hope that gives some ideas about mods you don't need to do any coding for. Two UFOs in 1 map is just a little different, it affects other parts of the game, like the geoscape (alien activity for the region, what if you abort a mission, etc) "

For a aborted mission under this circumstance ( when a second ufo shows up to help gather the crew of the original shot down one) i would assume the second ufo would take off as normal after a set amout of time ( they would need a set amount of time to gather the useful parts and crew from the wrecked ship) then the ufo location would just disappear as normal. I was thinking of having this happen about 5%-10% of all crashed ufos and have there  in battle  appearance  of the new ufo start randomly after turn 10 for example just so you go " Crap " just as  you have your guys all set up to storm the crashed ufo ship ;D.

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: Expandable Map
« Reply #6 on: January 04, 2012, 12:56:03 pm »
Also a follow up question.

When i use MapView it only allows me to create the one file for each type EG: Ufo. So to create additional sets do i create new sets of ufos , Name the file differently and your battscape code will select one of the file sets at random than use the correct SIZE ufo out of that file?
 Is that correct?  ( Please note currently i have not looked into HOW these are saved so please correct me if im wrong  ::))

I am hoping to have the basic version if my armed civilians finished tonight and since i cant see any way of using them yet i was going to start working on some UFOs next so your not storming the same one time and time again before i move onto more terrain variety.

(Please note the ufo in the picture was one i created many months ago and i dont really like it to be honest it just happened to be the ufo picture i clicked on when i opened the file. You can proberly tell from my Forum avatar that from time to time i just stuff around with ideas :P)
« Last Edit: January 04, 2012, 12:59:07 pm by luke83 »

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Expandable Map
« Reply #7 on: April 12, 2012, 02:35:59 pm »
Now that rulesets are externalized I can answer your question.
To create multiple files for the same UFO, you add mapblocks here:
Code: [Select]
  - type: STR_MEDIUM_SCOUT
    size: STR_SMALL
    sprite: 1
    damageMax: 200
    speedMax: 2400
    accel: 9
    power: 20
    range: 15
    score: 75
    battlescapeTerrainData:
      name: UFO_110
      mapDataSets:
        - BLANKS
        - U_EXT02
        - U_WALL02
        - U_BITS
      mapBlocks:
        - name: UFO_110
          width: 10
          length: 10

Say you created a new variation of the medium scout UFO_100_VAR1 then you add this:

Code: [Select]
      mapBlocks:
        - name: UFO_110
          width: 10
          length: 10
        - name: UFO_110_VAR1
          width: 10
          length: 10

The game will randomly choose between one of the two variations of the UFO map

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: Expandable Map
« Reply #8 on: April 13, 2012, 03:13:22 pm »
Any chance i can specify separate MCD types per UFO variation?

Offline luke83

  • Commander
  • *****
  • Posts: 1558
    • View Profile
    • openxcommods
Re: Expandable Map
« Reply #9 on: April 28, 2012, 01:21:59 am »
To build on my suggestion , this is the kind of vehicle the Gang members need to rockup onto the battle scape in to help the aliens ( Mid battle) !