Seems the update has killed this mod. I do hope it will be fixed soon, I was really digin' it.
MazeGen [Unmaintained]
Discussion in 'Plugin Support' started by 4seti, Apr 14, 2015.
-
Wulf Community Admin
Edit: See latest posts. -
Using the version you posted (and thank you for the response by the way) I get the message that the maze has been created but nothing happens.
-
Examples:
build/foundation --> assets/bundled/prefabs/build/foundation.prefab
build/wall --> assets/bundled/prefabs/build/wall.prefab
build/floor --> assets/bundled/prefabs/build/floor.prefab
build/block.stair.ushape --> assets/bundled/prefabs/build/block.stair.ushape.prefab
build/block.stair.lshape --> assets/bundled/prefabs/build/block.stair.lshape.prefab
... and so on ...
@Wulf I was wondering do you have any idea where is the line in the code where the exit is placed I mean I wan't to place a Door instead of Empty Space/Hole (Removed Wall) but seems I can't find the place... -
Wulf Community Admin
[DOUBLEPOST=1438984029][/DOUBLEPOST]Fixed the prefab renames that I missed in the previous attachment. Please test. -
Last edited by a moderator: Aug 7, 2015
-
So the maze build is working now, we just tested it. Thank you Wulf. you uppercase kick arse. The only thing (which I am willing to deal with because at least it is working now) is it creates a huge amount of lag and I guess it DC'ed my admin when he built it. BUT, it did build and that's what I was after. Thanks again.
the test maze was only 2x2x1 0 by the way.
Never mind it seems the issue has vanished. Thanks guys.Last edited by a moderator: Aug 8, 2015 -
Wulf Community Admin
-
a couple of questions.
1. It seems there is a Zone created automatically now for the maze. if this is correct, what are the parameters used (radius, etc.)
2. the maze teleport option - what are the time parameters and limits? I don't want someone raiding and then doing a maze TP to get away. need a delay in the TP and some sort of message to the user. also limits like:
-- number of times you can TP in a period of time like 1x per hour
-- delay between TPs "Sorry you must way NN seconds before using that TP again"
-- TP start delay, like it takes 5-10 seconds so that you can't use it to get out of a raiding situation. -
Hello,
How do I prevent players from putting up ladders on a open top one floor maze?
Thanks! -
-
I can't upload my version because i have it working with another Maze Event plugin that i have and wont be compatible without it but i can give the hint so if @Wulf wishes he can update the plugin so players won't suffer any more lag problems
Code://Set up some private variables at the start private Vector3 OriginRotation; private Quaternion OriginRot; private Vector3 LastPos; private bool spawn; private float num; private int ST;//Replace the whole PasteBuilding function + new function DelaySpawn void PasteBuilding(List<object> structureData, Vector3 targetPoint, float targetRot, float heightAdjustment, int floor) { int max = structureData.Count(); ST = 0; OriginRotation = new Vector3(0f, targetRot, 0f); OriginRot = Quaternion.Euler(OriginRotation); spawn = true; num = 0; LastPos = new Vector3(0f, 0f, 0f); Dictionary<string, object> structure = structureData[ST] as Dictionary<string, object>; DelaySpawn(structure, floor, targetPoint, structureData, max); // var MazeEvent = plugins.Find("MazeEvent"); MazeEvent.Call("MazeStartSpawning", max*0.035); - my Maze Event function } void DelaySpawn(Dictionary<string, object> structure, int floor, Vector3 targetPoint, List<object> structureData, int max) { Dictionary<string, object> structPos = structure["pos"] as Dictionary<string, object>; Dictionary<string, object> structRot = structure["rot"] as Dictionary<string, object>; string prefabname = (string)structure["prefabname"]; BuildingGrade.Enum grade = (BuildingGrade.Enum)structure["grade"]; Quaternion newAngles = Quaternion.Euler((new Vector3(Convert.ToSingle(structRot["x"]), Convert.ToSingle(structRot["y"]), Convert.ToSingle(structRot["z"]))) + OriginRotation); Vector3 TempPos = OriginRot * (new Vector3(Convert.ToSingle(structPos["x"]), Convert.ToSingle(structPos["y"]), Convert.ToSingle(structPos["z"]))); Vector3 NewPos = TempPos + targetPoint; GameObject newPrefab = GameManager.server.FindPrefab(prefabname); if (newPrefab != null) { SpawnStructure(newPrefab, NewPos, newAngles, grade); ///////////////// Place the DoorWay + Door ///////////////////// // This may not be needed because I'm using it for my Maze Event plugin but is a way to set up a doorway + door if the default rotation is 0, 0, 0 if (num != 0 && spawn) { if ((num - NewPos.x) > 3) { num = -1; spawn = false; LastPos.x = LastPos.x - 1.5f; LastPos.z = LastPos.z + 1.5f; Quaternion Angles = Quaternion.Euler((new Vector3(0f, 91f, 0f)) + OriginRotation); GameObject DoorWayPrefab = GameManager.server.FindPrefab("assets/bundled/prefabs/build/wall.doorway.prefab"); var DoorWay = SpawnStructure(DoorWayPrefab, LastPos, Angles, grade); DoorWay.enableStability = false; LastPos.z = LastPos.z - 0.1f; GameObject DoorPrefab = GameManager.server.FindPrefab("assets/bundled/prefabs/build/door.hinged.prefab"); var Door = SpawnStructure(DoorPrefab, LastPos, Angles, grade); Door.enableStability = false; SetDoorLock(Door); } else { LastPos = NewPos; num = NewPos.x; } } else if (num != -1) { LastPos = NewPos; num = NewPos.x; } ///////////////////////////////////////////////////////////////// // Extra Wall for protection from jumpers on each other if (floor == 1 && prefabname == "assets/bundled/prefabs/build/wall.prefab" || num == -1 && prefabname == "assets/bundled/prefabs/build/wall.prefab") NewPos.y = NewPos.y + 3; var Wall = SpawnStructure(newPrefab, NewPos, newAngles, grade); Wall.enableStability = false; } ///////////////// Anti Lag-Spawning ///////////////////// if ((ST+1) < max) { ST = ST + 1; structure = structureData[ST] as Dictionary<string, object>; timer.Once(0.001f, () => DelaySpawn(structure, floor, targetPoint, structureData, max)); } else { return; } }
(If @Reneb update the R-Removal tool like i suggested no one will have problem placing big mazes and removing them without lag/spikes
)
Last edited by a moderator: Aug 21, 2015 -
Maze has a remove option. I used it to remove a maze and it took the building with it.
-
Hi there ... the maze generator does not work with the last version. i get the following message when generating a maze:
Code:[8/24/2015 9:28:33 PM] FileSystem.LoadPrefab - should start with assets/ - build/wall [8/24/2015 9:28:33 PM] [BUNDLE] Not found: build/wall
-
-
[10/2/2015 6:52:15 AM] [Oxide] 6:52 AM [Error] Error while compiling MazeGen.cs(479,73): error CS1503: Argument `#1' cannot convert `UnityEngine.GameObject' expression to type `string'
Fix please -
Code:
[10/2/2015 3:13:32 PM] [Oxide] 3:13 PM [Error] Error while compiling MazeGen.cs(473,73): error CS1503: Argument `#1' cannot convert `UnityEngine.GameObject' expression to type `string'
-
the two maze updates on this thread by Wulf and Spoock are failing. Error:
[Oxide] 11:41 AM [Error] MazeGen plugin failed to compile!
[Oxide] 11:41 AM [Error] MazeGen.cs(479,73): error CS1503: Argument `#1' cannot convert `UnityEngine.GameObject' expression to type `string'
[DOUBLEPOST=1443824352,1443804177][/DOUBLEPOST]@Wulf can you please fix this mod again? -
-
works. Tnx, respect for you deer_SWAG