Magical vision skill (#1467)

* fix firewave error spamming

* basic magic traces entities

* Add magical vision system and mana trace entities

Introduces the magical vision mechanic, including the CP14MagicVisionComponent, marker entities, and related systems for tracking and displaying magical traces. Adds new actions, skill integration, localization strings, and icons for magical vision and trace markers. Magic traces are now spawned on spell use and mob state changes, with directional pointers and localized descriptions.

* Show time passed for magic vision markers

Adds a display of the time elapsed since a magic vision marker was spawned, using a localized string. Updates English and Russian locale files with the new 'cp14-magic-vision-timed-past' entry.

* aura imprints

* Update critical and death messages for inclusivity

Revised the 'critical' and 'dead' messages in both English and Russian locale files to use more inclusive language, replacing references to 'magical creature' with 'someone'.

* Move magic vision spawn on mob state change to server

Transferred the logic for spawning magic vision markers on mob state changes (Critical/Dead) from CP14SharedMagicVisionSystem to CP14AuraImprintSystem. This centralizes the event handling on the server side. Also increased the duration of magic vision markers for spell usage from 20 to 50 seconds.

* Integrate magic vision with visibility mask system

Added a CP14MagicVision flag to VisibilityFlags and updated the magic vision and religion systems to use the visibility mask system. Magic vision markers now use the Visibility component, and visibility is refreshed when relevant components are added or removed. Removed client-side toggling logic in favor of server-driven visibility.

* drowsiness overlay

* noir shader

* sfx design
This commit is contained in:
Red
2025-06-26 13:49:53 +03:00
committed by GitHub
parent ee036e8372
commit 81e044758f
36 changed files with 746 additions and 4 deletions

View File

@@ -56,6 +56,12 @@
categories: [ HideSpawnMenu ]
save: false
components:
- type: Sprite
sprite: _CP14/Effects/fire.rsi
layers:
- state: small
visible: false
map: ["enum.EffectLayers.Unshaded"]
- type: PointLight
color: "#E25822"
radius: 2.0

View File

@@ -0,0 +1,53 @@
- type: entity
id: CP14ActionToggleMagicVision
parent: BaseMentalAction
name: Magical vision
description: You focus on magical flows to track recent events and scan the aura imprints of other living beings.
components:
- type: Action
useDelay: 5
itemIconStyle: BigAction
checkCanInteract: false
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
icon:
sprite: _CP14/Actions/Spells/meta.rsi
state: magic_vision
- type: InstantAction
event: !type:CP14MagicVisionToggleActionEvent
- type: entity
id: CP14ManaVisionPointer
name: pointer
categories: [ HideSpawnMenu ]
components:
- type: Sprite
color: "#42a4f5"
sprite: /Textures/_CP14/Effects/Magic/pointer.rsi
offset: 0, -1
layers:
- state: pointer
shader: unshaded
drawdepth: LowFloors
- type: TimedDespawn
lifetime: 2
- type: Tag
tags:
- HideContextMenu
- type: entity
id: CP14MagicVisionMarker
categories: [ HideSpawnMenu ]
name: mana trace
components:
- type: Sprite
noRot: true
drawdepth: Effects
layers:
- state: sphere
sprite: /Textures/_CP14/Effects/Magic/pointer_sphere.rsi
shader: unshaded
color: "#42a4f5"
- type: Clickable
- type: Visibility
layer: 8 #magic vision only

View File

@@ -9,5 +9,4 @@
- state: green
- sprite: /Textures/_CP14/Structures/Dungeon/demiplan_rift.rsi
state: pulse
- type: CP14DemiplaneRift
- type: CP14DemiplaneRift

View File

@@ -232,6 +232,7 @@
Cold: 0.25
Bloodloss: 0.25
- type: CP14TradingReputation
- type: CP14AuraImprint
- type: entity

View File

@@ -42,6 +42,8 @@
- type: CP14NightVision #Night vision
- type: FootstepModifier
footstepSoundCollection: null # Silent footstep
- type: CP14AuraImprint
imprintColor: "#9e7e5d"
- type: Inventory
templateId: CP14Carcat # Cant wear shoes
speciesId: carcat

View File

@@ -20,6 +20,8 @@
spawned:
- id: CP14FoodMeatHuman
amount: 5
- type: CP14AuraImprint
imprintColor: "#91898d"
- type: Body
prototype: CP14Dwarf
requiredLegs: 2

View File

@@ -45,6 +45,9 @@
freeLearnedSkills:
- MetamagicT1
- MetamagicT2
- type: CP14AuraImprint
imprintLength: 10 #Long imprint hehe
imprintColor: "#42aaf5"
- type: Inventory
templateId: CP14Human
displacements:

View File

@@ -128,6 +128,9 @@
- type: CP14MagicEnergyDraw #Cool x3 mana regen!
energy: 1.5
delay: 3
- type: CP14AuraImprint
imprintLength: 6 #Short imprint hehe
imprintColor: "#919e19"
- type: Hands
handDisplacement:
sizeMaps:

View File

@@ -83,6 +83,8 @@
- type: Body
prototype: CP14Silva
requiredLegs: 2
- type: CP14AuraImprint
imprintColor: "#31cc3b"
- type: Bloodstream
bloodReagent: CP14BloodFlowerSap #Lol
- type: Inventory

View File

@@ -88,6 +88,8 @@
- MobMask
layer:
- MobLayer
- type: CP14AuraImprint
imprintColor: "#a81b5d"
- type: Damageable
damageContainer: CP14Biological
damageModifierSet: CP14Skeleton

View File

@@ -44,6 +44,8 @@
damage:
Heat: 1 #Magic regen from fire
Cold: -1
- type: CP14AuraImprint
imprintColor: "#e0762b"
- type: CP14SkillStorage #Innate pyrokinetic
freeLearnedSkills:
- PyrokineticT1

View File

@@ -23,4 +23,10 @@
- type: shader
id: CP14ReligionVision
kind: source
path: "/Textures/_CP14/Shaders/religion.swsl"
path: "/Textures/_CP14/Shaders/religion.swsl"
- type: shader
id: CP14BlueNoir
kind: source
path: "/Textures/_CP14/Shaders/blue_noir.swsl"

View File

@@ -138,6 +138,20 @@
- !type:NeedPrerequisite
prerequisite: MetamagicT2
- type: cp14Skill
id: CP14ActionToggleMagicVision
skillUiPosition: 6, 4
tree: Metamagic
icon:
sprite: _CP14/Actions/Spells/meta.rsi
state: magic_vision
effects:
- !type:AddAction
action: CP14ActionToggleMagicVision
restrictions:
- !type:NeedPrerequisite
prerequisite: MetamagicT2
# T3
- type: cp14Skill