Scattering Objects randomly in the world?

Hi folks!

I would need some help with an idea I have for my Númenorian Armory MOD.

I have made ‘Shards of Narsil’ (They are needed to forge the sword Andúril).

-At the moment they are crafted by the smith, but my idea was to somehow make them unique (only one of each shard shall exist), and maybe have them scattered around the world randomly to be found by the player?

What do you think, sound like a good idea?

I could really need some pointers on how to go about it with the code though…

So far there are three ‘Shards’ and I would like them to be randomly placed in the world when you start a new game.
And also, is it possible to get it to work regardless of what Biome the player chooses?

I would really appreciate the help :grinning:

Cheers!

1 Like

Hey there! Looking this over I think the best route would be via the necromancer crypt encounter that exists in game already. This could likely be duplicated into a new encounter that spawn three separate “zones” in which the reward would be your items.

Per stonehearth\data\gm\campaigns\ambient_threats\arcs\trigger\ambient_threats\ambient_threats_arc.json the relevant files for the crypt encounter are as follows. Locations refer to:

stonehearth\data\gm\campaigns\ambient_threats\arcs\trigger\ambient_threats\encounters

  "necromancer_crypt": "file(encounters/necromancer_crypt.json)",
  "create_necromancer_crypt": "file(encounters/create_necromancer_crypt.json)",
  "spawn_necromancer_undead": "file(encounters/spawn_necromancer_undead.json)",
  "wait_for_crypt_attacked": "file(encounters/wait_for_crypt_attacked.json)",
  "wait_to_spawn_nightly_undead": "file(encounters/wait_to_spawn_nightly_undead.json)",
  "generate_nightly_undead": "file(encounters/generate_nightly_undead.json)",
  "spawn_nightly_undead": "file(encounters/spawn_nightly_undead.json)",
  "wait_for_crypt_destroyed": "file(encounters/wait_for_crypt_destroyed.json)",
  "necromancer_crypt_destroyed": "file(encounters/necromancer_crypt_destroyed.json)",

I’d be more than happy to help throw together a working test for something like this if needed.

1 Like

That sounds really good! -Thanks! :slight_smile:

Yes Please! I would really be grateful if you could take the time have a look at it :grinning:
That would be some much needed help, -I don’t have any experience with the code for spawning, or campaigns.