Project X Forums
http://px.worms2d.info/forum/

True Shopping System [Updated v3]
http://px.worms2d.info/forum/viewtopic.php?f=13&t=390
Page 1 of 1

Author:  Virtu [ Mon Dec 05, 2011 1:57 am ]
Post subject:  True Shopping System [Updated v3]

Since 'Shoppa' games are mostly based on your luck with crates, I've decided to create an actual shopping system for PX! It certainly wasn't easy for me, since I'm not the most skilled at EAX :P

Here's how it works: Two new weapons work as currency, the Gold Coins and the Diamonds. You can't use them like a normal weapon though - they just display instructions on how to buy stuff and won't end your turn or be consumed when you attempt to use them. Another new weapon is the Treasure Chest: it can spice up games by giving random coin and diamond rewards to players that grab them! It even has an incredibly low chance to give out 1337 coins! :P

With my Extra MapEditor Objects lib, you are be able to set up small shops in your maps, each linked to a Zone. Each shop object (PurchaseItem) sells up to 20 weapons for a price, either in Coins or Diamonds, or even both. You can customize the amount in each bundle as well. Having a shop to exchange coins for diamonds would be a nice idea!

To set up a shop, first place a PurchaseItem object in your map. Place a zone nearby, and link both with the PurchaseZone field within the PurchaseItem object. For each item that's going to be sold in your shop, you have to create an ItemStock object. Once you finish configuring it, you can link your shop to your stock object. Don't forget to fill the Limit parameter in PurchaseItem according to the amount of items that are sold in that shop. Assign a unique ID to each of your shops, too! Otherwise your items won't display correctly.

Then, when you get your worm into the shop's zone, just press B to buy the weapon. That is, if your team has enough money! Press N to browse through the items in a shop.

Another new object, CoinBonus, enables coin rewards after each turn, based on total damage dealt. Three different bonuses can be configured.

If you stumble upon any glitch, please let me know!

(If you have StepS' PX Weapons Lib, make sure to add the Trollface Launcher weapon to your scheme as Treasure Chests can spit those out! If you don't or if you dislike Trollface Launcher, use the 'nosteps' version of the lib which is also included. The chests will give out Sheep instead)

Some screens:

Image

Image

Example map:

Also attached is an example PX scheme and an example map, edited with PX's Map Editor from raffie's amazing "Xian Shopping" map, taken from wmdb.org. They need a few libraries to work as intended:
->This, of course
->Extra MapEditor Objects v3
->Double Jump
->StepS' PX Weapons v4.0 & Wings
->Sprite Fixes & Mystery Box

Fortunately, they're all included. :)

EXAMPLE MAP COMING SOON

Changelog:
v3:
*Treasure Chest added
*Added workaround for broken weapon icons
*Support for Extra MapEditor Objects v3
*Example map

v2:
*First public release
*Includes Gold Coin and Diamond

v1:
*Private release

Attachments:
File comment: True Shopping System v3
trueshopping.zip [85.65 KiB]
Downloaded 782 times

Author:  StepS [ Tue Dec 06, 2011 11:07 am ]
Post subject:  Re: True Shopping System

Awesome! So nice :P
Do you have an example map? ;)

Author:  Twicken [ Fri Dec 09, 2011 11:02 pm ]
Post subject:  Re: True Shopping System

this is awesome

Author:  Twicken [ Fri Dec 09, 2011 11:05 pm ]
Post subject:  Re: True Shopping System

would be cool with like a street map with little shops.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/