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

sleeper agent fake announcement #28321

Closed
wants to merge 13 commits into from

Conversation

icekot8
Copy link
Contributor

@icekot8 icekot8 commented May 27, 2024

About the PR

this PR adds a CanFalseActivate field to the GameRuleComponent, nuke the evil AlertLevelInterceptionRule by moving it to a nicer place and adds CanFalseActivate = true to the sleeping agents event

Why / Balance

fixes part of #28016
I'm tired of two agents in every round🤏.

Technical details

I tried to implement CanFalseActivate at the StationEvent level, but failed.
CanFalseActivate == a simple skip of executing game rules.
Seeing the AlertLevelInterceptionRule made me want to cry at the amount of code for 2 separate files and hardcore “green”... and it interfered with the implementation of CanFalseActivate, alas.
The AlertLevelInterceptionRule was nicely shoved into StationEvent :trollface:
the sleeping agents event collapsed due to the lack of at least 1 rule there :trollface: and I gave it MassHallucinationsRule :trollface:, which basically shouldn't work because of duration: 0, but in any case, aggravating paracusia due to enemy communications sounds logical to me

at this moment, the event, if CanFalseActivate = true, throws the switch function, which with a 50% probability writes in the logs that the event triggered falsely, enrolling occurrences and skipping everything except StationEvent comp.

Media

image
image

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog

🆑

  • tweak: Sleeper Agents can cause false announcements

@icekot8 icekot8 requested a review from EmoGarbage404 as a code owner May 27, 2024 17:11
@github-actions github-actions bot added the S: Needs Review Status: Requires additional reviews before being fully accepted label May 27, 2024
@Dutch-VanDerLinde
Copy link
Contributor

thank u

Comment on lines 156 to 166
switch (i)
{
case 1:
break;
case 2:
{
_adminLogger.Add(LogType.EventStarted, LogImpact.High, $"Event fake started: {ToPrettyString(ruleEntity)}");
EndGameRule(ruleEntity, ruleData);
return false;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the fuck is this?

@Cojoke-dot
Copy link
Contributor

Is this not already a thing? I thought the sleeper agent could roll on 0 people... (if it can't... there's an idea)

maxOccurrences: 1 # can only happen once per round
startAnnouncement: station-event-communication-interception
startAudio:
path: /Audio/Announcements/intercept.ogg
- type: AlertLevelInterceptionRule
- type: MassHallucinationsRule # essentially (I hope) does nothing because of duration 0. it's just so that the event can complete, since removing "AlertLevelInterceptionRule" caused a problem with it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what

as has already been written, this is the solution to the problem.
If you remove it, this happens

- type: entity
  noSpawn: true
  parent: BaseTraitorRule
  id: SleeperAgentsRule
  components:
  - type: GameRule
    canFalseActivate: true
  - type: StationEvent
    earliestStart: 30
    weight: 8
    minimumPlayers: 15
    alertLevel: blue
    maxOccurrences: 1 # can only happen once per round
    startAnnouncement: station-event-communication-interception
    startAudio:
      path: /Audio/Announcements/intercept.ogg
  - type: AntagSelection
    definitions:
    - prefRoles: [ Traitor ]
      min: 1
      max: 2
      playerRatio: 10
      mindComponents:
      - type: TraitorRole
        prototype: Traitor

image
if add any rule

- type: entity
  noSpawn: true
  parent: BaseTraitorRule
  id: SleeperAgentsRule
  components:
  - type: GameRule
    canFalseActivate: true
  - type: StationEvent
    earliestStart: 30
    weight: 8
    minimumPlayers: 15
    alertLevel: blue
    maxOccurrences: 1 # can only happen once per round
    startAnnouncement: station-event-communication-interception
    startAudio:
      path: /Audio/Announcements/intercept.ogg
  - type: MassHallucinationsRule # essentially (I hope) does nothing because of duration 0. it's just so that the event can complete, since removing "AlertLevelInterceptionRule" caused a problem with it 
    minTimeBetweenIncidents: 0.1
    maxTimeBetweenIncidents: 300
    maxSoundDistance: 7
    sounds:
      collection: Paracusia
  - type: AntagSelection
    definitions:
    - prefRoles: [ Traitor ]
      min: 1
      max: 2
      playerRatio: 10
      mindComponents:
      - type: TraitorRole
        prototype: Traitor

image
I don't think adding null rule to solve my problem is a good idea.
MassHallucinationsRule was used since this rule will not work for the player due to the fact that the duration of SleeperAgentsRule = 0

@AJCM-git AJCM-git added S: Awaiting Changes Status: Changes are required before another review can happen and removed S: Needs Review Status: Requires additional reviews before being fully accepted labels May 28, 2024
@icekot8
Copy link
Contributor Author

icekot8 commented May 28, 2024

yaml linter is angry but in game and console everything is fine 🤏(I don't understand what the problem is)

image
image

@icekot8 icekot8 requested a review from EmoGarbage404 May 28, 2024 06:27
@github-actions github-actions bot added S: Needs Review Status: Requires additional reviews before being fully accepted and removed S: Awaiting Changes Status: Changes are required before another review can happen labels May 28, 2024
@github-actions github-actions bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jun 1, 2024
Copy link
Contributor

github-actions bot commented Jun 1, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jun 2, 2024
@github-actions github-actions bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jun 4, 2024
Copy link
Contributor

github-actions bot commented Jun 4, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jun 5, 2024
@github-actions github-actions bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jun 30, 2024
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jul 2, 2024
@icekot8 icekot8 marked this pull request as draft July 2, 2024 06:19
@icekot8
Copy link
Contributor Author

icekot8 commented Jul 3, 2024

I finished this.
Unfortunately, I had to resort to a system that literally just calls start for StationEventSystem.
but, uh, it works.
and I fixed the hardcoded bool.

@icekot8 icekot8 marked this pull request as ready for review July 3, 2024 14:21
Copy link
Member

@TheShuEd TheShuEd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix tests
image

@TheShuEd TheShuEd added S: Awaiting Changes Status: Changes are required before another review can happen and removed S: Needs Review Status: Requires additional reviews before being fully accepted labels Jul 16, 2024
Copy link
Contributor

github-actions bot commented Aug 5, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Aug 5, 2024
@bruhmogus
Copy link

"fuck you"
unconfirms your station threat

@slarticodefast
Copy link
Member

If you are coming back to this, leave a comment and I will re-open the PR.

@slarticodefast slarticodefast added the S: Derelict Status: Abandoned, but may contain something that can be salvaged. label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: Awaiting Changes Status: Changes are required before another review can happen S: Derelict Status: Abandoned, but may contain something that can be salvaged. S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants