-
Notifications
You must be signed in to change notification settings - Fork 342
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
New psionic ablility: Precognition #2131
Conversation
This is fascinating. I'm personally a huge fan of more psionic options. |
* Add NextEventComponent * Check for schedulers NextEventComponent * Seperate gernateing event to its own method * Add NextEventSystem and use in BasicStationEventSchedulerSystem
Signed-off-by: SolStar <[email protected]>
* Check for schedulers NextEventComponent * Seperate gernateing event to its own method * Add NextEventSystem and use in BasicStationEventSchedulerSystem * Format code * Add nextEvent time perdiction * Use RunTime instead of float minutes * Bug fixes * Add NextEvent to Ramping and Meteors * Fix timing on BasticStationEvents * initialize NextEventComponent when created --------- Signed-off-by: SolStar <[email protected]>
This reverts commit bf9cd26.
You're right should be good now |
@LadyDanger2743 Would you like to look over the design/balance for the ability? I'll list the stats I can think of here. |
Any update on this? |
Review hell but I plan on trying to move some of these changes upstream so I can implement this a bit more cleanly |
Content.Server/DeltaV/Abilities/Psionics/PrecognitionPowerSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/DeltaV/Abilities/Psionics/PrecognitionPowerSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/DeltaV/Abilities/Psionics/PrecognitionPowerSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/DeltaV/Abilities/Psionics/PrecognitionPowerSystem.cs
Outdated
Show resolved
Hide resolved
Content.Server/DeltaV/Abilities/Psionics/PrecognitionPowerSystem.cs
Outdated
Show resolved
Hide resolved
No clue what is causing that error |
Oh i see its another file |
@deltanedas can you also remove the Changes: Documentation tag? It was added accedently |
taking in for direction review! |
The levers that are easy to change are the cooldown, do after, effects, random chance, the weights for random messages including which one have random messages, event messages, excluding a category of events from being detected ie. random shuttles, excluding specific events mostly works but since it only has a limited memory it won't look far past that excluded event if that makes any sence. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Direction has wrapped up, I've tested this, and we've combed through all the info here. I am DELIGHTED to approve this. In my opinion, the atmosphere and mechanics of this ability far surpass all other psionic powers we have. Thank you to all the contributors who worked on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ill clean up nitpicks later
About the PR
Adds a new psionic power: Precognition. Precogs can tap into the nosphere to predict the future giving mysterious omens of things to come. When used you will get a message corresponding to the next station event within 5 minutes. There may be a chance that the result will be random to simulate unreliable readings.
Why / Balance
Psionics are part of DeltaV's unique identity but can sometimes feel stale and ancillary. Psionic powers could use some more variety and give supporting systems more uses, and this ability could open the door to more roleplay and gameplay possibilities. People could play as oracles predicting the future and warning of ill tides and give fun interactions with reporters and chaplains. Telepathic chat can be a hub of rumors both current and future. A local seer may be consulted to warn the station of harm.
Technical details
TODO:
Having the ability be able to predict the next event requires the next event to be pre-generated so that the precognition ability can access it. To hold this data a new component
NextEventComponent
will be attached to event schedulers and will contain two fields,EntProtoId NextEventId
andTimeSpan NextEventTime
.NextEventSystem
will provide a methodUpdateNextEvent
which updates the id and time with the given arguments and returns the previously stored id.NextEvent
components were attached to the various event scheduler prototypes that will be using the new system. TheRampingStationEventSchedulerSystem
andBasicStationEventSchedulerSystem
were updated to check if the scheduler has theNextEvent
comp and will change its logic to utilize them. All the event schedulers are variations of the BasicStationEventScheduler and useBasicStationEventSchedulerSystem
except for RampingStationEventScheduler.I will refer to
RampingStationEventSchedulerSystem
andBasicStationEventSchedulerSystem
similarly since they both have similar logic flow but slightly different names here and there (RampingStationEventScheduler could probably be made into a variant ofBasicStationEventSchedulerSystem
but it's not upstream).Started
will now check if there is aNextEvent
and will updateNextEvent
at the start since we have shifted the timeframe to be looking for the next event. InUpdate
check forNewEvent
and will then getEventManagerSystem
to generate an event without running it. It will then callUpdateNextEvent
to update it with the generated event and next event time which is time till next event + current round time.EventManagerSystem has had its generate event separated from running events so that the scheduler systems can call that to generate events without running them.
TryGenerateRandomEvent
will return false if it fails but outs the event otherwise.RunRandomEvent
will now instead call onTryGenerateRandomEvent
. Various methods in EventManagerSystem have had overloaded versions with aTimeSpan? eventRunTime
so that the scheduler systems can generate for events in the future.The precognition ability will look though all the NextEvent components and will compare the times to find the one that is the soonest in the future and will return a message based on a localization table.
Media
2024-11-19.21-13-14.mp4
Requirements
Breaking changes
I have included overloads to changed methods to allow for backwards compatibility but I have made changes to the following methods
EventManagerSystem
RunRandomEvent
now calls a newTryGenerateRandomEvent
to generate an event to runTryGenerateRandomEvent
RunRandomEvent
TimeSpan? eventRunTime
TimeSpan? eventRunTime
callsTryGenerateRandomEvent
with nulleventRunTime
TryBuildLimitedEvents
TimeSpan? eventRunTime
TimeSpan? eventRunTime
callsTryGenerateRandomEvent
with nulleventRunTime
AvailableEvents
TimeSpan? eventRunTime
TimeSpan? eventRunTime
callsTryGenerateRandomEvent
with nulleventRunTime
BasicStationEventSchedulerSystem
ResetTimer(eventScheduler)
happens before getting new event in path where entity hasnextEventComponent
RampingStationEventSchedulerSystem
PickNextEventTime(uid, component)
happens before getting new event in path where entity hasnextEventComponent
Changelog
🆑 SolStar, chamomileteatime