Jump to content
kabill

[v1.5/X:CE] Dynamic UFO Spawns (v1.0)

Recommended Posts

Dynamic UFO Spawns (v3.0)

Dynamic UFOs makes the geoscape part of Xenonauts more diverse and dynamic by varying UFO spawns and other small changes designed to make play more diverse.

Features:

- Dynamic UFO spawns! UFOs for each alien mission type are drawn from an array of UFO classes at any given point during the game, rather than only a single type like in vanilla.

- Dynamic Crew Loadouts: UFO missions now have crew suitable for their mission type. UFOs expecting to land (research, supply, construction, terror, base attack) have stronger and more aggressive crews while others have weaker crews. Crew numbers are also randomised to a small extent.

- Unlocked alien missions: Most of the limiters and cool-downs on UFO mission types have been mostly removed, leaving UFO missions more or less entirely down to RNG.

- Dynamic alien bases: Alien bases are mostly unlocked from the alien ticker, starting out as small when built and growing over time. Successful supply missions boost their growth, so larger bases can appear quickly if not stopped.

Bugs/Balance:

- This mod has undergone some testing and the balance seems to be pretty good. The late game is still a bit experimental however. Any comments or feedback about any element of the mod are welcome.

- There are no known bugs.

---

Download:

Dynamic UFOs v3.0

Install Instructions:

To install, either:

1) Unpack the zip file into assets/mods; or

2) Install using the mod manager in the Xenonauts game launcher

Alternatively, for Steam users, you can install the mod via Steam Workshop.

However you install the mod, make sure you set it to 'active' in the mod manager.

Uninstall Instructions:

To uninstall, either:

1) Delete the mod's folder from assets/mods; or

2) Uninstall using the mod manager in the Xenonauts game launcher

If you installed using Steam Workshop, you should also unsubscribe from the mod (otherwise it will keep re-downloading). Note that simply unsubscribing from the mod will not delete it; you must also delete the mod using one of the above methods.

---

Appendix:

Background:

Here's an archive of my original pitch about the mod, for those who are interested. In addition, previous discussion about the mod can be found here.

 

Apparently not content with having completed one modding project, my brain apparently has decided to move onto the next. So, er, here it is: dynamic UFO spawns.

EDIT: Warning, this post is fairly long.

The Premise:

The vanilla game is set up so that UFOs and aliens progress at a steady rate. The balance is such that a player of a sufficient skill level will be able to keep pace with the aliens in terms of technology and resources. There's nothing inherently wrong with this, but it makes the game predictable and - across many playthroughs - not especially varied.

What I'm interested in doing, then, is creating a dynamic UFO spawn system which draws from a larger pool of UFOs for any given mission. Hence, if the game calls a Ground Attack mission, for example, you might get a Corvette assigned to that mission, or maybe a Cruiser. For a Research mission, you might get a Scout ship, or you might get a Landing Ship. And so on.

Why Dynamic UFO Spawns?

Randomness for its own sake isn't necessarily a good thing, so here are the reasons why I'm interested in this concept:

1) Dynamic Air Combat Difficulty:

Currently, the air combat game is fairly simple for any given level of tech you possess. Foxtrots kill anything of an equivalent tech level that's unescorted; Condors (or Corsairs, if you're that way inclined) deal with the rest. With random UFO spawns, sometimes you'll face UFOs that are more challenging than usual, requiring you to risk losses in order to bring the UFO down.

One significant consequence of this is that it provides a mechanism for breaking the total air supremacy that the player can achieve by the mid-game. In my own experience, and from what others have said on these forums, it's possible to end up in a situation where there are no terror missions, alien bases or base attacks simply because the player is to apt at shooting down UFOs. But with the possibility of 'out of depth' UFOs which are tougher than what you should be able to deal with, these missions would be more likely to occur.

(One objection to this might be that no alien bases, terror missions or base assaults is the player's reward for playing well. That's true, *in game*, but in terms of the player's experience this is basically limiting them to a single type of ground mission for the rest of the game. Ironically, by playing well, the player deprives themselves of ground combat diversity!)

2) Variable Ground Combat Difficulty:

As with air combat, ground combat is more or less balanced against the player's expected tech level. The game is designed so that, in principle, the player should be able to win any given ground mission they face at any given point in time. By having dynamic UFO spawns, however, the difficulty is mixed up. Sometimes you'll get an easy UFO which you can use for beta team for (or whatever); other times you'll get a tough UFO that - even if you can bring it down - will be a mission you might prefer to skip on rather than fighting it out. In other words, it adds some risk-reward thinking into the decision of whether to do a ground mission.

