Objectives ecs rework (#19967)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-09-16 07:18:10 +01:00
committed by GitHub
parent e8c58d1574
commit f7711edbe3
106 changed files with 2121 additions and 1779 deletions

View File

@@ -0,0 +1,101 @@
# OBJECTIVE STYLE
# in comments anything that says final prototype means the objective that isnt abstract
# the final prototype must be noSpawn to avoid showing in f5
# components are listed in this order:
# 1. Objective
# 2. requirement components
# 3. non-condition components
# 4. the condition component
# all objectives should inherit this at some point
# then have its difficulty etc fields set in the final objective prototypes
- type: entity
abstract: true
id: BaseObjective
components:
- type: Objective
# requires that the player not have a die objective
- type: entity
abstract: true
parent: BaseObjective
id: BaseLivingObjective
components:
- type: ObjectiveBlacklistRequirement
blacklist:
components:
- DieCondition
# objective that targets a player
# final prototype must specify the title locale id in TargetObjective
- type: entity
abstract: true
parent: BaseObjective
id: BaseTargetObjective
components:
- type: TargetObjective
# requires that the player kill someone
# disables social objectives and is disabled by social objectives
- type: entity
abstract: true
parent: BaseTargetObjective
id: BaseKillObjective
components:
- type: Objective
unique: false
icon:
sprite: Objects/Weapons/Guns/Pistols/viper.rsi
state: icon
- type: ObjectiveBlacklistRequirement
blacklist:
components:
- SocialObjective
- type: KillPersonCondition
# requires that the player interact socially with someone
# disables kill objectives and is disabled by kill objectives
- type: entity
abstract: true
parent: BaseTargetObjective
id: BaseSocialObjective
components:
- type: Objective
unique: false
- type: ObjectiveBlacklistRequirement
blacklist:
components:
- KillPersonCondition
- type: SocialObjective
# requires that the target survives the round
- type: entity
abstract: true
parent: BaseSocialObjective
id: BaseKeepAliveObjective
components:
- type: KeepAliveCondition
# requires that the target completes at least 50% of their objectives
- type: entity
abstract: true
parent: BaseSocialObjective
id: BaseHelpProgressObjective
components:
- type: HelpProgressCondition
# requires that the player steal an item specified in the final prototype
- type: entity
abstract: true
parent: BaseLivingObjective
id: BaseStealObjective
components:
- type: StealCondition
# requires that the player not die, ignores being on emergency shuttle or cuffed
- type: entity
abstract: true
parent: BaseObjective
id: BaseSurviveObjective
components:
- type: SurviveCondition

View File

@@ -0,0 +1,83 @@
- type: entity
abstract: true
parent: BaseObjective
id: BaseNinjaObjective
components:
- type: Objective
# difficulty isn't used all since objectives are picked
difficulty: 1.5
issuer: spiderclan
- type: RoleRequirement
roles:
components:
- NinjaRole
- type: entity
noSpawn: true
parent: BaseNinjaObjective
id: DoorjackObjective
components:
- type: Objective
icon:
sprite: Objects/Tools/emag.rsi
state: icon
- type: NumberObjective
min: 15
max: 40
title: objective-condition-doorjack-title
description: objective-condition-doorjack-description
- type: DoorjackCondition
- type: entity
noSpawn: true
parent: BaseNinjaObjective
id: StealResearchObjective
description: Your gloves can be used to hack a research server and steal its precious data. If science has been slacking you'll have to get to work.
components:
- type: Objective
icon:
sprite: Structures/Machines/server.rsi
state: server
- type: NumberObjective
min: 5
max: 10
title: objective-condition-steal-research-title
- type: StealResearchCondition
- type: entity
noSpawn: true
parent: BaseNinjaObjective
id: SpiderChargeObjective
description: This bomb can be detonated in a specific location. Note that the bomb will not work anywhere else!
components:
- type: Objective
icon:
sprite: Objects/Weapons/Bombs/spidercharge.rsi
state: icon
- type: SpiderChargeTargetRequirement
- type: SpiderChargeCondition
- type: entity
noSpawn: true
parent: [BaseNinjaObjective, BaseSurviveObjective]
id: NinjaSurviveObjective
name: Survive
description: You wouldn't be a very good ninja if you died, now would you?
components:
- type: Objective
icon:
sprite: Clothing/Mask/ninja.rsi
state: icon
- type: entity
noSpawn: true
parent: BaseNinjaObjective
id: TerrorObjective
name: Call in a threat
description: Use your gloves on a communication console in order to bring another threat to the station.
components:
- type: Objective
icon:
sprite: Objects/Fun/Instruments/otherinstruments.rsi
state: red_phone
- type: TerrorCondition

View File

@@ -1,40 +0,0 @@
- type: objective
id: StealResearchObjective
issuer: spiderclan
requirements:
- !type:NinjaRequirement {}
conditions:
- !type:StealResearchCondition {}
- type: objective
id: DoorjackObjective
issuer: spiderclan
requirements:
- !type:NinjaRequirement {}
conditions:
- !type:DoorjackCondition {}
- type: objective
id: SpiderChargeObjective
issuer: spiderclan
requirements:
- !type:NinjaRequirement {}
- !type:SpiderChargeTargetRequirement {}
conditions:
- !type:SpiderChargeCondition {}
- type: objective
id: TerrorObjective
issuer: spiderclan
requirements:
- !type:NinjaRequirement {}
conditions:
- !type:TerrorCondition {}
- type: objective
id: SurviveObjective
issuer: spiderclan
requirements:
- !type:NinjaRequirement {}
conditions:
- !type:SurviveCondition {}

View File

@@ -24,7 +24,7 @@
- type: weightedRandom
id: TraitorObjectiveGroupKill
weights:
KillRandomObjective: 1
KillRandomPersonObjective: 1
KillRandomHeadObjective: 0.25
- type: weightedRandom

View File

@@ -0,0 +1,263 @@
- type: entity
abstract: true
parent: BaseObjective
id: BaseTraitorObjective
components:
- type: Objective
issuer: syndicate
- type: RoleRequirement
roles:
components:
- TraitorRole
- type: entity
abstract: true
parent: [BaseTraitorObjective, BaseSocialObjective]
id: BaseTraitorSocialObjective
components:
- type: Objective
icon:
sprite: Objects/Misc/bureaucracy.rsi
state: folder-white
- type: MultipleTraitorsRequirement
- type: entity
abstract: true
parent: [BaseTraitorObjective, BaseStealObjective]
id: BaseTraitorStealObjective
components:
- type: Objective
difficulty: 2.75
# state
- type: entity
noSpawn: true
parent: [BaseTraitorObjective, BaseLivingObjective]
id: EscapeShuttleObjective
name: Escape to centcom alive and unrestrained.
description: One of our undercover agents will debrief you when you arrive. Don't show up in cuffs.
components:
- type: Objective
difficulty: 1.3
icon:
sprite: Structures/Furniture/chairs.rsi
state: shuttle
- type: EscapeShuttleCondition
- type: entity
noSpawn: true
parent: BaseTraitorObjective
id: DieObjective
name: Die a glorious death
description: Die.
components:
- type: Objective
difficulty: 0.5
icon:
sprite: Mobs/Ghosts/ghost_human.rsi
state: icon
- type: ObjectiveBlacklistRequirement
blacklist:
components:
- EscapeShuttleCondition
- StealCondition
- type: DieCondition
# kill
- type: entity
noSpawn: true
parent: [BaseTraitorObjective, BaseKillObjective]
id: KillRandomPersonObjective
description: Do it however you like, just make sure they don't make it to centcom.
components:
- type: Objective
difficulty: 1.75
unique: false
- type: TargetObjective
title: objective-condition-kill-person-title
- type: PickRandomPerson
- type: entity
noSpawn: true
parent: [BaseTraitorObjective, BaseKillObjective]
id: KillRandomHeadObjective
description: We need this head gone and you probably know why. Good luck, agent.
components:
- type: Objective
# technically its still possible for KillRandomPersonObjective to roll a head but this is guaranteed, so higher difficulty
difficulty: 3.0
# killing 1 head is enough
unique: true
- type: TargetObjective
title: objective-condition-kill-head-title
- type: PickRandomHead
- type: KillPersonCondition
# don't count missing evac as killing as heads are higher profile, so you really need to do the dirty work
# if ce flies a shittle to centcom you better find a way onto it
requireDead: true
# social
- type: entity
noSpawn: true
parent: [BaseTraitorSocialObjective, BaseKeepAliveObjective]
id: RandomTraitorAliveObjective
description: Identify yourself at your own risk. We just need them alive.
components:
- type: Objective
difficulty: 1.75
- type: TargetObjective
title: objective-condition-other-traitor-alive-title
- type: RandomTraitorAlive
- type: entity
noSpawn: true
parent: [BaseTraitorSocialObjective, BaseHelpProgressObjective]
id: RandomTraitorProgressObjective
description: Identify yourself at your own risk. We just need them to succeed.
components:
- type: Objective
difficulty: 2.5
- type: TargetObjective
title: objective-condition-other-traitor-progress-title
- type: RandomTraitorProgress
# steal
## cmo
- type: entity
noSpawn: true
parent: BaseTraitorStealObjective
id: HyposprayStealObjective
components:
- type: NotJobRequirement
job: ChiefMedicalOfficer
- type: StealCondition
prototype: Hypospray
owner: job-name-cmo
## rd
- type: entity
abstract: true
parent: BaseTraitorStealObjective
id: BaseRDObjective
components:
- type: NotJobRequirement
job: ResearchDirector
- type: StealCondition
owner: job-name-rd
- type: entity
noSpawn: true
parent: BaseRDObjective
id: RDHardsuitStealObjective
components:
- type: StealCondition
prototype: ClothingOuterHardsuitRd
- type: entity
noSpawn: true
parent: BaseRDObjective
id: HandTeleporterStealObjective
components:
- type: StealCondition
prototype: HandTeleporter
## hos
- type: entity
noSpawn: true
parent: BaseTraitorStealObjective
id: SecretDocumentsStealObjective
components:
- type: Objective
# hos has a gun ce does not, higher difficulty than most
difficulty: 3.5
- type: NotJobRequirement
job: HeadOfSecurity
- type: StealCondition
prototype: BookSecretDocuments
owner: job-name-hos
## ce
- type: entity
noSpawn: true
parent: BaseTraitorStealObjective
id: MagbootsStealObjective
components:
- type: NotJobRequirement
job: ChiefEngineer
- type: StealCondition
prototype: ClothingShoesBootsMagAdv
owner: job-name-ce
## hop
- type: entity
noSpawn: true
parent: BaseTraitorStealObjective
id: CorgiMeatStealObjective
components:
- type: NotJobRequirement
job: HeadOfPersonnel
- type: StealCondition
prototype: FoodMeatCorgi
owner: objective-condition-steal-Ian
## cap
- type: entity
abstract: true
parent: BaseTraitorStealObjective
id: BaseCaptainObjective
components:
- type: Objective
# sorry ce but your jordans are not as high security as the caps gear
difficulty: 3.5
- type: NotJobRequirement
job: Captain
- type: entity
noSpawn: true
parent: BaseCaptainObjective
id: CaptainIDStealObjective
components:
- type: StealCondition
prototype: CaptainIDCard
- type: entity
noSpawn: true
parent: BaseCaptainObjective
id: CaptainJetpackStealObjective
components:
- type: StealCondition
prototype: JetpackCaptainFilled
- type: entity
noSpawn: true
parent: BaseCaptainObjective
id: CaptainGunStealObjective
components:
- type: StealCondition
prototype: WeaponAntiqueLaser
owner: job-name-captain
- type: entity
noSpawn: true
parent: BaseCaptainObjective
id: StealNukeDiskObjective
components:
- type: Objective
# high difficulty since the hardest item both to steal, and to not get caught down the road,
# since anyone with a pinpointer can track you down and kill you
# it's close to being a stealth loneop
difficulty: 4.5
- type: NotCommandRequirement
- type: StealCondition
prototype: NukeDisk
owner: objective-condition-steal-station

View File

@@ -1,239 +0,0 @@
- type: objective
id: CaptainIDStealObjective
issuer: syndicate
difficultyOverride: 2.75
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- DieCondition
- !type:NotRoleRequirement
roleId: Captain
conditions:
- !type:StealCondition
prototype: CaptainIDCard
- type: objective
id: KillRandomObjective
issuer: syndicate
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- RandomTraitorAliveCondition
conditions:
- !type:KillRandomPersonCondition {}
canBeDuplicate: true
# technically its still possible for KillRandomObjective to roll a head but this is guaranteed, so higher difficulty
# this also will not count missing evac as killing as heads are higher profile, so you really need to do the dirty work
- type: objective
id: KillRandomHeadObjective
issuer: syndicate
difficultyOverride: 3.0
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- RandomTraitorAliveCondition
conditions:
- !type:KillRandomHeadCondition {}
# killing 1 head is enough
canBeDuplicate: false
- type: objective
id: RandomTraitorAliveObjective
issuer: syndicate
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- KillRandomPersonCondition
- !type:MultipleTraitorsRequirement
conditions:
- !type:RandomTraitorAliveCondition {}
canBeDuplicate: true
- type: objective
id: DieObjective
issuer: syndicate
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- StealCondition
- EscapeShuttleCondition
conditions:
- !type:DieCondition {}
- type: objective
id: CMOHyposprayStealObjective
issuer: syndicate
difficultyOverride: 2.75
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- DieCondition
- !type:NotRoleRequirement
roleId: ChiefMedicalOfficer
conditions:
- !type:StealCondition
prototype: Hypospray
owner: job-name-cmo
- type: objective
id: RDHardsuitStealObjective
issuer: syndicate
difficultyOverride: 2.75
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- DieCondition
- !type:NotRoleRequirement
roleId: ResearchDirector
conditions:
- !type:StealCondition
prototype: ClothingOuterHardsuitRd
owner: job-name-rd
- type: objective
id: HandTeleporterStealObjective
issuer: syndicate
difficultyOverride: 2.75
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- DieCondition
- !type:NotRoleRequirement
roleId: ResearchDirector
conditions:
- !type:StealCondition
prototype: HandTeleporter
owner: job-name-rd
- type: objective
id: SecretDocumentsStealObjective
issuer: syndicate
difficultyOverride: 2.75
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- DieCondition
- !type:NotRoleRequirement
roleId: HeadOfSecurity
conditions:
- !type:StealCondition
prototype: BookSecretDocuments
owner: job-name-hos
- type: objective
id: NukeDiskStealObjective
issuer: syndicate
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- DieCondition
- !type:NotRoleRequirement
roleId: Captain
- !type:NotRoleRequirement
roleId: HeadOfSecurity
- !type:NotRoleRequirement
roleId: HeadOfPersonnel
- !type:NotRoleRequirement
roleId: ChiefEngineer
- !type:NotRoleRequirement
roleId: ChiefMedicalOfficer
- !type:NotRoleRequirement
roleId: ResearchDirector
conditions:
- !type:StealCondition
prototype: NukeDisk
owner: objective-condition-steal-station
- type: objective
id: MagbootsStealObjective
issuer: syndicate
difficultyOverride: 2.75
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- DieCondition
- !type:NotRoleRequirement
roleId: ChiefEngineer
conditions:
- !type:StealCondition
prototype: ClothingShoesBootsMagAdv
owner: job-name-ce
- type: objective
id: CorgiMeatStealObjective
issuer: syndicate
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- DieCondition
- !type:NotRoleRequirement
roleId: HeadOfPersonnel
conditions:
- !type:StealCondition
prototype: FoodMeatCorgi
owner: objective-condition-steal-Ian
- type: objective
id: CaptainGunStealObjective
issuer: syndicate
difficultyOverride: 2.75
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- DieCondition
- !type:NotRoleRequirement
roleId: Captain
conditions:
- !type:StealCondition
prototype: WeaponAntiqueLaser
owner: job-name-captain
- type: objective
id: CaptainJetpackStealObjective
issuer: syndicate
difficultyOverride: 2.75
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- DieCondition
- !type:NotRoleRequirement
roleId: Captain
conditions:
- !type:StealCondition
prototype: JetpackCaptainFilled
- type: objective
id: EscapeShuttleObjective
issuer: syndicate
requirements:
- !type:TraitorRequirement {}
- !type:IncompatibleConditionsRequirement
conditions:
- DieCondition
conditions:
- !type:EscapeShuttleCondition {}
- type: objective
id: RandomTraitorProgressObjective
issuer: syndicate
requirements:
- !type:TraitorRequirement {}
- !type:MultipleTraitorsRequirement
conditions:
- !type:RandomTraitorProgressCondition {}
canBeDuplicate: true