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

[Suggestions] mixed #14

Open
4Magma opened this issue Aug 10, 2022 · 5 comments
Open

[Suggestions] mixed #14

4Magma opened this issue Aug 10, 2022 · 5 comments

Comments

@4Magma
Copy link

4Magma commented Aug 10, 2022

Could you add a filter feature to manipulate the output of a command

  • via command | {filter} {options}
  • grep word, word, ... (skips all lines with out one of the words, or highlight this lines)
  • sort asc|desc

Could you expand the goto command

  • simple:
    • goto save (saves current position)
    • goto back (jump to last saved position)
    • example:
      • alias gohome goto save;goto {homeposition}
      • alias goback goto last
  • complex:
    • goto save=name (saves current position under this name)
    • goto back=name (jumps to position "name")
    • example:
      • alias sethome goto save=home
      • alias gohome goto save=last; goto back=home
      • alias goback goto back=last
@AltPlusF4
Copy link

AltPlusF4 commented Sep 13, 2022

Hi 4Magma, i'm considering to contribute the extended goto command feature on my fork and start a pull request. Since a friend uses the mod for his server and sometimes needs to teleport to other players, I would extend and prefer the syntax as follows:

  • goto [coordinates] player="Playername with quotes" to teleport a player to specific coordinates
  • goto [coordinates] savewp="Waypointname with quotes" to save the passed coordinates to a waypoint with the passed named
  • goto savewp="Waypointname with quotes" to save your current coordinates to a waypoint with the passed named
  • goto player="Playername with quotes" to teleport yourself to the player with the passed name
  • goto wp="Waypointname with quotes" to teleport yourself to the waypoint with the passed name

The [coordinates] argument represents coordinates in the form X Z, X Z Y X,Z X,Z,Y.

@JereKuusela and @4Magma please let me know what you think about the syntax.

Feel free to suggest other argument names for player=, savewp= and wp=.


Edit: The quotes for the names of players and waypoints are used to allow spaces in the names.

@4Magma
Copy link
Author

4Magma commented Sep 13, 2022

@AltPlusF4 Syntax looks good

@JereKuusela
Copy link
Owner

Heyh, I appreciate both suggestions and contributions. Unfortunately I have been very busy with other mods so that's why I haven't done anything.

I think I did goto back some time ago.

I would suggest doing them as goto playername and goto waypointname by first checking is the parameter "back", then if it is waypoint name, then if it is player name and finally parsing coordinates if nothing else was found.

You can combine the parameters so no need to use quotes there (the terminal will split them up even with quotes).

It might be more clear to have the waypoint setup as a separate command. Like waypoint [name] to set as the current position and waypoint [name] [coordinates] as the given position. Same for teleporting other players.

But very happy to get help so any implementation is more than fine. 😁

@AltPlusF4
Copy link

I think a separate command for waypoints is the cleaner way. Valheim Modding and Unity is currently a completely new area for me. Hence the question, is there an easy way to save the waypoints to a file, or do I have to use the standard C# IO?

@JereKuusela
Copy link
Owner

JereKuusela commented Sep 14, 2022

Standard C# IO. You can get the config folder with Paths.ConfigPath

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

No branches or pull requests

3 participants