aliens

Author Topic: [DONE] [Suggestion] Geoscape pop-up events  (Read 20193 times)

Offline Finnik

  • Colonel
  • ****
  • Posts: 496
  • Finnik#0257
    • View Profile
Re: [DONE] [Suggestion] Geoscape pop-up events
« Reply #45 on: August 11, 2022, 09:23:20 am »
What about check for having specific soldier types on the base? Like stacking 20 dogs on a base would spawn something fun :)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8719
    • View Profile
Re: [DONE] [Suggestion] Geoscape pop-up events
« Reply #46 on: August 11, 2022, 09:50:03 am »
You know how I hate sentences beginning with "What about".

Either you need it or you don't need it... say it clearly please.
I cannot read minds.

If that wasn't a question for me, I apologize in advance.

Offline Finnik

  • Colonel
  • ****
  • Posts: 496
  • Finnik#0257
    • View Profile
Re: [DONE] [Suggestion] Geoscape pop-up events
« Reply #47 on: August 13, 2022, 09:53:23 am »
Sorry. I do need this property. I wonder if it can be done in OXCE?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8719
    • View Profile
Re: [DONE] [Suggestion] Geoscape pop-up events
« Reply #48 on: August 14, 2022, 10:31:37 am »
OK.

Do you have any specific syntax in mind?

Do you want to do a PR or should I implement it myself?

Offline Finnik

  • Colonel
  • ****
  • Posts: 496
  • Finnik#0257
    • View Profile
Re: [DONE] [Suggestion] Geoscape pop-up events
« Reply #49 on: August 14, 2022, 12:12:41 pm »
OK.

Do you have any specific syntax in mind?

Do you want to do a PR or should I implement it myself?

I was thinking about something like that.
Code: [Select]
  - type: wildDogs
    oneTimeSequentialEvents: [STR_WILD_DOGS]
    soldierTypeTriggers:
      STR_SOLDIER: false
      STR_DOG: true
    executionOdds: 100

So once you process scripts, you iterate through all bases to see if a single base match those conditions. Would be enough for me, but AFAIK there is a regional system for event scripts (what region causes the event), not sure if those should interact somehow...

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8719
    • View Profile
Re: [DONE] [Suggestion] Geoscape pop-up events
« Reply #50 on: August 22, 2022, 09:13:39 pm »
I was thinking about something like that.
Code: [Select]
  - type: wildDogs
    oneTimeSequentialEvents: [STR_WILD_DOGS]
    soldierTypeTriggers:
      STR_SOLDIER: false
      STR_DOG: true
    executionOdds: 100

Added.

Offline Finnik

  • Colonel
  • ****
  • Posts: 496
  • Finnik#0257
    • View Profile
Re: [DONE] [Suggestion] Geoscape pop-up events
« Reply #51 on: October 21, 2022, 09:31:14 am »
Thanks!

Offline Aldorn

  • Commander
  • *****
  • Posts: 750
    • View Profile
Re: [DONE] [Suggestion] Geoscape pop-up events
« Reply #52 on: December 16, 2023, 03:07:11 am »
More attributes added for events:

1. music - String ID of the music to play when this event pops up on the Geoscape.
2. everyItemList - A list of item IDs. When this event pops up they are all transferred to the HQ (within 1 hour).
3. randomItemList - A list of item IDs. When this event pops up one of them is selected randomly and transferred to the HQ (within 1 hour).
4. weightedItemList - A weighted list of item IDs. When this event pops up one of them is selected randomly (respecting given weights) and transferred to the HQ (within 1 hour).

Attributes itemList and randomItem have been deprecated (and will be removed in oxce 6.2).

Edit:

5. everyMultiItemList - A list of item IDs and their quantities. When this event pops up they are all transferred to the HQ (within 1 hour).
All these new features are really wonderful  ::)

I hope you know that OpenXCom and OXCE are the best remastered game ever (in this I include both: the best game, and the best way to remaster a game)



I would have a question about eventScripts >> facilityTriggers

Definition of facilityTriggers is: A list of base facilities that can influence the execution of this script. Similar to research triggers; checks the presence of a facility (in any xcom base).

Apparently, it does not wait for a facility to be built. As soon as you build it, event is triggered, even if the facility will be available/functional in 1 month

Is it expected, or do I miss something?

Code: [Select]
eventScripts:
  - type: STR_TRAINING_TICKET_MONTHLY_EVENT_SCRIPT
    facilityTriggers:
       STR_TRAINING_ROOM
    eventWeights:
      0:
        STR_TRAINING_TICKET_MONTHLY_EVENT: 100
    #firstMonth: 0
    #lastMonth: -1
    executionOdds: 100

EDIT: in fact, I think what I wrote does not work, as it triggers even if I don't build anything

I made other attempts writing it differently, unsuccessfully (i.e., the event is triggered after the first hour):
Removing 1 space before STR_TRAINING_ROOM
Code: [Select]
eventScripts:
  - type: STR_TRAINING_TICKET_MONTHLY_EVENT_SCRIPT
    facilityTriggers:
      STR_TRAINING_ROOM
Using brackets
Code: [Select]
eventScripts:
  - type: STR_TRAINING_TICKET_MONTHLY_EVENT_SCRIPT
    facilityTriggers: [STR_TRAINING_ROOM]
Do as for researchTriggers
Code: [Select]
eventScripts:
  - type: STR_TRAINING_TICKET_MONTHLY_EVENT_SCRIPT
    facilityTriggers:
      STR_TRAINING_ROOM: true

EDIT2: forget that, I will do this differently by adding some research, making training tickets availble for purchase, with a monthlyBuyLimit

« Last Edit: December 16, 2023, 04:10:52 am by Aldorn »