• 🏆 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!

[Miscellanous / Other] Alchemy Tower

Status
Not open for further replies.
Level 6
Joined
Mar 17, 2017
Messages
103
I remember playing the ascension campaign, and they had something called the "vorpal tower" it's basically a tower that when captured will give you a slow but steady income
 
Level 9
Joined
Mar 17, 2017
Messages
464
Here is a list of similar gold - related things I've created/used when working on my campaign:

1- That research structure gold thing mentioned above ([Miscellanous / Other] - Alchemy Tower)

2- Supply post which gives you gold every minute when captured

3- Lumber traded in for gold with a huge forest to cut down

4- Ability that gives 1,000 gold to the player every 5 minutes (300 second cooldown) I believe the ability was called "extra funding" and basically became available after a sidequest where you help some locals out was done

5- Modified a unit to give a huge bounty when destroyed, the unit was one of those magnautar destroyers

6- Some structure like castles would give the player gold when destroyed, but only on easy and normal and not on hard

7- Hero with transmute

8- Destroying a goblin base gave you a huge gold bonus

9- You could capture a structure which gave you an ability that gave a certain amount of gold every 3 minutes

10- Bounty, I've had a mission you had an ability that when used would give you gold depending on how many units of a particular enemy you've destroyed, you gotta set up a trigger for this

11- a sidequest which when completed creates a goldmine in a good location for the player to use

12- In a particular mission I've had a Priest-type unit drop a ruin of rebirth when killed, this ruin allows whoever takes the ruin to ressurect the unit as his own, if you would take this priest unit and place him in a circle of power he would channel and generate gold

13- modified an orc burrow to give me gold depending on how many peons it holds, this concepts works very well actually

14- Had units that could channel for 1 minute and this would give gold to the player

15- Just letting the player start off with 25,000 gold, but he had no gold mine, and had to capture one in order to proceed with the mission
 
Level 9
Joined
Mar 17, 2017
Messages
464
I had designed this a while ago. . . but if I can recall corrected there were 2 triggers

The first trigger counted the number of units killed, so it would be triggered if a unit was killed, then as a condition it would check if the unit belonged to a particular player, and if this was true it would add 1 to an integer variable

The second trigger was activated only when the player used the ability, and would multiple 100 gold by the integer variable, give this gold to the player, and reset the integer variable back to 0, I believe that was it
 
Level 9
Joined
Mar 17, 2017
Messages
464
Well not exactly because each unit of this player was a battleship which was extremely hard to kill, and there were only like 18 ships total
 
Level 11
Joined
Mar 9, 2017
Messages
506
@Lord Aiden
for your purposes I would suggest the following; have a structure you can capture (like the obolisks by arthas) and set up a trigger to give a small re-occuring bonus, also get your castle to have an ability that gives you like 600 gold every 5 minutes or so, to make sure the player can get an extra boost whenever one is really needed
 
Level 28
Joined
Apr 6, 2010
Messages
3,105
Ransom: An ability that captures an enemy (Sleep with Ensnare effect), including heroes. Player A captures a unit belonging to player B.
* If no friendly and unensnared ground unit frees the victim in time (by attacking or by getting close to the captured unit), it is teleported to A's main building and becomes a prisoner (a much longer version of the previous Ransom debuff, can be rescued by a friendly unit attacking or getting close).
* B gets an option to pay a multiple of the unit cost(s) to A, in which case their unit(s) get teleported back to B's main building. A gets an option to execute the captured units (gives no experience or gold).
 
Level 12
Joined
Jun 20, 2017
Messages
959
It's not the amounts of work that count but rather the concept, lots of these creative ideas could be simplified or modified to something more useful
 
Level 9
Joined
Mar 17, 2017
Messages
464
@Lord Aiden I've looked at the stuff that you send me and the best option is basically having several structures across the map, capturing each structure leads to a small re-occuring gold bonus, having all structures under the player's control leads to a good steady income

Basically make several of these crystals or whatever, set up a trigger that would allow a hero or another unit to capture the structure by coming close to it, or something similar, and then set up a trigger that is activated every 20 or 30 seconds which checks if such a structure is present on the map and is owned by the player and is alive, then checks how many structures the player controls and gives him 50 gold for each structure
 
Level 12
Joined
Jun 20, 2017
Messages
959
@-Phoenix- @noob

Is this how you do it?

  • G Bonus
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Player - Set Player 1 (Red) Current gold to ((Player 1 (Red) Current gold) + (100 x (Number of living Alchemy Crystal units owned by Player 1 (Red))))
 