3) Variable UFO Contents:

The aliens encountered on a ground mission can be varied both by UFO type *and* mission type. As such, you could vary UFO contents by mission type for a greater range of aliens and difficulty. For example, a Corvette flying a Ground Attack mission could have a tougher crew loadout than a a Corvette on a Scouting mission. Similarly, on a Ground Attack mission there could be more aggressive alien types, while on a Scouting or Research mission there could be more passive or defensive aliens. All of this should lead to a much more varied ground combat game where you can't rely on the UFO type for a fairly accurate idea of what the mission is going to be like.

4) A Helping Hand:

I've focused mostly on how difficulty can spike upwards using a dynamic system, but it can also spike downward as well. This could be of use for players who are doing less well or have suffered a disaster that they'd struggle to deal with ordinarily because the game is no longer programmed to throw anything simple at the player.

Problems:

There are, of course, some problems with the idea as well:

1) Difficulty Spikes: Variable difficulty has its downside - sometimes you'll be outmatched and with dynamic UFO spawns I imagine there'd be more risk of catastrophe as the difficulty level is less predictable. However, I'd argue that a skilled player would be able to mitigate this by choosing their battles carefully and knowing when to call it quits and abort.

2) Tech Slowdown: with dynamic UFO spawns, it's not unreasonable that you might fall behind on tech because the game doesn't throw any UFOs at you of the appropriate level for a given stage in the game. This could be seen as a feature, as it will force the player out of their comfort zone on some play-throughs. But it can also be seen as a problem by making the game more difficulty sometimes without any capacity for the player to intervene. (Although greater air coverage is a partial counter, since the more UFOs you detect the more likely you are to detect one of the necessary tech level).

3) Tech Rush: the opposite of the above, getting a more advanced UFO early would potentially give you access to tech beyond what you would normally have at that point in the game and possibly allow you to skip some techs entirely.

I think this can be mitigated through various means, however. First, any tech skipping opportunities could be closed off (no MAGs before Plasma research is done; no Marauders until Corsairs are done; and so on). Second, when introducing a new UFO type into the pool, it could be assigned at first only to missions which give it the strongest crew loadout. That way, while it might be possible to access better tech earlier, you have to complete a grueling ground mission to do so. In that way, the problem is turned into a feature: a high risk ground mission nets the reward of more advanced tech.

In any case, it's also possible to see this as a feature, since it will allow the possibility of rushing for particular techs at the expense of others. In principle, I don't see why it would be a problem for a player to rush - say - aircraft if it's costing them in terms of their ground combat capability as a result. Or costing them much more money because they've hired more scientists to exploit the better tech sooner.

Conclusion:

So, that's my idea. The technical aspects of it (which I'm putting in a spoiler below) are really simple, so the trick will be balancing it. With that in mind, if anyone has any thoughts or ideas, or possibilities/problems I've not thought about, I'd love to hear them.

Acknowledgements:

- Special thanks to Solver for work done on X:CE to make this mod work better, as well as for comments and playtesting previous versions.

- More generally, thanks to those who have taken an interest in this mod and given ideas/feedback.

Share this post


Link to post
Share on other sites

Yay, my favourite mod! :)

A couple of suggestions. In the late game, a bit more balancing is still needed. The difficult point is that there's a large difference between a larger UFO appearing unexpectedly, and it appearing with a terror mission. If you're somewhat unlucky to get a UFO bigger than you're handling and it goes on a terror mission, that's tough to handle. Overall though, from what I've played, it seems the balance is close to where it should be.

Since your mod ties indirectly but in many ways to funding, what do you think about giving a funding bonus for savings civilians in terror missions? This mod is admittedly largely what I thought of when making the change possible. It improves the potential rewards for doing a tough terror mission, and fits with the whole dynamic unpredictability concepts because your funding gain would not be the same for every terror mission you win.

Share this post


Link to post
Share on other sites
A couple of suggestions. In the late game, a bit more balancing is still needed. The difficult point is that there's a large difference between a larger UFO appearing unexpectedly, and it appearing with a terror mission. If you're somewhat unlucky to get a UFO bigger than you're handling and it goes on a terror mission, that's tough to handle. Overall though, from what I've played, it seems the balance is close to where it should be.

I think I'd like to leave this in for the time being as I think it can be understood as a feature as much as a bug, so to speak.

