aliens

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

Offline Daev

  • Sergeant
  • **
  • Posts: 41
    • 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.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9109
    • 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: 41
    • 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.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9109
    • 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: 41
    • 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.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9109
    • 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: 41
    • 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: 1748
  • The Gate is open.
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #7 on: November 25, 2024, 03:43:04 am »
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: 41
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #8 on: November 25, 2024, 04:56:56 am »
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.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9109
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #9 on: November 25, 2024, 09:33:57 am »
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.

Yes, that is my first thought too.

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.

It's just a way to define the dynamic mission parameters using already established structures.

Offline Daev

  • Sergeant
  • **
  • Posts: 41
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #10 on: November 25, 2024, 03:50:36 pm »
It's just a way to define the dynamic mission parameters using already established structures.

Ahh gotcha, makes sense now when I think about it in engine, not ruleset terms.

Offline Scamps

  • Captain
  • ***
  • Posts: 86
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #11 on: November 25, 2024, 08:28:12 pm »
The purpose is not for the research topic to unlock new missions, but to be a pseudo mission select

Did you look into From the Ashes fork? It also solves "No initial funding" issue. Backward compatibility with OXCE not guarantied and under development, but might be worth taking a look.

Sorry for offtopic.

Online Delian

  • Commander
  • *****
  • Posts: 513
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #12 on: November 25, 2024, 09:14:36 pm »
If the purpose is to spawn an alien mission, then couldn't the same be accomplished with manufacturing and item trigger? Manufacturing is also more customizable than research due to item requirements.

The feature for players to be able to generate their own missions has been something modders have been experimenting for many years. At some point, wouldn't it make more sense to simply create a new window where players would be able to, I dunno, click on a button "I wanna do this mission", and the mission would be generated right there and then? Instead of various workarounds with research, manufacturing, and events?

Offline Daev

  • Sergeant
  • **
  • Posts: 41
    • View Profile
Re: [REQUEST] Research Topic spawns an Alien Mission after completion
« Reply #13 on: November 25, 2024, 11:00:10 pm »
If the purpose is to spawn an alien mission, then couldn't the same be accomplished with manufacturing and item trigger? Manufacturing is also more customizable than research due to item requirements.

The feature for players to be able to generate their own missions has been something modders have been experimenting for many years. At some point, wouldn't it make more sense to simply create a new window where players would be able to, I dunno, click on a button "I wanna do this mission", and the mission would be generated right there and then? Instead of various workarounds with research, manufacturing, and events?

I cannot speak to anyone else's motivations but my own. But my intention is to make research hours mean a lot more than they do in the base game. In my mod, you start out with very good gear, but no way to create it until way later. So any development and ways to create those weapons or any weapons will be very important.

I think it is an interesting and fun game loop option, to use those precious man hours, to get more supplies, crafting stuff, soldiers, etc. To do this, having a way to steer the ship so to say, into a mission that would benefit the game plan you are working towards, at the expense of getting tech later, and I mean months later, is a very cool way to do so.

The purpose of the feature is not to just have a mission select. As that defeats the purpose of the risk/reward decision, that I think would enrich gameplay, using systems already in place.