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

Tweaks and improvement to declutter defense-ranges #3732

Merged

Conversation

icexuick
Copy link
Collaborator

@icexuick icexuick commented Sep 16, 2024

And removal/integration of old defense-ranges + anti-ranges into new gl4 defense-ranges.

This is a new and tweaked version of the Defense-Ranges Widget.
It is meant to replace the old Defense Ranges.

What needs to be checked but also fixed/added is this:

gui_defenserange_gl4

  1. Show the range rings on mouse-hover on the minimap.
  2. Add underwater weapons (torpedoes) as blue rings
  3. Make cannon (LRPC) range rings disappear on distance (anti-nukes works correct, cannon does not - it remains visible)
  4. Add different pulsating color/fade to anti-nukes (allied) that have 0 stockpile - code of gui_anti_ranges.lua should probably be merged into gui_defenseranges_gl4.lua

gui_attackrange_gl4

  1. Separate "cannon" to only LRPC - (only for cannons that shoot over f.e. 2000 range - now it's gets assigned to practically all plasma cannons)
  2. Consider adding blue underwater weapons here as well
  3. Be able to manually choose which units show firing arcs, and which don't - some have quite some overlapping/confusing arcs which should be removed - while others (like armmanni or cormart) visually explain their firing-arc very well, and not too cluttering)
  4. LRPC now actually show their range on hover because of separate "cannon" settings (only needs to be added to minimap for ideal solution)

New zoomed out view with added LRPC cannons (yellow/orange) and anti-nukes (light-blue)
image

New zoomed in view on defense ranges with much less clutter:
image

PS. Also added as much Legion defenses as possible - but needs checking.

And removal/integration of old defense-ranges + anti-ranges into new gl4 defense-ranges
@WatchTheFort
Copy link
Member

Old widgets can be deleted, no?

@Ruwetuin
Copy link
Member

delete the old ones and rename the new ones so they have the same name as the old ones.

Do this so they get enabled right away, currently only the defaults change and there wouldnt be a change for everyone except completely new players

@icexuick
Copy link
Collaborator Author

Old widgets can be deleted, no?

Well only if Floris or Beherith can add the anti-ranges functionalities inside the new defense-ranges-gl4.

@icexuick
Copy link
Collaborator Author

icexuick commented Sep 16, 2024

delete the old ones and rename the new ones so they have the same name as the old ones.

Do this so they get enabled right away, currently only the defaults change and there wouldnt be a change for everyone except completely new players

Hmm that sucks a little, but indeed I strongly prefer this gets auto enabled over the old widgets.
Do you have some time to help me fix some of the remaining issues? @Ruwetuin

@icexuick icexuick added the UI Everything related UI, GUI, etc. label Sep 16, 2024
@WatchTheFort
Copy link
Member

WatchTheFort commented Sep 17, 2024

After this is merged and we're happy with it working, we should delete the old widgets and rename the new widget files to the old names

back to red for cannons + yellow for antinuke
@icexuick
Copy link
Collaborator Author

There are some remaining issues with correct ranges and weapon types.
And we need a good solution for LRPCs
So it's not yet ready.

Beherith and others added 6 commits September 18, 2024 10:30
…ce rendering a circle on attack range isntead of the limited fire arc cone.
…amera, but the distance from the circle to the camera float distToCam = length(circleWorldPos.xyz - camPos.xyz); //dist from cam
And additionally removed engine attack-ranges, which showed up on hover-attack. These practically are not needed anymore as attack-ranges should show/take care of all attack ranges now.
@icexuick
Copy link
Collaborator Author

@Ruwetuin One question.
Do you know why Juno shows a range ring on its weapon of like 2000-2250 elmos - it should have 32000 range

@icexuick
Copy link
Collaborator Author

@Ruwetuin second question - does the cmdcolors_icexuickt.txt still get used?

@Ruwetuin
Copy link
Member

yes, it's gui_cursors widget that looks for and loads the cmdcolors cursorset name.... which is icexuick!

@Ruwetuin
Copy link
Member

@Ruwetuin One question. Do you know why Juno shows a range ring on its weapon of like 2000-2250 elmos - it should have 32000 range

no, but isnt 2000-2250 some max range set in the widget somewhere?

Including some fade/distance and try-out to get melee weapons shown up.
AA weapons on coraak / armaak with bogus seem to be ignored and all weapons show up.
Reset of cmdcolor rangeAttack back to red - unfortunately - this is/should be removed as it clutters a lot. But placement of defenses still uses this engine ring, and also when using the "Attack" command - which still is useful.
@icexuick
Copy link
Collaborator Author

@Ruwetuin One question. Do you know why Juno shows a range ring on its weapon of like 2000-2250 elmos - it should have 32000 range

no, but isnt 2000-2250 some max range set in the widget somewhere?

I have tried to find it, but no luck at all.
Fixed all mines and mostly happy with current state.

@icexuick
Copy link
Collaborator Author

For now keeping the old defense_ranges - since that one seems to be more accurate/in-line with the new attack_ranges_gl4.
@Beherith it would be great if you could look at differences between attack-ranges and defense-ranges - specifically near mountains/height changes

@Beherith Beherith marked this pull request as draft October 31, 2024 19:12
Known issues:
- GetUnitWeaponVectors(unitID, weaponID).y must be passed in for both!
- Which can unfortunately change for popups

But we are much closer to ground truth now
@icexuick
Copy link
Collaborator Author

icexuick commented Nov 9, 2024

Latest update is that it will be very hard to unify both attack/defense ranges.
The biggest issue of differences is when hovering over an enemy defense f.e. - by default it will show it's stencilled defense-range, but on hover it will add the attack-range rings, which are slightly different.

We can 'solve' this by not showing attack-ranges on enemy-defenses - only display these on mobile units f.e.
Even without this, this PR is a big de-clutter/improvement .

If @Ruwetuin or @Beherith could help me with f.e. disabling showing attack-range rings on enemy defenses, then I think it's good to go!

@WatchTheFort
Copy link
Member

@icexuick What is the status of this? Is it ready for review? Ready for merging?

@Beherith Beherith marked this pull request as ready for review December 13, 2024 22:45
@WatchTheFort WatchTheFort merged commit 00678b7 into master Dec 19, 2024
@WatchTheFort WatchTheFort deleted the New-Defense-Ranges-GL4-/-Removal-of-old-&-anti-ranges branch December 19, 2024 20:18
WatchTheFort added a commit that referenced this pull request Dec 20, 2024
WatchTheFort added a commit that referenced this pull request Dec 20, 2024
Revert "Tweaks and improvement to declutter defense-ranges (#3732)"

This reverts commit 00678b7.
@WatchTheFort WatchTheFort restored the New-Defense-Ranges-GL4-/-Removal-of-old-&-anti-ranges branch December 20, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Everything related UI, GUI, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants