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

Aligning mapTools with current compass heading does only work for vanilla compass #8851

Closed
b-mayr-1984 opened this issue Mar 18, 2022 · 10 comments · Fixed by #8858
Closed

Aligning mapTools with current compass heading does only work for vanilla compass #8851

b-mayr-1984 opened this issue Mar 18, 2022 · 10 comments · Fixed by #8858

Comments

@b-mayr-1984
Copy link
Contributor

The mapTools feature of aligning the tool with the current compass heading does only work if the player is equipped with a vanilla compass ('ItemCompass').

  • In case you are playing with the GM DLC this will not work because it uses a different compass (might cause problems with other DLCs as well).
  • A vehicle gunner with powerful optics but without a compass equipped does also not get the option to align the map tool with himself (which doesn't make sense IMHO).

So the AND condition in below mentiond LOC does more harm than good. I recommend to remove it. The only damage being done in doing so is that infanterists and low tech vehicle gunners with map tools but without a compass (who does that anyways) will be able to align the map tools with their own heading.

condition = QUOTE((GVAR(mapTool_Shown) != 0) && {'ItemCompass' in assigneditems ACE_player});

Let me know what you think. I can remove it since I am currently already working on mapTools, but I want to hear your feedback first.

@b-mayr-1984
Copy link
Contributor Author

Some more info compass names of GM.
image

@LinkIsGrim
Copy link
Contributor

LinkIsGrim commented Mar 18, 2022

Can check for presence of any item in specfic assignedItems slot maybe?

@b-mayr-1984
Copy link
Contributor Author

Can check for presence of any item in specfic assignedItems slot maybe?

I already tried that. The problem here is that the lack of a compass is not indicated by an "" or null. Instead the array is skipping over the entry that would be taken by a compass.

I've discussed this with @diwako. He said his DUI uses a caching mechanism upfront to find all possible compasses.
GVAR(compassWhitelist) = "getText (_x >> 'simulation') == 'ItemCompass'" configClasses (configFile >> "CfgWeapons") apply {configName _x};
But even this wouldn't work for a vehicle crew that does not carry a compass and instead uses the vehicle equipment or a GPS.

So I still think it is best to just skip any check for a compass because the likelihood of one having maptools but no compass is smaller than all the other cases were the current behaviour can be considered a bug.

@b-mayr-1984
Copy link
Contributor Author

Something else that prevent's the map tool from showing the align-to-compass menu entry is this constellation.
image
Here I dropped the compass but still get a heading from the GPS.
image

This is just another example that shows that the good intention of not showing this menu entry causes more problematic constellations than it prevents problematic constellations (at least in my estimation).

@commy2
Copy link
Contributor

commy2 commented Mar 21, 2022

Just take a compass with you. That's the only way to physically align it irl too.

@BrettMayson
Copy link
Member

I don't see an issue with a common function canTellDirection or something, that returns true if they have any compass or a GPS

@b-mayr-1984
Copy link
Contributor Author

Just take a compass with you. That's the only way to physically align it irl too.

I tried to explain this in the issue description @commy2 . It does only work for the vanilla compass (ItemCompass).
If you bring another compass (like the GM compasses) it doesn't work because these compasses don't satisfy the AND condition mentioned in my initial post.

@commy2
Copy link
Contributor

commy2 commented Mar 23, 2022

private _hasCompass = getUnitLoadout _unit param [9, []] param [3, ""] != "";

@b-mayr-1984
Copy link
Contributor Author

private _hasCompass = getUnitLoadout _unit param [9, []] param [3, ""] != "";

I will give it a try and provide feedback. Thanks @commy2 :-)

@Akzuu
Copy link

Akzuu commented Mar 27, 2022

Thumbled upon to this thread and I have another fix suggestion for the map tools.

Currently, you can not use map tools without the default map. I noticed this issue when playing Prairie Fire dlc and the problem is basicly the same as with the compass. The item names for Prairie Fire maps are vn_o_item_map and vn_b_item_map.

The problematic condition can be found from acemod/ACE3/addons/maptools/functions/fnc_canUseMapTools.sqf line 20. I think the fix should be implemented to optional Prairie Fire compat, but I'm too unfamiliar with the codebase to figure out a proper solution to this issue. Do you mind checking this problem too while you are at it with the compass @b-mayr-1984 ?

Ps. the compass item names for Prairie Fire are vn_b_item_compass_sog and vn_b_item_compass

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 a pull request may close this issue.

5 participants