1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Melee Mapping contest #3 - Poll is up! Vote for the best 4v4 melee maps!
    Dismiss Notice
  3. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  4. We have a new contest going on right now! Join the 11th Music Contest! You are to make a Cinematic modern sound-track for this contest, so come and compete with other people for fun.
    Dismiss Notice

DatBoi's Terrain Generator (1.2)

Submitted by DatBoi
This bundle is marked as pending. It has not been reviewed by a staff member yet.
「DatBoi's Terrain Generator of DOOM」

By@DatBoi


Description
I present to you: a highly configurable random terrain generator with multiple terrain presets capability.

Features
Highly Configurable
Mostly leakless

Credits
Blizzard Entertainment, IcemanBo, Grey Knight, Remixer, kellym0, Kuhneghetz, HappyTauren, Deolrin, Sunchips, Fingolfin, Nightelfbuilder, HerrDave, olofmoleman, Verdun

Changelog
1.00: Release
1.01: Added "LoopQuantity" variable to CFG, for easier customization. (Suggestion by Abovegame), Also added automatic "iseedeadpeople"
1.02: Fixed errors in the tile part of the generator, removed unused models.
1.1: Every change @MyPad pointed out has been made.
1.2: Updated the generator to work in 1.29+
Map Description Generator 「By Vengeancekael」
Contents

DatBoi's Terrain Generator (Map)

