1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Dungeon Keeper 2 for WC3

Discussion in 'Requests' started by DEFACKTwalker, Mar 5, 2018.

  1. DEFACKTwalker

    DEFACKTwalker

    Joined:
    Aug 2, 2008
    Messages:
    130
    Resources:
    5
    Skins:
    2
    Maps:
    2
    Template:
    1
    Resources:
    5
    Dungeon Keeper 2
    a mod for WC3

    As a kid, i loved playing DK2. And i still do so. That's why I am curretnly working on a DK2 mod for WC3. And i could need a little help for that :)
    I already saw some DK2 maps for WC3...but they were not even a bit like the real game. I want to build in as many features as possible of the real DK2 game has.

    Map description
    If you don't know about Dungeon Keeper 2 yet, I'll give you a short explanation. You start with the heart of your dungeon and some Imps which are used to harvest gold and digg new paths for your dungeon. You're able to conquer portals which will attrackt creatues to join your dungeon and, ofc, to fight for you! Which creatures you will get complies with the rooms you built. The goal is to destroy all enemy dungeon hearts.

    The hardest part so far is making the Imps act like the ones in DK2. I won't add anyhing else if that does not work correctly.

    Stuff that is done but still need some work
    -Dirt and fortified walls can be marked and unmarked
    -Marked walls are beeing automatically attacked by Imps
    -Imps are able to change the floor type to a type on which you can build rooms
    -Spellbooks as build-menu for rooms and traps

    Video


    Issues
    All walls are units. And I am also using dummy units for every floor tile (128x128). That are about 8k dummy units. I would like to reduce that, but haven't find a simple solution yet. The way this stuff works is just that the Imps are attacking the dummy units automatically because they're enemies. Everything else, like if a wall dies, is triggered.
    My idea is, that amount of dummy units could be reduced by using hashtables.

    Credits
    Carved Wall model from Lestat(br)
    Dungeon Keeper II Carved Wall



    Help
    So if there's anyone out here who is into JASS and also a fan of DK2, i would be happy to get help from you from time to time. I want to create a quality DK2 map. That's why I am asking for help.

    If you want to take a look at my triggers, just send me your mail adress via pm and I will send you the map.

    Thanks to...
    Dr Super Good for answering my questions and helping me making this mod even possible.
     

    Attached Files:

    Last edited: Mar 5, 2018
  2. doom_sheep

    doom_sheep

    Joined:
    Oct 18, 2008
    Messages:
    756
    Resources:
    0
    Resources:
    0
    destructibles perform better than units, though I don't know about the marking mechanic. trackables might do what you want.

    there are triggers to detect and change tile types so you might be able to do get rid of dummy units there as well.
     
  3. DEFACKTwalker

    DEFACKTwalker

    Joined:
    Aug 2, 2008
    Messages:
    130
    Resources:
    5
    Skins:
    2
    Maps:
    2
    Template:
    1
    Resources:
    5
    Do you mean finished triggers here on the forum?
     
  4. doom_sheep

    doom_sheep

    Joined:
    Oct 18, 2008
    Messages:
    756
    Resources:
    0
    Resources:
    0
    no, but I'm sure someone will help you with it if you ask.
     
  5. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    So I don't want to commit to a map or anything but am happy to give some advice here and there.

    One of the easiest things that you can do is have larger wall segments for areas that are 100% uncut. For example, let's say walls have size 1x1. You could also have wall models for 2x2, 4x4, 8x8 etc, and merge every four 1x1 blocks in a square into a 2x2 block, then merge every four 2x2 blocks in a square into one 4x4 block, etc. Once someone mines any of the walls of the block it breaks down into blocks of half the size recursively, so if you smash a wall in an 8x8 block you'll end up with three 4x4 blocks, three 2x2 blocks, and three 1x1 blocks left over.

    The one downside is you'll probably need to make different models for the different wall sizes since just scaling everything up will look stretchy and will change Z heights as well. However, if you go by powers of two you shouldn't need very many models to get big savings on the number of units or destructables on your average map. If the users break 1/2 of the blocks on the map in a checkerboard pattern you'll still end up with a huge dummy count (pathing-wise there's absolutely no way to avoid this), but under realistic gameplay this should exponentially cut down on how many dummy units or destructables are necessary.
     
  6. DEFACKTwalker

    DEFACKTwalker

    Joined:
    Aug 2, 2008
    Messages:
    130
    Resources:
    5
    Skins:
    2
    Maps:
    2
    Template:
    1
    Resources:
    5
    Hi there,

    i've got a problem regarding the center of a region (jass). I want to move a unit directly to the center of an entered region...but the unit keeps moving to a point offset by 64 in both x and y direction.
    I am using a hashtable to save the center of the entered region and to load it, when a unit is entering a region.

    Here're the triggers i am using:

    Code (Text):
    func convert rect to region
        Ereignisse
        Bedingungen
        Aktionen
            Custom script:   local region rectRegion = CreateRegion()
            Custom script:   call RegionAddRect(rectRegion, udg_Temp_Region_2)
            -------- 0 - save center of region --------
            Custom script:   call SaveLocationHandle(udg_hash, GetHandleId(rectRegion), 0, GetRectCenter(udg_Temp_Region_2))
            -------- 1- save number of region --------
            Custom script:   call SaveInteger(udg_hash, GetHandleId(rectRegion), 1, udg_Region_Int)
            -------- add to "register enter region" the event unit enters region --------
            Custom script:   call TriggerRegisterEnterRegion(gg_trg_register_enter_region, rectRegion, null)
            -------- - --------
            Custom script:   set rectRegion = null
     
    Code (Text):
    register enter region
        Ereignisse
        Bedingungen
            Or - Any (Conditions) are true
                Bedingungen
                    (Unit-type of (Entering unit)) Gleich Treasury
        Aktionen
            Custom script:   set udg_Temp_RegionNumber = LoadInteger(udg_hash, GetHandleId(GetTriggeringRegion()), 1)
            Custom script:   set udg_Temp_Point = LoadLocationHandle(udg_hash, GetHandleId(GetTriggeringRegion()), 0)
            Set Temp_Player = (Owner of (Entering unit))
            Set Temp_PlayerNumber = (Player number of Temp_Player)
            Einheit - Move (Entering unit) instantly to Temp_Point
            Custom script:   call RemoveLocation (udg_Temp_Point)