Copy Paste

Copy and paste your buildings to save them or move them

Total Downloads: 21,515 - First Release: Apr 3, 2015 - Last Update: Jun 14, 2018

5/5, 83 likes
  1. I tried myself to fix deployables to save including code locks etc and get this:
    - I'm first time trying to do something in csharp at all, so almost nothing know about it. Actually i spend almost whole day of trying to do something with it...
    - I successfully restore deployables saving, but probably in really shit way.
    - I'm still fail to save lock/codelock, it i tried few combinations and all fail, i can spawn codelock itself, but it not connected to door...
    - I have tested around and if not copy really big constructions (that crashes server if paste) - it works fine with stability enabled.

    You can try my version for tests, but please don't really use it on normal server because i can't give any guaranties that it will not break something (and will be needed wipe).

    And i hope this plugin will be normally fixed later (including locks)
     

    Attached Files:

  2. The plugin technically needs an entire rewrite if you want to be able to paste buildings with server.stability = true, the main problem with stability is big rooms without pillars to support them, depending how they are placed the stability of it is going to be high enough to stay attached or not. Basically create a small 4x4 house (foundations + walls + floors), no 2nd floor or anything and no pillars. You'll be able to build one with an entire roof but when pasting you end up with a hole in the roof.

    And regarding deployables, this used to be a part of the plugin but at some point Reneb removed (commented) all the code that involves handling deployable items and I just haven't had the time yet to look into it.
     
  3. Hi! Is there anyway to use this plugins WHITOUTH server.stability false?

    because I want to have it whiouth it, or only with my pasted structures, not all server!

    thanks!
     
  4. Currently it could be removed from the plugin but chances are some buildings won't be pasted successfully.
     
  5. Yeah, because of stability, I know

    What I need to do? add "stability.true" in some line or something?

    Little guide appreciated, thanks !
     
  6. hello all ) when i do /past "name" , i have "unknow command" what's wrong?
     
  7. Wulf

    Wulf Community Admin

    /paste is the command, not /past. I'd recommend checking your logs for errors too.
     
  8. server.stability false
    Paste the building
    server.stability true
     
  9. Mughisi updated Copy-Paste with a new update entry:

    Update by Reneb

     
  10. In my data folder are now many copypaste-***.json
    Is it possible to manage the List of the Files with the plugin ?
    I mean with commends like /cplist , /cpdelete, /cprename
    that would be very helpful !
     
  11. It's not possible, we can have plugins create new data files but we can't make them delete or rename files. It's also not possible to get a file list of all the available data files unless they're loaded already.
     
  12. just check the ones that are empty (with the file size) or the ones you don't want a delete them.
     
  13. It seems since the latest update that the plugin is now turning off stabilty, pasting, and then turning it back on again. Is this correct?

    1 thing, when we do /placeback we our seeing the buildings face the wrong way sometimes?
     
  14. I thought this must go because in the Teleport Plugin i can List and delete Teleport Points ?
     
  15. It seems like code for turn off stability was just removed so now it works with stability.

    @Mughisi any ability to save lock/code lock? Even without saving keys/code itself, just spawn new one. Really need this for one thing what i'm doing. I have failed to connect code lock with door, have no idea how to do this.
     
  16. The teleport plugin stores all those points in one file, the buildings are each in their own file so it's entirely different.
    Stability isn't actually being disabled anymore.
    I'll try and have a look at it this weekend.
     
  17. This always has been an issue.
    When you copy, removeall, placeback, everything is fine it faces correctly.
    But when you restart the server or wipe the server it seems to not face the correct place ...
    Maybe it's a saving bug (value doesn't get saved in the file correctly and when it's called back it shows a fucked up value?)
     
  18. Thanks for this plugin. It's really cool.

    I was looking at the code and I noticed one thing that was a little odd. It's in line 294:

    Code:
    var returncopy = CopyBuilding(player.transform.position, currentRot.ToEulerAngles().y, buildingblock, out rawStructure, out rawDeployables, out rawStorages);
    For some reason it's passing the player rotation angle (compass angle, basically): currentRot.ToEulerAngles().y

    As a result the very same building /copy has different position and rotation values in the saved file ... depending on the view rotation of the player. That seems to go against the apparent intention of the rest of the code (to normalize positions and rotations relative to the initial block).

    So I tried substituting the player rotation with the initial block rotation: buildingblock.transform.rotation.ToEulerAngles().y

    Code:
    var returncopy = CopyBuilding(player.transform.position, buildingblock.transform.rotation.ToEulerAngles().y, buildingblock, out rawStructure, out rawDeployables, out rawStorages);
    Et voila! It works.

    With this change the saved file always has the same values for position and rotation (when starting with the same initial block). It doesn't matter what direction the player is facing when they type the /copy command.

    It's possible this could help you troubleshoot the /placeback rotate bug as well (mentioned above).

    Cheers.
     
  19. It's normal that it's from the player view.
    Because when you copy it you when it to paste the exact same way that you copied it (from the same angle)
    Using the initial block Will just make it random so you might paste it 90* 180* etc (exept if you place it back)
    So this would just fix the /placeback, but bug the /paste ^^