Plasma
Plasma copied to clipboard
Add message for changing fog environment settings
Add a new message (plFogTransitionMsg
maybe?) to change the values of a plFogEnvironment. It should be possible to include this message in a Responder Modifier.
This message probably belongs in PubUtilLib/plMessage
.
Message Style: Fire-and-forget, no callbacks
Message Receivers: plFogEnvironment objects. If no receiver is provided when constructing the message, set the receiver to the plPipeline default fog environment.
Message data:
-
float fStart
- new fog start value -
float fEnd
- new fog end distance value -
float fDensity
- new fog density value -
hsColorRGBA fColor
- new fog colour -
float duration
- unused but put it here now so it's available in the future without changing the message format
Message Handling:
Add a plFogEnvironment::MsgReceive()
handler that can receive plFogTransitionMsg
messages and update the fog environment values based on the ones provided in the message.
Non-Goals:
- Changing the fog type.
- Smoothly animating or transitioning the fog values.
- Tooling support in the PlasmaMax or korman plugins
Tasks:
- [ ] Create a new
plFogTransitionMsg
class - [ ] Create a new plCreatableIndex for the new message type
- [ ] Implement stream reading/writing for the message data
- [ ] Message should set receivers to the default fog environment if no receivers are specified
- [ ] Add message receiving support to
plFogEnvironment
Bonus Tasks
-
[ ] Change the fog-related pfConsole commands to create and send
plFogTransitionMsg
messages.
Only for colour, start/end, and density changes. -
[ ] Change the fog-related pfPython API commands to create and send
plFogTransitionMsg
messages.
Only for colour, start/end, and density changes. -
[ ] Add support for
plFogTransitionMsg
to the libHSPlasma project.
Do not start this until the pull request on H-uru/Plasma has been approved and merged.
Out of curiosity: Has something like this existed in CC and was removed, or how else is it possible for a player to change the fog (for everyone) on Deep Island?
That's done with console commands propagated over the network.
@Hoikas That brings up a good point though, do we need to consider anything at the message level to support both local fog changes and fog changes that are visible across the network? I can definitely see potential use cases for both