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

Projectile overrange unit implementation #4124

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SethDGamre
Copy link
Collaborator

@SethDGamre SethDGamre commented Jan 5, 2025

Adds overrange to StarburstLauncher/MissileLauncher units to prevent overrange. It's +10% of unitdef.range. This PR includes legion units. AA units are excluded.

The legion unitdefs are pretty terribly un-alphabetized so there's alot of changes being that I used the unit bake method of adding these customparams to units

explodeas = "smallexplosiongeneric",
footprintx = 2,
footprintz = 2,
health = 1000,
Copy link
Collaborator

@saurtron saurtron Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't have reorganized alphabetically as part of the same PR. That makes the pr more difficult to review, and also pollutes git history.

Ok I see it's because of some tool, but git allows adding just some of the stuff (git add -p). Anyways not a big deal.

@@ -1,11 +1,7 @@
return {
armcomlvl2 = {
maxacc = 0.18,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file doesn't look like it should be part of the commit, right?

@saurtron
Copy link
Collaborator

unit bake method

looking at the changes imo that method should be forbidden XD, would have been better to just edit manually or even code postprocess.

@sprunk
Copy link
Collaborator

sprunk commented Jan 14, 2025

proper capitalisation, post-processing?

See https://github.com/beyond-all-reason/spring/blob/master/doc/site/articles/unit-defs.markdown#unit-def-files

baking should be forbidden

Yes.

@saurtron
Copy link
Collaborator

saurtron commented Jan 14, 2025

proper capitalisation, post-processing?

See https://github.com/beyond-all-reason/spring/blob/master/doc/site/articles/unit-defs.markdown#unit-def-files

That examples remakes all keys to lowercase, but not sure bar is doing that (guess it is tho). Doesn't seem like a very good idea, now everyone changing capitalization randomly just in case.

@sprunk
Copy link
Collaborator

sprunk commented Jan 14, 2025

Read the text of the article and not just the example. tl;dr:

  • engine doesn't care about capitalisation.
  • making sure everything is lowercase is typically either done by just running lowerkeys in postprocessing (which is the implementation in the article's example), or by keeping all individual defs lowercase (which BAR does). There are tradeoffs but ultimately it doesn't matter which one.
  • the reason to do this is that Lua post-processing cares. Most of the Recoil ecosystem has postprocessing that expects everything it uses to be completely lowercase, including BAR (e.g. https://github.com/beyond-all-reason/Beyond-All-Reason/blob/master/gamedata/unitdefs_post.lua#L177-L181 )

@drivver44
Copy link
Contributor

Do not use Unitdef baking.
its a great way to break any of our open PRs that deal with unitdefs and causes a whole bunch of merge conflicts that have to be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants