NPC bases: is it possible?

So we got the ability to spawn landmarks now. But what if a landmark included an NPC base? This post was meant as a huge modding question mark: is it possible with the current tools?

Basic outline:

  1. NPC bases are biome specific and 1 or 2 of them spawn in each world.
    NPC base would be an entity with its very own components, spawned as a part of a landmark. I think it would be nice if they spawned near the world borders, not right in the middle, but I am not experienced enough to tell if it is possible. If not, I think they should be shown on the minimap before region selection.
  2. NPC base has its own player ID and can spawn units with its own player ID.
    Guardians, quest NPCs, you name it. Also, changing the amenity between a player and an NPC base would be possible this way: base starts neutral towards all human players, goes hostile against potential attackers and can become friendly when…
  3. NPC base has a button which intiates a campaign node.
    This should be tiered. The first time the button says ‘Say Hello!’ and offers an initial, easy quest. After the initial quest is completed, the button changes to ‘Offer assistance’ which starts a more difficult quest. After the two tiers are completed, the button changes to ‘Ask for a quest’ which starts a random quest node from a preset pool. This way a player can demand quests even in the late game.
  4. NPC bases can be traded with after completing the 1st tier quest.
    Just a button to call a merchant with a significant cooldown. Nothing really sophisticated.
  5. NPC bases offer unique services in exchange for gold coins after completing the 2nd tier quest.
    This is the beefy part. NPC-unique boosters, affecting things one cannot normally affect like weather, maybe even hiring mercenaries. The fancy stuff. Needs some coding knowledge but seems doable.

While I think all the above is quite codeable, there is one big question: how to handle the quest progress and command buttons in multiplayer? AFAIK the command buttons cannot be player-specific, only owner-specific, but I wouldn’t like to make the quest lines competitive: ‘whoever clicks the button first, gets the quest line’ is definitely not a nice solution.

Some storytelling ideas for NPC base types (featuring the ironical cuteness of SH):

  • Abandoned Facility: Repairers
    This looks useful. Not now. And not for you. It will be useful if you ship the right guy the necessary supplies. They are so preoccupied they don’t really see the danger coming, so protection will be needed as well, but the end result may be really useful. Like a working Phoenix Empire observatory or something.
  • Trading Post: Traders
    Being sent to the region by higher authorities or feeling like an entrepreneur on their own, any reason is good to make some money. Or a lot of it. And lots of exotic stuff, ornate stuff, shiny stuff… But money attracts The Greedy Ones. Will they protect themselves from The Great Thief? Definitely not without some help.
  • Ancient Sites: Cultists
    Power lies here. Lots of power. They want to unleash it. Of course, it wouldn’t be Stonehearth if in the end they unleashed something truly dangerous, so making a cake so tender and moist (and not a lie) is considered a superpower. Nevertheless, they need assistance and are willing to share their discoveries for a price if they succeed.
  • Peace’n’Quiet: Hermits
    Oh, hello. Not very nice to see you, but hello. Aa-aand… have a nice day. See you later. Much later. Preferably never. They built their little, cosy homes away from the society not without a reason. It is not easy to hunt down a Varanus in the middle of the town, but in a secluded forest… Reluctant to accept help, these guys are a bit arrogant at the beginning but come to like you in the end. Insert flat eyes expression here.

Now, this idea seems big and before even thinking of starting it, I’d like to know things like these are possible. If someone is willing to help, please consider helping these guys first: ACE - Authorized Community Expansion Project because I won’t have time to take on such a daring project for some time and they need your help now. I will let people know if (and when if so) this project starts.

Comments are welcome, especially the technical ones.

7 Likes

All of the above is definitely possible in a mod, mainly through the awkward but super powerful encounter system. Look at the Titan campaign as an example of what’s possible with encounters. The whole of it is just a combination of a weather type and an encounter graph.

Custom command button logic in multiplayer is straightforward. When someone clicks it, all it does is call a server method passing the caller player ID and the entity it was called on. It’s up to you to decide how you want to handle each player. If you want to hide it from specific players, you can do it at the UI level.

For initiating encounter nodes from in-world items, you typically have an encounter “wait for event” node and have the item emit that event after a given interaction. The merchant stalls do exactly that in response to a command button click.

6 Likes

But of course! The bases would simply be somewhat elaborate titan gongs.

3 Likes