Jump to content

Base Attack Trigger


Griffon

Recommended Posts

I don't think anyone knows how XBASES.DAT works...

 

The game world is split up into "regions", and apparently there's one record per region in XBASES. There are twelve records and fifteen regions, thirteen of which contain land on which you can build bases. No one has documented which records are supposed to correspond with which regions.

 

(It would appear that there must be one region that contains land, yet cannot be attacked by aliens... My guess is that this would be the Pacific zone.)

 

Best I can make out, retaliation missions are randomly triggered at the start of each month, but whether they're "try and find your bases" missions or whether they're "attack bases that have been found" missions seems to depend on the contents of XBASE.

 

I would assume that you need to put the LOC.DAT index of your base into XBASES.DAT, using the record that corresponds to the region that base is in. In order to determine which regions use which records, someone would need to observe what changes are made during the course of regular in-game alien investigations.

 

I just did a quick check on my usual testing save, in which I have a base that regularly gets located by aliens within two weeks (very handy for messing with base defense missions). The base is in the South East Asian area and the ninth record was affected. The first (two byte) value was set from 0 to 1, and the second (two byte) value was set to 5 (that being the LOC.DAT index of the base in concern).

Link to comment
Share on other sites

Ah, thanks for the help.

 

In my current save, I've got an Ethereal Battleship heading for a base attack on an Europe base, and the modified record is the fifth one, with values 1, 0, 0, 0. (this being my starting base). Checking the wiki, it seems like the records are in the order specified by ZONAL.DAT.

 

More notably, the month-long retaliation "campaign" by the UFOs does not seem to be divided into "find base" or "attack discovered base" types. In a save at the end of the previous month, XBASES.DAT was completely unmodified, and yet the battleship knew where to go. In an alternate timeline where I shot down the scouts, the Battleship still showed up on a retaliation mission, but zoomed around Europe like the scouts, presumably trying to find the base.

 

However, simply modifying the record for a base attack does not seem to work, there must be a retaliation "campaign" already in progress for the battleship to know where the base is. It seems that when the battleship arrives, XBASES.DAT tells it where to go (or not), and the scouts change XBASES.DAT when they discover the base.

Link to comment
Share on other sites

Yes, all of that rings true...

 

At the start of each month, missions get set in in MISSIONS.DAT. The odds of a mission appearing in a given region depends on ZONAL.DAT, and the type of mission depends on ACTS.DAT.

 

The exception to all this is retaliation missions, which are scheduled when you shoot down UFOs. So I guess that, in order to trigger a Battleship that will attack a certain base, you must:

 

- Set the base in the correct region in XBASES.DAT

- Set the mission in the retaliation slot for the same region in MISSIONS.DAT

 

Each mission is stored as four two-byte values. So to trigger a retaliation attack ASAP, I guess you'd want to set the first value to 3 and the second to 1 (indicating the very last UFO to be sent on the mission, that being a Battleship), the third value to 0 (which should indicate that the UFO should be sent "straight away"), and the last value to whatever alien race you want (say 1 for Snakemen).

 

Note that no matter how many UFOs you shoot down on a given mission, it won't be aborted. It often delays the arrival of the next craft on the chain, but doesn't prevent it.

 

Scouts must locate your bases in much the same way as you locate alien bases - by flying around slowly in close proximity. I'm not sure if only UFOs on retaliation missions are capable of finding your bases or whether any nearby UFO has a chance to accomplish it.

Link to comment
Share on other sites

Again, thanks for the information.

 

A question, how does ZONAL.DAT affect "the odds of a mission appearing". In all my games, I've never seen the contents of ZONAL.DAT be changed by the games, no matter how many UFOs I shoot down or how many complete their missions successfully.

 

Also, the number of aliens generated by the game for the base defense seems to correspond with the UFO on a the retaliation mission. Changing the Battleship into a Small Scout still triggers the base mission on arrival, but only one alien was generated by the game, and killing him ended the mission.

Link to comment
Share on other sites

Ooh, that's interesting... I wonder what happens if you use out-of-range values for the UFO counter and/or the sub-counter. That will have the game pulling UFO types from unexpected areas of memory, which will probably result in a crash for most values... but in some cases, it may allow the game to select other UFOs that aren't supposed to be used on that mission.

 

For example, if you can get it to send a terror ship, you could have Chryssalids running around your base... :(

 

Re ZONAL.DAT, I'm afraid my sum total of knowledge on that file is represented on the page I linked. It may be that the file is only written once (when you start the campaign), it may be that it only changes when the aliens sign a treaty (why concentrate on America if they've signed?), it may be that the file is the same for EVERY game and never changes... I don't know.

 

As for how the file contents affects things, it seems that the higher a value for a given region, the more likely missions for that region will be picked from ACTS.DAT for use in MISSIONS.DAT. I would guess the game adds all the priorities together, rolls a random number between 0 and the result, and chooses the region according to which range the number falls within.

Link to comment
Share on other sites

More notably, the month-long retaliation "campaign" by the UFOs does not seem to be divided into "find base" or "attack discovered base" types. ....

 

However, simply modifying the record for a base attack does not seem to work, there must be a retaliation "campaign" already in progress for the battleship to know where the base is. It seems that when the battleship arrives, XBASES.DAT tells it where to go (or not), and the scouts change XBASES.DAT when they discover the base.

That sounds reasonable.

 

The correct adjustment of XBASES.DAT will replace the next retaliation mission with a base-attack Battleship. I'm a bit fuzzy on whether this replacement also transmogrifies Research and Terror missions.

Link to comment
Share on other sites

I think all have been said already about XBASE.dat, MISSIONS.dat, LOC.dat. Few notes:

 

The scout locating a base must be on retaliation mission and it must be max 80 miles away to get the base (other type of scouts don't count).

 

Triggering of retaliation set of missions

- normally occurs after a shotdown of an alien vessel and succesful random role.

- plus there is one automatically scheduled retaliation, starting every month after the (13 - game_difficulty)-th month in the game. The MISSIONS.dat entries are set to 0-0-5-[random_race]. So I guess you should see an auto-retaliation scheduled in November on superhuman (January is probably equivalent to 0), with a scout appearing at 2:30 of the 1st Nov.

- such a mission will be automatically scheduled BEFORE THAT if you've completed Alien Origins research (the one with leader I think).

 

When a retaliation scout is about to occure according to MISSIONS.dat, the Aliens check for a known XBASE location. If it exists, they skip the scouting phase and equip a battleship.

 

 

It is questioned/ doubtful / untested whether the game erases the right XBASE.bat entry after a succesful defense of a Base attack. If anybody has an info on it, it would be nice.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...