OpenXcom Forum

Modding => OpenXcom Extended => Topic started by: Finnik on December 02, 2018, 02:15:38 pm

Title: [DONE] [Suggestion] Required items per starting condition
Post by: Finnik 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.
Title: Re: [Suggestion] New property for starting conditions
Post by: Solarius Scorch on December 02, 2018, 02:19:32 pm
This looks really useful. Thumbs up!
Title: Re: [Suggestion] New property for starting conditions
Post by: FeruEnzeru[RETIRED/I QUIT] 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.
Title: Re: [Suggestion] New property for starting conditions
Post by: Finnik 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.
Title: Re: [Suggestion] New property for starting conditions
Post by: FeruEnzeru[RETIRED/I QUIT] 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?
(http://img2.wikia.nocookie.net/__cb20121102224457/xcom/images/8/85/Skeleton_Key.jpg)
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
Title: Re: [Suggestion] New property for starting conditions
Post by: Finnik 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
Title: Re: [DONE] [Suggestion] Required items per starting condition
Post by: Meridian 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