Gizamaluke

Member Since 29 Jan 2010
Offline Last Active May 04 2013 10:22 AM

#123982 New TFTD Sub designs

Posted Bomb Bloke on 28 April 2013 - 05:51 AM

Regarding the Zrbite thing:

When you start a battle, the Geoscape engine creates a table of items. The first set is the stuff you opted to bring along, and these are all positioned at the equipment pile point in your dropship. The second set is the stuff the aliens brought along, and these are all placed into their inventories. The third set of stuff is the Zrbite, which is placed where the Geoscape engine believes the Accelerators are - it doesn't check the map files for this information, it's hardcoded into the executable.

After that, the Tactical engine starts, goes to the initial equip screen for your soldiers, automatically hands items out as it sees fit and lets you make any changes you feel are important.

Hence it doesn't matter what edits you make to the map files, the Geoscape engine doesn't care.

There are two ways around this: One is to find the co-ords in the Geoscape engine and modify them. The other is to run custom software in between the time the Geoscape engine hands control to the Tactical engine to modify the object table with the correct co-ords (which is exactly how XcomUtil and my own mods do much of their work).

The former method has two major pitfalls in that you'd have no way to have "variants" of a USO available in the game, you'd have to choose one layout and stick with it. The other is that you'd only be able to move the Zrbite, not add or remove chunks of the stuff.

So I'd been planning on implementing functionality into my BBMod to check the maps for Accelerators and make sure that the object table respected their positions, though things are a bit more complex if you're changing the size of the USO maps as well.

That's a problem for much the same reason the Zrbite thing is: the Geoscape engine gets to choose the map layout, and so it aligns ships with map modules that lack terrain features. But it assumes all those modules and ships are of a certain size, so if you change those sizes it all messes up.

Just so happens that I've written code to generate maps from scratch, and that'd solve that little problem with slight modification (because it CAN check the maps for their proper sizes rather then assuming things), but the catch is it's only used by my UFO/TFTD ComboMod (for reasons that likely make sense to you if you consider that it incorporates all of UFO:EU's maps into TFTD).

XcomUtil also has its own map writing code, though that'd also require an update to account for alternate craft and Blade hasn't been around for a little while now.  :(  Still, lemme know if you're interested in randomly loading USOs via my ComboMod. If you're only really fussed about the Zrbite, I can deal with that using my much less intrusive BBMod.

(The mods and the documentation about what they actually DO are all in my toolkit, if you're unfamiliar with them).


#123945 New TFTD Sub designs

Posted AMX on 26 April 2013 - 12:30 PM

Giz, the problem is that the space reserved for the craft is hardcoded.
UFO02 gets a single 10x10 map block, and if your map is bigger than that, it overlaps whatever terrain happens to be there.
The squid works as a replacement for UFO03, but then there's empty space next to it (because UFO03 gets 20x20 reserved space).


#123810 New TFTD Sub designs

Posted Bomb Bloke on 21 April 2013 - 09:34 AM

It'd be easy enough to code up a dynamic ship-swapper (I could adapt the X-COM-ship-switching code I use in my BBMod fairly readily), the only downside I can think of is that it'd be tricky to switch the Geoscape graphics of those ships (the ones you see during interception)... though I doubt anyone'd notice if that simply wasn't done.  :laugh: