• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Forsaken Defense Template v1.2

  • Like
Reactions: dragoon431
Forsaken Defense Template

Map Info
This is a map TEMPLATE that I created to help you lazy people get started. It has all the basic features of a hero defense. You can use this and tweak it as you wish. I made this to be used as a baseline for mappers, so don't expect a fully playable map. It's very helpful if you're starting from scratch and don't wanna do all the tedious work.
Features
--> Beautiful Landscape.
--> User-friendly Wave Support.
--> Hero Selection.
--> Simple Hero Revive.
--> Dynamic Multi board.
--> Easy to use recipe system [by Dark_Dragon]
--> Leakless Triggers.
--> An optimized random hero function.
Note: v1.2 Is probably the last update. Only bug fixes will follow if any should be reported.

1.1:
--> Added some birds.
--> Added a minimap preview.
--> Added a -random function.
--> Added a consumable shop.
--> Added more props/doodads.
--> Added a new enviroment island.
--> Improved terrain near the base area.
--> Improved the terrain on the island in general.
--> The Naga Queen now turns when attacking.
1.1b:
--> Fixed a problem with the food caps.
--> Altered landscape slightly.
v1.2
--> Added a secret shop.
--> Added some random props and enviroment doodads.
--> Added a simple example on how the recipe system works.
--> Added a brief introduction to each trigger and what it does.
--> Added the portal that leads to secret shop + move triggers.
--> Improved the landscape, so the trees aren't in the water.
--> Improved some sub-islands' terrain and form.
--> Improved overall documentation.
--> Improved terrain slightly.
--> Fixed several typos.
x42i4w.jpg
2eflv0j.jpg
2qvqezl.jpg
ng9f11.jpg
9t0h7m.jpg


Keywords:
Template, forsaken, f0rsak3n, hero, defense, fortress, stronghold, defend, help, choose, heroes, island, fire, naga, creeps, custom, element, guide, g
Contents

Forsaken Defense Template v1.2 (Map)

Reviews
12:36, 10th Jun 2011 -Kobas-: Status: Approved Systems could be useful.

Moderator

M

Moderator

12:36, 10th Jun 2011
-Kobas-:
Status: Approved
Systems could be useful.
 
Level 10
Joined
Mar 16, 2009
Messages
354
this will need to be made larger in order to be of any use to someone, extra space allows people to but their own ideas into the template; Forsaken Defense Template is very small, and although has some flashy multi board and such there is no room for the user of the template to develop anything more then maybe new heroes, items and levels.
 
Level 14
Joined
Nov 2, 2008
Messages
579
I really don't see your point. Extra space? If you mean in terms of terrain, it won't make sense if I leave a lot of open places would it? And a lot can be made with this, it's only the basics. More complex systems can be added, modes, secret shops perhaps AI. The terrain can easily be changed by dragging and selecting the doodads and deleting them, then just forming the landscape. And not everyone wants to make a 12 player map, since it costs a lot more effort in terms of balancing. I, personally, like to keep it small with 6 players or less. But if you want to make a huge map, then this is clearly not for you.
 
Level 30
Joined
Jul 31, 2010
Messages
5,246
Wtf!

^XPQJ & MrStormyZ

oh gosh! what's wrong with you two? aren't you listening to the maker of the map? its called a "TEMPLATE", it means you can tweak, reshape, re-order, remake, etc. you don't have to change its map size or make it large, its in you to make those decisions, but if your willing to make a different type of map and you don't like this idea, then make your own.
 
Level 9
Joined
Sep 18, 2010
Messages
585
^XPQJ & MrStormyZ

oh gosh! what's wrong with you two? aren't you listening to the maker of the map? its called a "TEMPLATE", it means you can tweak, reshape, re-order, remake, etc. you don't have to change its map size or make it large, its in you to make those decisions, but if your willing to make a different type of map and you don't like this idea, then make your own.

well was about to comment "so actual Terrainers are going to be mocked on having sense or not ?"
but I see this isn't a "Terrain Template" involves Triggers so yea XPQJ and I might had been wrong on the last comments.:grin:
 
Level 30
Joined
Jul 31, 2010
Messages
5,246
^MrStormyZ

good! and be proud by the maker for lending free triggers for his map, some people don't give a damn chance for passing there ideas of triggers and spreading it to everyone. and the best part of it. it has no leaks and bugs on it. which makes it clean and friendly for use.
 
Reviewed by Midnighters
Triggers/Scripts
The triggers look very well made, and they all look leakless to me, however, there are two that you should look into changing, and putting some comments into, so that the users using this template, will know what they do.

