Skip to content
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

eternum game docs #2145

Merged
merged 4 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .knip.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"entry": ["eternum-docs/**/*.mdx", "eternum-docs/**/*.tsx"],
"ignore": [
".trunk/**",
"**/*.js",
"bot/**",
"**/vitest**",
"eternum-docs/package.json",

"eternum-docs/vocs.config.ts",

"sdk/packages/eternum/global.d.ts",
"config/bank/index.ts",
"**/**__test__**/**",
Expand Down
19 changes: 19 additions & 0 deletions eternum-docs/components/ResourceIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from "react";
type Props = {
name: string;
id: string | number;
size?: number;
};

export default function ResourceIcon({ name, id, size = 50 }: Props) {
return (
<img
src={`/resources/${id}.png`}
bob0005 marked this conversation as resolved.
Show resolved Hide resolved
alt={name}
title={name}
width={size}
height={size}
style={{ verticalAlign: "middle" }}
/>
);
}
Empty file.
Empty file.
25 changes: 0 additions & 25 deletions eternum-docs/docs/pages/game/index.mdx

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion eternum-docs/docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { HomePage } from "vocs/components";
Eternum is a decentralized, open-source, and community-driven MMORPG game built on the Dojo framework.
</HomePage.Description>
<HomePage.Buttons>
<HomePage.Button href="/game" variant="accent">
<HomePage.Button href="/overview/overview" variant="accent">
Get started
</HomePage.Button>
<HomePage.Button href="https://github.com/BibliothecaDAO/eternum">GitHub</HomePage.Button>
Expand Down
56 changes: 56 additions & 0 deletions eternum-docs/docs/pages/mechanics/hyperstructures.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: Hyperstructures & Points
description: Hyperstructure mechanics and leaderboard system in Eternum
---

# Hyperstructures

## Construction Process

> 🏗️ **Initialization**
>
> - Requires Ancient Fragments to start construction
> - Can be placed anywhere on the map
> - Two contribution modes:
> - Public: Anyone can contribute
> - Tribe-only: Limited to owner's tribe members

### Building Requirements

> 📦 **Resource Contributions**
>
> - Requires all 22 resource types
> - Multiple players can contribute
> - Construction complete when all requirements met
Comment on lines +22 to +24
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix grammar and add specific resource requirements

  1. The sentence structure needs improvement
  2. The documentation would be more helpful with specific resource quantities

Apply this diff to fix the grammar:

- Construction complete when all requirements met
+ Construction is complete when all requirements are met

Consider adding:

  • A table showing required quantities for each resource type
  • Total resource requirements
  • Any minimum contribution amounts per player
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
> - Requires all 22 resource types
> - Multiple players can contribute
> - Construction complete when all requirements met
> - Requires all 22 resource types
> - Multiple players can contribute
> - Construction is complete when all requirements are met
🧰 Tools
🪛 LanguageTool

[uncategorized] ~24-~24: This verb may not be in the correct form. Consider using a different form for this context.
Context: ...players can contribute > - Construction complete when all requirements met ## Points Sy...

(AI_EN_LECTOR_REPLACEMENT_VERB_FORM)


## Points System

### Construction Points

> 🎯 **One-time Rewards**
>
> - Contributors earn points upon completion
> - Points based on:
> - Amount of resources contributed
> - Rarity of contributed resources
> - Awarded once construction is complete
Comment on lines +32 to +36
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance points calculation clarity

  1. Grammar needs improvement
  2. The points calculation mechanism needs more detail

Apply this diff to fix the grammar:

- Amount of resources contributed
+ Number of resources contributed

Consider adding:

  • The formula used for points calculation
  • Examples of points earned for different resource contributions
  • A table showing resource rarity tiers and their point multipliers
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
> - Contributors earn points upon completion
> - Points based on:
> - Amount of resources contributed
> - Rarity of contributed resources
> - Awarded once construction is complete
> - Contributors earn points upon completion
> - Points based on:
> - Number of resources contributed
> - Rarity of contributed resources
> - Awarded once construction is complete
🧰 Tools
🪛 LanguageTool

[uncategorized] ~34-~34: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...n completion > - Points based on: > - Amount of resources contributed > - Rarity o...

(AMOUNTOF_TO_NUMBEROF)


### Generation Points

> ⚡ **Ongoing Points**
>
> - Begins after construction is complete
> - Generates points every Eternum cycle
> - Points distributed via share system
> - Owner controls share distribution
> - Share changes restricted to 48-hour cooldown

## Strategic Considerations

> 💡 **Management**
>
> - Plan resource gathering before initialization
> - Consider tribe-only mode for security
> - Defend completed structures to maintain control
> - New owner gains share control upon capture
> - Previous share settings reset on capture
42 changes: 42 additions & 0 deletions eternum-docs/docs/pages/mechanics/military/combat.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Combat
description: Military and combat mechanics in Eternum
---

## Combat System

### Unit Advantages

> ⚔️ **Combat Matchups**
>
> ```
> Paladins → Crossbowmen
> Crossbowmen → Knights
> Knights → Paladins
> ```
>
> Units deal more damage to their strong matchup and less damage to their weak matchup.

### Battle Duration

- Combat duration is dynamically calculated based on army sizes
- Larger armies result in longer battles
- Highly uneven matchups may resolve more quickly

### Battle Dynamics

- Additional armies can join either side during ongoing combat
- Combat continues until one side is defeated or retreats

### Siege Mechanics

> 🏰 **Siege System**
>
> - Attacking a realm initiates a siege phase before combat
> - During siege phase:
> - Defenders can prepare defenses
> - Resources can be transferred in/out of the realm
> - Defenders can "break" the siege by initiating combat early
> - Once combat begins:
> - Resource transfers are blocked
> - The realm is considered under active attack
51 changes: 51 additions & 0 deletions eternum-docs/docs/pages/mechanics/military/units.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Units
description: Military and combat mechanics in Eternum
---

### Units

> 🎯 **Unit Types**
>
> - **Paladins**
> - Larger energy pool for extended movement
> - Same energy regeneration rate as other units
> - Can cover more distance in a single move
> - **Crossbowmen**
> - Reduced food consumption (50% less)
> - More efficient for exploration and movement
> - **Knights**
> - Standard unit with baseline stats

### Army Energy System

> ⚡ **Energy Mechanics**
>
> - Army's maximum energy is determined by its composition
> - The unit with the lowest energy pool sets the army's limit
> - Energy regenerates at a fixed rate for all unit types every Eternum cycle
> - Energy is consumed when moving across tiles

## Army Movement

### Energy Consumption

> 🏃 **Movement Mechanics**
>
> - Moving armies requires energy
> - Each tile crossed consumes energy
> - Food is consumed during movement

### Unit-Specific Movement

> 💨 **Movement Traits**
>
> - **Paladins**
> - Larger energy pool for extended movement
> - Takes longer to fully recharge energy
> - **Crossbowmen**
> - Uses 50% less food while moving
> - Ideal for long-distance exploration
> - **Knights**
> - Standard movement costs
> - Standard food consumption
Comment on lines +41 to +51
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Reorganize duplicate content and ensure consistency

The Unit-Specific Movement section largely duplicates information from the earlier Units section, but with some inconsistencies:

  • Paladins: New information about energy recharge is introduced here
  • Crossbowmen: Food consumption is described differently (50% less vs reduced)

Consider:

  1. Consolidating all unit-specific information in one section
  2. Ensuring consistent terminology throughout the document
  3. Including all relevant information in the initial unit descriptions

Example reorganization:

### Unit Types

#### Paladins
- Larger energy pool for extended movement
- Standard energy regeneration rate
- Longer recharge time due to larger pool
- Can cover more distance in a single move

#### Crossbowmen
- 50% reduced food consumption
- Efficient for exploration and long-distance movement

#### Knights
- Standard movement costs
- Standard food consumption
- Baseline energy pool and regeneration

96 changes: 96 additions & 0 deletions eternum-docs/docs/pages/mechanics/realm/buildings.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
title: Buildings
description: Building mechanics and costs in Eternum
---

# Buildings

Buildings are essential structures in your realm that provide various benefits. Each construction increases the cost of
subsequent buildings of the same type exponentially.

## Building Types

### Basic Infrastructure

> 🏘️ **Worker's Hut**
>
> - Basic population housing
> - Provides population capacity

> 🏪 **Storehouse**
>
> - Increases resource storage capacity
> - Essential for resource management
> - Prevents production waste
> - Consider building more when storage is frequently full

### Production Buildings

> 🌾 **Farm**
>
> - Produces Wheat for population and armies
> - Provides 10% production bonus to adjacent buildings
> - Strategic placement is key for optimization

> **Fishing Village**
>
> - Produces Fish for population and armies

> 💰 **Market**
>
> - Produces Donkeys
> - Essential to keep a constant trading flow
> - Essential for economic growth

> **Resource Facility**
>
> - Produces specified resource
> - Consumes some of your other realms' resources

Comment on lines +45 to +49
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance Resource Facility description with specific details.

The current description lacks specific information about which resources can be produced and consumed. Consider adding:

  1. List of possible resources that can be produced
  2. Examples of resource consumption rates

### Military Buildings

> **Available military buildings and their units:**
>
> - **Barracks:** Knights
> - **Stables:** Paladins
> - **Archery Range:** Crossbowmen
> - Each military building also increases your max army count by 1 (up to 3, for a total of 6)

#### Army Size Bonus

> Each military building increases your maximum army count by 1, up to a maximum of 3 buildings (for a total bonus of +3
> to army size).

### Production Management

> ⚙️ **Production Controls**
>
> - Buildings can be paused/resumed
> - Pausing stops:
> - Resource consumption
> - Resource production
> - Use pausing to:
> - Prevent resource waste
> - Manage storage capacity

### Building Costs

> 💰 **Cost Scaling**
>
> - Each building has a base resource cost
> - Subsequent buildings of same type cost more
> - Cost increase is exponential
> - Example progression:
> - First Worker's Hut: 100 wood
> - Second Worker's Hut: 200 wood
> - Third Worker's Hut: 400 wood
> - And so on...

### Construction Management

> 🏗️ **Building Tips**
>
> - Prioritize buildings based on your realm's needs
> - Consider population increase and capacity
> - Monitor resource production and storage capacity
> - See Production Management section for resource conservation strategies
46 changes: 46 additions & 0 deletions eternum-docs/docs/pages/mechanics/realm/realm.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Realms
description: Your base of operations in Eternum
---

# Realms

Realms are NFTs that determine your capabilities in Eternum. Originally created as "Realms (For Adventurers)", they were
the first Loot derivative, comprising 8,000 generative maps with unique metadata of resources and traits.

## Realm Access

- Each Realm NFT grants entry into Eternum seasons
- Owners become Lords of their onchain kingdoms
- Access to specific resources from the 22 available types
- Foundation for building and expanding your influence in the game

## Realm Levels

### Settlement

> A small settlement with 6 buildable hexes.

### City

> A glorious city with 18 buildable hexes.

### Kingdom

> A kingdom with 36 buildable hexes.

### Empire

> A vast empire with 60 buildable hexes.

## Starting Values

> 🏰 **Base Castle Stats**
>
> - **Population**: 5 workers
> - **Military Capacity**:
> - 3 attacking armies
> - 1 defending army
> - **Resource Storage**: 300,000 kg
>
> _These are the default values for a new realm before any buildings are constructed._
14 changes: 14 additions & 0 deletions eternum-docs/docs/pages/mechanics/resources/production.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Production

- Every resource, with the exception of food, requires other resources to be produced.

> Ex: to produce Wood, you need Stone, Coal and Wheat.

- Production will work automatically until paused or resources are depleted
> ⚠️ **Warning**
> If some of the input resources required aren't available:
>
> - Available resources will still be consumed
> - No output will be produced
>
> To prevent resource waste, manually pause buildings when resources are low.
Comment on lines +1 to +14
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Documentation needs additional production details

The current documentation is missing crucial information about production mechanics:

  1. Production rates and timing information are not documented anywhere in the mechanics section
  2. While storage capacity is well documented in storage.mdx (300,000kg per storehouse), this information should be cross-referenced in the production documentation
  3. No visual examples of the production interface are present in the documentation
🔗 Analysis chain

Verify documentation completeness

Consider adding these important details about production mechanics:

  1. Production rates or time requirements
  2. Storage capacity limits
  3. Visual examples of the production interface

Let's check if these details exist in other documentation files:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for production-related details in other doc files
rg -i "production rate|production time|storage capacity|storage limit" docs/

Length of output: 124


Script:

#!/bin/bash
# Search in the correct path for production and storage related documentation
rg -i "production rate|production time|storage capacity|storage limit" eternum-docs/

Length of output: 788


Script:

#!/bin/bash
# Search for any storage or capacity related information
rg -i "storage|capacity" eternum-docs/

Length of output: 2580


Script:

#!/bin/bash
# List all files in the mechanics section to ensure we're not missing any relevant docs
fd . eternum-docs/docs/pages/mechanics/

Length of output: 794


Script:

#!/bin/bash
# Check for production rates or timing information
rg -i "rate|time|speed|interval|per|output" eternum-docs/docs/pages/mechanics/resources/

Length of output: 1046


Script:

#!/bin/bash
# Check if there are any UI or interface examples
fd -e png -e jpg -e jpeg -e gif -e svg . eternum-docs/docs/pages/mechanics/resources/

Length of output: 87

🧰 Tools
🪛 LanguageTool

[style] ~3-~3: Consider using “except” or “except for”
Context: ## Production - Every resource, with the exception of food, requires other resources to be pr...

(WITH_THE_EXCEPTION_OF)


[uncategorized] ~12-~12: A period might be missing here.
Context: ...ill be consumed > - No output will be produced > > To prevent resource waste, manu...

(AI_EN_LECTOR_MISSING_PUNCTUATION_PERIOD)

Loading
Loading