TorchAPI / Torch

An extensible modding framework and improved client/DS for Space Engineers. Still a work in progress!
Apache License 2.0
146 stars 76 forks source link

[Sugestion] Entity Import / Export #169

Closed Neimoh closed 6 years ago

Neimoh commented 6 years ago

We need the ability to Import / Export grids live in torch. If someone loses a grid and we can pull it from a backup by exporting the .sbc from SeToolBox we need to be able to import that .sbc file into the world.

Exporting grids will allow us to backup a players grids if they are leaving for extending periods and notify us.

zenduin commented 6 years ago

More importantly it would make backups MUCH more useful since we could restore specific grids much easier.

Branakburn commented 6 years ago

PLEASE Some Assistance on this would be awesome!

Jimmacle commented 6 years ago

Started working on this, the current implementation lets you export and import grids from the world by name. Do you need anything in addition to this?

Neimoh commented 6 years ago

That is all we need for this particular feature. I assume you mean grid name which is fine as long as we have the entity redux coming soon with sorting options and more displayed info.

Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: John Gross notifications@github.com Date: 4/3/18 9:57 PM (GMT-05:00) To: TorchAPI/Torch Torch@noreply.github.com Cc: "[ GSF ] Neimoh" Thmpprrr@aol.com, Author author@noreply.github.com Subject: Re: [TorchAPI/Torch] [Sugestion] Entity Import / Export (#169) Started working on this, the current implementation lets you export and import grids from the world by name. Do you need anything in addition to this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/TorchAPI/Torch","title":"TorchAPI/Torch","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/TorchAPI/Torch"}},"updates":{"snippets":[{"icon":"PERSON","message":"@Jimmacle in #169: Started working on this, the current implementation lets you export and import grids from the world by name. Do you need anything in addition to this?"}],"action":{"name":"View Issue","url":"https://github.com/TorchAPI/Torch/issues/169#issuecomment-378455278"}}}

zenduin commented 6 years ago

Export via entityId would also be useful for those times where the grid name is not unique. I would also like import & export buttons when "entity redux" is implemented. Collision checking would also be helpful. We don't want to paste ships inside of other grids or voxels, and don't want to paste stations on top of other grids. It would also be good to be able to specify ownerId/authorship and location when importing. Oh, and I assume torch plugins would have access to these import/export methods? Could they also specify the file location (along with ownerId/authorship, etc)? I have been thinking about a plugin that could automatically export a player's grids when they become inactive, purge their player data, and store the grids by the player's SteamId so they could be imported by the player with a command if they ever become active again. I just thought it would be good to check for enemy bases within firing range before importing those grids again, but they can figure that out for themselves...

Jimmacle commented 6 years ago

Exporting via entity ID should already work as well as collision checking. Importing and exporting grids isn't technically complicated so don't think that you need my code to do the same thing :P As for location/owner ID you can already specify an entity to import the grid near so I could use that to determine who should own the grid.

Neimoh commented 6 years ago

Owner info should be stored in the sbc. That should be left as is and imports would be set to original owner just in case we have to cut/paste a grid for someone else in that faction that is spazzing out. Worst case scenario we can edit gps/owner in a backup file via se toolbox pre export or change the owner after we import. The more we can do via console the better torch will be. Not all of us have the option of logging into the game to help people.

Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: John Gross notifications@github.com Date: 4/6/18 12:40 AM (GMT-05:00) To: TorchAPI/Torch Torch@noreply.github.com Cc: "[ GSF ] Neimoh" Thmpprrr@aol.com, Author author@noreply.github.com Subject: Re: [TorchAPI/Torch] [Sugestion] Entity Import / Export (#169) Exporting via entity ID should already work as well as collision checking. Importing and exporting grids isn't technically complicated so don't think that you need my code to do the same thing :P As for location/owner ID you can already specify an entity to import the grid near so I could use that to determine who should own the grid.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/TorchAPI/Torch","title":"TorchAPI/Torch","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/TorchAPI/Torch"}},"updates":{"snippets":[{"icon":"PERSON","message":"@Jimmacle in #169: Exporting via entity ID should already work as well as collision checking. Importing and exporting grids isn't technically complicated so don't think that you need my code to do the same thing :P As for location/owner ID you can already specify an entity to import the grid near so I could use that to determine who should own the grid."}],"action":{"name":"View Issue","url":"https://github.com/TorchAPI/Torch/issues/169#issuecomment-379146156"}}}

Jimmacle commented 6 years ago

Implemented in Essentials: https://github.com/TorchAPI/Essentials/commit/e25552bbe18d30fc62128b93123033a1fffdd6f0