Talk:Battlescape Map Generation

From UFOpaedia
Revision as of 19:11, 17 March 2009 by Seb76 (talk | contribs) (New section: KABOOM!!)
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)

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)

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...

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)