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

[0.50.02/0.50.03-SNAPSHOT] /nuke command custom nukes aren't working #6374

Closed
4 tasks done
stonewall072 opened this issue Jan 7, 2025 · 3 comments · Fixed by #6375
Closed
4 tasks done

[0.50.02/0.50.03-SNAPSHOT] /nuke command custom nukes aren't working #6374

stonewall072 opened this issue Jan 7, 2025 · 3 comments · Fixed by #6375
Assignees

Comments

@stonewall072
Copy link
Contributor

Brief Description *

Currently, when you try to use the /nuke command it will not trigger unless a "Type" has been specified. Including the Type parameter will override any other parameters you include in the command, making it impossible to use the command to generate a custom nuclear attack.

3. Steps to Reproduce

  1. Load into game
  2. Attempt to use /nuke command using the parameters for a custom nuclear weapon
  3. Nuke will not trigger and message in chat window will state that you must specify a type
  4. Using 0-4 as the type parameter will allow the command to trigger, but any other parameters following that will be ignored

Attach Files

No response

Severity *

Medium (Gameplay Limitation): Non-core functionality is impaired, providing a suboptimal but playable experience.

MegaMek Suite Version *

0.50.02

Operating System *

Windows 11

Java Version *

17.0.11

Final Verification

  • I confirm this is a single, unique issue that hasn't been reported before
  • I have included all necessary information and files to help reproduce this issue
  • I have asked on MegaMek Discord about this issue
  • I have confirmed this issue is being opened on the correct repository: MegaMek, MegaMekLab, or MekHQ
@Scoppio Scoppio self-assigned this Jan 8, 2025
@Scoppio
Copy link
Collaborator

Scoppio commented Jan 8, 2025

I found a bug, and I know what is the problem with what you are saying, I am just thinking in how to properly fix it.

What you can do currently is use named arguments instead of positional arguments in the command:

The following is how you make a nuke use positional arguments

/nuke 15 10 2

to make the same nuke using named arguments:

/nuke x=15 y=10 type=2

But if you want a custom nuke you will need to use the named arguments (ps.: you can use positional arguments for all arguments in the correct sequence, and then if you want to jump the sequence of arguments or change the sequence of args, you have to use named arguments)

/nuke 15 10 dmg=50000 deg=2500 radius=100 depth=3

However this second approach has a bug that I have to fix.

I suggest that instead you use the other nuke commands (available only to GMs, without the need to enable nukes in the game prior to using)

/nsc -> Nuclear strike custom
/nsc [x] [y] [dmg] [deg] [radius] [depth]
# Using only positional arguments
/nsc 10  10  1000  100  10  2

# using positional and named arguments
/nsc 10 10 dmg=1000 deg=100 radius=10 depth=2

# using only named arguments
/nsc x=10 y=10 dmg=1000 deg=100 radius=10 depth=2

# named arguments can be used out of order
/nsc dmg=1000 x=10 deg=100 y=10  depth=2 radius=10


/ns -> Nuclear strike
/ns [x] [y] [type]
/ns 10 10 2
/ns 10 10 alamo

@stonewall072
Copy link
Contributor Author

The named arguments is handy information! If I had ever been aware they could be done that way I had forgotten it.

@Scoppio
Copy link
Collaborator

Scoppio commented Jan 9, 2025

most of the new commands accept named arguments. check the help of them before using.

fixed the nuke, it works the way you remember :)

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.

2 participants