Has anyone had success editing Shards?

So. I'm working on a mod that reworks the magic system, and one of the things I'm attempting is to do is to remove the different shard types and have the game spawn only generic shards. If I understand correctly, the way to do this is:

1) Set the rarity in the xml to -1 for each existing shard type.

2) Create a custom shard type, set its rarity to the sum of the other shards' rarity.

3) Create custom improvements that require the new shard resource.

4) Track down the code that seems to spawn one shard at each starting point (any ideas?)

Am I missing anything here? Thanks in advance.

5,924 views 8 replies
Reply #1 Top

Update: 1-3 were surprisingly easy, piggybacking on the existing code. However I'm still having a problem with locating the code that spawns starting resources like fertile land and a random shard.

Reply #2 Top

It is my understanding that those are hardcoded. You can try breaking the original, in coreworldresources, in various ways to see if they stop spawning.

Reply #3 Top

Thanks. I'm starting to wonder if maybe all of the shard spawning code is under the hood. I've modified the CoreShards.xml to spawn only Air shards, which I'm using as a base, but it doesn't seem to prevent other types from spawning regardless. Files in the Mods folder, "Use Mods" option enabled.

I'll mess around with it a little bit more.

Reply #4 Top

Yes, shards spawn under the hood as well.

Reply #5 Top

Updated with a more informative title.

Like I said above, it looks like shard spawns are handled differently than all other resources. I was wondering if anyone had some insight.

Reply #6 Top

Well what I know is that each spawn has a shard, and that each map will have at least 1 of each shard.

I built this: https://forums.elementalgame.com/399133

a while back to allow the modder some control over new shards.

Reply #7 Top

Fantastic. This doesn't solve the problem completely, but it helps. I have no idea why they would have a separate system for shards that we don't have access to.

Reply #8 Top

Alright, one last update. I tried setting the ShardBaseQuantityMax and Min variables to 0 in the CoreMaps xml, thinking that I could add a custom shard resource to the CoreWorldResource.xml. But, this didn't seem to have any effect either.