Level 14
Joined
Sep 28, 2011
Messages
968
Personally for avoiding a group leak I would use BJ_wantdestroygroup(or whatever it was named)
Or I would set a group variable to the fitting group and then count the units within that variable then remove the group within the variable.
 
Level 14
Joined
Sep 28, 2011
Messages
968
When you create a group and never destroy it(example: you create a group which is not in a variable then you can not destroy it or you made it in a variable but did forget to destroy it) then it makes a group leak.
You could read a tutorial about memory leaks.
Here is one tutorial about the subject:
Memory Leaks
groups are not the only source of memory leaks: watch out for locations leaks too since they are a quite huge source of leaks.(many function create locations)
 
Level 12
Joined
Jun 20, 2017
Messages
959
so putting

Custom script: set bj_wantDestroyGroup = true

will destroy the next
unit group only if its
just used to count units for somethng
 
Level 14
Joined
Sep 28, 2011
Messages
968
so putting

Custom script: set bj_wantDestroyGroup = true

will destroy the next
unit group only if its
just used to count units for somethng

you can read in the tutorial that segment of text:

"For groups you can even use an other method.
If you set "bj_wantDestroyGroup" boolean = true via custom script, it will automatically destroy the next unit group creation, that is done via GUI.

  • page.gif
    Custom script: set bj_wantDestroyGroup = true
  • unitgroup.gif
    Unit Group - Pick every unit in (Playable Map Area) and do (Unit - Hide (Picked unit))
"
 
Level 14
Joined
Sep 28, 2011
Messages
968
Here is an example from the tutorial:
  • set.gif
    Set Group = Pick every unit in (Playable Map Area)
  • if.gif
    ... Usage of Group ...
  • page.gif
    Custom script: call DestroyGroup(udg_Group)
basically group variables points toward groups and you can destroy the group at which the variable is pointing in order to not have a memory leak.
 
Level 11
Joined
Mar 9, 2017
Messages
506
im by far no expert at this but I believe that if its used in a variable then use the

Custom script: call DestroyGroup(udg_Variablename)

if a trigger is used to pick units in a unit group then do actions then put

Custom script: set bj_wantDestroyGroup = true

before it


does this work if you have multiple actions in a loop though?
 
Level 14
Joined
Sep 28, 2011
Messages
968
Im talking about the
  • Unit Group - Remove all units from (Last created unit group)
does this prevent the leak also?
No because the group still exists(it have no units within it but it still exists)
basically it is as if you had a box and removed all the stuff within that box the box is still intact unlike when you set the box on fire.
 
Last edited:
Level 11
Joined
Mar 9, 2017
Messages
506
Ok will this work though ?

  • Untitled Trigger 1
    • Events
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Footman) and do (Actions)
        • Loop - Actions
          • Unit - Change color of (Picked unit) to Green
          • Unit - Order (Picked unit) to Move To (Center of (Playable map area))
          • Wait 2.00 seconds
          • Unit - Order (Picked unit) to Move To (Center of (Region1))
 
Level 14
Joined
Sep 28, 2011
Messages
968
Ok will this work though ?

  • Untitled Trigger 1
    • Events
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Footman) and do (Actions)
        • Loop - Actions
          • Unit - Change color of (Picked unit) to Green
          • Unit - Order (Picked unit) to Move To (Center of (Playable map area))
          • Wait 2.00 seconds
          • Unit - Order (Picked unit) to Move To (Center of (Region1))
Sorry I was replying to another person.
i think your trigger would not leak a group but you leak 2 locations per units: Center of (Region1) and Center of (Playable map area).
 
Level 11
Joined
Mar 9, 2017
Messages
506
OK, what if you have a trigger that constantly re-uses a variable like location for a spell or something of that nature, the variable does not get cleared but is frequently re-used
 
Level 14
Joined
Sep 28, 2011
Messages
968
If you do not reassign the variable(basically do not use set again) the variable will always point toward the same location (which will always be at the same spot) and so you would only have one location and not create extra locations that are not pointed at.
So
at game start
udg_zlorblu=center of playable map area

when x is cast
create a potato at udg_zlorblu

would not leak extra locations over time.(you would still have a location all the time)
 
Level 9
Joined
Mar 17, 2017
Messages
464
@Lord Aiden
Here , I believe these triggers will help you

