Web application generating interactive and highly customizable maps
Find a file
2025-05-18 16:11:46 +02:00
.docker Containerized version (#639) 2021-07-13 18:42:28 +03:00
.github Update FUNDING.yml 2024-11-28 12:02:43 +01:00
.vscode v1.3.03a 2020-03-27 17:52:23 +03:00
charges feat: add new emblem charges 2023-10-30 22:27:25 +04:00
components Slider-input web component (#1109) 2024-08-22 13:35:36 +02:00
config central store for heightmap configs 2022-05-29 01:03:21 +03:00
heightmaps doc: update readme 2023-02-09 13:12:37 -08:00
images Fix: rework texture data format (#1017) 2023-11-19 14:43:56 +04:00
libs style: increase dialog buttons size 2024-12-16 14:30:11 +01:00
modules ollama implementation 2025-05-18 16:08:31 +02:00
styles feat: generate less water ice, v1.108.3 2025-02-15 17:45:16 +01:00
utils fix: data integrity checks - better Stripping issue detection, v1.107.1 2025-02-08 15:12:57 +01:00
.gitignore fix: image conversion UI, restrict namebase chars 2022-09-17 14:36:32 +03:00
CODE_OF_CONDUCT.md docs: code of conduct 2022-06-01 15:08:20 -07:00
Dockerfile Containerized version (#639) 2021-07-13 18:42:28 +03:00
dropbox.html dropbox - load script dynamically 2022-02-08 00:47:17 +03:00
icons.css AI generation for notes (#1112) 2024-08-23 18:08:50 +02:00
index.css fix: grid layer to not be clickable 2025-03-09 13:29:45 +01:00
index.html ollama implementation 2025-05-18 16:08:31 +02:00
ISSUE_TEMPLATE.md Update ISSUE_TEMPLATE.md 2018-06-11 21:36:07 +03:00
LICENSE Update LICENSE to include permission for derivative works 2024-06-29 12:03:52 +02:00
main.js perf: set text-rendering to optimizeSpeed, v1.108.1 2025-02-15 14:43:51 +01:00
manifest.webmanifest Correct name and shortname in web manifest (#912) 2023-01-09 01:03:23 -08:00
README.md ollama implementation 2025-05-18 16:11:46 +02:00
run_php_server.bat BAT-file for run PHP built-in server (#1094) 2024-07-11 13:46:26 +02:00
run_python_server.bat v1.5.02 - COA rendering + editor basic UI 2021-02-04 15:56:27 +03:00
sw.js fix: service worker fn 2024-09-20 15:40:10 +02:00
versioning.js fix: grid layer to not be clickable 2025-03-09 13:29:45 +01:00

Fantasy Map Generator

Azgaar's Fantasy Map Generator is a free web application that helps fantasy writers, game masters, and cartographers create and edit fantasy maps.

Link: azgaar.github.io/Fantasy-Map-Generator.

Refer to the project wiki for guidance. The current progress is tracked in Trello. Some details are covered in my old blog Fantasy Maps for fun and glory.

preview

preview

preview

Join our Discord server and Reddit community to share your creations, discuss the Generator, suggest ideas and get the most recent updates.

Contact me via email if you have non-public suggestions. For bug reports please use GitHub issues or #fmg-bugs channel on Discord. If you are facing performance issues, please read the tips.

Pull requests are highly welcomed. The codebase is messy and requires re-design. I will appreciate if you start with minor changes. Check out the data model before contributing.

You can support the project on Patreon.

Inspiration:

Recent Changes (May 18, 2025)

Ollama Integration for AI Text Generation

An integration with Ollama has been added as a new provider for the AI text generator feature, allowing users to leverage local large language models.

Key Changes:

  • New Provider: "Ollama" is now available in the AI generator's model/provider selection.
  • Model Name as Key: When Ollama is selected, the "API Key" input field is repurposed to accept the Ollama model name (e.g., llama3, mistral, etc.) instead of a traditional API key.
  • Local Endpoint: The integration communicates with a local Ollama instance via the http://localhost:11434/api/generate endpoint.
  • Streaming Support: Responses from Ollama are streamed into the text area.

Files Modified:

  1. modules/ui/ai-generator.js:
    • Added ollama to the PROVIDERS and MODELS constants.
    • Implemented the generateWithOllama function to handle API requests to the Ollama endpoint.
    • Modified handleStream to correctly parse the JSON streaming response from Ollama.
    • Updated UI logic in generateWithAi and its helper updateDialogElements to:
      • Change the "API Key" field's placeholder text to "Enter Ollama model name (e.g., llama3)" when Ollama is selected.
      • Store and retrieve the Ollama model name from local storage similarly to how API keys are handled for other providers.
      • Ensured the dialog initialization and element updates occur at the correct time (during the dialog's open event) to prevent errors with elements not being found in the DOM.
  2. modules/ui/notes-editor.js:
    • The openAiGenerator function, which is called when clicking the "generate text for notes" button, was verified to correctly invoke the generateWithAi function.
    • The prompt sent to the AI was updated to be more explicit about requiring HTML formatting (using <p> tags, no heading tags, no markdown) to ensure consistent output. (Self-correction: The user undid the latest prompt change, so this part of the description might not be accurate if the user intends to keep the previous prompt. The README will reflect the general functionality implemented). The prompt engineering aims to guide the AI to produce HTML-formatted descriptions suitable for the notes section.

Goal:

The primary goal of this integration was to provide a simple and functional way to use local Ollama models within the Fantasy Map Generator's AI text generation feature, ensuring that existing functionalities, especially the "generate text for notes" button, remain operational. Initial issues with the dialog not opening were resolved by refining how and when the dialog and its internal event listeners are initialized.