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

Overhaul Tracers module #491

Merged
merged 51 commits into from
Apr 20, 2021
Merged

Overhaul Tracers module #491

merged 51 commits into from
Apr 20, 2021

Conversation

ampersand38
Copy link
Member

When merged this pull request will:

@mharis001 mharis001 added the feature Adds a new feature label Dec 18, 2020
@mharis001 mharis001 added this to the 1.10.0 milestone Dec 18, 2020
Copy link
Member

@mharis001 mharis001 left a comment

Choose a reason for hiding this comment

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

Works well and makes the tracers module a lot more useful in Zeus.

I'd like to see an unscheduled equivalent to BI's function for the module. Should be fairly straightforward to replace the sleeps with CBA's alternatives. This could also be taken further and replace the tracers module altogether in Zeus.

@mharis001
Copy link
Member

Let's replace the tracers module in Zeus altogether. I think using a module dialog would be better than the current attributes approach (would allow the user to set these properties when placing the module).

@ampersand38
Copy link
Member Author

Let's replace the tracers module in Zeus altogether. I think using a module dialog would be better than the current attributes approach (would allow the user to set these properties when placing the module).

Should I be basing this new module on something like the LightSource module?

@ampersand38 ampersand38 changed the title Tracers Attributes Tracers Module Dec 22, 2020
@CreepPork
Copy link
Member

CreepPork commented Dec 22, 2020

Looking nice and I agree with @mharis001 that it should replace the module but there are some improvements, I think would make using the module better:

  • Target button when pressed should provide a line where you would want to target (I wouldn't like entering coordinates and not directly at the Zeus camera because that's annoying) (but also immediately closing the dialog box on pressing close wouldn't be good - it would be nice if you pressed the Target button it would show a message: "when you press okay it will provide a target cursor" or something like that, so the user doesn't get confused - of course, it should be canceled if the user pressed cancel.)
  • In the current implementation, when target is pressed, it shouldn't immediately switch and fire at Zeus, because you cannot reset with the cancel button.
  • And nobody knows weapon classnames from their heads, a dropdown would be nice to have all the weapons listed (more accurately, only rifles/machine guns would be good), otherwise, nobody really will be using that field.

@mharis001
Copy link
Member

@ampersand38 Yes, it would be good to base this module off of the light source module.

Also, agree with @CreepPork 's points about entering coordinates and weapon class names. Zeus user interfaces should be more user friendly and quicker to use than that.

@ampersand38
Copy link
Member Author

  • Target button when pressed should provide a line where you would want to target (I wouldn't like entering coordinates and not directly at the Zeus camera because that's annoying) (but also immediately closing the dialog box on pressing close wouldn't be good - it would be nice if you pressed the Target button it would show a message: "when you press okay it will provide a target cursor" or something like that, so the user doesn't get confused - of course, it should be canceled if the user pressed cancel.)

I considered the target cursor and thought it wouldn't be as useful since tracers will often be directed at higher angles where there isn't terrain or even objects. Maneuvering the camera is kind of the easiest way to pick a position above the terrain. Is there a way to use the cursor for an altitude-offset target?

Also, agree with @CreepPork 's points about entering coordinates and weapon class names. Zeus user interfaces should be more user friendly and quicker to use than that.

On the other hand, cursor would be a good way to target an object. Maybe I can have the Target Type tool box select between cursor, edit box, camera?

  • In the current implementation, when target is pressed, it shouldn't immediately switch and fire at Zeus, because you cannot reset with the cancel button.

Indeed. The ZEN module commit has fixed this.

  • And nobody knows weapon classnames from their heads, a dropdown would be nice to have all the weapons listed (more accurately, only rifles/machine guns would be good), otherwise, nobody really will be using that field.

I agree that those fields would only be useful in very specific cases. I think for most users will only need the colour choice, red tracers are red tracers. For someone who knows they want a specific tracer, surely they can look it up in arsenal? it's kind of a "if you really need it, it's there" kind of usage. I think if we curate a list of weapons, someone will immediately ask for something not on it.

@ampersand38
Copy link
Member Author

addons/modules/functions/fnc_moduleTracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_tracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_moduleTracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_moduleTracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_moduleTracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_tracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_tracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_moduleTracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_moduleTracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_moduleTracers.sqf Outdated Show resolved Hide resolved
@mharis001
Copy link
Member

Functionality-wise, this works very well. UX-wise, I think we either remove the weapon and magazines class name fields or provide combo boxes with options. We don't have to manually curate a list of weapons (and their magazines) and instead can compile one with weapons that have at least one compatible magazine whose tracersEvery property is 1.

With doing that, this would have to be converted to a custom module dialog since selecting a weapon should refresh the magazines combo box with the weapon's compatible magazines.

@ampersand38
Copy link
Member Author

I'll remove the weapon and magazine fields until I can implement them.

With doing that, this would have to be converted to a custom module dialog since selecting a weapon should refresh the magazines combo box with the weapon's compatible magazines.

Is there a module set up like this that I can reference?

@mharis001
Copy link
Member

Is there a module set up like this that I can reference?

Any module that doesn't use the dialog component and instead has a custom dialog (for example: reinforcements, ambient fly, set date). I'll push a prototype display for this module.

@mharis001 mharis001 modified the milestones: 1.10.0, 1.11.0 Feb 3, 2021
@mharis001 mharis001 changed the title Tracers Module Overhaul Tracers module Feb 3, 2021
@mharis001
Copy link
Member

@ampersand38 I pushed a custom dialog that allows the user to select a weapon and magazine from a list. The moduleTracers function is mostly unchanged and needs to be adapted for the parameters the new GUI provides it.

Image

tracers_dialog

addons/modules/functions/fnc_moduleTracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_moduleTracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_moduleTracers.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_moduleTracers.sqf Outdated Show resolved Hide resolved
@mharis001
Copy link
Member

I did some clean up on the tracers PFH - removed some unused variables and fixed command name casing, Also, added a timeout to the alignment check waitUntilAndExecute and the updated _nextBurstTime now accounts for _burstLength to not start another burst while one is ongoing in the case of small _delay values.

@mharis001 mharis001 merged commit 3b360af into zen-mod:master Apr 20, 2021
@ampersand38 ampersand38 deleted the tracers branch January 11, 2023 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants