OpenXcom Forum
OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Suggestions DONE => Topic started by: mutantlord on September 06, 2022, 01:09:31 am
-
Hello, I wish to propose a feature that remove items from base in Events. Something like.
events:
- name: STR_NEGATIVE_EVENT
description: STR_NEGATIVE_EVENT_DESCRIPTION1
randomRemoveMultiItemList:
-
STR_AVALANCHE_LAUNCHER: 2
STR_AVALANCHE_MISSILES: 10
-
STR_STINGRAY_LAUNCHER: 3
STR_STINGRAY_MISSILES: 15
-
STR_CANNON: 4
STR_CANNON_ROUNDS_X50: 20
timer: 100
timerRandom: 200
extraStrings:
- type: en-US
strings:
STR_NEGATIVE_EVENT: "Base Theft"
STR_NEGATIVE_EVENT_DESCRIPTION1: "Due to internal corruption in your base, some of your base items has been sold to the black markets."
-
Done.
Any of the item generating attributes can be re-used.
Add attribute `invert: true` to make them remove items.
Example:
events:
- name: STR_NEGATIVE_EVENT
description: STR_NEGATIVE_EVENT_DESCRIPTION1
invert: true # default false
randomMultiItemList:
-
STR_STINGRAY_LAUNCHER: 3
STR_STINGRAY_MISSILES: 15
-
STR_PISTOL: 4
STR_PISTOL_CLIP: 20
timer: 100
timerRandom: 200
-
Question: what will be, if base does not have proper item when event happens?
-
Question: what will be, if base does not have proper item when event happens?
The code iterates through the bases, including crafts that are not out of the base, and removes the items until the desired amount has been reached. Nothing happens if there are no items to remove.
I suppose this imposes some limitations how this can be used. The example in the original suggestion does not make sense, because displaying a message about base theft makes little sense if nothing is in fact stolen.
-
Logically, the event should only pop up if all the required items are present.
-
Logically, the event should only pop up if all the required items are present.
If you want an event, where the thieves steal all your gold, what do you specify?
10, 100, 1000?
And if you specify 1000 gold, but there is only 999 gold in the base... do the thieves just say "yeah, f it, 999 gold is not worth our trouble, let's politely return it back and leave..."?
Anyway, the so called "negative events" have been discussed multiple times before and the result was, they are simply a bad feature overall.
They can't be properly specified... thus this discussion.
And they are a BAD game design anyway.
Most players (including myself) will just reload previous autosave and sell all gold before the thieves can steal it.
But sometimes I have a weak day and implement also features I completely disagree with.
-
Hi Meridian, thank you for implementing this feature. I look forward in including it in my mods. I remember in event script there is item trigger, this negative event can only trigger if the item is in the base. Can be use in a number of situations if a modder has the creative imagination for its use. I am really grateful for it’s inclusion, thank you very much and your time in making it possible.
-
If you want an event, where the thieves steal all your gold, what do you specify?
I guess for negative events to properly function, they should be a lot more configurable, perhaps by allowing the modder to specify multiple outcomes:
What happens if no items present (below minimum range of required items): No message (event skipped), or failure message (take nothing)
What happens if some of the items are present: no message (event skipped), failure message (take nothing), partial success message (take whatever you can)
What happens if all of the items are present: success message (take all)
And who said that negative events have to only remove items? They could both take items and give items at the same time. Or crafts?
Hmm. This is pretty complicated, because conditions are normally only checked in eventScripts, which are only executed at the beginning of the month, but here we'd need to check conditions when an event happens during a month. So basically, when event happens, it would have to instantly trigger an eventScript, which would check the item conditions and conditionally trigger negative events depending on item presence and item count...
-
Sample Coding
extraStrings:
- type: en-US
strings:
STR_DCFEVENTS: "Disconnected Future Events"
STR_EVENT39: "Base Corruption Detected"
STR_EVENT39NOTE: "One of our Logistic officers has found some inventory is missing from their regular base inventory check out. Their research is saying that some of these equipment is either missing, lost or stolen."
eventScripts:
- type: STR_DCFEVENTS39
eventWeights:
0:
STR_EVENT39: 100
firstMonth: 0
executionOdds: 1
itemTriggers:
STR_STRELA_LAUNCHER: true
events:
- name: STR_EVENT39
description: STR_EVENT1NOTE
background: BACK13.SCR
regionList: [LANDSPAWNSMERC]
city: false
points: 100
invert: true
randomMultiItemList:
-
STR_STRELA_LAUNCHER: 1
-
STR_STRELA_LAUNCHER: 2
-
STR_STRELA_LAUNCHER: 3
timer: 25000
timerRandom: 3000
-
That is how it should work. Nothing more or less. Modder will have to come up with inspiration to work with the limits of this feature. Nothing more is ask of it.
-
A suggestion to improve this feature. When items are removed, add "-" symbol into popup window with output, e.g. -1 STR_PISTOL CLIP.
-
A suggestion to improve this feature. When items are removed, add "-" symbol into popup window with output, e.g. -1 STR_PISTOL CLIP.
Done.
-
Well, at least I am glad that this feature is interested by a few other modders, not just me. Hope it can be expanded into something more with more suggestions.