Skip to content

Add Arkania survival feature: generator state, quests, dialog, and weather integration#20

Open
Scorchys12 wants to merge 2 commits into
masterfrom
codex/design-quests-and-weather-mechanics-for-arkania
Open

Add Arkania survival feature: generator state, quests, dialog, and weather integration#20
Scorchys12 wants to merge 2 commits into
masterfrom
codex/design-quests-and-weather-mechanics-for-arkania

Conversation

@Scorchys12
Copy link
Copy Markdown
Owner

Motivation

  • Add an Arkania planetary survival vertical slice that reuses existing quest, weather, and persistence systems to introduce cold-weather hazards and a shared city generator resource.
  • Provide server-side persistence for a single city-level generator resource and expose simple player interactions via dialog and quest turn-ins.
  • Tie generator condition into local snowstorm severity so Arkania-specific cold can be influenced by player contributions without replacing the global weather system.

Description

  • Add a persistent entity ArkaniaGeneratorState and a service ArkaniaGenerator to track HeatReserve, Integrity, Coal, MachineParts, HeatCores, MedicalSupplies, ForecastData, Morale, and timestamps, plus helper methods like AddCoal, AddMachineParts, and BuildStatusText.
  • Add dialog ArkaniaGeneratorDialog to let players view generator status, deposit items, and remove items from player inventory by resref via CountItems/RemoveItems, and wire item resrefs ark_coal, ark_machine_part, ark_heat_core, ark_med_supplies, and ark_fcst_data into deposit actions that call ArkaniaGenerator methods.
  • Add quests in ArkaniaQuestDefinition implementing the first Arkania quest package (repeatable community turn-ins and adventure quests) and hook quest completions to update the generator state via ArkaniaGenerator callbacks.
  • Introduce Arkania to PlanetType as an inactive entry and add an Arkania WeatherClimate in WeatherPlanetDefinitions with custom messages and HasSnowStorms = true.
  • Modify weather system: change ApplySnowstorm signature to ApplySnowstorm(uint oTarget, uint oArea, int damageDice = 2), clamp dice, add GetSnowstormDamageDice logic that returns 0/1/2/3 based on area name, local ARKANIA_SAFE_FROM_COLD, and the ArkaniaGenerator HeatReserve, and use that value when applying and scheduling snowstorm damage.
  • Add documentation Readmes/ArkaniaSurvivalPlan.md describing scope, architecture, item resrefs, and phased implementation guidance.

Testing

  • Built the solution successfully after the changes and ensured the project compiles without errors.
  • Executed the existing automated test suite and build-time checks; all automated tests passed.

Codex Task

@Scorchys12
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c32303f8cd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread SWLOR.Game.Server/Service/Weather.cs Outdated
ApplyEffectToObject(DurationType.Instant, eEffect, oTarget);

DelayCommand(6.0f, () => { ApplySnowstorm(oTarget, oArea); });
DelayCommand(6.0f, () => { ApplySnowstorm(oTarget, oArea, damageDice); });
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recompute snowstorm severity before rescheduling

When an Arkania player is already in a snowstorm, this recursive call keeps reusing the damageDice value captured when the loop started. If the generator reserve changes thresholds or ARKANIA_SAFE_FROM_COLD is set for the area while the player remains in the same area, the ongoing loop never calls GetSnowstormDamageDice again, so deposits/safe-cold areas do not affect that player's storm damage until they leave or otherwise stop the loop. Recompute the dice from oArea inside ApplySnowstorm before applying and rescheduling so the new generator state can take effect during active storms.

Useful? React with 👍 / 👎.

@Scorchys12
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b35a449d8e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +9 to +13
public const string CoalResref = "ark_coal";
public const string MachinePartResref = "ark_machine_part";
public const string HeatCoreResref = "ark_heat_core";
public const string MedicalSuppliesResref = "ark_med_supplies";
public const string ForecastDataResref = "ark_fcst_data";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the missing Arkania item templates

These new resrefs are used as quest collect objectives/rewards and by the generator dialog, but the commit does not add any matching item resources (I searched the repo/Module for ark_coal, ark_machine_part, ark_heat_core, ark_med_supplies, and ark_fcst_data and found only these code/docs references, no Module/uti templates). As soon as any Arkania quest that awards or requests these items is enabled, players cannot obtain/turn in the required objects and rewards such as AddItemReward(ArkaniaGenerator.CoalResref, 3) will try to create a non-existent template.

Useful? React with 👍 / 👎.

{
var builder = new QuestBuilder();

TheCityMustSurvive(builder);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wire the new Arkania quests into module content

These quest definitions are registered by reflection, but I searched both Module and SWLOR.Game.Server for the six new quest ids and ArkaniaGeneratorDialog and found only these definitions/docs. With no NPC/dialog/trigger/placeable locals referencing the ids, players have no way to accept or advance the added quests, and the multi-state quests that rely on trigger/placeable progression cannot be completed once the planet content is enabled.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant