Jump to content

Escort chance settings


kottis

Recommended Posts

Currently, I try to add always escorts to air superiority ufos to test some aircraft properties. This should possible by setting the “escort chance” in AM_airsuperiority.xml to high number. However this seems to have no influence at all. I use a fresh installed version and tried to chance the escort change in different missions types too, but with no result. Has anyone an idea where to change the escort change? Or is there a global variable which overrides everything?

Link to comment
Share on other sites

The high number for “escort chance” in AM_airsuperiority.xml was 1000, but if its linked to the ticker, I would expect to seen no escort at all in the beginning. And with set to 0 there would be escorts from the start, if the general mission ticker is zero too. I will play a little with these values maybe there a other way.

Link to comment
Share on other sites

Ok after some testing and playing with the parameters in the missions xml I am a little confused. Here the results:

During testing all other missions start ticker were set to 1000 (worked fine), veteran difficult choosen, radar range set to 5000, funding damage set to 0.1, single base

Lets start with air superiority:

ES (escort chance) = 0 ; TK (Ticker, when mission type starts in game time) = 0

Result: starts appearing end of Okt. (only a sinlge mission of each wave was possible, “once per wave” parameter has no influence)

ES = 500; TK = 0;  escorts starts appearing end of Okt.

ES = 1000; TK = 0;  escort starts appearing end of Okt.

Terror mission:

ES = 0; TK = 0;  escorts starts appearing end of Okt. . (only a sinlge mission of each wave was possible, “once per wave” parameter has no influence)

ES = 500; TK = 0;  escorts starts appearing end of Okt.

ES = 1000; TK = 0;  escorts starts appearing end of Okt.

Constructions mission: same like terror

Ground attack: (default no escorts at all, if fighter are added escorts will be created)

ES = 0; TK = 0;  escorts starts appearing end of Okt.

ES = 500; TK = 0;  escorts starts appearing end of Okt.

ES = 1000; TK = 0;  escorts starts appearing end of Okt.

Research: no escort was created regardless of parameters

Further points:

After the appearing of a new UFO types no more escorts are created, only after 1 ingame month new escorts started again. This was the same for all UFO types. Escort chance seems to have no influence, maybe its an artifact from previous versions and is overwritten by same global command.

Link to comment
Share on other sites

Did you check at what ticker point the first escort UFOs are set to spawn for the missions? If you didn't change these, then it's possible that none spawned because there was no UFO class set to escort duty before ticker point 200.

Link to comment
Share on other sites

Did you check at what ticker point the first escort UFOs are set to spawn for the missions? If you didn't change these, then it's possible that none spawned because there was no UFO class set to escort duty before ticker point 200.

If you mean the ticker for the first escort (i.e. e:alien.fighter) its always set to 0. Heavy fighter and interceptor were default. Or is there an other parameter?

Edited by kottis
Link to comment
Share on other sites

Yeah, that's what I meant. Just thought it was worth mentioning just in case.

Looks like it might be hard-coded into the mission types, then. I wonder whether Solver or someone else could be persuaded to look at the UFO mission code to see if there's anything in there.

Link to comment
Share on other sites

The Escort chance variable in the XML mission files does nothing. Only the e: variables in the XML matter, specifying what escorts will be provided in relation to ticker values.

The calculation of whether a particular mission will have an escort is a bit odd. I will not go into details now, but basically the chances of having an escort depend on how much the ticker has moved past the point of that ship appearing. For instance, Base Attacks have Landing Ships at 350 ticker, and Carriers at 600. At ticker 350, Landing Ships will be unescorted, and then as the ticker approaches 650, the probability of escorts increases.

Link to comment
Share on other sites

That's exactly what I have seen in my tests. After a certain time after each UFO type escorts are appearing. There is still the point that some missions have no escorts at all, like research and scouting. For ground attack you can enable escorts by adding the e:alien... rows in the xml.

Link to comment
Share on other sites

Actually, now I think about it, why do UFO escorts appear in Dynamic UFOs at all? The mod works by continually changing the UFO type which is set for any given mission type. Should this not be resetting the escort chance every time a change occurs?

Link to comment
Share on other sites

I'd guess the system regiesters the first time UFO x appears, then compares the first time it appears to the current ticker score each time a wave is generated.

That's what I was wondering. In which case, there's some small ability to manipulate the escort chance just using the AM_ files in so far as you can very temporarily trigger a UFO type earlier than it is supposed to appear, thereby starting the escort chance for that particular type at a higher level than would otherwise have been the case. Obviously, its not even close to an ideal solution, but it's better than nothing (until a code rewrite comes along? :))

Link to comment
Share on other sites

No, that's not exactly how it works, in the Dynamic UFO they appear because there is a short gap to the next UFO type. For instance:

Landing Ship 380

Cruiser 382

Carrier 384

Landing Ship 386

etc

For most ticker values, the ticker is actually close to the "next" ship type. Which isn't a linear progression in the Dynamic UFO mod, but it's still a higher ticker value, and it is that proximity that produces escorts.

Link to comment
Share on other sites

Ok, using the example you've given just to make sure I've fully understood:

At ticker point 380, there would be the lowest (0%?) chance of a landing ship spawning with an escort. As the ticker approaches 382, the chance of a landing ship spawning with escorts increases towards its maximum likelihood. At 382, A Cruiser would be spawned with the lowest chance of an escort, and so on.

So basically, within the period for each UFO type the chance of an escort spawning will move from its lowest to its highest before moving on to the next UFO type.

If that's the case, that's actually fine (in fact, it's better than fine because it basically completely randomises escort spawn chance as well).

Link to comment
Share on other sites

Yes, correct, except it wasn't designed to work with such narrow values.

At 380 for Landing Ships, an internal "range" value is just 2 - that is, ticker until the next ship type. The "lower bound" is the minimum ticker for the current ship to appear - 380 here. The calculation is like this in pseudocode:

c = ticker - lower bound

if (c < range / 4):

no escort

if (c < range * 3/4):

escort prob = (c - range / 4) / (range / 2)

if (c > range * 3/4):

has escort

So at ticker 380, range is 2, lower bound is 380, c is 0. No escort.

At ticker 381, range is 1, lower bound is still 380, c is 1. Escort, since c is greater than 3/4 of range.

Link to comment
Share on other sites

Hm, but what happens after battleships? There is no further ship. In my test escorts for battleships appeared around June/July. As for the dynamic ufos mod, after disabling all missions except research (high ticker value), no escorts were generated even after 12 months. Maybe there is a simple boolean in the code which disables escorts. I will play with the suggestions above maybe there is walk around to have always escorts.

Link to comment
Share on other sites

When there's no later ship, it acts as if the next step is 1000 ticker points higher. So if Battleships appear at ticker 650, the game considers the next step to be at 1650. Meaning that Battleships would start getting escorts 250 ticker points after their initial appearance, at 900 that is.

Link to comment
Share on other sites

Does the calculation for escorts count non-integers?

Using the same example as above, basically there'd be 0 chance of an escort between 380 and 380.5, an increasing chance of an escort between 380.5 and 381.5, and then a certain chance between 381.5 and 382. Assuming it doesn't count in integers, that's fine. If it rounds, though, that's where the problem will lie.

That said, even if it does work on integers I should be able to multiply up the entire ticker system by 10 or 100 and that would cure the issue.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...