For me, the key question is how difficult an early high-level terror mission is. If they're more or less impossible, then that is a problem since there's nothing you can do about it. However, if it's possible to win them fairly consistently, even at a high cost, then I think that's reasonable and in line with the aims of the mod. (But see below.)

Since your mod ties indirectly but in many ways to funding, what do you think about giving a funding bonus for savings civilians in terror missions? This mod is admittedly largely what I thought of when making the change possible. It improves the potential rewards for doing a tough terror mission, and fits with the whole dynamic unpredictability concepts because your funding gain would not be the same for every terror mission you win.

When I was updating the mod I saw those and was tempted by it as, in principle, I think it's a really good feature. That said, it is a shift away from vanilla in terms of balance.

However, it might be easy enough to balance by reducing the base level of funding bonus and giving a bonus for saving civilians such that saving X% of them gets you the same as you would in vanilla. I'd be tempted to say that saving ~1/3 of the civilians should give you the base amount, since I think that's probably a reasonable average and ensures that good performance can be rewarded better than poor performance is penalised. (Plus, saving all the civilians is more or less impossible, or at least impossible to control.)

---

Retrospective thought: So, I just realised that the problem with early high-level terror missions is that there's no up-side to them.

The idea of the mod, to a certain extent at least, is to provide opportunities for high-stakes play by taking on harder missions for better rewards. Pulling a high level UFO is a problem, because it's difficult to take down and the recovery mission is difficult too. On the other hand, if you pull it off, you get access to better tech sooner and more loot than you'd have gotten normally in vanilla.

The trouble with Terror Missions and Base Attacks is that getting hit by a larger UFO is just a penalty. You could argue that there's the opportunity to shoot down the UFO before it reaches its target, but at best this has just made it like every other "out of depth" UFO in the mod.

Ideally, then, there should be an upside to winning those missions as well as a downside to losing them, to make them more worthwhile. There's nothing I can think of in the code at the moment, but something I did think of was having the reward/penalty for losing/winning a terror mission scale by UFO type. I.e. larger UFOs cause a bigger funding drop but also provide a bigger bonus if defeated. That way, there's an additional reward for taking on a difficult terror mission and it means you haven't just been screwed over by an unlucky RNG that could easily have thrown a much easier mission at you.

Not sure what you can do about Base Attacks though to do the same.

Share this post


Link to post
Share on other sites
Question how this is compatibile with FItH so many nice mods but most of them use same files.

It's currently not, but it would be easy enough to make a compatibility patch. I might do so this evening if I have a chance.

Share this post


Link to post
Share on other sites

Kabill, the points about terror missions are good ones. I still think letting civilians count for funding would not screw much with vanilla balance, as the terror missions are not that common. Note also that the failure penalty is set at 500, while the success bonus is at 150. That is a large difference, in absolute terms the risk if much worse than the gain. In fact a failed terror mission will bring funding down to 0 in a region with average relations.

Something I would rather like is perhaps for the loot sales to be more significant from a terror mission - given that successful terror missions tend to still come at a high cost, it sort of seems like terror missions are always a net loss. As for the added difficulty of dynamic larger-than-usual terror missions, they come from extra alien crew size. For instance, a Carrier terror mission before you've had the chance to possibly build a Valkyrie.

Share this post


Link to post
Share on other sites

Kabill, the points about terror missions are good ones. I still think letting civilians count for funding would not screw much with vanilla balance, as the terror missions are not that common. Note also that the failure penalty is set at 500, while the success bonus is at 150. That is a large difference, in absolute terms the risk if much worse than the gain. In fact a failed terror mission will bring funding down to 0 in a region with average relations.

Something I would rather like is perhaps for the loot sales to be more significant from a terror mission - given that successful terror missions tend to still come at a high cost, it sort of seems like terror missions are always a net loss. As for the added difficulty of dynamic larger-than-usual terror missions, they come from extra alien crew size. For instance, a Carrier terror mission before you've had the chance to possibly build a Valkyrie.

Share this post


Link to post
Share on other sites

Update 1: I've uploaded a small update which adds a relation bonus for saving friendly units in Terror Missions. The base bonus is reduced from 150 to 100, but each friendly unit alive at the end of the mission adds +10 (allowing for a maximum of +300 if you save all friendly units).

Update 2: I've also uploaded a small compatibility patch which allows you to play this mod with Enhanced Crash Sites or Fire in the Hole.

