Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

MapMagic 2 - infinite procedural land generator

Discussion in 'Assets and Asset Store' started by Wright, Apr 24, 2020.

  1. DigitalIPete2

    DigitalIPete2

    Joined:
    Aug 28, 2013
    Posts:
    44
    Have a quick search earlier in this thread there is code to change seeds.
     
  2. DigitalIPete2

    DigitalIPete2

    Joined:
    Aug 28, 2013
    Posts:
    44


    Ola Did you download the patch above its in Wright's reply to my issue with the Lock (which was different to yours btw) - anyways download the patch and copy the files into the right folders and see if that helps.

    Hope it does.

    IPete2.
     
  3. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    109
    thank you for the thought i downloaded it and applied then locked my terrain and still have the same issues with the old nature manufacture trees and bushes not being cleared outside the lock when a new seed is applied

    I downloaded that update got a bunch of errors now... rip... i even saved a back up and tried replacing with the back up and still getting the errors

    it won't load my graph.... i don't want to rewrite my graph again for the third time...i got the graph back just have to put back in all the objects thankfully... downloaded current map magic from the store... found an older graph thankfully... some weird errors
     
    Last edited: Mar 8, 2021
  4. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    Just to report a small bug

    The node Rarefy we can't add the distance. One temporary solution is just to expose the value.

    upload_2021-3-7_19-39-36.png
     
    protopop likes this.
  5. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    Yes, it will be a separate module, and it will cost $45.
    The Bundle price, $157.5, includes this module ($45 objects, $45 biomes, $45 brush and $22.5 splines), so the Brush will be included to Bundle.

    Increasing the Size value of the fundamental Simple Form will increase the size of islands, but will increase the distance between them. You can then reduce the islands size with Contrast/Levels/Curve.

    Thanks for finding this out! Will look further into the Lock now.

    You can change the seed at starting a game on executing this line in Start/Awake/OnEnable:
    Code (CSharp):
    1. mapMagic.graph.random = new Noise(seed, permutationCount:32768);  
    2. //32768 is initial permutation num for MM noise.
    Keep no tiles pinned (otherwise they won't connect with new tiles with new seed).
    This script is changing your graph (seed value) every start, this value is stored in graph asset.
    Make sure that 'MapMagic' and 'Den.Tools' namespaces are used.
    Here is the example script.

    Thanks, but it would be much more convenient if you could just send a naturemanifacture model instead. To fix the issue I've got to reproduce it in my working project, so there's no need to compile project unless it is the only way to reproduce.

    Thanks for letting me know, will fix it soon!
     
    protopop and mick129 like this.
  6. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    Trees lock fix (for Objects/Bundle users only).

    Looking into this. Could reproduce and trying to find out why this happens the whole day - but can't wrap my head around it.

    EDIT: seems I've found a way to fix it, and it's included in fix above. It seems to be working properly, but I will appreciate if you could take a look if it will cause other issues with objects?
     
    Last edited: Mar 8, 2021
  7. bdae

    bdae

    Joined:
    Dec 24, 2017
    Posts:
    23
    This doesn't seem to have fixed anything. The lock preview lines are still floating on invisible terrain, trees are still spawning on the invisible terrain and the trees are still ignoring the locked area and spawning inside of it. The same thing happens with object spawning (rocks for example).
     
  8. RafaelMartin

    RafaelMartin

    Joined:
    Dec 1, 2016
    Posts:
    3
    Hi Wright!,

    I'm getting this error in runtime with infinite terrain:

    Code (CSharp):
    1. Exception: Empty weld array. Possibly terrain has not been generated yet
    2. MapMagic.Terrains.Weld.ApplyToTerrain (UnityEngine.TerrainData terrData, System.Single[] arr, Den.Tools.Coord dir) (at Assets/MapMagic/Terrains/Weld.cs:658)
    3. MapMagic.Terrains.Weld.WeldDraftToMain (MapMagic.Terrains.TerrainTile reference, MapMagic.Terrains.TerrainTile welded, Den.Tools.Coord weldDir) (at Assets/MapMagic/Terrains/Weld.cs:650)
    4. MapMagic.Terrains.Weld.WeldSurroundingDraftsToThisMain (MapMagic.Core.TerrainTileManager tileManager, Den.Tools.Coord coord) (at Assets/MapMagic/Terrains/Weld.cs:576)
    5. MapMagic.Terrains.TerrainTile.SwitchLod () (at Assets/MapMagic/Terrains/TerrainTile.cs:214)
    6. MapMagic.Terrains.TerrainTile.Dist (System.Single newRemoteness) (at Assets/MapMagic/Terrains/TerrainTile.cs:339)
    7. Den.Tools.TileManager`1[T].Deploy (Den.Tools.Coord[] camCoords, System.Collections.Generic.Dictionary`2[TKey,TValue] pinned, UnityEngine.MonoBehaviour holder) (at Assets/MapMagic/Tools/TileManager.cs:253)
    8. Den.Tools.TileManager`1[T].Update (UnityEngine.Vector3 tileSize, UnityEngine.MonoBehaviour holder, System.Boolean distsOnly) (at Assets/MapMagic/Tools/TileManager.cs:104)
    9. MapMagic.Core.MapMagicObject.Update () (at Assets/MapMagic/Core/MapMagicObject.cs:140)
     
  9. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    Could you please email me the scene and the graph? I've found the error and fixed it, but probably there's another one I've missed.

    Haven't you noted the way to reproduce it? I've got a similar bug report, but the error happens episodically from time to time. I would be grateful if someone could find more or less reliable way to reproduce it.
     
  10. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    109
    wow you are unbelievable... i have been dealing with this bug for months and you've fixed it! it fixed the trees and the bush errors! holy cow im so excited! Thank you so much! I can't believe you figured that out! it works great! thank you!
     
  11. RafaelMartin

    RafaelMartin

    Joined:
    Dec 1, 2016
    Posts:
    3
    I don't know if this could help you but I noted that this only happens if I set the "Out Level" option in the Height node to "Main", in "Both" works correctly. I think the problem is related with the LOD switch of the terrains. I will make more tests when I'm home.
     
  12. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    Glad to help, I wish I could do it earlier!

    Yes, it seems to be it. And by switching Height to Main I could reproduce the welding issue.

    This setting makes the node generate and apply height only for main tiles, but not drafts. It was made to avoid loosing time on generating grass on LODs, maybe some objects, maybe even trees. Don't know the purpose of switching the height to main level only. Maybe it's better to remove this setting here?
     
  13. gozdagb

    gozdagb

    Joined:
    Feb 23, 2014
    Posts:
    71
    Hey, there is a bug in Import Node.
    When you set scale like 3 you will get an error, and offset stop working:

    Code (CSharp):
    1. Thread failed: System.Exception: Couldn't upsize: src Den.Tools.CoordRect: offsetX:-18 offsetZ:-18 sizeX:549 sizeZ:549 is less than dst Den.Tools.CoordRect: offsetX:-16 offsetZ:-16 sizeX:545 sizeZ:545
    2.  
     
  14. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    I try to connect the villages between them. To achieve this I scatter some town center and create a portal to them (1st scatter)
    Somehow they doesn't connect after X distance. The "Main Road" portal lead directly to the road texture and no texture override that road.
    Am I missing something? :)

    Edit: just for clarification I have played a lot with the Pathfinding's value, including the distance factor.

    upload_2021-3-10_13-41-13.png
     
    Last edited: Mar 11, 2021
  15. DenisPahunov

    DenisPahunov

    Joined:
    Dec 2, 2019
    Posts:
    4
    Thanks for reporting itcould you please clarify - what scale exactly do you have? And what are your import map resolution, tile size and margins?

    The thing is that each tile has absolutely no information about the objects used on the other tiles. However if you are using only the scatter node you can make objects scatter out of tile margins the same way they should be scattered with the other tile. Increase the Add Margins value in advanced settings to do that.
     
    mick129 likes this.
  16. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    Thank you that make so much sense :)
     
  17. Mr_Darkness

    Mr_Darkness

    Joined:
    Apr 6, 2020
    Posts:
    8
    Hi, I already asked this question, but I never got an answer. How do I place the fourth biome in the selected area? I'm trying to make it so that each of the four biomes occupies exactly one terrain on each side. (that is, one biome on the top left, another on the top right, and so on, as shown in the photo)
     

    Attached Files:

  18. gozdagb

    gozdagb

    Joined:
    Feb 23, 2014
    Posts:
    71
    @DenisPahunov It was an import node with raw texture, 1k resolution, scale greater than 2. This is enough for the error to appear. Sometimes the error does not appear with these settings, but the offset will not work.
     
    Last edited: Mar 12, 2021
  19. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    2All: Sorry if I missed some posts, feel free to let me know if you still need any advice or encountered an issue.

    To create a square mask that takes a quarter of the area you can use a Blend node with Multiply blend type. This will multiply the values of one mask with the values of the other. If both masks are gradients with different directions it will highlight only one corner:
    MaskQuarter.jpg

    Thanks for reporting the issue, I will try to reproduce it.
     
  20. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    Version 2.1.2 is available at the Asset Store. It gathers all of the patches since 2.1.1 and some more bug fixes:
    - Move locked tiles fix
    - Trees were not locked in some cases - fixed
    - Lock generated hige platform - fixed
    - MicroSplat + layers fix
    - VS Pro mask group fix
    - Import node offset fix
    - Lock trees fix
    - Fix on removing Naturemanifacture assets
    - Rarefy GUI fix
    - Grass not switching to VertexLit on already existing terrain fix
     
    valentinwinkelmann likes this.
  21. thevisad

    thevisad

    Joined:
    Jan 29, 2018
    Posts:
    24
    I am running into a small issue with the import node and scaling in 2.12. When setting the scale factor to 4 or 4.01 there is a crash and it fails to properly generate the map. Values 3.99 and below, and above 4.02 do not seem to have an issue with the generation and generate properly. This is on a 4 x 4 terrain layout with just a few nodes in use.

     
  22. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    188
    MicroSplat TerrainBlending still not working......

    Unity2019.4.19f1
    HDRP 7.3.1
    MapMagic 2.1.2
    MicroSplat 3.74
    MicroSplat - HDRP 2019 Support 3.723

    upload_2021-3-15_1-29-34.png upload_2021-3-15_1-30-20.png
    upload_2021-3-15_1-29-17.png
     
  23. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    I'm going to release the Brush module public Beta version this week. The beta will be available for free, and will not require additional paid modules installed (however some presets that use splines or objects won't work).

    Seems to be something with the material itself. Not sure if it is MM, but I can look into it - is there any chance you could email the whole project to me (without the unnecessary objects, textures and other data)?

    Thanks! I've already got a similar report and going to fix it for the next version.
     
    thevisad likes this.
  24. Alienmadness

    Alienmadness

    Joined:
    Sep 6, 2012
    Posts:
    109
    maybe my math is not working
    MapMagic 2 = free
    MapMagic 2 Biomes & functions = $45
    MapMagic 2 Splines (roads) = $22.50
    MapMagic 2 Objects = $45
    ------
    Total $112.50

    Bundle price is $157.50

    why would i pay more for the bundle? this makes absolutely no sense. either the description is missing something or the price is messed up.
    even if it included the erosion Erosion Brush (which is not in the discription) @ $25 buying them individually is still cheaper.
     
  25. gypynkt

    gypynkt

    Joined:
    Aug 31, 2018
    Posts:
    2
    I was just about to post the same... This has been bugging me for weeks. Especially when it says in the description:

    Full MapMagic 2 asset together with three default modules that turn it from terrain tool to full-scale world creator: Objects, Splines and Biomes. Made to simplify downloading, installation and update. Helps to avoid compatibility issues between modules with different versions. The summary price of 3 modules and the price of this asset are equal.
     
  26. Alienmadness

    Alienmadness

    Joined:
    Sep 6, 2012
    Posts:
    109
    lol, same here. i have looked at this more then a few times over the last few weeks. one of the reasons i didnt buy it when it was on sale. my bigger concern is if they cant get the math right, or the description correct. what is the product itself like. not to be a negative nelly, but details matter.
     
  27. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    The Bundle will include 4 modules. One of them - the Brush - is not released yet, but the Bundle users will get it for free once it's available (not actually free since they've paid for it :)). And it will cost $45, like most of the other modules. So the calculations are:

    MapMagic 2 = free
    MapMagic 2 Biomes & functions = $45
    MapMagic 2 Splines (roads) = $22.50
    MapMagic 2 Objects = $45
    MapMagic 2 Brush= $45
    ------
    Total $157.50

    Sorry if the Bundle description is confusing - I was going to mention Brush module with next update (with update - because changing description requires Unity review, maybe kind of "light" review). But since it confuses many people I'll make an update now.
     
    gypynkt and valentinwinkelmann like this.
  28. Alienmadness

    Alienmadness

    Joined:
    Sep 6, 2012
    Posts:
    109
    thanks for the clarification
     
  29. AlanGreyjoy

    AlanGreyjoy

    Joined:
    Jul 25, 2014
    Posts:
    192
    Got it fixed.
    1. Upgrade to unity 2020.3.0f1 (LTS)
    2. Delete Mapmagic
    3. Reimport from package manager
    4. Restart unity
    5. Enjoy

    Now I have the new context menu. Hooray!!!!!!
     
  30. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    MapMagic Brush module public beta is available!

    The beta is available for free, and does not require additional paid modules installed (however some presets that use splines or objects won't work). Released module price will be $45. Instead of a fee now I ask you of informative issue report.

    Please report all of the module issues and ideas to IdeaInformer. Make sure that the reported issue contains the steps to reproduce it. Please pay attention to this issue description - at least it's the purpose of the beta test. The issue reports that do not meet specifications most likely will be rejected. The Brush module Beta could be downloaded here: for core version, for objects/bundle version (use core version if you have only biomes module installed).

    Wish you a nice toying with the Brush!

    Hope this video tutorial will help you at the beginning:


    Don't remember exactly what was the issue, but yes, there might be a problem with Unity's package manager on upgrade. ElevenGame found a quick way to fix it:
     
    Last edited: Mar 18, 2021
    Swyfft and thevisad like this.
  31. thevisad

    thevisad

    Joined:
    Jan 29, 2018
    Posts:
    24
    @Wright I was doing some digging into the Forest code to try and understand what it was doing. It looks like Forest Generate is using the seedlingsIn for both inputs, instead of using otherTreesIn for the Other Trees at line 1035.

    Code (CSharp):
    1. TransitionsList otherTrees = data.ReadInletProduct(seedlingsIn);
     
  32. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    Nice work with the brush, I will test it this weekend.
    I'm currently building a village asset for MM2 and I'm very curious to see how I can make that fit with your brush.

    I have a question, this problem only happen in one project and I really can't figure out why. I use Microsplat and I'm not sure what is causing the weird separation between every tiles. It is like if there was an offset somewhere and I can't figure out why. Any clue?

    EDIT: I have tested many combinaison and always get similar results (with ant without custom splatmap)

    upload_2021-3-19_9-56-56.png
     
    Last edited: Mar 19, 2021
  33. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    Thanks for reporting it! Seems obvious but got to test it anyways. Planned for 2.1.3

    It looks more like a spline issue. It might have a different position on terrain tiles. Are you using splines?
     
  34. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    188
    I simply cannot express my excitement about the MapMagic+MicroSplat compatibility enough...:)

    MapMagic + MicroSplat with real Splatmaps (super cool new feature)


    MapMagic + MicroSplat with CustomSplatmaps via Textures (as we have been using for a while with the MapMagico+MicroSplat integration)


    Both looks like really bad S***.

    2020.3.0f1 URP 10.3.2
    MicroSplat - Version 3.76 - March 19, 2021
    MicroSplat - URP 2020 Support - Version 3.7 - March 18, 2021
    MapMagic2 - Version 2.1.2 - March 12, 2021


    Please Dennis, explain to me where is the error, why does it not work?

    Edit:

    And a complete video of how I set up a blank project.


    Edit2:

    Btw, an error (independent of MicroSplat) that I observe in various versions is this:

    Code (CSharp):
    1. Exception: Empty weld array. Possibly terrain has not been generated yet
    2. MapMagic.Terrains.Weld.ApplyToTerrain (UnityEngine.TerrainData terrData, System.Single[] arr, Den.Tools.Coord dir) (at Assets/MapMagic/Terrains/Weld.cs:689)
    3. MapMagic.Terrains.Weld.WeldDraftToMain (MapMagic.Terrains.TerrainTile reference, MapMagic.Terrains.TerrainTile welded, Den.Tools.Coord weldDir) (at Assets/MapMagic/Terrains/Weld.cs:650)
    4. MapMagic.Terrains.Weld.WeldSurroundingDraftsToThisMain (MapMagic.Core.TerrainTileManager tileManager, Den.Tools.Coord coord) (at Assets/MapMagic/Terrains/Weld.cs:576)
    5. MapMagic.Terrains.TerrainTile.SwitchLod () (at Assets/MapMagic/Terrains/TerrainTile.cs:214)
    6. MapMagic.Terrains.TerrainTile+<ApplyRoutine>d__44.MoveNext () (at Assets/MapMagic/Terrains/TerrainTile.cs:783)
    7. Den.Tools.Tasks.CoroutineManager.Update () (at Assets/MapMagic/Tools/ThreadManager/CoroutineManager.cs:147)
    8. MapMagic.Core.MapMagicObject.Update () (at Assets/MapMagic/Core/MapMagicObject.cs:144)
    Does not occur every time but often. If the Infinite Generation is deactivated, the error does not occur.
     
    Last edited: Mar 20, 2021
  35. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    Yes I use the splines, those are my settings.
    Consider the first scatter like the center of the village and the second one are the houses.

    Edit: Just for clarification, the roads inside the villages (like in the screenshot above) is the section of the top in the spline screenshot.


    upload_2021-3-20_10-26-17.png
     
    Last edited: Mar 20, 2021
  36. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    MicroSplat output sends a lot of different kind of data to terrain in different ways. So I recommend re-initializing MS node each time advanced settings were changed. But the easiest way to do it is to re-pin the tile. I can see you've done it at the video.

    Speaking of the channel numbers there was an issue somewhere at the IdeaInformer. I've fixed it and the fix will be available with the next update.

    I'm hunting for this issue to reproduce it.

    If anyone can find a reliable way to reproduce "Empty weld array" error - please let me know. Once reproduced I will try to fix it ASAP.

    I'm going to change the splines engine once things will settle down with the brush. Probably it will fix some issues, most probably it will add new ones, but I'm going to fix them after changing the engine, otherwise these fixes might be wasted efforts.
     
  37. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    Alright, I understand and thank you!
    I will see if I can find another way to do it.
     
  38. Jairusx

    Jairusx

    Joined:
    Jun 25, 2020
    Posts:
    62
    Hello. I have a question. How can make a different graphs and blend them together? I have biomes & functions.
    Is it possible? I would like to make an open world map and I will need different shapes. Thanks!

    For example I wanna flat biome, then next to it a mountain biome. I will need that separation

    Will "Locks" do the work for my case?
     
    Last edited: Mar 20, 2021
  39. QJaxun

    QJaxun

    Joined:
    Sep 30, 2016
    Posts:
    24
    How would you recommend randomizing a map on startup then?
     
  40. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    Looks like the use case from this video:


    You can change a global seed value. It's a graph property and doesn't belong to any generator.

    You can change the seed at starting a game on executing this line in Start/Awake/OnEnable:
    Code (CSharp):
    1. mapMagic.graph.random = new Noise(seed, permutationCount:32768);
    Keep no tiles pinned (otherwise they won't connect with new tiles with new seed).
    This script is changing your graph (seed value) every start, this value is stored in graph asset.
    Make sure that 'MapMagic' and 'Den.Tools' namespaces are used.

    Here you can find an example script.
     
  41. QJaxun

    QJaxun

    Joined:
    Sep 30, 2016
    Posts:
    24
    This works perfectly, thank you.
     
  42. thevisad

    thevisad

    Joined:
    Jan 29, 2018
    Posts:
    24
    @mick129 and I rooted out the issue in his project and are working on getting it to you now. I noticed it earlier when testing his graph on large terrains. It looks to be an issue in his project when pinning 4 x 4 tiles, but only if you draw them all at once. Pinning them one at a time does not seem to cause this issue. The Gyazo shows the difference in his graph.


    https://gyazo.com/3c945d87b79642c992fd76c3d893e504
     
  43. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    In addition to what Thevisad said, removing a lot of contend in the graph didn't seems to remove the problem.
     
  44. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    188
    @thevisad @mick129
    I haven't seen the error in the editor yet, but I've seen it a lot in play mode, where it's most annoying.
    This also happens with a graph that has only one noise -> output node. the graph itself does not seem to play a role.
     
  45. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    To everyone who is experiencing "Empty Weld Array" error - could you please try this fix?

    Thanks thevisad for providing a reproducible scenario!
     
  46. thevisad

    thevisad

    Joined:
    Jan 29, 2018
    Posts:
    24
    I can confirm that I was not able to replicate this issue any further.
     
  47. AlanGreyjoy

    AlanGreyjoy

    Joined:
    Jul 25, 2014
    Posts:
    192
    Is there a way to have biome spawn rules?

    Like, Ocean biome can only have either Ocean Biome or Shore Biome spawn next to it? If not, I think that would be a great addition.

    Like so
    upload_2021-3-22_21-34-23.png

    Obviously you can add as many "Spawn Rules" as you want.

    Thoughts?
     
    boysenberry likes this.
  48. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    When you have a moment, can you explain what Push and silhouette do?
    I try to make sense of it and hope it could be a solution for my problem :p


    upload_2021-3-23_16-33-35.png
     
  49. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    "Spawn Rules" are actually biome masks. With the help of this masks you define where the biome should be and how intense it should be. In the case given if you want a central tile you can use Simple Form of a Pyramid to make it square, and adjusted with Levels to reduce blending:
    BiomePerTile.jpg
    The most important thing to remember is that you are not bound by tiles, their size and shape. Actually you can place this square anywhere you like, and make it bigger or smaller, or make it round.

    Push node tries to push objects away from the spline. Might be useful if you want to move some stones or trees away from the roads. The red connection means that you're trying to create a loop - MainRoad portal source depends on this node output.

    Silhouette fills the area inside of the closed spline with white, leaving all other black. Sort of boolean signed distance field.
     
    mick129 likes this.
  50. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    Thank you!

    Then I really have to refactor my node if I want to make this change. At almost 300 it is getting hard to not make a loop. Than you for that protection again infinite loop haha.