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

Upload Command #276

Open
norfaremc opened this issue Nov 18, 2024 · 13 comments
Open

Upload Command #276

norfaremc opened this issue Nov 18, 2024 · 13 comments
Labels
enhancement New feature or request

Comments

@norfaremc
Copy link

norfaremc commented Nov 18, 2024

Request Description

Hi there! Love this mod!

We are wondering if you could make a simple command for uploading avatars, so when players join the modpack/server, we can run a command line to apply an avatar to a player and then have it upload, so players don't have to go in and manually apply their models. Thank you!

Example: /figura upload < model >

@norfaremc norfaremc added the enhancement New feature or request label Nov 18, 2024
@PoolloverNathan
Copy link
Contributor

PoolloverNathan commented Nov 19, 2024

There's /figura load MODELNAME, and a certain addon that I am totally unrelated to adds a function that uploads the current avatar. Unfortunately, neither of them can be executed by the server as of now. However, once you've uploaded a model once, it'll automatically apply when joining the server in the future. To use this method:

  1. Add to your script:
    if goofy and host:isHost() then
      goofy:uploadAvatar()
    end
  2. Include the avatar at e.g. figura/avatars/default/.
  3. Add the aforemented addon to the modpack. (Go to the latest action run and download the Fabric-Artifacts artifact, then add it as a JAR. If you need permission to attach a JAR, use this part of the comment as the proof.)
  4. Tell your users to select the avatar initially

Alternatively, you can set a client-side default model for other players that haven't uploaded a model via a resource pack, which will let people override their model with something else if they wish. This should work for the host, but I haven't tested it. There also isn't a way to 'unpack' an avatar distributed via this method (without violating server rules), which may make overriding it more complicated if you don't also distribute the avatar source. To use this method:

  1. Load an avatar normally.
  2. /figura export avatar player
  3. Create a resource pack, and put the generated NBT file (in the Figura folder) to be at assets/figura/cem/minecraft/player.nbt.
  4. Arrange for that resource pack to be loaded via e.g. openloader.

By the way, most help tends to be given in Figura's Discord server (for our plugin use our server instead). Sometimes, you can receive help in GitHub, but not as many people will answer here. Also, the /figura upload command is (will be) implemented via #270, but it has the same client-side limitation as the above.

@PoolloverNathan
Copy link
Contributor

@TheBunnyMan123, can I bug you to update GoofyPlugin's Modrinth page?

@TheBunnyMan123
Copy link
Contributor

With what? @PoolloverNathan

@PoolloverNathan
Copy link
Contributor

With what?

Is uploadAvatar released yet?

@TheBunnyMan123
Copy link
Contributor

Good question

@norfaremc
Copy link
Author

I'm not looking for server-side commands or support. I'm running it through FTB Quests and the Origin mod to apply certain cosmetics to players when they choose their origin in the FTB Quest menu. All we want is a command to upload the avatar they they have, without them having to open the Figura menu--completely client-side. Just as you can load an avatar with a command, being able to upload it with a command is all we want.

@norfaremc
Copy link
Author

Apologies, there was a lot to read--I skimmed over the #270! I'm glad to see it's a feature you're already working on implementing! Awesome-Thank you!

@PoolloverNathan
Copy link
Contributor

PoolloverNathan commented Nov 19, 2024

and the Origin mod to apply certain cosmetics to players when they choose their origin in the FTB Quest menu

Oh, it's possible to detect the current origin from Figura using a bit of scripting! Currently it's a bit annoying to do so (@TheBunnyMan123 should we add a native solution (and an event) to The List?), but it might be easier than maintaining an avatar each.

I'm glad to see it's a feature you're already working on implementing!

That's not my implementation (I'm not officially related to Figura except for using it and having a few other PRs open; the aforemented addon has bunny's implementation, and as we codevelop an addon, that implementation is probably more related to me), but it'll work! I believe it's possible to compile the PR yourself if you need it before it's merged, as I'm fairly sure it's complete as of now.

@vickystxr
Copy link
Contributor

Apologies, there was a lot to read--I skimmed over the #270! I'm glad to see it's a feature you're already working on implementing! Awesome-Thank you!

"You (Nathan)"? you mean me
https://www.youtube.com/watch?v=4UDapUtM0Kw

@Riftlight
Copy link
Contributor

You (plural), meaning figura as a whole.
dont worry vicky youre the best copy paster of code ever no one will try to take that from you 😁

@TheBunnyMan123
Copy link
Contributor

Apologies, there was a lot to read--I skimmed over the #270! I'm glad to see it's a feature you're already working on implementing! Awesome-Thank you!

"You (Nathan)"? you mean me https://www.youtube.com/watch?v=4UDapUtM0Kw

Why did you put a link to the dragon ball Z perfect cell theme???

@vickystxr
Copy link
Contributor

Why did you put a link to the dragon ball Z perfect cell theme???

because you're either perfect, or you're not me

@TheBunnyMan123
Copy link
Contributor

because you're either perfect, or you're not me

strike that! reverse it.

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

No branches or pull requests

5 participants