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

Adds ability to run effect_on_conditions on either avatar or npc death. #51890

Merged
merged 8 commits into from Sep 26, 2021

Conversation

Ramza13
Copy link
Contributor

@Ramza13 Ramza13 commented Sep 26, 2021

Summary

Infrastructure "Adds ability to run effect_on_conditions on either avatar or npc death."

Purpose of change

Adds ability to run effect_on_conditions on either avatar or npc death.
This allows targeted epilogue style messages, though at present they are distinct from and do not replace the actual epilogue screen. Also, as shown in the test code, it allows creating json to switch to controlling a follower on death.
Request from I-am-erk on discord for usage making refugees react to each others deaths and suggestion about controlling follower on death.

Describe the solution

There were too many effect_on_condition bools so I made them an enum for sanity. Added new types for running on either current avatars death or npcs.

Describe alternatives you've considered

Testing

Used this json

{
    "id": "EOC_DEATH_TEST",
    "type": "effect_on_condition",
    "eoc_type": "AVATAR_DEATH",
    "effect": [ { "u_message": "Enjoy not dying if you have a follower.", "popup": true }, "take_control_menu" ]
  },
{
    "type": "npc",
    "id": "refugee_beggar1",
    "//": "Hungry beggar in the refugee center.",
    "name_unique": "Reena Sandhu",
    "gender": "female",
    "name_suffix": "beggar",
    "class": "NC_BEGGAR_1",
    "attitude": 0,
    "mission": 7,
    "chat": "TALK_REFUGEE_BEGGAR_1",
    "faction": "lobby_beggars",
    "death_eocs": [
      {
        "id": "EOC_DEATH_NPC_TEST",
        "eoc_type": "NPC_DEATH",
        "effect": [ { "npc_message": "You are a killer!" } ]
      }
    ]
  },

Additional context

@Maleclypse Maleclypse added Mechanics: Character / Player Character / Player mechanics Mechanics: Effects / Skills / Stats Effects / Skills / Stats NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Sep 26, 2021
@kevingranade kevingranade merged commit eba01f0 into CleverRaven:master Sep 26, 2021
@Ramza13 Ramza13 deleted the death_eocs branch September 26, 2021 19:16
@I-am-Erk
Copy link
Contributor

I almost missed this going in. Will have to take some time to use this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mechanics: Character / Player Character / Player mechanics Mechanics: Effects / Skills / Stats Effects / Skills / Stats NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants