Hammerwatch Forum

Custom mapping and Mods => Editor Discussion => Topic started by: Heretic on November 14, 2013, 11:40:31 PM

Title: Collectibles - How do they work?
Post by: Heretic on November 14, 2013, 11:40:31 PM
I can't see anything in the .xml files that show how the collectible items work. The coins give a discount on stores - how is that configured in the XML or in the editor? The levels released don't show any scripting for the coins. The planks have a global counter - which makes sense and is easy to figure out - but the coins themselves give a discount without any apparent method :/ 

The main difference I see is that the plank behaves as 'collectible' while the coins behave as 'money' with a value of 0.

Does having the Value of 0 have some hard-coded properties?
Title: Re: Collectibles - How do they work?
Post by: NekoBaron on November 15, 2013, 08:05:09 PM
The coins just handle the discount for shops automatically and its the amount you collect that determine the amount they reduce it buy, you cant make a coin that reduces by 20% itself.

I just hide em around my campaign every so often and hope for the best for now.
Title: Re: Collectibles - How do they work?
Post by: Heretic on November 15, 2013, 08:20:31 PM
Thanks Neko - I know WHAT they do, I wanted to know HOW they do it. So that I can make collectible items of my own, etc.
Title: Re: Collectibles - How do they work?
Post by: NekoBaron on November 16, 2013, 12:36:27 AM
You kind of answered you own question since you seem to know how the planks worked.

You can give a global any name and check it whenever you want it to.
Title: Re: Collectibles - How do they work?
Post by: Heretic on November 16, 2013, 03:16:10 AM
So the coins are hard coded then?

Is there any known purpose for the orbs/crystals?
Title: Re: Collectibles - How do they work?
Post by: NekoBaron on November 16, 2013, 12:39:17 PM
I think the orbs are like planks, for use however you want. I'm using the orbs as the main item to collect for my campaign.
Title: Re: Collectibles - How do they work?
Post by: Hipshot on November 18, 2013, 08:28:38 AM
The coins are hard coded yes, they just use the same name form as the planks.
Title: Re: Collectibles - How do they work?
Post by: Keppler on January 10, 2014, 09:27:44 AM
Haha!