aliens

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

Offline Finnik

  • Colonel
  • ****
  • Posts: 143
    • 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 »

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 9825
  • 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 FeruEnzeru[RETIRED/I QUIT]

  • Colonel
  • ****
  • Posts: 430
  • retired, because of Meridian and his followers. 👎
    • View Profile
Re: [Suggestion] New property for starting conditions
« Reply #2 on: December 02, 2018, 05:05:55 pm »
This looks really useful. Thumbs up!
Man i wish "crafts (example: STR_SKYRANGER or any kind craft string (STR_ANY))" could work with/on the "producedItems" code while manufacturing items on the workshop and workshop projects.
« Last Edit: December 02, 2018, 05:10:24 pm by FeruEnzeru »

Offline Finnik

  • Colonel
  • ****
  • Posts: 143
    • View Profile
Re: [Suggestion] New property for starting conditions
« Reply #3 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 FeruEnzeru[RETIRED/I QUIT]

  • Colonel
  • ****
  • Posts: 430
  • retired, because of Meridian and his followers. 👎
    • View Profile
Re: [Suggestion] New property for starting conditions
« Reply #4 on: December 02, 2018, 06:35:59 pm »
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.
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

Offline Finnik

  • Colonel
  • ****
  • Posts: 143
    • View Profile
Re: [Suggestion] New property for starting conditions
« Reply #5 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: 6382
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [DONE] [Suggestion] Required items per starting condition
« Reply #6 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 »