Talk:Battlescape Map Generation

From UFOpaedia
Jump to navigation Jump to search

Urban Roads

I've observed a 45-50% chance of an east/west road appearing, and a 75% chance of a north/south. Both appearing at once occured 20% of the time. Only done 110 trials at the present time however.

- Bomb Bloke 03:55, 10 February 2008 (PST)


I'm pretty sure I encountered road-less terror missions before. It's been a while since I ran random terror missions though. BTW: the max number of 20x20 modules which can happen on a Cydonian base map is 8 (including the brain room). In an alien base, it's 4 (including the command center). In both instances, the game has to create 2 green staging rooms so that your soldiers have a place to start. Therefore, the min number of small 10x10 modules (neglecting the 2 green rooms) in the Cydonian base is 2 and in an alien base it's 7. Of course, this assumes the game's map generation engine is purely random.

- Zombie 22:45, 13 February 2008 (PST)


Can't remember ever seeing a terror map without a road... Are you certain?

What I plan to do is create a special logger and run a few thousand samples through it. That'll get the percentages that much more clear.

I'll be doing the same regarding the odds of any other module turning up in a given space. I suspect the limits as to how many large modules can appear are, as you say, solely based on how many can actually fit; but I'd like to have it nailed down for certain. :)

- Bomb Bloke 23:41, 13 February 2008 (PST)


Like I said, I'm not 100% certain on seeing road-less terror missions, but I'm pretty sure. If the map generation engine is completely random, it guarantees the possibility. Technically, there is a 6.67% (1 of 15) chance of spawining a road in a N/S or E/W configuration and the same chance of a dual roadway. It's possible that because the roads come first in the map area, the game might be more inclined to to include them. Then again, if the game engine spawns a road section somewhere, it might have to re-work the whole map so that the road goes across. In either case, the probabilities of a N/S or E/W road configuration should be identical so perhaps more trials are needed to gain a better understanding. --Zombie 00:42, 14 February 2008 (PST)


Finally got around to pulling in the figures.

  • Total number with WE roads on their own: 456 ( 23.59027 %, or 31.46998 % of single road maps)
  • Total number with NS roads on their own: 993 ( 51.37093 %, or 68.53002 % of single road maps)
  • Total number with WE roads: 940 ( 48.62907 %)
  • Total number with NS roads: 1477 ( 76.40973 %)
  • Total number with both roads: 484 ( 25.0388 %)
  • Total number with no roads: 0 ( 0 %)
  • Total number with a single road: 1449 ( 74.9612 %)
  • Total trials: 1933

- Bomb Bloke 22:07, 17 March 2009 (EDT)

Map Sizes

XcomUtil may generate oddly shaped maps?

- BB


No, but the engine should accept rectangular maps (at least TFTD does, in the case of the ships). BladeFireLight once designed a Battlefield Generator that was supposed to allow you to create your own maps but i never quite figured it out.

- Hobbes 13:52, 13 February 2008 (PST))


So XcomUtil didn't generate those 60x60x2 alien bases?

UFO does support rectangular maps, and even maps more then four units high. My throwing logger generates them to spec, but the maps aren't intended for playing on.

There were also some odd issues where adding extra levels would cause all sorts of rendering artefacts... Can't quite remember how high you had to push things for that to happen.

- Bomb Bloke 17:36, 13 February 2008 (PST)


I'm not sure about the 6x6x2 alien bases anymore, might just be my memory playing tricks on me.~

- Hobbes 12:34, 18 February 2008 (PST)


I guess you'll have to trust me on this one, but base assault mission are generated by code starting at 0x0044D030 ; there you can see:

.text:0044D042 mov     eax, 5
.text:0044D047 add     esp, 0Ch
.text:0044D04A mov     pGeodata.map_xsize_10, ax
.text:0044D050 mov     pGeodata.map_ysize_10, ax
.text:0044D056 mov     pGeodata.map_zsize, 2
.text:0044D05F mov     pGeodata.terrain_type, 4
.text:0044D068 mov     pGeodata.craftsToDraw, 0
.text:0044D06F mov     word ptr missionDescriptor, 3   ; 3 -> base offense

