@Reneb
For signs:
In LustyMap, Wulf just changed this line :
By this line :Code:uint textureID = FileStorage.server.Store(stream, FileStorage.Type.png, uint.MaxValue);
I dunno if it can help you..Code:uint textureID = FileStorage.server.Store(stream, FileStorage.Type.png, CommunityEntity.ServerInstance.net.ID);
[DOUBLEPOST=1480774101][/DOUBLEPOST]Ah, just saw, it solved by an oxide fix x). Thanks

Copy Paste
Copy and paste your buildings to save them or move them
Total Downloads: 21,552 - First Release: Apr 3, 2015 - Last Update: Jun 14, 2018
- 5/5, 83 likes
-
-
so do i need to fix it? or it works?
-
One guy cant paste an old file, but there is nothing anyone can do. -
Yeah everytime I try to paste a building even if I built it at maximum height off ground it still those.. isn't there a fix for that?
-
/paste nameofcopy height 1
or
/placeback nameofcopy height 1
to make it higher you can use 2, 3, 4, etc. -
how save my building after wipe?
-
Couple things came up for me. When I use radius command objects such as bushes, cactus and trees are always pasted back, please filter these out because i get floating objects in the air and have to reset environment. Also when I use autoheight it always fails with too steep error I really need this autoheight to work properly, is there any way to fix it?
So I tried to write my own plugin and call your paste function to paste a building based on saved name, but it fails with the following, how can I successfully call it please?:
Calling with:
Code:message = PluginTest.CallHook("cmdChatPaste", message).ToString();
Code:[Error] Failed to call hook 'cmdChatPaste' on plugin 'CopyPaste v3.0.19' (InvalidCastException: Cannot cast from source type to destination type.) (21:31:58) | [Oxide] 20:31 [Debug] at Oxide.Plugins.CopyPaste.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 (21:31:58) | [Oxide] 20:31 [Error] Failed to call hook 'RaidCall' on plugin 'RaidEvent v1.0.0' (NullReferenceException: Object reference not set to an instance of an object) (21:31:58) | [Oxide] 20:31 [Debug] at Oxide.Plugins.RaidEvent.RaidFunction () [0x00000] in <filename unknown>:0 at Oxide.Plugins.RaidEvent.RaidCall (.BasePlayer player) [0x00000] in <filename unknown>:0 at Oxide.Plugins.RaidEvent.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
Last edited by a moderator: Dec 8, 2016 -
if you dont like it: /undo
then /paste XX height MOREXX -
-
Is it really to do something like that for hurtworld?
-
There seems to be a problem using
Code:autoheight true
Code:if (maxHeight - minHeight > 3f) return "The ground is too steep";
Code:float minHeight = 0f;
Code:if (height.y < minHeight) minHeight = height.y;
Code:object FindBestHeight(List<Dictionary<string,object>> entities, Vector3 startPos) { float minHeight = 999f; float maxHeight = 0f; foreach(var entity in entities) { if(((string)entity["prefabname"]).Contains("/foundation/")) { var foundHeight = GetGround((Vector3)entity["position"]); if(foundHeight != null) { var height = (Vector3)foundHeight; if (height.y > maxHeight) maxHeight = height.y; if (height.y < minHeight) minHeight = height.y; } } } if (maxHeight - minHeight > 3f) return "The ground is too steep"; return maxHeight; }
Code:float minHeight = 0f;
and withCode:float minHeight = 999f;
[DOUBLEPOST=1481784371][/DOUBLEPOST]There would also seem to be a similar problem with maxHeight, in that it will never find a maxHeight below the terrain. However that problem is masked by a problem with the parameters to Physics.Raycast. Basically the signature is this;
Code:public static bool Raycast(Vector3 origin, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal);
Code:object GetGround(Vector3 pos) { RaycastHit hitInfo; if (Physics.Raycast(pos, Vector3.up, out hitInfo, groundLayer)) { return hitInfo.point; } if (Physics.Raycast(pos, Vector3.down, out hitInfo, groundLayer)) { return hitInfo.point; } return null; }
Code:RaycastHit hitInfo; if (Physics.Raycast(pos, Vector3.up, out hitInfo, Mathf.Infinity, groundLayer)) { Puts("up point " + hitInfo.point + " for point "+ pos); Puts("hit up point"); return hitInfo.point; } if (Physics.Raycast(pos, Vector3.down, out hitInfo, Mathf.Infinity, groundLayer)) { Puts("down point "+ hitInfo.point + " for point " + pos); Puts("hit down point"); return hitInfo.point; } return null;
Code:float maxHeight = -999f;
Code:RaycastHit hitInfo; if (Physics.Raycast(pos, Vector3.up, out hitInfo, Mathf.Infinity, terrainLayer)) { return hitInfo.point; } if (Physics.Raycast(pos, Vector3.down, out hitInfo, Mathf.Infinity, terrainLayer)) { return hitInfo.point; } return null;
Last edited by a moderator: Dec 15, 2016 -
Hello, I have some errors I can't copy a build
(16:39:59) | [Oxide] 16:40 [Error] Failed to call hook 'cmdChatCopy' on plugin 'CopyPaste v3.0.19' (JsonSerializationException: Self referencing loop detected for property 'normalized' with type 'UnityEngine.Vector3'. Path 'entities[0].position.normalized'.)
(16:39:59) | [Oxide] 16:40 [Debug] at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonContainerContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.Serialization.JsonContract& memberContract, System.Object& memberValue) [0x00000] in <filename unknown>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject (Newtonsoft.Json.JsonWriter writer, System.Object value, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract collectionContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty) [0x00000] in <filename unknown>:0
(16:39:59) | [Oxide] 16:40 [Warning] Calling 'cmdChatCopy' on 'CopyPaste v3.0.19' took 357ms -
How can i delete a copy i made or show the list of copied templates
-
Last edited by a moderator: Dec 21, 2016
-
so I have been using the mod a few weeks and I love it but now I'm at the point where I have copied loads and forgotten the names.... any command to list the names of the files you make when doing a copy?
-
Code:[12/21/2016 23:25:35] [Oxide] 23:25 [Error] Failed to call hook 'cmdChatList' on plugin 'CopyPaste v3.0.18' (UnauthorizedAccessException: System access is restricted, you are not allowed to use System.IO.Path)
-
I could imagine a patch to copypaste which would keep track of the files created using a datafile, and then that list could be used for delete/list chat commands.
-
-