Author Topic: [DONE] [Suggestion] Bounty after successful mission  (Read 5487 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
[DONE] [Suggestion] Bounty after successful mission
« on: August 02, 2017, 01:07:22 pm »
There is already a research bounty (usually a research gateway unlocking other research or missions or other stuff),
see here: https://openxcom.org/forum/index.php/topic,5227.msg79244.html#msg79244

After discussion on Discord (Solarius, Warboy), I added an item bounty as well... in case you can't put such item into a terrain or into a ship/UFO (as it is normally done).

I decided to add only a single item, for the following reasons:

1. It is easier for player to spot 1 item called "Mission Bounty" in the debriefing "recovered items" GUI than it is to spot several random items. I also suggest giving bounty item a low listOrder, so that it appears on the top of the list

2. You can use this item in manufacturing and turn it into not only any number of items... but also into engineers, scientists, soldiers or crafts. This is more flexible and also allows you to wait until you can actually use the bounty... e.g. until you have a free hangar for a craft or free space for a new staff member.

3. I'm lazy

The bounty item is added into base stores automagically, after any "successful" mission.
OpenXcom counts as success:
 - normal mission: killed or stunned all aliens
 - destroy objective(s) mission: at least 1 survivor, objective(s) already destroyed and no next stage... even if you abort the mission afterwards with at least 1 soldier in exit area (e.g. TFTD alien colony)
OpenXcom counts as failure:
 - normal mission: all soldiers lost
 - normal mission: aborted
 - destroy objective(s) mission: no survivors or aborted while not all objective(s) destroyed yet or not last stage yet
Vanilla ChronoTriggers FORCE_WIN and FORCE_LOSE will override the above, ChronoTrigger FORCE_ABORT will behave the same way as if you aborted a mission.
 
Code: [Select]
alienDeployments:
  - type: STR_LOC_GDX_PRISON
    unlockedResearch: STR_LOC_GDX_PRISON_DONE
    missionBountyItem: STR_LOC_GDX_PRISON_BOUNTY_ITEM # item added after successful mission

Suggestions, improvements, critique, etc. are welcome...
« Last Edit: July 17, 2018, 03:06:30 pm by Meridian »

Offline alinare

  • Colonel
  • ****
  • Posts: 128
    • View Profile
Re: Bounty after successful mission
« Reply #1 on: August 02, 2017, 01:25:00 pm »
Hello Meridian:
Some things have occurred to me, that I do not know if they will be able to be implemented:
- An object only appears once throughout the game, for example, unique artifacts, valuable components.
- That a concrete weapon, that is, only affects a certain objective. For example, a poison that attacks only the sectoids, or the mutons.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Bounty after successful mission
« Reply #2 on: August 02, 2017, 05:26:45 pm »
Hello Meridian:
Some things have occurred to me, that I do not know if they will be able to be implemented:
- An object only appears once throughout the game, for example, unique artifacts, valuable components.

Possible.
Make a mission that only appears once and make this item the bounty from this mission.

- That a concrete weapon, that is, only affects a certain objective. For example, a poison that attacks only the sectoids, or the mutons.

Possible.
There are 10 more armor resistance types, use one of them and make everybody except your selected foes immune to this type of damage.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Bounty after successful mission
« Reply #3 on: August 02, 2017, 08:19:16 pm »
Great news!

Now we can have the "mysterious chest" feature... Except it will be examined by brainers, not runts. But that's just as good, and perhaps even better.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [DONE] [Suggestion] Bounty after successful mission
« Reply #4 on: December 19, 2021, 08:26:20 pm »
I decided to add only a single item...

You can now spawn more than one item (of the same type).
Example:

Code: [Select]
alienDeployments:
  - type: STR_TEST
    missionBountyItem: STR_SOME_ITEM
    missionBountyCount: 42

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: [DONE] [Suggestion] Bounty after successful mission
« Reply #5 on: December 28, 2021, 10:40:29 pm »
What about making it in the form of a more complex data type, like a map of items to their count?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [DONE] [Suggestion] Bounty after successful mission
« Reply #6 on: December 28, 2021, 11:25:03 pm »
It is technically possible.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: [DONE] [Suggestion] Bounty after successful mission
« Reply #7 on: December 29, 2021, 12:09:39 am »
Sure.  :) More interesting - is it required? I usually spawn items on the map directly, so it naturally goes to the loot.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [DONE] [Suggestion] Bounty after successful mission
« Reply #8 on: December 29, 2021, 01:10:40 am »
I don't know if it is required.
Nobody asked for it yet.

