Author Topic: [REQUEST] Research Topic spawns an Alien Mission after completion  (Read 279 times)

Offline Daev

  • Sergeant
  • **
  • Posts: 39
    • View Profile
Hello, i am currently designing a TC mod that takes place in a Post-Apocalypse, the theme/feel is you emerging from a bunker (Base), and branching out to the local communities and establishing yourself to take care of an ultimate threat. Central to my theming is that you do not have any knowledge of the world above for the first month, you learn it as you play.

To me this means no UFOs or Site Missions, or even initial funding at the start. What I wanted to do for missions, is to have research topics, something like "Scouting Mission" or "Seach for Scavenging Sites" that once researched, would then in turn spawn an alien mission or site.

This would provide a level of choice at the start for the type of mission, and the rewards and assets you wish to focus on early. For example, maybe you do alot of scav missions for early materials to create a surplus of military grade weapons. Or maybe you do settlement defense missions for free recruits and base personnel, as the market really does not have anything in it until the mid-late game.

Hopefully this is relatively simple to do, but I think would be a very cool feature for other applications as well.

Thank you for your time.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #1 on: November 21, 2024, 11:33:25 pm »
Spawning alien missions is not a problem, it's already done for example when shooting down a UFO (retaliation) or just by RNG (supply missions).

The problem is what parameters should the mission have and how do you want to define them.
If you want all parameters hard-coded (type, race, region, etc.) it's easy, but probably also not very fun.
If you want them dynamic, then how much? And where and how do you want to define this dynamic aspect?

Offline Daev

  • Sergeant
  • **
  • Posts: 39
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #2 on: November 22, 2024, 12:00:16 am »
If you want all parameters hard-coded (type, race, region, etc.) it's easy, but probably also not very fun.
If you want them dynamic, then how much? And where and how do you want to define this dynamic aspect?

That is a good point, did not think of that. The TC will take place only in the continental United states, I will be making a custom globe that will be scaled up.

So the dream would be to have a weighted table of mission strings that is chosen, that way you can have lists that update with new topics as some are enabled and disabled using the ARC system and research progression.

If there is a way to override the region to be on that the base is in, that would be cool but is not completely necessary. But other than that, I think those tools are enough for plenty of randomization, as most other stuff would be handled by the missions and the mapscripts.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #3 on: November 22, 2024, 01:11:19 am »
As clarified in the other thread (https://openxcom.org/forum/index.php?topic=12339.0)
the alien mission should not be spawned on research topic completion,
but rather on event popup (`spawnedEvent` attribute), which can be much later than the research topic completion.

Offline Daev

  • Sergeant
  • **
  • Posts: 39
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #4 on: November 22, 2024, 01:16:41 am »
As clarified in the other thread (https://openxcom.org/forum/index.php?topic=12339.0)
the alien mission should not be spawned on research topic completion,
but rather on event popup (`spawnedEvent` attribute), which can be much later than the research topic completion.

Either/Or would work for my use, as long as a completion of a research topic spawns an alien mission not bound by the Mission Scripts rule, that would work. if the AlienMission spawns from a SpawnEvent Attribute, thats works perfect and if that is easier to do for you, than that is the best option.

Again, I appreciate your time sir.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #5 on: November 22, 2024, 01:24:06 am »
Both are equally easy, I may even do both.

But I'll come back to you later about those hardcoded/dynamic alien mission parameters again, that will be the tricky part.

Offline Daev

  • Sergeant
  • **
  • Posts: 39
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #6 on: November 22, 2024, 01:34:47 am »
Both are equally easy, I may even do both.

But I'll come back to you later about those hardcoded/dynamic alien mission parameters again, that will be the tricky part.

Awesome, I honestly, really appreciate your time here!

IK this is a different request, but weighted list option for both the SpawnedAlienMission and the SpawnedEvent would honestly be enough, as that seems easier to implement then overriding the hardcoded attributes.

Offline Nord

  • Commander
  • *****
  • Posts: 1747
  • The Gate is open.
    • View Profile
Maybe there can be used different approach: research topic with some new flag will cause the defined missionscript to "restart" just as in the beginning of month.

Offline Daev

  • Sergeant
  • **
  • Posts: 39
    • View Profile
Maybe there can be used different approach: research topic with some new flag will cause the defined missionscript to "restart" just as in the beginning of month.

The issue with that approach, in my head, is that it would be imprecise at best, and cause a mission that was intended to run/spawn only once, to spawn for the entire month at worst. As once the topic is completed, that mission will always have a chance to spawn that month now, instead of a "Cause and Effect" style of choice.

The purpose is not for the research topic to unlock new missions, but to be a pseudo mission select, allowing for an almost separate game loop of choice. While you are doing the usual xcom loop of ufo, intercept, crash site mission. You are able to choose a mission using your research hours in order to get item, funds, progression etc. Very similar to Covert OPs in War of the Chosen.

Although your approach could be useful for a different purpose.