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

JSON "u_set_guard_pos" making idle npcs move broke somewhere between now and 3 months ago #74861

Open
LyranRenegade opened this issue Jul 1, 2024 · 0 comments
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@LyranRenegade
Copy link
Contributor

LyranRenegade commented Jul 1, 2024

Describe the bug

                            "u_run_npc_eocs": [
                                {
                                    "id": "HA_EOC_CYRUS_CELLAR_NPC_MOVEMENT_EUGENE_LEFT_CHAIR",
                                    "effect": [
                                        { "message": "***DEBUG u: <u_name> WANTS TO MOVE" },
                                        { "u_set_guard_pos": { "global_val": "_LEFT_CHAIR" }, "unique_id": true }
                                    ]
                                    
                                }
                            ],
                            "npc_range": 50,
                            "unique_ids": [ "HA_EUGENE" ]

This used to work in experimental of 26-03 this year but since last update (26-06) it doesn't.
The Debug message correctly shows the NPC's name as <u_name>

the var_list.ouput seems to have the right variable:
|;npctalk_var_HA_EUGENE_LEFT_CHAIR;(4452,3775,10);

The variable is installed in the mapgen with

            "place_variables": [
                { "name": "HA_EUGENE_LEFT_CHAIR",           "x": 11, "y": 16 },

If I trace it with a debug eoc it shows correctly as a global var:

{ "message": "***DEBUG EUGENE LEFT CHAIR: <global_val:HA_EUGENE_LEFT_CHAIR>" }

(same as in var_list;output (4452,3775,10) )

the npc class has the trait { "trait": "RETURN_TO_START_POS" },

so, somewhere last 3 months something broke in this process.. To be clear, the message is displayed so the surrounding code runs normally still.

Attach save file

this is my mod it uses
HardcoreApocalypse.zip

this is the save-file
Pleasantville.zip

the relevant code is in data/mods/HardcoreApocalypse/

  • _NPCS/eocs/ha_npc_ai_eocs.json
  • _NPCS/HA_NPC_DEFINITIONS.json

Steps to reproduce

place the folder HardcoreApocalypse in mods
run the save-game

every 5 minutes the eoc "HA_EOC_CYRUS_CELLAR_NPC_MOVEMENT" from "_NPCS/eocs/ha_npc_ai_eocs.json" is run and can randomly cause a guardpos update for all the present npcs
so, waiting for an hour should update it a few times for each npcs..
as is seen nobody is moving.. but the other behavorial events [like chitchat] does work.
All the code is running normally as can be seen by the debug-tracing..

Only the u_set_guard_pos is not having any effect.

////

Other method would be to quickly recreate the situation in the bug-description
by creating a npc with the class trait 'return to start-pos'
and then run a npc_eoc as above ^^

Expected behavior

Expected / hoped was it would keep on working

Screenshots

No response

Versions and configuration

win 7
06460ed (tiles)

Additional context

No response

@LyranRenegade LyranRenegade added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

No branches or pull requests

1 participant