I used a sky fury tower as an example

  • Capture
    • Events
      • Unit - A unit comes within 350.00 of Sky-Fury Tower 0183 <gen>
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Owner of (Entering unit)) Equal to Player 1 (Red)
          • ((Unit-type of (Entering unit)) is A Hero) Equal to True
    • Actions
      • Special Effect - Create a special effect attached to the overhead of Sky-Fury Tower 0183 <gen> using Abilities\Spells\Other\Charm\CharmTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.50 game-time seconds
      • Unit - Change ownership of Sky-Fury Tower 0183 <gen> to Player 1 (Red) and Change color
  • +
  • +
  • +
  • +
  • +
  • Gold
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Player - Set Player 1 (Red) Current gold to ((Player 1 (Red) Current gold) + (50 x (Number of units in (Units owned by Player 1 (Red) matching (((Unit-type of (Matching unit)) Equal to Sky-Fury Tower) and (((Matching unit) is alive) Equal to True))))))
 
Level 6
Joined
Mar 17, 2017
Messages
103
@-Phoenix- I've actually had a few, let's say you don't want a 500k goldmine, and you don't want the player to migrate to new mines during the battle, what are some ways to ensure the player has a decent income when the mine runs low
 
Level 9
Joined
Mar 17, 2017
Messages
464
The method mentioned above, having an ability that gives a gold when you click on it that gives gold depending on the total enemies slain, lets say it gives 2 gold per unit, well at the end of the game this ability could give as much as 1000 gold per activation if you slain 500 enemies, another idea is a salary system where the more enemies you destroy the higher the salary goes.

I would suggest either capturing buildings throughout the game that generate income or having a structure that generates gold over time but can be upgraded when the player acquires certain items
 
Level 6
Joined
Mar 17, 2017
Messages
103
To clarify, you mean an ability that when clicked gives you gold depending on your total enemy kill counter?
 
Level 9
Joined
Mar 17, 2017
Messages
464
To clarify, you mean an ability that when clicked gives you gold depending on your total enemy kill counter?

Yes, it would generate very low amounts of gold at the start of the game and the value of gold it will generate will increase the longer the battle goes on(more kills =more gold),

You can create it with a dummy ability and a trigger; every time you use the ability it activates the trigger and it gives you

(enemy units killed)*(x gold)

where I would suggest you use either 1 or 2 as X or it'll see abuse, also set the cooldown to 60 or more

Another way is to have a salary system with a similar set up, basically give the player (enemies killed)*(x gold) every Y seconds
you could set up a leaderboard with the values of how much the player gets and the amount of time until next bonus

Both ensure an increase in this type of income as the game progresses, both can also be capped; you can make a trigger that sets the ceiling values at 500 enemies killed or so if you want

You can also make a trigger that gives you more gold the more the game lasts, similar to the 2nd method described above except set to give gold according to the elapsed game time, I however never tried this out


I personally used the lumber economy method, there are also other things but I just don't have the time to write about them
 
Last edited:
Level 9
Joined
Mar 17, 2017
Messages
464
It was easy to set up and hard to abuse because a) workers cost 1 food each and b) there was a finite number of trees (although there was a very large number of them)

you can either have a hero trade in lumber at a trading post, or set up a trigger that just requires the player to have x lumber and trade it for gold using a dummy ability (without the nuisance of having the hero present every time)

Also another reason was it was a forest map, if it was barrens or ice-themed I would've used something else;it just happen to fit the theme
 
Level 9
Joined
Mar 17, 2017
Messages
464
Naw, would've just put a huge amount of gold in the gold mine, I don't see anything wrong with huge gold mines, why do you?
 
Level 6
Joined
Mar 17, 2017
Messages
103
It allows a person to turtle, but I don't like having the player need to capture other mines either, it basically forces the player to try to wipe the enemy pi yet asap and when this goes wrong he has to restart
 
Level 12
Joined
Jun 20, 2017
Messages
959
It allows a person to turtle, but I don't like having the player need to capture other mines either, it basically forces the player to try to wipe the enemy pi yet asap and when this goes wrong he has to restart

I assume you were trying to say enemy player. You're right this does happen, that's why I wanted capturable structures that generate gold
 
Level 12
Joined
Jun 20, 2017
Messages
959
You can make them invulnerable so it doesn't happen, but yea if they do get destroyed then you have to restart the mission
 
Level 9
Joined
Mar 17, 2017
Messages
464
In a map with no gold mines I gave the player a structure (model: pocket factory) keeping which alive gave the player a steady income.

In another map where the gold ran out the player would receive 2 of those elf wagons as reinforcements, (the wagons you have to defend in that mission with prince kael), and these gave the player gold every 30 seconds or so (this was the idea of one of the people I worked with on the project), the wagon could be trained if destroyed but it had a built limit of 2

An idea that I've had but that was never realized was having a boat unit and calling it "treasure hunter" or something like that, the idea was if this boat was in a certain deep sea area it would generate gold over time, with the limitation being that each boat cost 5 food and this would prevent abuse
 
Status
Not open for further replies.
Top