The triggers are as follows.
  • Load Items
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- --- --------
      • -------- Item Group 1 --------
      • Set CItemType[1] = Value
      • Set CItemType[2] = Value
      • Set CItemType[3] = Value
      • Set CItemType[4] = Value
      • Set CItemType[0] = Value
      • Custom script: call NewItemGroup()
      • -------- Item Group 2 --------
      • Set CItemType[1] = Value
      • Set CItemType[2] = Value
      • Set CItemType[3] = Value
      • Set CItemType[0] = Value
      • Custom script: call NewItemGroup()
      • -------- Item Group 3 --------
      • Set CItemType[1] = Value
      • Set CItemType[2] = Value
      • Set CItemType[3] = Value
      • Set CItemType[4] = Value
      • Set CItemType[0] = Value
      • Custom script: call NewItemGroup()
      • -------- ======= --------
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
JASS:
library DDItemCombineBasic initializer Init

    globals
        // *** Edit to your own will ***
		private constant string ITEM_COMBINE_EFFECT = "Abilities\\Spells\\Items\\AIlm\\AIlmTarget.mdl"
		private constant string ATTACH_POINT		= "origin"
        // *** End edit ***
	
        private sound ItemCombineSound = null
        private integer array CType[8191]
		private integer ItemN = 0
    endglobals

    function NewItemGroup takes nothing returns nothing
        local integer i = ItemN*6 + 7
        local integer h = 1
        set ItemN = ItemN + 1

        loop
        exitwhen (h == 7)
            set udg_CItemType[i] = udg_CItemType[h]
            set udg_CItemType[h] = 0
            set h = h + 1
            set i = i + 1
        endloop
        set CType[ItemN-1] = udg_CItemType[0]
        set udg_CItemType[0] = 0
    endfunction

    private function UnitRemoveItemById takes unit whichUnit, integer itemId returns nothing
        local integer i = 0
        local item it
        
        loop
        exitwhen (i >= bj_MAX_INVENTORY)
            set it = UnitItemInSlot(whichUnit, i)
            if GetItemTypeId(it) == itemId then
                call RemoveItem(it)
                exitwhen (true)
            endif
            set i = i + 1
        endloop
        set it = null
    endfunction

    private function Actions takes nothing returns nothing
        local integer n = 0
        local integer array it
        local integer i = 7
        local integer h = 0
        local integer x = 0
        local unit u = GetTriggerUnit()
        local boolean b = true
        local integer y = 0
        local integer z = 0
        local integer array hero_item_type

        // Get hero items
        loop
        exitwhen (x >= bj_MAX_INVENTORY)
            set hero_item_type[x] = GetItemTypeId(UnitItemInSlot(u, x))
            set x = x + 1
        endloop

        loop
        exitwhen (n >= ItemN)
            set h = i + 6
            
            set x = 0
            set it[x] = hero_item_type[x]
            set x = x + 1
            set it[x] = hero_item_type[x]
            set x = x + 1
            set it[x] = hero_item_type[x]
            set x = x + 1
            set it[x] = hero_item_type[x]
            set x = x + 1
            set it[x] = hero_item_type[x]
            set x = x + 1
            set it[x] = hero_item_type[x]
            set x = x + 1
            
            set y = 0 // N of items that hero has ()
            set z = 0 // N of items needed ()
            loop
            exitwhen (i >= h or udg_CItemType[i] == 0)
                set z = z + 1
                // Does unit contain item n
                set x = 0
                loop
                exitwhen (x >= bj_MAX_INVENTORY)
                    if (it[x] == udg_CItemType[i]) then
                        // Kick out the item
                        set it[x] = 0
                        set y = y + 1
                        // And increase by 1
                        exitwhen (true)
                    endif
                    set x = x + 1
                endloop
                
                set i = i + 1
            endloop
            set i = h
            
            if (y == z) then
                set h = i
                set i = i-6
                loop
                exitwhen (i > h or udg_CItemType[i] == 0)
                    call UnitRemoveItemById(u, udg_CItemType[i])
                    set i = i + 1
                endloop
                call UnitAddItemById(u, CType[n])
                call SetSoundPosition(ItemCombineSound, GetUnitX(u), GetUnitY(u), 0.)
                call StartSound(ItemCombineSound)
                call DestroyEffect(AddSpecialEffectTarget(ITEM_COMBINE_EFFECT, u, ATTACH_POINT))
                set u = null
                return
            endif
            
            set n = n + 1
        endloop
    endfunction

    //===========================================================================
    private function Init takes nothing returns nothing
        local trigger t = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_PICKUP_ITEM )
        call TriggerAddAction( t, function Actions )

        call Preload(ITEM_COMBINE_EFFECT)

        set ItemCombineSound = CreateSound( "Abilities\\Spells\\Orc\\MirrorImage\\MirrorImage.wav", false, true, true, 10, 10, "" )
        call SetSoundParamsFromLabel( ItemCombineSound, "MirrorImage" )
        call SetSoundDuration( ItemCombineSound, 1756 )
        call SetSoundPitch(ItemCombineSound, 1.2)
        call SetSoundVolume(ItemCombineSound, 100)
    endfunction

endlibrary
Perhaps putting some information on what these do, and what to change, will help.
Object Editor Work
As far as I see, no spells were changed, so there is really nothing to review, since this is a template. The heroes that were changed, were simply changed to have colored names.
Terrain
The terrain is very well made, although I don't see how this would work as a hero defense template,. Other than those mentioned above, I really see no pathing issues, or anything that would lower performance.
Gameplay
I cannot really comment on gameplay, since it is in fact a template, but it has the general feel of a Defense, so that is a plus.
Final Judgment
Overall, I give the map a rating of 3.5, Vote for Approval
 
the only good thing that could happen if this was larger is that users that needs a larger map can use it as it is (terrain-wise), but that is up to the maker of this template himself, since this is his template, its up to him to decide how large his template would be... and the size of this is pretty fine already...

anyway, the template looks cool and is useful. ^_^
 
Top