Author Topic: [DONE] [Suggestion] Required items per starting condition  (Read 4106 times)

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
[DONE] [Suggestion] Required items per starting condition
« on: December 02, 2018, 02:15:38 pm »
With help of gurus of C++ (thanks again Meridian, SupSuper, Yankes and Otto for explanations and support) ive add new property into starting conditions block, called needItem. this works very similar to allowedCraft, but it checks, if sending craft contains listed items, and if not, its not allowed to launch (and also land). Here is video demo:

If that feature is wanted for modders, may be it would be possible to add it to OXCE? I can commit it to github. Also im very noob for OOP and C++, so any comments and tips are wellcome.
« Last Edit: February 03, 2019, 01:04:50 pm by Meridian »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Suggestion] New property for starting conditions
« Reply #1 on: December 02, 2018, 02:19:32 pm »
This looks really useful. Thumbs up!

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: [Suggestion] New property for starting conditions
« Reply #2 on: December 02, 2018, 06:07:27 pm »
So when i was watching the video, startingConditions could be a great idea (Unless you need or don't need pistols or anything your units recommend for this mission).

e.g: Covert Missions with a Single Soldier as an Agent with just pistols instead of two handed guns (example: rifle or cannon or shotgun or any kind of two handed weapon).

How about that.  :D

Initial point was that you will need some sort of spetial key, to go base assault mission, but it can be modded to anything. You are speaking more about allowedItems, that alredy exist in OXCE. Pistol here is only as example item.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: [Suggestion] New property for starting conditions
« Reply #3 on: December 02, 2018, 07:05:29 pm »
Okay! :D

Speaking of examples for needItems for alien base assaults:

How about this?

This the Skeleton Key from EU2012/EW afaics. :)

My example strings for base assault mission starting conditions are...
Code: [Select]
startingConditions:
  - type: STR_ALIEN_BASE_ASSAULT_KEY
    needItems:
        - STR_EU2012_SKELETON_KEY

nice) it should be ripped for OXC sprite or redrawn

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9102
    • View Profile
Re: [DONE] [Suggestion] Required items per starting condition
« Reply #4 on: February 03, 2019, 01:09:27 pm »
This has been added a few weeks ago.

Just adding that the attribute name is "requiredItems", not "needItems".
And it's a list of items and required quantities too.

There is also a flag "destroyRequiredItems" saying if the items should be destroyed or not (upon landing confirmation).

Code: [Select]
startingConditions:
  - type: STR_ALIEN_BASE_ASSAULT_KEY
    requiredItems:
      STR_EU2012_SKELETON_KEY: 1
    destroyRequiredItems: true
« Last Edit: February 03, 2019, 01:12:03 pm by Meridian »