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

Allows setting fixed special scoped parameters for start locations #72558

Merged
merged 6 commits into from
Apr 4, 2024

Conversation

Procyonae
Copy link
Contributor

@Procyonae Procyonae commented Mar 22, 2024

Summary

None

Purpose of change

Closes #72479
Needed for #72561 and #72809

Describe the solution

You can set singular or multiple parameters to singular values which then override those calculated normally when the mapdata is initialised, so you don't have to set every parameter.
You can also use this to set a parameter to a 0 weight value for it to be start location only.

set_parameters somewhat cargo cults overmap_ui's set_special_args used for debug setting parameters

Describe alternatives you've considered

The bool being stored in overmap_buffer is pretty gross but I couldn't see how to easily scope it otherwise

It still calcs the overridden parameters which is suboptimal but I didn't fancy attacking the function that spits them all out together

If I or someone else gets around to doing #72529 the functions will probably want moving to overmap_special but I didn't fancy trying to scope that for this

Testing

Tested with #72561

Additional context

@github-actions github-actions bot added Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` Scenarios New Scenarios, balancing, bugs with scenarios <Bugfix> This is a fix for a bug (or closes open issue) labels Mar 22, 2024
@Procyonae Procyonae marked this pull request as ready for review March 22, 2024 20:44
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Mar 22, 2024
src/start_location.h Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 25, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 27, 2024
@Maleclypse
Copy link
Member

As an in repo use case of this You can also use this to set a parameter to a 0 weight value for it to be start location only. can you have the Ready or Not Mansion start with special ferals only exist in that start?

Sorry to request some extra work from you but I think that will both demonstrate a usecase and close a stable blocker.

@Procyonae
Copy link
Contributor Author

Procyonae commented Mar 29, 2024

As an in repo use case of this You can also use this to set a parameter to a 0 weight value for it to be start location only. can you have the Ready or Not Mansion start with special ferals only exist in that start?

Sorry to request some extra work from you but I think that will both demonstrate a usecase and close a stable blocker.

Backporting this for that purpose doesn't seem like the best solution bc it would require a pretty hefty parameterisation of mansion_boarded into the normal mansions (likely several 1000 line changes)
Instead I'm doing an PR that places all the special ferals with a start eoc expanding on the existing one, removing them from normal spawns.

Thanks for pointing out the mansion start though, I'll still do the parameterisation at some point down the road to cut down on repeated maps and make future adjustments easier as well as adding variety by allowing the start in all the different mansion layouts but I don't want to do that rn (I also want to give the mansions driveways and parking at some point)

@Procyonae
Copy link
Contributor Author

Opened the mansion feral PR #72695

@Procyonae
Copy link
Contributor Author

As an in repo use case of this You can also use this to set a parameter to a 0 weight value for it to be start location only. can you have the Ready or Not Mansion start with special ferals only exist in that start?

Sorry to request some extra work from you but I think that will both demonstrate a usecase and close a stable blocker.

Is there any issue with using a draft PR as a use case? I'd of put this in with the evac centre PR but I thought it made more sense to separate them

@I-am-Erk I-am-Erk merged commit 0a6c239 into CleverRaven:master Apr 4, 2024
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display Scenarios New Scenarios, balancing, bugs with scenarios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Start location parameters
4 participants