Skip to content

Commit

Permalink
Merge pull request #25 from Friends-of-Monika/dev
Browse files Browse the repository at this point in the history
Release 0.3.2
  • Loading branch information
dreamscached authored Oct 24, 2022
2 parents 42d62dc + 416e49c commit 87730d6
Show file tree
Hide file tree
Showing 12 changed files with 210 additions and 58 deletions.
3 changes: 2 additions & 1 deletion config/default/configs/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@ SmallText = Doki Doki Literature Club
# Beginning timestamp, displays as 'XX:XX:XX elapsed' on activity block.
# Currently, the following values are supported:
# * SessionStart - timestamp of current session start.
# * LastPresenceUpdate - timestamp of last presence update occurreed.
# * None - disable start timestamp.
Start = SessionStart

# End timestamp, displays as 'XX:XX:XX remaining' on activity block.
# Currently, the following values are supported:
# * None - disable end timestamp.
# * UpcomingEvent1h - timestamp of upcoming event date, up to 1 hour
# (unfortunately, Discord won't allow more.)
# * None - disable end timestamp.
End = None
4 changes: 3 additions & 1 deletion config/default/configs/events/all-day.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
# Since: v0.0.1

[Presence]
Condition = eve_prompt_1w is not None and eve_days_1w == 0
Condition = (
eve_prompt_1w is not None and eve_prompt_1w != "milestone_personal_best"
and eve_days_1w == 0)
Priority = -790
Dynamic = True
Inherit = Default
Expand Down
3 changes: 2 additions & 1 deletion config/default/configs/events/all.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# Since: v0.0.1

[Presence]
Condition = eve_prompt_1w is not None
Condition = (
eve_prompt_1w is not None and eve_prompt_1w != "milestone_personal_best")
Priority = -800
Dynamic = True
Inherit = Default
Expand Down
2 changes: 1 addition & 1 deletion config/default/configs/topics/exp-previewer.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This presence config defines activity that will be shown when player is in
# expression previewer menu.
# floating islands dialogue/floating islands view.
#
# Author: Herman S. <[email protected]>
# Since: v0.3.0
Expand Down
16 changes: 16 additions & 0 deletions config/default/configs/topics/floating-islands.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This presence config defines activity that will be shown when player is in
# expression previewer menu.
#
# Author: Herman S. <[email protected]>
# Since: v0.3.2

[Presence]
Condition = event_label == "mas_monika_islands"
Priority = -20
Dynamic = True
Inherit = Default


[Activity]
Details = Admires the scenery with [his] [m_name]
State = Gazing at the floating islands
20 changes: 14 additions & 6 deletions doc/CUSTOMIZING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ If you're looking for a way to override *default* config files, see

If you feel like learning by example, you might as well look into `config/`
folder which contains all maintained presence config files that are well
commented and documented for your convenience and understanding. If you want to
learn some theory though, here it is, right below.
commented and documented for your convenience and understanding as well as
[EXAMPLES.md](EXAMPLES.md) page. If you want to learn some theory though, here
it is, right below.

## Basic principles

Expand Down Expand Up @@ -70,14 +71,18 @@ data, manage presence directly, etc.
Discord Presence Submod ships with few extensions maintained by project creators
and maintainers:

* `fom-custom-vars.rpy` provides Custom Variables framework for registering and
* `custom-vars.rpy` provides Custom Variables framework for registering and
updating custom variables that can be used in expressions and interpolations.
* `fom-events.rpy` provides custom variables related to upcoming calendar
* `events.rpy` provides custom variables related to upcoming calendar
events.
* `fom-functions.rpy` provides custom functions that can be found useful in
* `functions.rpy` provides custom functions that can be found useful in
interpolations.
* `fom-locations.rpy` provides custom variable for displaying currently active
* `locations.rpy` provides custom variable for displaying currently active
background.
* `weather.rpy` provides custom variable for current weather detection.
* `brbs.rpy` provides custom variable for current be right back detection.
* `topics.rpy` provides custom variable and logic for detection of current
topic.

### Inheritance

Expand Down Expand Up @@ -156,6 +161,9 @@ to edit it, you can use a path (relative to config directory) instead:
Override = default/configs/default.conf
```

Taking possible override conflicts into account, if there are is more than one
override existing for a certain config, one with higher priority prevails.

### Disabling

Another parameter introduced in 0.3.1 is `Disable =`, which if set to `True`
Expand Down
53 changes: 53 additions & 0 deletions doc/DEFAULTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,45 @@ Below you can see a table with default config files and their priorities for
your convenience in finding a desired config and its priority without a need to
dig up every single file.

### Configs shown on topic

| Priority | Config |
|----------|-------------------------------------------------------------------------|
| -20 | topics/exp-previewer.conf |
| -20 | topics/floating-islands.conf |

### Configs shown on anniversary/milestone day

| Priority | Config |
|----------|-------------------------------------------------------------------------|
| -90 | events/anni-year-day.conf |
| -90 | events/anni-milestone-day.conf |

### Configs shown a week before anniversary/milestone

| Priority | Config |
|----------|-------------------------------------------------------------------------|
| -100 | events/anni-year.conf |
| -100 | events/anni-milestone.conf |

### Configs shown on player's or Monika's birthday

| Priority | Config |
|----------|-------------------------------------------------------------------------|
| -190 | events/player-bday-day.conf |
| -190 | events/moni-bday-day.conf |

### Configs shown a week before player's or Monika's birthday

| Priority | Config |
|----------|-------------------------------------------------------------------------|
| -200 | events/player-bday.conf |
| -200 | events/moni-bday.conf |

### Configs shown during be right back idle

| Priority | Config |
|----------|-------------------------------------------------------------------------|
| -600 | be-right-backs/my-otter-self-brbs/stretching.conf |
| -600 | be-right-backs/my-otter-self-brbs/stimulation.conf |
| -600 | be-right-backs/my-otter-self-brbs/social.conf |
Expand Down Expand Up @@ -64,11 +92,36 @@ dig up every single file.
| -600 | be-right-backs/genetechnician-reading-submod/reading_manga.conf |
| -600 | be-right-backs/genetechnician-reading-submod/reading_horror.conf |
| -600 | be-right-backs/genetechnician-reading-submod/reading_dystopian.conf |

### Config shown on a special date

| Priority | Config |
|----------|-------------------------------------------------------------------------|
| -790 | events/all-day.conf |

### Config shown a week before special date

| Priority | Config |
|----------|-------------------------------------------------------------------------|
| -800 | events/all.conf |

### Configs shown during night or morning

| Priority | Config |
|----------|-------------------------------------------------------------------------|
| -950 | time-of-day/night.conf |
| -950 | time-of-day/morning.conf |

### Configs shown during specific weather

| Priority | Config |
|----------|-------------------------------------------------------------------------|
| -995 | weather/thunder.conf |
| -995 | weather/snow.conf |
| -995 | weather/rain.conf |

### Default/fallback config

| Priority | Config |
|----------|-------------------------------------------------------------------------|
| -1000 | default.conf |
39 changes: 38 additions & 1 deletion doc/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,41 @@ them in `""` after `==`):
Condition = mas_globals.time_of_day_4state == "morning"
Priority = -950
Dynamic = True
```
```

## Weather based configuration

Using `mas_current_weather` one can create a config that will be active when
there is a certain type of weather in Monika's world:

Here's list of currently available values (not that unlike in other examples,
these are not strings, and they are deliberately written without quotes):
* `mas_weather_def`
* `mas_weather_rain`
* `mas_weather_snow`
* `mas_weather_thunder`
* `mas_weaher_overcast`

```ini
[Presence]
Condition = mas_current_weather == mas_weather_rain
Priority = -995
Dynamic = True
```

## Topic based configuration

Using custom variable `event_label`, you can create a config that will be chosen
as soon as player enters a certain topic. Here's how:

```ini
[Presence]
Condition = event_label == "monika_hemispheres"
Priority = -20
Dynamic = True
```

There isn't a list of available values for this, but you can look into [Monika
After Story](https://github.com/Monika-After-Story/MonikaModDev/blob/master/Monika%20After%20Story/game/script-topics.rpy#L868)
source code and get event labels from there, as well as custom labels from
submods.
Loading

0 comments on commit 87730d6

Please sign in to comment.