Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Find Isherwood Farm mission #46821

Merged

Conversation

Maleclypse
Copy link
Member

@Maleclypse Maleclypse commented Jan 17, 2021

Summary

SUMMARY: Content "Quest to find Isherwood Farms"

Purpose of change

I wanted to tie in Mr Lapin to the surrounding communities but since the Evac Center hates the visibly mutant. That seemed to only leave groups that are fiercely independent and might respect someone who can survive on their own.

Describe the solution

Adds dialogue and quest to Lapin to find Isherwood.

Describe alternatives you've considered

none

Testing

Tested successfully

Additional context

@Maleclypse Maleclypse marked this pull request as draft January 17, 2021 05:59
@Maleclypse
Copy link
Member Author

@curstwist I'm not sure that under current standard world settings the Isherwood Farm can spawn. Right now my new gaming laptop hangs for between 1 minute 40 seconds and 2 minutes 20 seconds while it searches and then it errors as follows ERROR : src/mission_util.cpp:249 [cata::optional<coords::coord_point<tripoint, (coords::origin)1, (coords::scale)2> > find_or_create_om_terrain(const tripoint_abs_omt&, const mission_target_params&)] Unable to find and assign mission target farm_isherwood_2.
13:29:35.109 : Log shutdown.

@actual-nh
Copy link
Contributor

#46701 has Isherwood Farms 40% of the time, although Lapin Cabin only 20% of the time.

@curstwist
Copy link
Contributor

I see it spawn when I'm map hopping so I know its possible. Does the act of revealing it try to force one to spawn? Can it have a more generous range like the refugee center?

@Maleclypse
Copy link
Member Author

#46701 has Isherwood Farms 40% of the time, although Lapin Cabin only 20% of the time.

When I look at the stats I'm not seeing that they checked how often Isherwood actually spawns compared to them setting it to spawn 40% of the time it can spawn . I'd be very surprised if it was actually showing up in 4/10 overmaps. But I'd be fairly happy with that in a lot of ways. Am I misunderstanding their PR?

@Maleclypse
Copy link
Member Author

I see it spawn when I'm map hopping so I know its possible. Does the act of revealing it try to force one to spawn? Can it have a more generous range like the refugee center?

Currently I have it set to a range of 280 which I think is more generous than the refugee center search unless I'm mistaken. I thought Refugee Center search goes out 120.

@actual-nh
Copy link
Contributor

When I look at the stats I'm not seeing that they checked how often Isherwood actually spawns compared to them setting it to spawn 40% of the time it can spawn . I'd be very surprised if it was actually showing up in 4/10 overmaps. But I'd be fairly happy with that in a lot of ways. Am I misunderstanding their PR?

No, I don't think so; I may not have been thinking clearly. But it's a lot more likely to actually spawn 4/10 times with the modifications in that PR, I suspect. @Venera3, I don't suppose you have any of the overmap files from your testing still around?

@actual-nh
Copy link
Contributor

I see it spawn when I'm map hopping so I know its possible. Does the act of revealing it try to force one to spawn? Can it have a more generous range like the refugee center?

Currently I have it set to a range of 280 which I think is more generous than the refugee center search unless I'm mistaken. I thought Refugee Center search goes out 120.

If I understand things correctly, that large search range may be why it was taking so long... see #35376.

@Maleclypse
Copy link
Member Author

Doubled the search range to 560 from 280 and it not only found it but found it in under 20 seconds. This is victory.

@Maleclypse Maleclypse marked this pull request as ready for review January 17, 2021 22:03
@Maleclypse Maleclypse changed the title [WIP] Add Find Isherwood Farm mission Add Find Isherwood Farm mission Jan 17, 2021
@Venera3
Copy link
Member

Venera3 commented Jan 18, 2021

Looking at my notes I either lumped them in with the farms in general or not seen them spawn ( I definitely counted Lapin as a cabin, so let's go with that). I'll set up the test branch again and get back to you in a few hours.
My understanding is that if a mission can't find its destination in the generated overmaps it'll run the worldgen until it does or has generated 11 overmaps without success. What's unclear to me is if those get generated with the special in question being set to mandatory, but I can try testing that as well.

@Venera3
Copy link
Member

Venera3 commented Jan 18, 2021

Okay, so there's definitely something up with Isherwood specifically, if I had to guess it's because it spans more than 4 special "chunks" and the worldgen might not be able to make heads or tails of it.
After some inital testing I modified the chance to spawn to 80%.
Proper testing with a modified exe to print a debug message for each placed special, on both an unmodified experimental and on my modified branch. On both I hopped around 25 overmaps in batches of 5, resetting the world each time and noting the specials:
From 25 normal overmaps 7 had a Lapin cabin and 0 an Isherwood farm on the master branch.
On my own (rebalanced) branch it came out to 9/25 OM with Lapin (overshot its 20% chance) and 10/25 Isherwood farms (that's what I'd expected from the 40% chance, but this was after raising that!).

I...can't really explain that without diving into the code deeper. I'd assume that there's a mechanism to disqualify specials from overlapping, but that would not be my first wrong assumption.

@curstwist
Copy link
Contributor

I set it to wilderness which is more restrictive on where it can be placed as well, maybe ease that restriction by changing it to forest or land in locations

@Venera3 Venera3 mentioned this pull request Jan 19, 2021
1 task
@ZhilkinSerg ZhilkinSerg merged commit e9c5034 into CleverRaven:master Jan 21, 2021
@anothersimulacrum anothersimulacrum added [JSON] Changes (can be) made in JSON NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Jan 22, 2021
@Maleclypse Maleclypse deleted the Lapin-Quest-to-meet-Isherwoods branch February 11, 2021 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[JSON] Changes (can be) made in JSON NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants