Open 4Magma opened 2 years ago
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 coordinatesgoto [coordinates] savewp="Waypointname with quotes"
to save the passed coordinates to a waypoint with the passed namedgoto savewp="Waypointname with quotes"
to save your current coordinates to a waypoint with the passed namedgoto player="Playername with quotes"
to teleport yourself to the player with the passed namegoto wp="Waypointname with quotes"
to teleport yourself to the waypoint with the passed nameThe [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.
@AltPlusF4 Syntax looks good
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. 😁
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?
Standard C# IO. You can get the config folder with Paths.ConfigPath
Could you add a filter feature to manipulate the output of a command
Could you expand the goto command