Gold Harvesting Idea

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

User avatar
MasterCrusaderX
Newcomer
Posts: 24
Joined: June 7th, 2007, 11:02 pm
Title: Amateur Mapmaker
Location: Washington, USA

Gold Harvesting Idea

Post by MasterCrusaderX »

Normally most map makers go for the standard Gold Mine and Peasant/Peon routine; however, I thought I'd try something that may or may not have already been done. What I want to do is find out how to make it where a unit (Peasant) that is attacking destructible (Gold Ore) will receive maybe like 5 gold at a 40% chance.

I wondering if this is possible through the means of destructibles or am I forced to make it a unit?

Edit: Sorry for any confusion.
Last edited by MasterCrusaderX on April 8th, 2008, 8:20 am, edited 2 times in total.
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Gold Mining Idea

Post by Ozzapoo »

MasterCrusaderX wrote:Normally most map makers go for the standard Gold Mine and Peasant/Peon routine; however, I thought I'd try something that may or may not have already been done. What I want to do is find out how to make it where a unit (Peasant) that is attacking destructible (Gold Ore) will receive maybe like 5 gold at a 40% chance.

I wondering if this is possible through the means of destructibles or am I forced to make it a unit?
By 'attacking' i assume you mean mining? Well I'm not sure whether you can do it using destructibles... but a simple trigger should do the trick ;) However, I can't seem to find a suitable Event for when gold is mined... But to do the gold thing this should get you started.

Code: Select all

Set SomeNumberVar = (Random integer number between 1 and 4)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        SomeNumberVar Equal to 1
    Then - Actions
        Player - Add 5 to (Owner of (Triggering unit)) Current gold
    Else - Actions
        Do nothing
Welcome to WC3Edit ;)
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: Gold Mining Idea

Post by weirdone2 »

This is done in islanddef I do believe. And you could do it with destructibles but you'd have to use locations with it and well I don't see why you don't want to use a unit. :P
User avatar
MasterCrusaderX
Newcomer
Posts: 24
Joined: June 7th, 2007, 11:02 pm
Title: Amateur Mapmaker
Location: Washington, USA

Re: Gold Mining Idea

Post by MasterCrusaderX »

weirdone2 wrote:This is done in islanddef I do believe. And you could do it with destructibles but you'd have to use locations with it and well I don't see why you don't want to use a unit. :P
Well I wanted to use a destructible because I didn't want it to be a player, but I guess it'd be much easier that way in the case of making it a unit. I was just wondering. Thanks for the info both of you.
User avatar
MasterCrusaderX
Newcomer
Posts: 24
Joined: June 7th, 2007, 11:02 pm
Title: Amateur Mapmaker
Location: Washington, USA

Re: Gold Mining Idea

Post by MasterCrusaderX »

Ozzapoo wrote:
MasterCrusaderX wrote:Normally most map makers go for the standard Gold Mine and Peasant/Peon routine; however, I thought I'd try something that may or may not have already been done. What I want to do is find out how to make it where a unit (Peasant) that is attacking destructible (Gold Ore) will receive maybe like 5 gold at a 40% chance.

I wondering if this is possible through the means of destructibles or am I forced to make it a unit?
By 'attacking' i assume you mean mining? Well I'm not sure whether you can do it using destructibles... but a simple trigger should do the trick ;) However, I can't seem to find a suitable Event for when gold is mined... But to do the gold thing this should get you started.

Code: Select all

Set SomeNumberVar = (Random integer number between 1 and 4)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        SomeNumberVar Equal to 1
    Then - Actions
        Player - Add 5 to (Owner of (Triggering unit)) Current gold
    Else - Actions
        Do nothing
Welcome to WC3Edit ;)
You can't really just do a ...

Code: Select all

(Random integer number between 1 and 4)
on it's own. WE conditions only have comparisons so I'm stuck with ...

Code: Select all

(Random integer number between 1 and 4) Equal to 1
There is also the fact that I want the unit that is attacking to be a specific type that being the Peasant and only the Peasant. One more thing, since the Peasant is basically attacking this structure I don't want other units or structures attacking it.
User avatar
tru_power22
Old Wrinkly Member
Posts: 271
Joined: January 12th, 2008, 4:42 am
Title: Re-R-Re-Re-Remix
Location: Canada EH?

Re: Gold Mining Idea

Post by tru_power22 »

You could make the unit neutral hostile.....

Plus, to get a 40% chance it would be, um, really hard... 50% or 25% would work better.
Contact me on WC3 Killing_Spree22, I'm at US west!

To avoid being a noob read this: http://forum.wc3edit.net/everything-els ... t4579.html
This is the official site for team UKS, it's also my home page - http://www.TeamUks.tk

I AM DEAD, I WILL NO LONGER BE POSING HERE. BEEN FUN WITH YOU ALL.
Bushido

Re: Gold Mining Idea

Post by Bushido »

Please don't double post! Use the Edit Button or wait until some1 wrotes back ..Thanks !
User avatar
MasterCrusaderX
Newcomer
Posts: 24
Joined: June 7th, 2007, 11:02 pm
Title: Amateur Mapmaker
Location: Washington, USA

Re: Gold Mining Idea

Post by MasterCrusaderX »

King-Bushido wrote:Please don't double post! Use the Edit Button or wait until some1 wrotes back ..Thanks !
Sorry.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Gold Mining Idea

Post by Aero »

Is this manual or automatic harvesting?

I'm willing to design a system and try some things if out if you give me more information.

Try to answer the following:
Automatic or completely manual?
Does the gold go directly to the player or does the peasant 'receive it'? If the peasant does receive it, where does the peasant drop it off? Is there multiple drop off zones?
Ability or do you attack the gold mine?
Is the gold mine infinite? If not, how much gold does it provide? Does it 'respawn'? If it does respawn, how would it work?
What probability should it be for the peasant to receive the gold (As well as the amount). Just need some rough figures.

Any other info would be appreciated.
User avatar
MasterCrusaderX
Newcomer
Posts: 24
Joined: June 7th, 2007, 11:02 pm
Title: Amateur Mapmaker
Location: Washington, USA

Re: Gold Mining Idea

Post by MasterCrusaderX »

Well it's supposed to be automatic, here is how it should work exactly:

There is a object named Gold Ore. This object has X amount of HP and when the Peasant attacks the Gold Ore it should have a X% chance of giving owning player X gold.

OR

... Peasant attacks the Gold Ore and has a X% chance to receive Gold Nugget.

Though I may have figured it out.

Code: Select all

Gold Harvest
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacked unit)) Equal to Gold Ore
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Attacking unit)) Equal to Architect
                (Random integer number between 1 and 4) Equal to 1
            Then - Actions
                Player - Add 5 to (Owner of (Attacking unit)) Current gold
            Else - Actions
                Do nothing
I am willing to take any other ideas on making mining a little more interesting versus the standard right-click on Gold Mine.