Back to the Korax Forum Archives


Forum

Shopping system

Mon, 25 Jan 2010 13:14:15

RambOrc

FB and CW, did you decide on a certain system yet? Can't really build final shop interiors until I know what kind of shopping system we'll use.
Mon, 25 Jan 2010 16:54:31

Crimson Wizard

I like the idea of graphical interface most of all. Pushing buttons in the walls to buy an object is for the games that do not allow custom interactions (read: coded by lazy programmers). While shop interface is not ready, we may use dialog as a temporary substitution. Example of conversation script which takes money from player (from my Strife mod):
	choice TheGhostCreek "Take me to the Ghost Creek." hidden
	if (EnableGhostCreek and (Level.MapNumber() not 30))
	{
		say "That would be 50 gold. Are you ready to go?";
		yesno continue terminate;
		if (Player.HasInventory(Coin, 50))
		{
			Player.RemoveInventory(Coin, 50);
			Player.TeleportToMap(30);
			terminate;
		}
		else
			jump SayNoGold;
	}
How it may look like in our game:
	choice none "Buy axe for 50 Coin"
	{
		if (Player.HasInventory(Coin, 50))
		{
			Player.RemoveInventory(Coin, 50);
			Player.GiveInventory(WeaponFighterTimonsAxe);
		}
		else
			jump SayNotEnoughCoin;
	}


	choice none "Buy hammer for 100 Coin"
	{
		if (Player.HasInventory(Coin, 100))
		{
			Player.GiveInventory(WeaponFighterHammerOfRetribution);
			Player.RemoveInventory(Coin, 100);
		}
		else
			jump SayNotEnoughCoin;
	}

	speech SayNotEnoughCoin
	{
		say "You don't seem to have enough coin, sorry.";
	}
Mon, 25 Jan 2010 16:58:56

Firebrand

Yes, I'm OK with this system, it's simple enough to be coded, but I would go for a generalized implementation, where each item might have a cost in it's properties and everything would be pulled from there, instead of having to make multiple implementations for it <!-- s:) --><img src="{SMILIES_PATH}/orc2.gif" alt=":)" title="Smile" /><!-- s:) -->.
Mon, 25 Jan 2010 17:01:33

Crimson Wizard

[quote="Firebrand":2cj9n68w]Yes, I'm OK with this system, it's simple enough to be coded, but I would go for a generalized implementation, where each item might have a cost in it's properties and everything would be pulled from there, instead of having to make multiple implementations for it <!-- s:) --><img src="{SMILIES_PATH}/orc2.gif" alt=":)" title="Smile" /><!-- s:) -->. That's why I am talking about shopping menu. It will be much easier to insert unlimited amount of item types if there is this particular shopping behavior programmed. In dialogs you'll have to add new option for every new item you wish to insert in game.
Mon, 25 Jan 2010 17:03:35

Firebrand

Oh, I read your post again and I see that it's not yet implemented and that you are suggesting this as a temporary solution, heh! <!-- s:) --><img src="{SMILIES_PATH}/orc2.gif" alt=":)" title="Smile" /><!-- s:) -->
Mon, 25 Jan 2010 17:05:56

Crimson Wizard

I would suggest something like a classic powerups-shops interface from old arcade games. Few rows of slots with item icons in them, and a message board below, which tells item specs and cost. Maybe there could be also tabs/buttons above to switch between item types.
Mon, 25 Jan 2010 18:40:25

RambOrc

From a mapping point of view, it looks clear that you will not use the KMOD 2 style shop so I won't need to physically place all items in a shop. One thing to keep in mind, the interface should be simple and easily useable without a mouse. More complex interfaces should be kept for TSP, SE is more about uncomplicated fast action.

Back to the Korax Forum Archives