Reviews
MyPad
^^ Before the generation starts, apply a cinematic fade out. After the generation ends, apply a cinematic fade in. Notes: The generator system itself must be separate from the dialog button that appears on Map Initialization. The trigger in...
  1. Abovegame

    Abovegame

    Joined:
    Jan 2, 2016
    Messages:
    454
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I think you should put the code in JASS tags.
     
  2. Championfighter25

    Championfighter25

    Joined:
    Apr 9, 2017
    Messages:
    1,316
    Resources:
    0
    Resources:
    0
    Tested it a few times and it works very well. No crashes, just the small lag spike you warned us about. (1-2 seconds lag spikes are my eternal bane :D)
    The terrain generated also looks very well made.
     
  3. Abovegame

    Abovegame

    Joined:
    Jan 2, 2016
    Messages:
    454
    Resources:
    1
    Maps:
    1
    Resources:
    1
    You should also make the for loops have a variable in config (as in max_doodads , flowers , whatever....). The user shouldn't go around the code that much i guess.
     
  4. DatBoi

    DatBoi

    Joined:
    Jul 1, 2016
    Messages:
    98
    Resources:
    0
    Resources:
    0
    I'll get on it right now.
     
  5. UT_

    UT_

    Joined:
    Jul 6, 2018
    Messages:
    1
    Resources:
    0
    Resources:
    0
    really good generator, it helped me on some small projects, treally recomend it. :D
     
  6. nightelfbuilder

    nightelfbuilder

    Joined:
    Dec 15, 2017
    Messages:
    165
    Resources:
    14
    Packs:
    1
    Maps:
    6
    Template:
    7
    Resources:
    14
    the terrain surprisingly looks good, nice job on this.

    P.s, change the map name cause this ain't shitty. :p
     
  7. Alxen345

    Alxen345

    Joined:
    Aug 6, 2015
    Messages:
    881
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Excepting the lag spikes that occur but there's a warning about that at the very beginning, this tool is really useful and is a good addition to any w3 modder. I suggest you add more types of terrain in this generator. 5/5
     
  8. noob2

    noob2

    Joined:
    Mar 27, 2017
    Messages:
    106
    Resources:
    0
    Resources:
    0
    I would like to know:
    Why do you add grass and flowers(the destructible for both of them) within the trees at the end of the generation?
    You can barely see the grass within the trees and when you do it looks weird.
    (however putting grass texture under the trees is fine)
     
  9. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,410
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    I suggest that you have an instant fade out and fade in once the generation is done.
     
  10. DatBoi

    DatBoi

    Joined:
    Jul 1, 2016
    Messages:
    98
    Resources:
    0
    Resources:
    0
    That's just for the example, you can easily remove it :p

    I should probably offset those to not be exactly below the tree tho

    What do you mean?
     
  11. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,107
    Resources:
    2
    Models:
    1
    Icons:
    1
    Resources:
    2
    Previous Message

    ^^ Before the generation starts, apply a cinematic fade out. After the generation ends, apply a cinematic fade in.


    Notes:


    • The generator system itself must be separate from the dialog button that appears on Map Initialization. The trigger in question is
      • Config
      .

    • The following variables are not constants:
      • TERRAINPOINT
      • DESTRUCTABLESPOINT
      • DEFORMATIONSPOINT


    • In trigger
      • Special Terrain
      , (have mercy on the mapmaker), you can optimize the trigger so that it only enumerates each destructable once. You can check the destructable type internally with this script:

      Special Terrain DatBoi

      • For each (Integer A) from 1 to STMax, do (Actions)
        • Loop - Actions
          • Destructible - Pick every destructible in (Entire map) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Destructible-type of (Picked destructible)) Equal to DestructibleType[(Integer A)]
                • Then - Actions
                  • Set STPOINT = (Position of (Picked destructible))
                  • Environment - Change terrain type at STPOINT to SpecialTerrain[(Integer A)] using variation SpecialTerrainVariation[(Integer A)] in an area of size SpecialTerrainSize[(Integer A)] and shape SpecialTerrainShape[(Integer A)]
                  • Custom script: call RemoveLocation(udg_STPOINT)
                • Else - Actions



      Special Terrain Changes

      • Destructible - Pick every destructible in (Entire map) and do (Actions)
        • Loop - Actions
          • For each (Integer A) from 1 to STMax, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Destructible-type of (Picked destructible)) Equal to DestructibleType[(Integer A)]
                • Then - Actions
                  • Custom script: exitwhen true
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Integer A) less than or equal to STMax equal to true
            • Then - Actions
              • Set STPOINT = (Position of (Picked destructible))
              • Environment - Change terrain type at STPOINT to SpecialTerrain[(Integer A)] using variation SpecialTerrainVariation[(Integer A)] in an area of size SpecialTerrainSize[(Integer A)] and shape SpecialTerrainShape[(Integer A)]
              • Custom script: call RemoveLocation(udg_STPOINT)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • STInteger Equal to 1
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Destructible-type of (Picked destructible)) Equal to Tree1
                      • (Destructible-type of (Picked destructible)) Equal to Tree2
                      • (Destructible-type of (Picked destructible)) Equal to Tree3
                      • (Destructible-type of (Picked destructible)) Equal to Tree4
                      • (Destructible-type of (Picked destructible)) Equal to Tree5
                      • (Destructible-type of (Picked destructible)) Equal to Tree6
                      • (Destructible-type of (Picked destructible)) Equal to Tree7
                      • (Destructible-type of (Picked destructible)) Equal to Tree8
                      • (Destructible-type of (Picked destructible)) Equal to Tree9
                      • (Destructible-type of (Picked destructible)) Equal to Tree10
            • Then - Actions
              • Set Temp_Point = (Position of (Picked destructible))
              • Destructible - Create a Grass[(Random integer number between 1 and 4)] at Temp_Point facing (Random angle) with scale 0.80 and variation 1
              • Custom script: call RemoveLocation (udg_Temp_Point)



      The (Integer A) variable is a placeholder, wherein you can substitute another variable for it.
      Also, another variable should hold picked destructable, as it can become costly to reference it all over and over again.

    • Is this intended for multiplayer as well? If so, this trigger might prove problematic:

      Generator Stop

      • GeneratorStop
        • Events
        • Conditions
        • Actions
          • Trigger - Turn off Destructibles <gen>
          • Trigger - Turn off Deformations <gen>
          • Trigger - Turn off Critters <gen>
          • Trigger - Turn off Terrain <gen>
          • Wait 2.00 seconds
          • Trigger - Turn off Special Terrain <gen>
          • Trigger - Turn on CritterSpawn <gen>
          • Custom script: call DestroyTrigger( GetTriggeringTrigger() )



      The Wait function could potentially desync other players if this is to be for multiplayer maps as well.

    • Although it isn't pointed out in the Spell Submission Rules, it is recommended not to use (Integer A) or (Integer B) as variables, since they are for public use. (Imagine 20 families using the same C.R. Things could get ugly.)

    Nitpicks:


    • The description of the resource could use some work. Have confidence in presenting your map, and do not be too down on yourself when describing it.
    • As mentioned by @Abovegame, some more configurability would be desired.
    Nevertheless, the system itself is quite capable, and functional, and I envision that it will be updated later on.

    Status:


    • Awaiting Update
     
    Last edited: Jul 10, 2018
  12. DatBoi

    DatBoi

    Joined:
    Jul 1, 2016
    Messages:
    98
    Resources:
    0
    Resources:
    0
  13. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,107
    Resources:
    2
    Models:
    1
    Icons:
    1
    Resources:
    2
    You can move a lot of the variable assignment to a map Initialization trigger, since configurables are generally assigned on that time frame.

    The trigger Config, though mostly true to its namesake, is executed on a dialog-click, which would then initialize a lot of things, before starting up the respective triggers. That is why I would prefer moving those variable assignments to another trigger, or the statement above.

    The dialog button input and the terrain generator should be separate from each other, but that does not mean I am discouraging you from using it. Rather, have the terrain generator do all the things it needs to do and just build the dialog from there.
     
  14. DatBoi

    DatBoi

    Joined:
    Jul 1, 2016
    Messages:
    98
    Resources:
    0
    Resources:
    0
    That would remove the multiple preset configuration possibility completely...
     
  15. RiotZ

    RiotZ

    Joined:
    Jul 25, 2009
    Messages:
    2,723
    Resources:
    2
    Maps:
    2
    Resources:
    2
    I wanted to use this system myself for an Age of Empires sort of rip off I'm doing but there are some problems with it from a practicality standpoint. Trees and doodads block building paths making it useless for RTS matches, there are no cliffs (I feel like this would be relatively easy to add too,) the randomness of it isn't that dramatic, I've ran it a few times and the tiles don't vary much nor does the environment in general. You need water, cliffs, less saturation of trees, and the option for different environments/tilesets or greater variation within the existing tileset.
     
  16. DatBoi

    DatBoi

    Joined:
    Jul 1, 2016
    Messages:
    98
    Resources:
    0
    Resources:
    0
    You can add ALL that except cliffs via configuration.
     
  17. RiotZ

    RiotZ

    Joined:
    Jul 25, 2009
    Messages:
    2,723
    Resources:
    2
    Maps:
    2
    Resources:
    2
    How exactly would you change the distribution of trees to be closer to wc3 melee? And not clog up your starting area.
     
  18. -Manuel-

    -Manuel-

    Joined:
    Oct 4, 2016
    Messages:
    125
    Resources:
    0
    Resources:
    0
    When I started the map, the cinematic mode never disappears. So I checked the triggers and you turn on the Cinematic Mode but never turn it off.

    This is too good, I'll wait for updates that implements cliffs or elevations. + rep.
     
  19. RanCatu1020

    RanCatu1020

    Joined:
    Mar 23, 2017
    Messages:
    44
    Resources:
    0
    Resources:
    0
    So how exactly does this work? I'm stuck in cinematic mode and the terrain isn't doing anything.