McJtyMods / InControl

Be In Control of Mob Spawns and others
MIT License
46 stars 17 forks source link

Feature Request - Specify DAYS mobs can spawn #22

Open GeekyNinja opened 7 years ago

GeekyNinja commented 7 years ago

Wondering if it was easy/possible/feasible to add keys to specify a minimum and maximum day number that mobs could spawn? e.g:

minday: Mob(s) would not spawn before Day X maxday: Mob(s) would not spawn after Day Y

Some mods like Raiders, Drones, and others do have these settings, but it's not consistent across all mods so was wondering if it was possible to make it so in InControl, to allow consistency across a modpack when it comes to mob difficulty progression?

Thanks for the consideration :)

McJty commented 7 years ago

How do you measure days?

GeekyNinja commented 7 years ago

Apologies, I meant specify minimum/maximum Minecraft day number that mobs could spawn.

I did a bit of digging into the InGame Info XML source (link and code below), and found a calculation for day (Line 18)?

https://github.com/Lunatrius/InGame-Info-XML/blob/master/src/main/java/com/github/lunatrius/ingameinfo/tag/TagTime.java

return String.format(Locale.ENGLISH, "%d", world.getWorldTime() / 24000);

Would this then be able to be used as a comparison against a min & max value in a config?

Thanks!

scottosx commented 7 years ago

Would it be possible to get this functionality somewhat using local and regional difficulty? I believe this takes into account time in world (occupied chunks) as well as other things like moon phase. The question is how to structure the JSON.

Would you need to set each hostile spawn to deny or allow within a min and max difficulty along with a max count of that mob in the world?

Basically, I would like my NPC based world to start off with a low number of hostile mobs whose number (and strength) gradually increase as the time passes and the colony builds up. This being at say 25% of default Minecraft spawn rules.

ghost commented 7 years ago

I would also like to set up some kind of increasing difficulty per region. I was reading about the local difficulty calculations and wondering if it would be possible to access the raw values (TotalTimeFactor, ChunkFactor, and RegionalDifficulty) so I could set my own caps, at least as far as In Control was concerned.

scottosx commented 7 years ago

It would be probably be easiest (for the user) to set up if there was a globalspawn adjustment factor. Like globalspawnhostile 0.25 or globalspawnpassive 2.0 ... Then the difficulty calculation takes over from there.

ghost commented 7 years ago

I was thinking of using regional difficulty to encourage players to up their defenses or relocate to escape the hordes.

naqaden commented 5 years ago

Along the same lines, I could really use spawn control by lunar phase (at night every Nth day, or some such).

VinterNacht commented 4 years ago

Lunar Phase, day ranges (every 3-5th day), would also be amazing.

ghost commented 4 years ago

You know, this would also be great in reverse, causing mob farms to dry up over time.