OpenXcom Forum
OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Suggestions DONE => Topic started by: Meridian on January 24, 2019, 03:59:01 pm
-
requested by Drages
-
The idea is that you recover something else than what you see on the battlescape.
Can be used for example:
1. to recover weapon fragments instead of weapons, a la xcom2012
2. to recover tons of various loot instead of a loot box (and skip the manufacturing project to open a loot box)
3. to recover some alien body parts instead of alien corpse (and skip dissection manufacturing project)
4. etc.
Sample ruleset:
items:
- type: STR_PLASMA_PISTOL
recoveryTransformations:
STR_WEAPON_FRAGMENTS: [0, 50, 35, 15] # 0% to recover 0 items, 50% to recover 1 item, 35% for 2 items, 15% for 3 items
STR_RANDOM_BITS_OF_KNOWLEDGE: [10] # always recover exactly 10 items
Specifying just one number means "recover that many items".
Specifying two or more numbers gives weights to recover 0, 1, 2, 3, 4, 5, etc. items, for example:
- [0, 50, 35, 15] = 0% to recover 0 items, 50% to recover 1 item, 35% for 2 items, 15% for 3 items
- [25, 25, 25, 25] = 25% for 0, 25% for 1, 25% for 2, 25% for 3 items
- [1, 1, 1, 1] = means the same as above = 25% for 0, 25% for 1, 25% for 2, 25% for 3 items
On the "transformed into" side, you cannot specify to recover live aliens from some random unorganic junk.
Also, you can (but should not) recover special items (alien alloys, food, entertainment, etc.) or bounty items, because the debriefing summary is done before the transformations and will not show correct values to the player.
The "transformed from" side supports transformation of:
- weapons
- ammo
- consumable medikits
- non-consumable medikits
- alien corpses
- corpses of live aliens who die because of lack of alien containment
- civilians recovered as items (which don't represent a live alien)
- bounty item
Not supported or irrelevant:
- live aliens EDIT: partially supported since March 25th 2020, OXCE v6.5, live aliens can now be recovered as items (not as other live aliens)
- civilians recovered as items (which do represent a live alien)
- special items (alien aloys, alien food, alien entertainment, etc.)
- xcom vehicles (HWP/SWS)
- xcom vehicle ammo
- automatically replaced armor of KIA xcom soldiers
- automatically replaced armor of MIA xcom soldiers
-
Hey again!
You already listed what we need this for. I always hated to have 150 heavy plasma just to sell.. alien tech should be alien tech, not ready for us to use at first moment, or not to handle them after i figure out where is the trigger.
Just it needs to have randomization to complete the random project. For example that weapon which destroyed or disassembled first, should able to give random items. More part or the most important "unique parts" can be survived after that self destruct or disassemble procedure. As i explained why the randomization should be at manufacture-research-loot herehttps://openxcom.org/forum/index.php/topic,6867.0.html (https://openxcom.org/forum/index.php/topic,6867.0.html), we need to able to get things with percentages from this transformations. I just do not care if a heavy plasma gives me 4 or 5 weapon fragment but that very rare "weapon power core" to create my own human plasma weapons. It goes same to body parts as maybe the brain of the sectoid is not blown up this time.. how can someone miss that head anyway..
As the code example, as same as manufacture one:
recoveryTransformations:
STR_WEAPON_FRAGMENTS: 1-3
STR_PLASMA_CORE: 0,50-1,35-2,15 (%50 0 drop, %35 1 drop, %15 2 drop)
STR_RANDOM_BITS_OF_KNOWLEDGE: 10
Thank you!
-
One more useful innovation it be.
Agree with all my heart.
Maybe syntax can use lists as deployement?
Randomitemtransform:
- variant1
- 2
-
- parts1: 5
- parts2: 3
?
-
Added support for randomization.
Updated original post with ruleset syntax.
-
Added support for randomization.
Updated original post with ruleset syntax.
So, if i want to have %10 chance to get 1 item only,
STR_WEAPON_FRAGMENTS: [90, 10] # 90% to recover 0 items, 10% to recover 1 item
and can it be more then 4?
STR_WEAPON_FRAGMENTS: [20, 20, 20, 20, 20] # 0 to 4 item with %20 chance
are those correct?
And this confused me a bit, [1, 1, 1, 1] ,
I read this %1 chance to get 0-3 items.. how is this work with [25,25,25,25]? I mean this could be 25 items with %25 chance.. so this [1, 1, 1, 1] is unique to "1" only?
-
So, if i want to have %10 chance to get 1 item only,
STR_WEAPON_FRAGMENTS: [90, 10] # 90% to recover 0 items, 10% to recover 1 item
Yes.
and can it be more then 4?
Yes, unlimited.
STR_WEAPON_FRAGMENTS: [20, 20, 20, 20, 20] # 0 to 4 item with %20 chance
are those correct?
Yes.
And this confused me a bit, [1, 1, 1, 1] ,
I read this %1 chance to get 0-3 items.. how is this work with [25,25,25,25]? I mean this could be 25 items with %25 chance.. so this [1, 1, 1, 1] is unique to "1" only?
I cannot use percentages... because modders could define something like this [100,100,100,100]... and then wtf should I do?
Instead the numbers are "weights".
If all weights add up to 100, then it is the same as percentages. If they add up to something else, corresponding portion is considered.
So [0, 50, 35, 15] adds up to 100 and corresponding chances are 0/100, 50/100, 35/100 and 15/100 = 0%, 50%, 35% and 15%.
Similarly [1, 1, 1, 1] adds up to 4 and corresponding chances are 1/4, 1/4, 1/4 and 1/4 = 25%, 25%, 25% and 25%.
-
I cannot use percentages... because modders could define something like this [100,100,100,100]... and then wtf should I do?
Instead the numbers are "weights".
If all weights add up to 100, then it is the same as percentages. If they add up to something else, corresponding portion is considered.
So [0, 50, 35, 15] adds up to 100 and corresponding chances are 0/100, 50/100, 35/100 and 15/100 = 0%, 50%, 35% and 15%.
Similarly [1, 1, 1, 1] adds up to 4 and corresponding chances are 1/4, 1/4, 1/4 and 1/4 = 25%, 25%, 25% and 25%.
I see, this is great solution! I got it now!
So same for manufacture will open a new era for XCom!!! :) again thx for your time!
-
Small update in OXCE v6.5:
The "transformed from" side supports transformation of:
- weapons
- ammo
- consumable medikits
- non-consumable medikits
- alien corpses
- corpses of live aliens who die because of lack of alien containment
- civilians recovered as items (which don't represent a live alien)
- bounty item
Not supported or irrelevant:
- live aliens EDIT: partially supported since March 25th 2020, OXCE v6.5, live aliens can now be recovered as items (not as other live aliens)
- civilians recovered as items (which do represent a live alien)
- special items (alien aloys, alien food, alien entertainment, etc.)
- xcom vehicles (HWP/SWS)
- xcom vehicle ammo
- automatically replaced armor of KIA xcom soldiers
- automatically replaced armor of MIA xcom soldiers
-
I have a mission where you rescue some victims from a Deep Ones ritual. These victims are not civilian units, they are items (battleType: 0).
There are several types of such victims (for visual variety), but I'd like to recover them all as the same item (called Human Sacrifice), since I don't need to differentiate between them once they mission ends. How exactly should I specify that? The examples given are about complex cases like a multitude of items from one, with weights and such, and I just need a simple 1:1 transformation of item X to item Y. Help please :)
-
On the "transformed into" side, you cannot specify to recover live aliens from some random unorganic junk.
Transforming inanimate objects into live aliens is not supported.
-
In case your "Human Sacrifice" object is not a live alien, then you can use this example:
items:
- type: STR_GRENADE
recoveryTransformations:
STR_ELECTRO_FLARE: [1]
- type: STR_STUN_ROD
recoveryTransformations:
STR_ELECTRO_FLARE: [1]
This transforms all grenades and stun rods into electroflares.
-
Thank you, this is exactly what I needed.