Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trans-Coast logistics start triggers a debug error. #51237

Closed
curstwist opened this issue Aug 30, 2021 · 5 comments
Closed

Trans-Coast logistics start triggers a debug error. #51237

curstwist opened this issue Aug 30, 2021 · 5 comments
Labels
<Bug> This needs to be fixed

Comments

@curstwist
Copy link
Contributor

Describe the bug

The "Trans-Coast Logistics Concourse" start triggers the attached debug error. I think I've narrowed down the trigger for this bug, but I'm uncertain if it can be fixed via Json so I could use some help.

Steps To Reproduce

  1. Create a new world
  2. Use the Trans-Coast Logistics Concourse start.
  3. Move towards the security exit of the concourse (yellow S on overmap).
  4. If you don't pick up the lanyard quickly, and the EOC triggers to release the security bots, you will get the debug message.
  5. If you get the lanyard quickly, there isn't an issue because the EOC doesn't trigger.

Context:
This doesn't happen if you enter the OMT (lab_CORE_2x1_1DN) from an adjacent OMT, only if you spawn in the OMT and trigger its EOC. So I think it may be missing a c++ check.

Expected behavior

No debug message. I've used this same EOC set up in the lab multiple times and this is the only place that triggers the debug message so far.

Screenshots

image

Versions and configuration

Win10, any recent build

Additional context

Note that the start scenario itself doesn't have EOC attached to it this is attached to the Mapgen for that OMT.

relevant eoc:

  {
    "type": "effect_on_condition",
    "id": "lab_concourse_bot_release",
    "recurrence_min": 5,
    "recurrence_max": 10,
    "condition": {
      "and": [
        { "u_at_om_location": "lab_CORE_2x1_1DN" },
        {
          "not": {
            "or": [
              { "u_has_item": "id_science_maintenance_yellow" },
              { "u_has_item": "id_science_transport_1" },
              { "u_has_item": "id_science_visitor_1" },
              { "u_has_item": "id_science_maintenance_green" },
              { "u_has_item": "id_science_maintenance_blue" },
              { "u_has_item": "id_science_security_yellow" },
              { "u_has_item": "id_science_security_magenta" },
              { "u_has_item": "id_science_security_black" },
              { "u_has_item": "id_science_mutagen_green" },
              { "u_has_item": "id_science_mutagen_pink" },
              { "u_has_item": "id_science_mutagen_cyan" },
              { "u_has_item": "id_science_medical_red" }
            ]
          }
        }
      ]
    },
    "effect": [ { "mapgen_update": "release_bots_concourse", "om_terrain": "lab_CORE_2x1_1DN" } ]
  },
  {
    "//": "Opens bot release if you have no ID badges.",
    "type": "mapgen",
    "update_mapgen_id": "release_bots_concourse",
    "method": "json",
    "object": {
      "place_terrain": [
        { "ter": "t_thconc_r", "x": 15, "y": 3 },
        { "ter": "t_thconc_r", "x": 15, "y": 4 },
        { "ter": "t_thconc_r", "x": 16, "y": 4 },
        { "ter": "t_thconc_r", "x": 16, "y": 5 },
        { "ter": "t_thconc_r", "x": 17, "y": 5 },
        { "ter": "t_thconc_r", "x": 17, "y": 6 },
        { "ter": "t_thconc_r", "x": 15, "y": 20 },
        { "ter": "t_thconc_r", "x": 15, "y": 19 },
        { "ter": "t_thconc_r", "x": 16, "y": 19 },
        { "ter": "t_thconc_r", "x": 16, "y": 18 },
        { "ter": "t_thconc_r", "x": 17, "y": 18 },
        { "ter": "t_thconc_r", "x": 17, "y": 17 }
      ]
    }
  }
@curstwist curstwist added the <Bug> This needs to be fixed label Aug 30, 2021
@Menschheit
Copy link
Contributor

Menschheit commented Aug 30, 2021

Do not use mapgen_update as a first level subeffect of an eoc, use queued effects instead.
first level subeffect of eoc presumes there is only 1 talker, but mapgen_update has two.
THe code for queued sequence of effects fixes that.
Put the effect you want under "set_queue_effect_on_condition" then it will be ok(Like what you already did it in #50920).

@curstwist
Copy link
Contributor Author

Do not use mapgen_update as a first level subeffect of an eoc, use queued effects instead.
first level subeffect of eoc presumes there is only 1 talker, but mapgen_update has two.
THe code for queued sequence of effects fixes that.
Put the effect you want under "set_queue_effect_on_condition" then it will be ok(Like what you already did it in #50920).

Unfortunately, this doesn't work at all (trigger wise). Maybe I messed it up, if you have any further insights. The other queued EOC I wrote has a monster initiating the EOC so perhaps that's the difference.


  {
    "type": "effect_on_condition",
    "id": "badge_check_concourse",
    "effect": [
      {
        "set_queue_effect_on_condition": [
          {
            "id": "lab_concourse_bot_release",
            "condition": {
              "and": [
                { "u_at_om_location": "lab_CORE_2x1_1DN" },
                {
                  "not": {
                    "or": [
                      { "u_has_item": "id_science_maintenance_yellow" },
                      { "u_has_item": "id_science_transport_1" },
                      { "u_has_item": "id_science_visitor_1" },
                      { "u_has_item": "id_science_maintenance_green" },
                      { "u_has_item": "id_science_maintenance_blue" },
                      { "u_has_item": "id_science_security_yellow" },
                      { "u_has_item": "id_science_security_magenta" },
                      { "u_has_item": "id_science_security_black" },
                      { "u_has_item": "id_science_mutagen_green" },
                      { "u_has_item": "id_science_mutagen_pink" },
                      { "u_has_item": "id_science_mutagen_cyan" },
                      { "u_has_item": "id_science_medical_red" }
                    ]
                  }
                }
              ]
            },
            "effect": [
              { "mapgen_update": "release_bots_concourse", "om_terrain": "lab_CORE_2x1_1DN" }
            ]
          }
        ]
      }
    ]
  },

@Menschheit
Copy link
Contributor

Sorry I was wrong, set_queue_effect_on_condition won't fix that, I didn't read the codes carefully.
There is no problem in #50920 since magic can apply eoc too(I didn't know that 😢 ) and the eoc added from a magic does have 2 talkers (caster and target).
Now if you don't use magic, those passive eocs (processed every turn) only has 1 talker: the player, so the debugmsgs occur, but this should be easy to fix.

@curstwist
Copy link
Contributor Author

Menschheit, Thanks for the follow up! I haven't resolved it yet myself either.

I do notice it can also trigger when moving between z levels in similar circumstances to the ones listed above. I guess the obvious solution is to add more badge bots for the areas that use this technique instead. If no one has a better solution, I can knock those out this weekend. I did like the variety and I'm still not entirely sure why this doesn't always trigger.

@anothersimulacrum
Copy link
Member

Fixed in #51241?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed
Projects
None yet
Development

No branches or pull requests

4 participants