@Solver: I actually reduced the penalty for failing terror missions down to 300 as a result of removing the terror mission cooldown time. Combined with the higher starting funding values, the penalty for failure should be moderate compared with vanilla.

In terms of terror mission rewards, I'd actually thought about that as a possible solution. The easiest way to do this would to to add an alien with a particular item with a high sale value (maybe even make it mission appropriate, like an alien communications relay or drop-pods or something). That said, it might still feel clunky. Ideally there'd be a solution which gels more with the Terror Mission theme.

Share this post


Link to post
Share on other sites

u are a boss thanks, istaling this straigh away

I presume u did not do the changes in already combined FItH and lore + just in plane FItH?

Edited by Alewalek

Share this post


Link to post
Share on other sites

sounds insteresting, sorry for bothering you...but i use FitH and the Lore+ patch with oppresive UI...so if i install this...and patch it to FitH+lore.. ...then am i still needing a FitH=Lore+ UI patch??

(i mean...a complete "Fith+lore+UI+dinamyc ufo patch"?...you know what im saying? oh dear...my head hurts @.@)

Edited by blackwolf
misspelling

Share this post


Link to post
Share on other sites

Is this compatible with XNT or do we need a compat patch for that too? I wanna give it a try, but not at the expense of messing up my XNT and saves.

Share this post


Link to post
Share on other sites
u are a boss thanks, istaling this straigh away

I presume u did not do the changes in already combined FItH and lore + just in plane FItH?

The compatibility patch works with the combined FitH/Lore+ pack too.

sounds insteresting, sorry for bothering you...but i use FitH and the Lore+ patch with oppresive UI...so if i install this...and patch it to FitH+lore.. ...then am i still needing a FitH=Lore+ UI patch??

(i mean...a complete "Fith+lore+UI+dinamyc ufo patch"?...you know what im saying? oh dear...my head hurts @.@)

Sadly, this mod isn't currently compatible with Oppressive UI (even with the patch). There's a chance I'll make a compatibility patch at some point, don't know when though.

Is this compatible with XNT or do we need a compat patch for that too? I wanna give it a try, but not at the expense of messing up my XNT and saves.

XNT: Into Darkness already has this mod built in, so no need to install it separately.

Share this post


Link to post
Share on other sites

wow thank you! dont worry take all the time you need..amazing work, i just run a few missions and, just blindly attacked a a ufo(corvette) on first week with a bunch of rookies,a totally carnage, i love it!

Share this post


Link to post
Share on other sites

Shameless hint: a new version could be cool, given the recent official fix to the likelihood of base attack missions, and newfound knowledge about the aggressive/passive mission distinction :)

Share this post


Link to post
Share on other sites

I'll get an update put out vaguely soon, sure. Might not be 'til next week, though, as I'm in the middle of some important work stuff at the moment (which I'm being especially slow at).

Share this post


Link to post
Share on other sites

Not to be rude or stuff, but I think it would be nice if your mods could be compatible with Xtended backgrounds. I mean, they're like, essential for playthroughs(I think so)

Share this post


Link to post
Share on other sites

Some comments then on the last part of the game with this mod, kabill. I actually think that the increased amount of max UFOs per wave does take away a bit from the strategy. With so many UFOs in a wave, they are capable of producing lots of funding-damaging events in a short time. So it becomes imperative not just to shoot down the wave as usual, but to do so in the shortest amount of time possible. Making sure I send out single Marauders with manual control, etc., to be able to run the maximum amount of missions. So the late high-tech part of the game feels a bit too much like a grind in the air.

Also you probably know this now, but you also have a low probability of base attacks. With once-per-wave removed on Scout missions (chance 100) it means that choosing Base Attack for a new mission never goes above 10% - even if Air Superiority has already been chosen.

Share this post


Link to post
Share on other sites

@Bulk: It might happen at some point. I don't particularly want to do combined mod packs with mods that are still in development at the moment as I don't really have the time to keep updating them. But once I've got this mod settled down, I'll see about mixing it with some other stuff.

@Solver: Message received. In the next build, I'll regress is back to the vanilla values and see how that compares. It might be that there'd be room for a middle round between the two.

