Skip to content

Feature request: Implement INNER_VOICE daily task #967

Description

@tickBit

What do you want to see in the API?

Add a server-tracked daily task: INNER_VOICE.

The task should be completed when a player successfully updates and saves the clan phrase/motto.

The player-facing instruction for the task is:

{
  "fi": "Avaa klaanin asetukset. Muokkaa klaanin mottoa ja tallenna muutos. Mieti, mitä haluatte viestiä toisillenne ja muille."
}

The task should use the existing clan phrase field.

The task should be configured with:

{
  type: ServerTaskName.INNER_VOICE,
  amount: 1,
  amountLeft: 1
}

How do you think this should work?

The frontend opens the clan settings UI and lets the player edit the clan motto/phrase.

When the player saves a changed phrase value successfully through the backend, the server should progress or complete the INNER_VOICE daily task.

Expected flow:

  1. Player opens clan settings.
  2. Player edits the clan motto/phrase.
  3. Frontend sends the updated phrase value to the backend.
  4. Backend validates and saves the updated phrase.
  5. Backend progresses/completes the INNER_VOICE daily task.
  6. Frontend receives the updated clan data normally through the API and/or MQTT.

About MQTT

When the clan phrase is successfully updated, the backend should publish a clan update MQTT notification so clan members can update their local clan data without polling.

Suggested payload:

{
  clan_id: string;
  phrase: string;
}

Example:

{
  "clan_id": "67fe4e2d8a54d4cc39266a43",
  "phrase": "Together we rise"
}

The MQTT event should be sent only after the phrase update has been successfully saved.

Any additional info?

This should be treated as a clan-level daily task.

Changing the clan phrase/motto affects the whole clan, so completing INNER_VOICE should reward/progress the clan task rather than only an individual player task.

INNER_VOICE = 'inner_voice' already exists in ServerTaskName.

The task must be included in taskGenerator.service.ts.

dailyTasksStartupRefresh.service.ts refreshes the daily tasks into MongoDB, so this task must also be included in the startup refresh generation path.

No separate enum for clan phrase/motto appears to exist currently. The existing phrase field is a string, so this task should track changes to that field.

The clan phrase/motto is not free text in the UI.

The frontend has a hardcoded list of allowed motto strings and their localizations. The player selects one of these predefined mottos, and the frontend sends the selected motto as a plain string to the backend through the existing phrase field.

The string may be Finnish or English, for example "Victory or nothing!", but the frontend can still map it back to the localized Finnish and English versions because all allowed mottos are known and hardcoded on the frontend side.

The backend does not need a separate enum for clan mottos for this task. The backend should treat phrase as the existing string field, save the received value, and complete/progress INNER_VOICE when the phrase has been successfully changed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew feature to add

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions