How do I make a console request? The wiki is for the legacy stuff and I can't find anything in the forums here either. if (modApi.Application.LocalPlayer.BodyTemp > 50.0) { //kill the player }
With the old api (legacy). Dont think the new api has it added. Not yet atleast. I'll look it up tomorrow Quickly got this. If you need to execute on another player, a mod that creates the RemoteEx request for you.
Type help give if you out a - confront of the number it removes rad, hp etc etc No. The NPCs cant be controlled in any way
The code sample in the wiki (for console requesst) just gives me a null reference on GameAPI. (I can't figure out how to initialize it.) GameAPI.Game_Request(CmdId.Request_ConsoleCommand, (ushort)CmdId.Request_InGameMessage_AllPlayers, new Eleon.Modding.PString("destroyme")); (Also fails with Request_InGameMessage_SinglePlayer) I don't know what you're talking about with RemoteEx.
GameAPI.Game_Request(CmdId.Request_ConsoleCommand, (ushort)CmdId.Request_ConsoleCommand, new PString("remoteex cl=" REST OF CODE Thats how I use it in a mod, works flawless CL is the player CLIENT ID remoteex: Sends a console command to either a player or a playfield Command: remoteex Use pf=<process id> or cl=<client id> to send console command to
Again, I can't get gameapi to init so I just get a null reference. The Game_Start function doesn't seem to ever get called.
I have working examples of some console commands in the mod wrapper I maintain: https://github.com/MichaelGoulding/...tedMods/search?q=remoteex&unscoped_q=remoteex I'd love to add more if I could get some more examples. Thanks.
Check out this help: ----------------- Command: remoteex ----------------- Send ingame console commands to a player or playfield Player example: remoteex cl=xyz sector Akua (replace xyz with your player client ID) Playfield example: remoteex pf=13012 destroy 26035 / remoteex pf=13012 regenerate 34 replace 13012 with the Playfield Proccess ID The other number is the entity ID of the ship/poi ---------------------- So remoteex just uses the ingame console commands. With this you could just use most of them that you see in the console with "help" Examples: String.Format("remoteex pf={0} undock {1}", Prozess.ID, Struct.ID) String.Format("remoteex pf={0} regenerate {1}", Prozess.ID, Struct.ID) String.Format("remoteex cl={0} pda clr {1}", Player.CurrentClientID, PDAChapter) String.Format("remoteex cl={0} pda clr {1}", Player.CurrentClientID, PDAChapter) String.Format("remoteex cl={0} marker add name={1} pos={2:F0},{3:F0},{4:F0} W WD expire={5}", Player.CurrentClientID, MarkerName, Coordinates.EW, Coordinates.Height, Coordinates.NS, ExpireIn) String.Format("remoteex cl={0} detach", Pilot_CurrentClientID)
Also one that will work https://empyrion.gamepedia.com/Give here are all concole commands: https://empyrion.gamepedia.com/Console_Commands
In the new API, I see there is IPlayfield.IsPvP but it's read only. Can we get that so it can be set as well? I want to write a mod for a different kind of PvP that involves switching the playfield PvP status but I want to do it without having to kick everyone and restart the server. Kicking everyone out of the playfield and restarting the playfield would be ok, just don't want to have to restart the server.