tureptor / terraoptifind

Finds optimal NPC housing combinations for Terraria
MIT License
3 stars 4 forks source link

Add hybrid biomes #5

Closed tureptor closed 11 months ago

tureptor commented 2 years ago

Largely implemented in 8de5882
Need to add trihybrids (tribrids?) like HallowCavernsDesert though (maybe add quad hybrids etc. as well? will need to automate hybrid generation for that)

tureptor commented 2 years ago

(Goblin tinkerer = 10, steampunker = 2, guide = 0, all pylons covered, use the natural+easily creatable biomes)

Biome(s) for groupNPCs in this group (and their pricing modifier for each biome)
ForestMerchant(0.89)
ForestZoologist(0.84), Golfer(0.84)
HallowCavernsTavernkeep(0.79), Demolitionist(0.79)
HallowParty Girl(0.79), Wizard(0.89)
CavernsSnowClothier(0.84), Tax Collector(0.89)
CavernsSnowGoblin Tinkerer(0.75), Mechanic(0.75), Princess(0.77)
DesertOceanSteampunker(0.79), Stylist(0.89), Cyborg(0.84)
DesertNurse(0.84), Dye Trader(0.84), Arms Dealer(0.79)
JungleDryad(0.84), Painter(0.79), Witch Doctor(0.84)
OceanAngler(0.89), Pirate(0.79)
MushroomGuide(0.95), Truffle(0.79)
Biome(s) for groupNPCs in this group (and their pricing modifier for each biome)
ForestMerchant(0.89)
ForestZoologist(0.84), Golfer(0.84)
HallowCavernsTavernkeep(0.79), Demolitionist(0.79)
HallowDesertNurse(0.79), Arms Dealer(0.79)
HallowSnowParty Girl(0.79), Wizard(0.89), Santa Claus(0.84)
CavernsSnowClothier(0.84), Tax Collector(0.89)
CavernsSnowGoblin Tinkerer(0.75), Mechanic(0.75), Princess(0.77)
DesertOceanDye Trader(0.89), Stylist(0.79)
DesertSteampunker(0.79), Cyborg(0.89)
JungleDryad(0.84), Painter(0.79), Witch Doctor(0.84)
OceanAngler(0.89), Pirate(0.79)
MushroomGuide(0.95), Truffle(0.79)

Interesting results. Turns out you want the Stylist in the DesertOcean hybrid, and then either (put the Steampunker/Cyborg with her, and the Dye Trader with the Nurse/Arms dealer), or (put the Dye Trader with her, and then have the Steampunker/Cyborg in a standalone Desert biome).

If you're willing to allow the existence of a OceanSnow hybrid (may need to build it up and away from the ocean sand) then you can slightly improve on this by placing the Tax Collector with the Angler/Pirate duo, and moving the Clothier with the Guide/Truffle.

tureptor commented 2 years ago

@lowoli I finally got round to adding hybrid biomes

bryanclst commented 2 years ago

Nice job! I like that hybrid biomes are off by default and available through the checkboxes. One thing: Desert and Ocean are incompatible biomes, except when the sand is Hallow. I noticed this while testing: Arms Dealer does not get his biome bonus from being in the ocean (which has well over 1500 sand blocks), but if you turn the sand Hallow, he suddenly enjoys being there, and sells the Ocean, Desert, and Hallow pylons.

There may be numerous similar cases. The Desert page on the wiki says that "Deserts are overridden by most other biomes, including the Ocean," but it does not talk about any of these "other" biomes. I don't know how one might find all these incompatibilities without testing. I checked OceanSnow using TEdit; that one is valid, so just removing DesertOcean should be a good band-aid fix for now. I could make a comprehensive list of every hybrid biome that works sometime if there doesn't already exist a source for that and there's no way to automatically check it.

tureptor commented 2 years ago

Thanks for the feedback. I've just removed the DesertOcean and replaced it with the HallowDesertOcean (which is now in easily creatable).

The source I was using manually/that I was planning on using to automatically generate all the hybrid biomes was this wiki page but it seems like it's outdated/inaccurate.

I could make a comprehensive list of every hybrid biome

Thanks for the offer, but since the next couple of days is free for me, I'll just test each combo with the help of TEdit quickly.

tureptor commented 2 years ago

OK, I've finished testing all the dual hybrid biomes and my results are as follows:
The forest cannot co-exist with another biome (it is always overwritten) Same with the DesertOcean combo (treated as ocean only) There is a weird case with the OceanCaverns combo where NPCs will think they are in both biomes (i.e. both stylist and goblin tinkerer happy) and sell both pylons, but only the Caverns pylon will work (the Ocean pylon won't) All other dual hybrid biomes co-exist (NPCs will think they are in both biomes, and both pylons will work) but in some cases only one pylon will be sold, even if both function (this mainly seemed to be an issue with Caverns hybrids)

Will finish testing the trihybrids tomorrow.

tureptor commented 2 years ago

Finished testing the trihybrids (and added them to the calculator). The pattern is pretty much the same:

The main interesting solution from adding trihybrids is that with the Goblin Tinkerer>>>>>>>>>Steampunker>>Everyone else (>>>>>>>>>>>Guide) weighting order, the optimal layout is to put the Goblin Tinkerer with the Mechanic and the Dye Trader in the CavernsDesertSnow trihybrid, then put the Princess with the Steampunker and Cyborg. This brings the Steampunker pricing down to a minimum of 0.75, and the Dye Trader remains relatively happy since he's in a preferred biome. The CavernsDesertSnow is quite fiddly to make though - need to import 1500 Snow/Desert blocks into the other biome.

InSimpleTermsJordan commented 11 months ago

This may be ready to be closed due to #10