1. Seems the update has killed this mod. I do hope it will be fixed soon, I was really digin' it.
     
  2. Wulf

    Wulf Community Admin

    Try the attached version below.

    Edit: See latest posts.
     
  3. 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.
     
  4. You need to place assets/bundled/prefabs/ in front of all entities with build/ and place .prefab in the end of all.
    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...
     
  5. Wulf

    Wulf Community Admin

    Looks like I missed some! I'll post another shortly.

    Perhaps the TryPasteLock portions?
    [DOUBLEPOST=1438984029][/DOUBLEPOST]Fixed the prefab renames that I missed in the previous attachment. Please test.
     
  6. I've checked that one seems it's just a Lock placer when the Maze is pasted but have nothing to do with placing the exit... He is leaving a whole without placing a wall or placing the wall then deleting it... More likely he is just leaving a hole and not placing the last wall... Though its hardcore to find where is that spot from all the numbers in there but maybe somewhere inside GenerateMaze function o_O
     
    Last edited by a moderator: Aug 7, 2015
  7. 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
  8. Wulf

    Wulf Community Admin

    Pretty sure any operations like what this plugin does would create a bit of lag while it is initially created. Shouldn't be an issue after.
     
  9. 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.
     
  10. Hello,
    How do I prevent players from putting up ladders on a open top one floor maze?

    Thanks!
     
  11. Use Zone Manager to create a zone around it. once you install Zone Manager and reload your mods. you can then create a maze and it will automatically create a Zone around it.
     
  12. Actually I've managed to create a way to prevent the server lag/spike even spawning a HUGE building across the whole map :) 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 :p

    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; }
         }
    Actually I'm stupid just downloaded @Wulf 's plugin and added my update. Should be working but someone need to test it to be sure about it :) (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
  13. Maze has a remove option. I used it to remove a maze and it took the building with it.
     
  14. 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
     
  15. Read the post's 1st then post a message... There is already updated and uploaded version to the MazeGen plugin few post's above...
     
  16. [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
     
  17. 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'
     
  18. 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?
     
  19. Try this
     
  20. Yeee :) works. Tnx, respect for you deer_SWAG