which means (if you're not fluent in x86 ;) ) that the alien assaults maps are hard coded to 5x5x2 size.

Similarly for base defense, you'll find:

.text:0044CD6B mov     eax, 2
.text:0044CD70 mov     ebx, 6
.text:0044CD75 mov     pGeodata.map_zsize, ax
.text:0044CD7B mov     word ptr missionDescriptor, ax  ; 2 -> base defense
.text:0044CD81 add     esp, 0Ch
.text:0044CD84 mov     pGeodata.map_xsize_10, bx
.text:0044CD8B mov     pGeodata.map_ysize_10, bx
.text:0044CD92 mov     pGeodata.terrain_type, 3
.text:0044CD9B mov     pGeodata.craftsToDraw, 0

which translates into 6x6x2 map size. Seb76 14:12, 18 February 2008 (PST)


Arrow, please discuss here before you edit this stuff... hmm... I'm going to look for an editor, and see what happens if I hack Mutons to have 250 Health and 250 armor in all directions. If my suspicions are correct, the UPS explosion will STILL kill them... anyone know which editor can edit Muton stats and UPS explosion damage? ... I haven't seen any editors which can do that, so far... Jasonred 12:45, 17 March 2009 (EDT)

I admit I was a bit hasty in editing; I'm fairly low on sleep. I would ask you recall to do the same on some other pages. :) IIRC, from Zombie's The UFO power source explosion actually exceeds a Blaster Bomb in power. What I think happens is that the game might respawn some aliens after the explosion in the event they're all killed by the blast, as a failsafe. If no aliens are present, the battle would never begin because the aliens would never pass the "Any units alive?" check before the beginning of Turn 1. And I have seen wounded aliens near Power Source explosions on occasion. So it is possible. Arrow Quivershaft 13:05, 17 March 2009 (EDT)
I bet the Mutons survive, as I see plenty of merely damaged aliens from power plant explosions (CE Edition). -- Zaimoni, 14:21 17 Mar 2009 (CDT)
... Ok... I need to either get an editor or bring in Mind-Probes to confirm this...

Ah, but there's always some aliens OUTSIDE the spaceship, right? Is it hard-coded always, or is it just very very very likely that there will be aliens outside the ship? ... hmmm... but, as I've said... the UPS explosion behaves very strangely. The inconsistant blast pattern, among other things. If you tried to SIMULATE a UPS explosion by editting Heavy Explosives, and set them off right in the center of a Medium Scout, you would get the same blast pattern every single time. A crashed Medium Scout can have anything ranging from the floor ceiling and walls being intact to a hole in the ceiling to near total annihilation with even the outer hull shredded. ... Heck, you can usually recover an intact UFO navigation from a crashed medium scout. Try firing off a Blaster Bomb in the middle of one, and see what happens...

I definitely agree with your failsafe theory... every combat MUST start with live aliens. But I think that is in ADDITION to any weird behaviour exhibited by the UPS kaboom.

Just checked... UPS blows with strength 215, but has a random modifier too... they already know that UPS boom is weird vs terrain. Let's see how weird it is vs units...

A Medium Scout where no aliens spawn outside is rather likely to start with zero aliens. This is most common on Beginner (have seen twice in ??? missions). Saving the game is impractical as the battle ends before XCOM starts its first turn. -- Zaimoni, 14:12 17 Mar 2009 (CDT)
Eh... really? So you CAN start a mission with zero aliens? Interesting... what version of the game are you playing, BTW?
Eh... this gives me a thought for yet another crackpot theory... which is about the spawning of units for the higher difficulty levels... I tend to find quite a number of aliens inside the UFO to be much greater on Superhuman... maybe the "extra" aliens from superhuman were spawned after the UPS explosion?
Eh... come to think of it... if it ended so quick, how do you know the map had zero aliens? Maybe it was tactical.exe crashing and made you think the mission succeeded, but it was just the prior mission results?

Jasonred 18:22, 17 March 2009 (EDT)

As mentioned above: CE edition (XCOMUtil'd, as the graphics need patching to display at all; however, the only binary executable code patching XCOMUtil does is to remove the Difficulty Bug). The forked tactical.exe did not crash; the start of the turn is displayed properly, I get a brief glimpse of the BattleScape, and then the Mission Over sequence. No reaction time to speak of. -- Zaimoni, 18:10 17 Mar 2009 (CDT)
If the mission results says success and no aliens killed, no aliens captured, that's a pretty good hint the exe didn't crash. Your previous mission presumably had kills. No survivors happens, from time to time. Knan 19:18, 17 March 2009 (EDT)

KABOOM!!

The game does actually feature vertical damage from explosions, and not only for UPS. I guess the reason it's believed otherwise is that the flying armor gives good protection against ground explosions. The UPS explosion being up to 250 in explosive power can destroy roof tiles, as well as a modified blaster bomb would. And I can assure you that UPS explosions use the same routine as standard explosions ;-) Seb76 15:11, 17 March 2009 (EDT)

Other than the fact that UPS does 215 +/- 35 damage to terrain? hmm... Wait, methinks me gets that part... sort of... basically, the initial strength of the explosion is randomly determined, then it henceforth behaves like a normal explosion? ... How much damage is applied to alien units nearby then? Do they get hit for the full damage or something? ... Sigh... I need to wait until my current game reaches the point where I have a full developed Psi Corps.

- : As for vertical damage from explosions, er... SORT OF. Explosions do vertical damage, but only to floor/roof tiles. Units and objects appear to be untouched. Not only flying armor, even Floaters and Ethereals will be completely untouched by an explosion occuring underneath them. I have been wondering about that, actually...