Actually, just some thoughts: The justification for more UFOs was to offset the fact that, on average, the late game is less hard in terms of the UFOs it throws at you. However, having some less difficult UFOs actually comes with some disadvantages as well, since you're getting less in the way of funding boosts/resources for shooting them down/recovering them. Furthermore, I suppose that actually the late game UFOs aren't actually much of a match for late game aircraft anyway, so the fact that there are weaker UFOs spawning is pretty irrelevant (is it that much harder to down a Carrier with two Marauders compared with downing a Landing Ship?). There might be some efficiency gains (you might be able to send out only one plane rather than two), but again this is being countered by reduced resources and funding gains making it harder to get greater numbers of more powerful aircraft up in the air anyway.

In other words, the system might have been more self-balancing than I was giving it credit for.

(As an aside, another solution would be to push back the ticker-point at which the new maximum mission count is reached. I did this slightly, changing it from 700 to 850, but I had no sense of how the progression actually worked so wasn't sure how much of a difference this would make. From what I remember of the calculation you posted, 1000 might give the same UFO spawn progression as in vanilla up until ticker 700, but it would increase beyond that the longer you play the game. having never actually finished the game before, I don't really have a sense of when the final mission tends to happen, but I've always assumed ~800 (i.e. May) was about right so largely you would only be 'punished' if you were being especially slow.)

EDIT: Base attacks, yeah, I'll sort those. Now I know how the system works, I'll probably do an overview of all the mission types just to make sure they're in reasonable proportion with one another.

Share this post


Link to post
Share on other sites

Exactly, the system is kinda self-balancing, which I also observed now upon reaching the last stages of the game. Yeah sure, having a Corvette show up is a lucky break - I can easily down it, and it's an easy crash site I can use to train less-experienced soldiers if I want to. But I still need to send a plane after that Corvette, which is happily generating funding loss events. But at the same time I'm also facing multiple Cruiser/Carrier/Battleship UFOs, some with escorts, that need squadrons to take down. That, coupled with the factors you list, leads me to believe that the vanilla value of 7, or maybe 8, for max wave size is sufficient.

I do not think there is any need to be extra punishing in the late game - it's already punishing if you've done poorly before, and otherwise it's time to begin turning the tide. Keep in mind also that the number of alien bases present increases the max wave size, which I feel suits the mod very well - you will not want to leave alien bases around in the late game because an additional couple of UFOs can be a huge pain in the butt.

Share this post


Link to post
Share on other sites

Exactly, the system is kinda self-balancing, which I also observed now upon reaching the last stages of the game. Yeah sure, having a Corvette show up is a lucky break - I can easily down it, and it's an easy crash site I can use to train less-experienced soldiers if I want to. But I still need to send a plane after that Corvette, which is happily generating funding loss events. But at the same time I'm also facing multiple Cruiser/Carrier/Battleship UFOs, some with escorts, that need squadrons to take down. That, coupled with the factors you list, leads me to believe that the vanilla value of 7, or maybe 8, for max wave size is sufficient.

I do not think there is any need to be extra punishing in the late game - it's already punishing if you've done poorly before, and otherwise it's time to begin turning the tide. Keep in mind also that the number of alien bases present increases the max wave size, which I feel suits the mod very well - you will not want to leave alien bases around in the late game because an additional couple of UFOs can be a huge pain in the butt.

Share this post


Link to post
Share on other sites

Cool, I'll set it to the vanilla 7/700 then for the next build.

Also, if you get a chance could I ask you a favour? There's a thread on the mod discussion forum which details some tests looking at UFO escorts. The results imply that the variables in the AM_ files aren't working. If you have the time, would you be willing to have a look at the UFO mission code to see if you can find what might be causing this/how the escort chance actually works? It's not at all critical, but I've played around with the escorts a bit in this mod and it would be useful to know whether changes actually make any difference.

Share this post


Link to post
Share on other sites

Could you tell me what changes this mod makes to gameconfig.xml? I just installed the Community Edition v.24 which comes with a new gameconfig.xml and would like to get this mod working for a new playthrough.

Share this post


Link to post
Share on other sites

It changes just about everything from between where the funding modifiers are and the end of that section (after all of the UFO mission variables).

Assuming X:CE v0.24 hasn't added anything into that section since v0.21 (which I don't think it has) you should be safe just to copy-paste the modded file into v0.24. Hopefully.

@All those who care about the mod: I will hopefully have all of next weekend free so I'll be updating the mod to v1.07/X:CE v0.24 (or higher!) then.

Share this post


Link to post
Share on other sites

Yeah, you should be able to use the gameconfig.xml file also with X:CE 0.24. If it doesn't crash on startup, then everything will work, you just lose the 3-radar range display from 0.24.

Share this post


Link to post
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

×