Thutmose / Pokecube

Primary Development has moved to: https://github.com/Pokecube-Development
https://github.com/Pokecube-Development
19 stars 7 forks source link

Config Suggestions: Dimension whitelist for village structures & villager trainers #287

Open luke-bravenboer opened 6 years ago

luke-bravenboer commented 6 years ago

Suggestion:

A configuration option allowing dimension ID white/blacklisting for the village-related configuration options:

Reasoning:

In pokecube.cfg, there is an option 'I:dimensionWhitelist' (along with I:dimensionBlacklist / B:whiteListEnabled) which can be specified to only spawn pokecube mons in a specific dimension. This can be used alongside the configuration setting I:spawnDimension, to configure a particular dimension where players will be introduced to Pokecube & asked to select their starter 'mon.

For example, in my instance, I'm using these properties to whitelist the Lost Cities dimension (ID=111) for all Pokecube-related activities. (This dimension still has regular village generation.)

However, even with this configuration, players can still get a pokecube before visiting the intended dimension, by simply finding any village in the overworld & using the Pokecube Table in the corner. To avoid this, I have to disable B:villagePokecenters, though this will prevent Pokemon Centers from generating in the whitelisted dimension also- which is undesirable.

I also don't want villagers in the overworld to be calling out Pokemon to defend themselves, because those 'mons shouldn't exist in this dimension; so I have to disable B:npcsAreTrainers also, which unfortunately also affects the whitelisted dimension.

Notes:

Long story short, I think it would be useful if we could white/blacklist the generation of pokecenters & marts per-dimension, as well as the whole villagers-being-trainers thing. Either they could be affected by the dimensionBlacklist & dimensionWhitelist options (probably not good for encapsulation), or separate whitelists for all 3 options (probably too verbose), or maybe just a master dimension whitelist for all village/villager-related options?

Thutmose commented 6 years ago

This should be possible to do, I can look into adding black and white list capabilities to all of the villager and village related features

Thutmose commented 6 years ago

This commit here should mostly deal with this issue:

https://github.com/Thutmose/Pokecube/commit/102272214dac6552d331d6943a071890cf7bbdb6

It makes the general white/blacklist apply to everything, if I do need seperate ones later, I shall add them case-by-case, but for now, the general one is easier to setup, and doesn't add more to the configs.

luke-bravenboer commented 6 years ago

Fantastic, this is perfect thank you :)

Thutmose commented 6 years ago

I have looked into the village stuff, and it seems the best I could do is make it not build the structure in specific dimensions, this will result in blank plots in the village though, as it seems there is no way to tell it that a building isn't allowed in specific dimensions

luke-bravenboer commented 6 years ago

That's a shame, but definitely better than nothing! How noticable are the blank plots, is it too weird to release?

Thutmose commented 6 years ago

Currently they are the size of pokecenter and pokemarts, when the are in the middle of a village they are very obvious, especially if the pokemart and pokecenter were directly adjacent, I can see if I can find a way to make them smaller, but I am not sure how well that will go

luke-bravenboer commented 6 years ago

Hey, following up on this, any thoughts on pushing out this change, or are you just not happy with it as it is?

Personally I'd much rather actually be able to have pokecenters & marts spawning in the whitelisted dimension & live with having a few empty plots in overworld villages, than simply having to disable the Pokecube structures entirely.

(Also, having trouble figuring it out from your commit, but did this 'broadening the scope of the dimension white/blacklist' change also affect the deactivateMonsters / disableVanillaMonsters options? I'd love to finally be able to prevent vanilla mobs in my 'pokecube' dimension)

Thutmose commented 6 years ago

test to see if the current version has the version that leaves the blank plots, I think it might do.

The deactivateMonsters / disableVanillaMonsters options work by removing the mobs from the biome spawn lists, so they can't be done specific to dimension, they are done this way for performance reasons, ie the mobs never try to spawn, rather than having to cancel spawns each time.

I can see about adding a worse performance config option that uses the cancelling method, which can be done dimension specific

luke-bravenboer commented 6 years ago

Huh, didn't actually realise you'd released the change already, sorry! Looks fantastic, I honestly can't even tell that there's supposed blank plots in the villages without pokecube structures.

Right, I thought that was the case. I'll leave that decision up to you then, I doubt it'll affect many players other than myself anyway :)

luke-bravenboer commented 6 years ago

(For future reference if anyone else ends up reading this & wants to do a similar thing, you can always use another mod like McJty's In Control! to configure pretty much everything about mob spawning, including dimension blacklisting)