My guess is that it is not required, there are other options to achieve the same result.
« Last Edit: December 29, 2021, 01:16:16 am by Meridian »

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: [DONE] [Suggestion] Bounty after successful mission
« Reply #9 on: December 29, 2021, 09:44:20 am »
There are some designs that would be much easier if you could be able to award multiple items from the alienDeployments.rul.

Code: [Select]
alienDeployments:
  - type: STR_TEST
    missionBountyItem: [STR_SOME_ITEM, STR_SOME_OTHER_ITEM, STR_ANOTHER_ITEM, STR_ONE_ITEM, STR_LAST_ITEM]
    missionBountyCount: [42, 112, 14, 1, 5]

I've had to compromise what I've been building a few times because only one type of item could be awarded for mission victory via bounty.

If multiple bounty items per alienDeployment: were added I would make use of this feature.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: [DONE] [Suggestion] Bounty after successful mission
« Reply #10 on: December 29, 2021, 12:18:56 pm »
There are some designs that would be much easier if you could be able to award multiple items from the alienDeployments.rul.

Code: [Select]
alienDeployments:
  - type: STR_TEST
    missionBountyItem: [STR_SOME_ITEM, STR_SOME_OTHER_ITEM, STR_ANOTHER_ITEM, STR_ONE_ITEM, STR_LAST_ITEM]
    missionBountyCount: [42, 112, 14, 1, 5]

I've had to compromise what I've been building a few times because only one type of item could be awarded for mission victory via bounty.

If multiple bounty items per alienDeployment: were added I would make use of this feature.
Why this is two separate lists? This will only make harder to load it and harder for modders to edit it.
If we need multiple item with different count then it should look like:
Code: [Select]
missionBountyItemX: #this could be same node or node with different name
  STR_SOME_ITEM: 12
  STR_ANOTHER_ITEM: 5

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: [DONE] [Suggestion] Bounty after successful mission
« Reply #11 on: December 29, 2021, 02:26:20 pm »
Why this is two separate lists? This will only make harder to load it and harder for modders to edit it.
If we need multiple item with different count then it should look like:
Code: [Select]
missionBountyItemX: #this could be same node or node with different name
  STR_SOME_ITEM: 12
  STR_ANOTHER_ITEM: 5

I was basing it off how i'd seen zombieUnitByArmorMale: & zombieUnitByArmorFemale: written in the past.

Code: [Select]
    zombieUnitByArmorMale: { STR_NONE_UC: STR_DOT_TENTACULAT_ZOMBIE_DIVING_SUIT_UNIT, STR_PLASTIC_AQUA_ARMOR_UC: STR_DOT_TENTACULAT_ZOMBIE_PLASTIC_AQUA_UNIT, STR_ION_ARMOR_UC: STR_DOT_TENTACULAT_ZOMBIE_ION_ARMOR_UNIT, STR_MAGNETIC_ION_ARMOR_UC: STR_DOT_TENTACULAT_ZOMBIE_MAGNETIC_ION_ARMOR_UNIT }
    zombieUnitByArmorFemale: { STR_NONE_UC: STR_DOT_TENTACULAT_ZOMBIE_DIVING_SUIT_UNIT, STR_PLASTIC_AQUA_ARMOR_UC: STR_DOT_TENTACULAT_ZOMBIE_PLASTIC_AQUA_UNIT, STR_ION_ARMOR_UC: STR_DOT_TENTACULAT_ZOMBIE_ION_ARMOR_UNIT, STR_MAGNETIC_ION_ARMOR_UC: STR_DOT_TENTACULAT_ZOMBIE_MAGNETIC_ION_ARMOR_UNIT }


The way you're displaying it is much better, a single easy to read list like that would be much more preferable.

As you can see from the above code the other kind of list can get difficult to read pretty fast.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [DONE] [Suggestion] Bounty after successful mission
« Reply #12 on: December 29, 2021, 06:30:58 pm »
I was basing it off how i'd seen zombieUnitByArmorMale: & zombieUnitByArmorFemale: written in the past.

They have completely different syntax, I don't see how you could base one off the other.

The way you're displaying it is much better, a single easy to read list like that would be much more preferable.

As you can see from the above code the other kind of list can get difficult to read pretty fast.

Yankes' syntax and the zombie example are both doing the same thing and are interchangeable.
You can use the same syntax for zombie stuff to make it more readable.

More info here: https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html