Persistent Browser RPG · Dark Medieval Systems · Powered by Mediakor
Medievalkor is a persistent, browser-based RPG built on the Mediakor stack.
It combines classic RPG stats and loot with asynchronous web gameplay, allowing players to progress through missions,
crafting, and properties without needing to be online 24/7.
- Tech Stack: PHP + MariaDB (LAMP-style container), HTML/CSS (Dark Medieval 0.x theme).
- Design Goal: “Idle-friendly, system-heavy” — deep mechanics, low friction.
- Core Pillars: Characters · Missions · Crafting · Properties · Guilds · Economy.
Medievalkor runs as a standalone web application but is deeply integrated into the broader Mediakor ecosystem:
authentication, logging, and infrastructure are shared with other internal services.
Medievalkor is set in a single, large continent divided into regions and biomes.
The world is designed to support future expansion without rewriting core systems.
- The Lowlands: Starter zones, low-level missions, basic crafting materials.
- Iron Marches: Mid-tier combat zones; higher-risk missions, better equipment drops.
- Veilwood: Magical forest zones; intended home of later spell and alchemy content.
- Obsidian Frontier: Late-game frontier; future home of large-scale dungeons and faction conflicts.
- The Mages Company: Contractor-like magic users offering missions and services.
- The Fighters Company: Mercenary group focused on combat missions and defense contracts.
- Independent Guilds: Player-formed organizations interacting with the world via guild systems.
The world lore is intentionally modular: regions and factions can be attached to new systems (events, dungeons, etc.)
without reworking the core data model.
Characters are the center of Medievalkor. Each account can own one or more characters, each with their own stats,
inventory, guild affiliation, and mission progress.
- STR — Physical power, affects melee damage and carry weight (design target).
- DEX — Accuracy, evasion, ranged reliability.
- CON — Health, stamina, resilience to damage.
- INT — Magic power, crafting efficiency, knowledge-based checks.
- WIS — Magical resistance, perception, cooldown optimization.
- CHA — Social interactions, future vendor/guild bonuses.
| Field | Type | Description |
id | INT PK | Unique character ID. |
user_id | INT FK | Link to owning user. |
name | VARCHAR | Character name. |
level | INT | Character level, 1–100. |
xp | BIGINT | Current XP. |
str, dex, con, int, wis, cha | INT | Base or total stats. |
gold | INT/BIGINT | Primary currency. |
created_at | DATETIME | Creation timestamp. |
- XP curve is handled by
check_and_apply_level_up() in includes/level.php.
- Levels 1–100 use a quadratic growth curve (XP required increases per level).
- Level-ups can:
- Increase base stats.
- Unlock new missions / crafting tiers (design target).
- Modify drop tables or property yields (future expansion).
The typical player loop in Medievalkor:
- Pick Missions from mission lists appropriate for your level.
- Run Missions Asynchronously — timers/returns managed via
character_missions.
- Collect Rewards — XP, gold, items, crafting materials.
- Craft or Upgrade Gear based on recipes and materials.
- Invest in Properties for passive income using mission/crafting profits.
- Join Guilds and collaborate for shared goals and future faction mechanics.
This loop is intentionally minimal-click and friendly to short sessions, while still allowing depth via systems
like crafting, properties, and future dungeons/factions.
Missions are the main asynchronous activity. They represent contracts, excursions, hunts, deliveries, etc.
| Table | Purpose |
missions | Defines mission templates (name, description, level, duration, base rewards). |
character_missions | Tracks which character is on which mission, start/end times, and state. |
mission_drops | Defines potential item rewards and drop chances per mission. |
- Player selects an available mission from
missions (filtered by level and other criteria).
- A record is created in
character_missions with start_time and end_time.
- Once
now >= end_time, the mission can be “completed”:
- XP and gold are granted based on mission definition.
- Loot is generated using
mission_drops probability entries.
- Status updates to completed; optional future failures/partial success conditions.
- Hunt — Combat-focused, higher risk, better item drops.
- Escort — Longer duration, stable gold/XP, moderate loot.
- Gather — Focused on crafting materials and resources.
- Contract — Faction-tied missions (planned) affecting reputation/standing.
Dungeons are designed as multi-encounter challenges that require small parties of characters.
Current implementation is partial; systems are being iterated.
- Players form parties via a party UI.
- Parties enter dungeon instances with multiple “rooms” or encounters.
- Combat is turn-based and resolved server-side.
- Loot is distributed based on contribution and role (design target).
- Planned Tables:
dungeons — Definitions (name, difficulty, biome, boss flags).
dungeon_runs — Specific runs, party members, current stage.
dungeon_encounters — Monster groups, scripts, AI behaviors.
- Party Handling: currently piggybacks off party-like structures and dungeon.php logic.
Dungeons are considered a major expansion system and will be documented in their own sub-pages once stabilized.
Items are fully database-driven and support equipment, consumables, crafting materials, and special tokens.
- Weapon — Damage modifiers, stat bonuses.
- Armor — Defense and resistances.
- Accessory — Rings, amulets, utility buffs.
- Consumable — Potions, scrolls, one-use items.
- Material — Crafting ingredients.
- Property Tokens — Items that unlock or upgrade properties (concept).
| Table | Description |
items | Master list: name, type, rarity, description, base stats. |
character_inventory | Relations between characters and items; tracks quantity and equipped state. |
- Inventory UI allows equipping items to specific slots (weapon, head, body, etc.).
- Equipped items modify effective stats for combat and checks.
- Back-end logic reads from
character_inventory and items to build final stat blocks.
Crafting converts materials into higher-tier items using database-defined recipes.
The system is built to be content-driven: recipes can be added without code changes.
| Table | Purpose |
crafting_recipes | Defines output item, crafting time, and difficulty. |
crafting_recipe_ingredients | Links recipes to input items and required quantities. |
- Player selects a recipe from the crafting UI.
- System checks if the character has required ingredients in
character_inventory.
- Ingredients are consumed; a crafting timer or instant result is applied (depending on design).
- Output item is added to inventory on success.
Future enhancements may tie crafting efficiency or bonus yield to INT and WIS,
as well as introduce recipe discovery and tiered workstations.
Medievalkor uses a sell-to-server market model via item_market_prices.
This allows a stable baseline economy independent of player-to-player trade (which can be added later).
| Column | Description |
item_id | FK to items. |
buy_price | Price the server pays to buy the item from players. |
base_price | Reference value for the item. |
quantity_bought | Tracks how many of that item the server has “purchased”. |
- Prevent runaway inflation by capping or adjusting prices based on
quantity_bought.
- Allow “sink” mechanics where items can be sold off-system to stabilize inventories.
- Future hooks for NPC vendors, auctions, or player-driven markets.
Guilds let players form organized groups with shared identity and (later) mechanical benefits.
| Table | Description |
guilds | Guild name, description, emblem, creation data. |
character_guilds | Membership: character_id, guild_id, rank, join_date. |
- Guild tags and names displayed in chat and character profiles.
- Planned: guild banks, shared properties, guild missions.
- Planned: faction alignment meta-layer via guild declarations.
Properties provide recurring rewards over time — a core “idle” mechanic that pairs with missions and crafting.
| Table | Purpose |
properties | Property definitions: type, name, base yield, cost. |
character_properties | Tracks which character owns which property, and last_collected_at. |
- Each property yields gold (and potentially materials) per time interval.
- When the player visits the properties page:
- Time since
last_collected_at is calculated.
- Yield is computed and granted, capped by configurable limits.
last_collected_at is updated.
- This allows “check-in” style gameplay without forcing constant online presence.
Medievalkor includes a simple world chat to enable social presence and coordination.
- Messages stored in
chat_messages with timestamps and sender info.
- Planned: color-coded names or badges based on level, guild, or staff role.
- Potential integration with external chat (e.g., Discord relays) via API hooks.
Medievalkor is built to be container-friendly and easy to move between environments (dev → staging → prod).
- Web: Apache + PHP (Docker container in the Mediakor stack).
- Database: MariaDB / MySQL-compatible server.
- Tools: phpMyAdmin or direct CLI / admin tools for database management.
includes/db.php — PDO connection, centralized.
includes/auth.php — Login, registration, session handling.
includes/level.php — XP table and check_and_apply_level_up().
includes/header.php / footer.php — Layout + Dark Medieval theme wrappers.
- Develop locally using Docker (Apache+PHP + MariaDB).
- Commit changes to the internal Git/Gitea repo
Medievalkor.
- Update production container from repo (pull + rebuild or mount + sync).
- Apply schema changes via migration scripts / SQL patches.
The schema is designed around clear domains: Accounts, Characters, Content, and Systems.
users — Account-level authentication and profile info.
characters — Per-character stats, progression, and currency.
items, character_inventory
crafting_recipes, crafting_recipe_ingredients
missions, character_missions, mission_drops
guilds, character_guilds
properties, character_properties
item_market_prices
chat_messages
When designing new features, they should generally fit into one of these domains and follow
the existing patterns for relation tables (linking characters to systems via character_* tables).
While implementations may evolve, the core entry points are:
index.php — Landing / character selection.
character.php — Character overview (stats, level, summary).
inventory.php — Inventory and equipment management.
missions.php — Mission list, mission start/complete actions.
crafting.php — Crafting recipes and actions.
properties.php — Property ownership and collection UI.
guilds.php — Guild creation, join/leave, roster.
chat.php — World chat display/input (sometimes embedded in layouts).
For deeper technical details, see the Medievalkor · Dev Notes subpage
(intended to hold code-level notes, TODOs, and edge cases).
Administrative tasks keep Medievalkor healthy and consistent with the rest of the Mediakor environment.
- Monitor error logs for PHP and database issues.
- Review mission and economy balance; adjust
missions and item_market_prices as needed.
- Review property yields and progression pacing.
- Run regular database backups (either from host or via tools like phpMyAdmin / CLI).
- Direct DB editing for now (with strict change logging).
- Planned web-based admin panel:
- Spawn/edit items and recipes.
- Inspect or modify characters (for support operations).
- View mission statistics, drop rates, and economy indicators.
Medievalkor is actively evolving. Major planned directions include:
- Dungeons 1.0: Stable dungeon runs with party support, boss mechanics, and loot tables.
- Magic System: Spell lists, mana/energy resources, status effects, and synergies.
- Deeper Factions: Worldmap influence, faction missions, and territory control.
- External Integrations: Discord bots, dashboards, or mobile helpers using a small REST API.
- Expanded Admin UI: Non-technical tooling for content creation (items, missions, properties).
As features stabilize, each subsystem will receive its own detailed documentation page under the
Medievalkor section of this wiki.
Project Status: ACTIVE DEVELOPMENT
Last updated: 2025-11-11
Maintained by: Mediakor Game Development