Open-Historia/open-historia ? reverse-engineered prompt

Reverse engineered prompt

Build me an open source grand strategy game like Pax Historia, with a big interactive world map where borders, territories, and nations change over time. I want players to be able to click a country and chat with it, get AI intelligence briefings, ask an advisor for strategic help, and see AI driven events that react to what is happening in the world.

It should also let me move armies, fight battles, and build or edit scenarios with a map editor where I can draw regions, split and merge borders, paint owners, and add cities. I want a community area where people can browse and import scenarios, plus the ability to publish their own.

Please make it work in the browser and also as a desktop app that can run offline, with my own AI backend if needed. Keep it polished enough to feel like a real game, and if you need current docs or setup details, look them up online first.