HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

The Marketplace, seriously.

03-23-2007, 07:11 AM#1
Moss
OK, this has been asked before but it didn't seem to be really answered anywhere. In fact some posts just gave a terse wrong answer. How do the Marketplaces work? I went on an adventuresome journey through the blizzard.j file and I came to the conclusion that it simply waits 2 minutes and then begins stocking random permanent, charged, or artifact items which it selects from any of the items that are set to sellable in the object editor. But when I place a Marketplace in my map it does nothing. I have heard it said that it only uses items that are set to be dropped by creeps on the map, but creeps do drop items on my map, still no worky. I even made sure that InitNeutralBuildings is run at map initialization because that trigger seems to start the Marketplace up.

Any ideas?
03-23-2007, 10:22 PM#2
Dark.Revenant
If all else fails, trigger it yourself. 2 random level 1-8 items of any class every 30 seconds or so should do the trick.
03-23-2007, 10:36 PM#3
Moss
Has all else failed?
03-23-2007, 10:55 PM#4
Taur
Certainly it's much easier than what you're doing now.
03-24-2007, 04:42 AM#5
Moss
Huh? What I am trying to do now is just use a Marketplace like normal. It works on melee maps somehow, so why doesn't work on my map?
03-24-2007, 01:15 PM#6
Melshisedek1
I had the exact same problem on the current map I am working on. I was going nuts seeing it do nothing. I had to resolve to trigger. Before you do so, I be certain to check in item editor that the item is avaible has random. Also I have noticed I was'nt getting all level of objects, so I put them all to level 1 and made these three triggers. Oh, I made a computer like market so here:

SetComputerSells
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units of type Computer connected to the internet) and do (Actions)
Loop - Actions
Neutral Building - Add (Random level 1 Any Class item-type) to (Picked unit) with 1 in stock and a max stock of 1


THEN

TurnOffSells
Events
Time - Elapsed game time is 23.00 seconds
Conditions
Actions
Trigger - Turn off SetComputerSells <gen>
Trigger - Turn off TurnOffSells <gen>


FINALLY

OnlineSurfing
Events
Unit - A unit Sells an item (from shop)
Conditions
(Unit-type of (Selling unit)) Equal to Computer connected to the internet
Actions
Wait 2.00 seconds
Neutral Building - Add (Random level 1 Any Class item-type) to (Selling unit) with 1 in stock and a max stock of 1


Be certain that the market place has enough slot avaible, you can add this action:

Unit Group - Pick every unit in (Units of type Computer connected to the internet) and do (Actions)
Loop - Actions
Neutral Building - Limit (Picked unit) to 11 item slots


It should solve your problem.
03-24-2007, 06:58 PM#7
Moss
Ya, I guess that is not too much work.
07-23-2007, 03:03 AM#8
Moss
I know this is super old, but for the record I got to the root of how Marketplaces work, in case anybody cares. The following requirements have to be met:
  • There are preplaced units on the map that drop items. Marketplaces start out with low level items and build up so I think it may need to be a level 1 item that is dropped or else you won't see anything until it would be time for the level X items to be appearing in the Marketplace, maybe not.
  • Said unit is killed and drops item.
  • There must be items in the object editor that have "Include as Random choice" set to true. There is a bunch by default. This may or may not need to apply to the item that was dropped.
  • Of course nothing will appear in Marketplaces for two minutes from the beginning of the game.

Now, after figuring all that out I guess it is easier to just trigger it by hand rather than going through all the items in the game and preventing them from being included as random choices, especially if you want to have creeps in you map that drop random stuff and want to control separately what appears in the Marketplace.
07-23-2007, 04:52 AM#9
Panto
Thanks for posting your findings. This is useful information, if just to help steer people away from trying to use it :)