(done) Different character inventories?

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

(done) Different character inventories?

Post by zoom »

I wondered about what it would be like to add next to the standard (male/androgyneous) character inventory a female counterpart.
:shock: :?
So "female" characters use the new , "male" champions the old one.
IT does not really matter, just an idea.

Maybe it would even be cool to have the possibility for a different
inventory for each champion.
this could lead to a unique hissssa, wuuf, dwarf inv. screen and so forth. (Dwarves could be a bit smaller thus the slots would be arranged more closely to each other etc. Slogar, the spidercreature from csb, would pose some difficulties though; like , 4 hands, no feet.!!?)
I imagine the empty body slots "pictures" to be unique to each champion .scaly reptile hide for lizards and fuzzy hands for bikas..You get the idea


Doable? Sensible? Willingness/more urgent matters? thoughts??
User avatar
Gambit37
Should eat more pies
Posts: 13773
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I think it's a lot of effort for very little gain. I think having a general inventory arrangement works fine.
Tom Hatfield
Ee Master
Posts: 688
Joined: Mon May 07, 2001 7:00 pm
Location: Indiana, USA
Contact:

Post by Tom Hatfield »

But all the coolest little features are "lot of effort, little gain." It's like a signature.

As for different inventories, characters in Lands of Lore sometimes had different inventory layouts. The four-armed guy, for example (can't remember names), could hold two weapons and two shields, but he was limited in other equipment. The characters in Stonekeep sometimes had different equipment limitations, like Sparkles the fairy. I think this would be a good practical implementation for a custom dungeon.
User avatar
Parallax
DMwiki contributor
Posts: 424
Joined: Mon Aug 28, 2006 7:56 pm
Location: Back in New Jersey

Post by Parallax »

I believe this can already be done.

# dsb_replace_inventory(char, inventory_image_name)
Replaces the inventory background of a character with the given image. This can happen on-the-fly at any time. Note that the background image must be specified as a string, not an entry in a table.

You can also replace the pointer to a more gender- or species-appropriate version. I agree that it's a point of detail, but it's the little details that make the difference between 'good' and 'great'. :)
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

dsb_replace_inventory will work for simply changing the background image.

To make changes to the inventory layout will require more significant changes, and as Gambit says, it might not be worth it.
Tom Hatfield
Ee Master
Posts: 688
Joined: Mon May 07, 2001 7:00 pm
Location: Indiana, USA
Contact:

Post by Tom Hatfield »

Well, I disagree, but if it's too much trouble, then don't bother. I do wonder how it might work if you did implement it. Describe the inventory using a script, and then handle the actual data structures with native code? Seems impractical to use pure scripts for it.
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Well, depends on what you call changing inventory : agreed that if characters can only have 3 attack methods and 2 hands displayed on top screen, it's not very useful to be able to have several other hands (for spiders). Same goes for other body slots.

Changing the graphical display from char to char could be fun, though.

The only interesting change I could see is in the way pouch, quiver and bagpack work : the slots wouldn't be available unless you actually wear a pouch / quiver / backpack in the first slot. But it is almost doable by removing extra slots beside the first and only using pouch / quiver / backpack as containers, and changing the function that gets ammo to look into the quiver.
What Is Your Quest ?
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Tom Hatfield wrote:Well, I disagree, but if it's too much trouble, then don't bother. I do wonder how it might work if you did implement it. Describe the inventory using a script, and then handle the actual data structures with native code? Seems impractical to use pure scripts for it.
As a matter of fact, that's exactly what I do for chests, currently. :D
The command dsb_objzone defines an inventory slot in a certain area of the subrenderer bitmap. The game engine then takes care of drawing the item there, handling mouse clicks, object exchanges, and whatnot. :)

On the topic of the inventory itself, though: Right now, the behavior of which slot is which is hardcoded, as is the number of inventory slots that are available to a character and what the engine calls each slot. In order to add a more "generalized" inventory management system, I would have to adapt all this to a generalized data structure, as you say.

This is something I'd be willing to do, down the line, eventually, if I can get a clearer idea of what people are hoping to be able to do with it.
User avatar
Parallax
DMwiki contributor
Posts: 424
Joined: Mon Aug 28, 2006 7:56 pm
Location: Back in New Jersey

Post by Parallax »

I don't see myself doing the following anytime soon, even if it were possible, but here are some ideas:

_ Moving inventory slots about:As Zoooom described for dwarves (for instance) having their body, leg and feet slots closer together. Also includes moving the position of the hands in the general display so portraits can be made bigger without it looking weird, or the whole layout rearranged.

_ Adding / removing slots: A tree-creature might have no legs nor feet slots, an ettin might have two heads. If you've ever played 'Jagged Alliance' some vests had more or fewer pockets: inventory slots that became available if the character was wearing a large enough vest.

_ Creating entirely new slots. Belt and ring come to mind as traditional D&D slots, but tail might be an option too, for the right character. That also opens the option of having, say, a male and female version of the body slots and have some items fit on only some of them, providing an alternative way to restrict equipment by gender.

This is all I can think of at the moment, but I'm sure that as soon as Sophia is done coding it, more will come to me. :P
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Also appearing./disappearign slots - you take/remove a backpack and gain/lose those slots, you take hand damage bad enough you cannot use that hand, so the slot blanks, etc
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

first of all :

hardcore dm fans will probably get sick or at least are being sceptic when they hear these suggestions, but it is nothing more. I have mixed feelings about it , too. DM inventory is fine...but you know how it is.
There is a proverb\/ why do it easy when it can be done complicated/\
I am not aiming at spoiling the gameclone by telling to add this and that "needful things" under any circumstances. I am convinced it will be more fun to play the game with a greater diversity of possiblilities, however. If they turn out to be crap, it's ok as long as not too much sweat -especially of Sophia- has been produced in order to make these changes. And besides , I personally like to talk about it and I think you, too.


to continue beo's approach:
or put a claymore(very large sword) in the hand and the secondary hand slot moves next to and below the primary action hand's slot indicating that 2 hands are being used. Or simply have a second underlapping item slot near the primary hand slot. [there should be sampledrawings, really]
(attack options/3 new ones then?increase the weapon power slightly?(same attack options compared to single handed usage)

which , of course gets us to the problem of how to tell the game engine when to use items with 2 hands.
probably only when the secondary hand slot is vacant, or an extra button, but well, this is not anticipated. Easy way would be that items which fit into a pouch will not break 2h usage(like rings), a shield or chest would.Automatically enter 2hand mode if possible. More below


add some item level/character level - specific slots:
green slots fits for every item, purple slots (the border-line colour is purple) will only allow to place purple items there (expert level)
THis could be seen by using the eye tool in inventory . Items get background colour of their respective level.
Probably too irritating . And you have red around wounded body spaces, which does not help. Also contradicts to the whole dm philosophy of everyone can use everything.
the other way around: only if champion's fighter / ninja... level is high enough , special or standard slots get usable(similar to the rune restriction idea of RTC)
there would be slots(ninja slots 3 and 4) and fighter (2h slot) that are not free to access right from the start. Explanation:Champions has to learn first how to carry 4 arrows ready for throwing in her pouch(ninja level) or how to fight effectively with 2 hands/ dual wield blah blah..

possilbility to stack items on top of each other.
could be hell, actually to make it user friendly..

combination slot for items (2 necklaces combine to one (2hand slot) which gives an double item that can then be worn around the neck just like a single item.)(armor and robe combine to sth.. you get the idea)
same for disassembly slot: items get separated again.
the problems here could be the items per se. How do you keep track of what values the original items had ? Doable, but some should not be able to being separated again(Potions mixed together. Bandages and herbs. leather straps on hide armor [repaired armor] flintstone on axe.. etc. )

dual wield weapons use 2 hand special extra slot:
the corresponding weapons are each put into one hand. below the primary hand(action hand) a mirrorred version of the picture in the passive hand is being displayed , indicating that the champion then uses 2 swords.
contrary to , when 2hand wielding, this slot will be empty. large swords get a slightly extruding new picture, like the tip and hilt overlaps the border and fills both.Or, -if someone is still interested- :shock: center a new item slot above the primary hand slot and the mirror slot while fading them out, to get the effect of them being underneath this very new preliminary item slot .there should be sample pictures of what I mean. I will make some, if there is need, and maybe you did not get what I tried to convey?


crazy idea
6 attack options, each occupying 1/2 of the original line space.
thus you get like:
swing/swing
chop/thrust
---A---/berserk
(A is free, so maybe add there warcry?)

ok , I digressed a bit , but it seems like it is ultimately what I would like to try out in the game. . some of that..
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

well, don't know if any of you wanted s.th. like this to be displayed
in inventory ...
http://img502.imageshack.us/my.php?image=charshr1.png
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Oh, that looks good :)

But would it look good in the general case, I wonder...
And where to draw the line? Displaying head-wear? Neck-wear? Clothes?

It could spiral out of control, and create a lot of work for me and for the person drawing the portraits, and I'm not sure how much it'd add.

A limited form of this can already be done, because DSB already allows the portrait to be changed dynamically, but only to fixed images.
User avatar
MitchB1990
Artisan
Posts: 183
Joined: Fri Jan 27, 2006 2:49 am
Location: Seattle, WA

Post by MitchB1990 »

Sophia wrote:Oh, that looks good :)

But would it look good in the general case, I wonder...
And where to draw the line? Displaying head-wear? Neck-wear? Clothes?

It could spiral out of control, and create a lot of work for me and for the person drawing the portraits, and I'm not sure how much it'd add.

A limited form of this can already be done, because DSB already allows the portrait to be changed dynamically, but only to fixed images.
I think that a simpler project for dynamic portrait would be adding injured/sick/starving portraits. That way it will show cuts,bruises, etc. when hurt, or make em look sick when poisoned.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

well, nevermind. ;)
Inventory is perfect the way it is.
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

I wasn't discounting everything, just the idea of radically changing the portraits...

Some of what you and Parallax have suggested are good.
A lot of the "two handed" stuff can be done already, even, with the right tricky Lua..
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

sounds intriguing!

the sample pic was not meant to change a portrait, but to cut out the head
with headwear and put it into the head slot right on the inventory sheet.
(alas the head is not fitting but 60% full size into the original head slot(dunno slot dimension,16 x 16 pixels? it would need more than that to display original heads of dm portraits)
So you would get stamm's face , for instance and put a diadem, helmet, glasses on the "head slot"... looks funny, but the items would need 2 dimensions:
one above the head and one displayed as behind the head(helmet neck section)
whatever, changing portraits would be a bit too overcomplicated.
Maybe level dependant could be an option.(more or less a wimp looking one
and one that looks like in csb enhanced dm portraits, but:)
Portraits should not change. You get used to them/it while playing the game,
and probably identify with it, much like with a protagonist in a film.
Tom Hatfield
Ee Master
Posts: 688
Joined: Mon May 07, 2001 7:00 pm
Location: Indiana, USA
Contact:

Post by Tom Hatfield »

I've wanted to post a visualization of why I think different styles of inventories can be useful, but until today, I didn't have access to a scanner! Anyway, here are some diagrams I drew up during my own development:

This first sample is at least a couple years old. It's derived directly from Lands of Lore (the Humanoid and Aegian samples in particular are taken straight out of LoL) and signifies a less-is-more approach to equipment, which I found was a very refreshing change of pace.

http://three.homeip.net/images/inv_01.png

This second one is more recent and applies to Dungeon Shock. It's very preliminary but gives you a basic idea of the "dual slot" approach I'm taking with one- and two-handed items. (You may recognize it as a derivative of X-Com's inventory.)

http://three.homeip.net/images/inv_02.png

Anyway, this shows what I would do with custom inventories and hopefully offers a solid supporting argument for DSB developers who want it.

Edit: I made the images into URLs to preserve the formatting (and to save your bandwidth, probably!) -Sophia
Edit: Cool, thanks. :) - Tom
Last edited by Tom Hatfield on Mon Apr 09, 2007 6:24 pm, edited 1 time in total.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

In order to give alternate weapon-handling a sense,
there should be some difference in
2Hand wield, Dual wield and single handed wield
apart from the "looks fancy" aspect.

Can this be done :
(dependant on slot item uses different bonus/attack etc..)

Tom, what are you developing?(?-->dungeon shock)
details would be fine :)
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Well you can't change the position of slots yet (but I think Sophia mentionned she wanted to change that) but you can already change the background image for characters separetely, and the hand image.

The pointer image can be modified too, since it is already modified when the player picks a character (from the empty party pointer to the mouse) and when a player picks up an item.

Finaly : dual and single handed are not very different, and can be done already. Two handed is slightly more complicated, especially since you have to handle the case when both hands are full and the player wants to put a two handed weapon : where to place the two items in hand ?
What Is Your Quest ?
Tom Hatfield
Ee Master
Posts: 688
Joined: Mon May 07, 2001 7:00 pm
Location: Indiana, USA
Contact:

Post by Tom Hatfield »

Joramund wrote:Two handed is slightly more complicated, especially since you have to handle the case when both hands are full and the player wants to put a two handed weapon : where to place the two items in hand ?
I'd have both items go into the character's inventory, but if one/neither doesn't fit, throw it/them on the ground at the party's feet (one on each side of the cell).
zoooom wrote:In order to give alternate weapon-handling a sense,
there should be some difference in
2Hand wield, Dual wield and single handed wield
apart from the "looks fancy" aspect.
Well, this applies primarily to my own design. It's up to you to apply it to enhanced DM, but the general idea is that some weapons can only be wielded in two hands, whereas smaller weapons can be dual-wielded to provide multiple attacks at once (perhaps with a slightly longer recovery time). So, yes, there would be a difference.

I put the two "hand" slots next to each other because to me it makes sense that the icon for a two-handed weapon should take up two adjacent slots. This also applies to the backpack, of course. The fact that my armor takes up four slots is irrelevant in the equipment panel, because there are four slots dedicated to armor (could have been one), but it matters to the backpack (which isn't shown).

However, it isn't necessary that a two-handed item be two icons wide. I have another inventory design from many years ago that uses a single icon approach in much the same way Joramund described. I saw the connected slot approach as a step up.

Edit: forgot to answer your other question, zoooom. Dungeon Shock is an "Other Games Like DM" project that I'm developing. No idea if it will ever see fruition, but I don't intend to stop working on it. I like watching other projects grow because it's very inspirational.
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Joramund wrote:Well you can't change the position of slots yet (but I think Sophia mentionned she wanted to change that)
Yes, I do.
Eventually. :wink: :roll:

Once the slots are dynamic, enabling and disabling them dynamically won't be too hard, which should make a two-handed weapon not terribly difficult to implement:
Simply putting the weapon in the right hand will cause some tricky Lua code to check if the left hand is empty, and, if so, disable it and place the weapon in the right hand.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

2H usage:(mostly large weapons, but some items come to mind)

I would keep the single item swap...Why punish the player?
why not allow for a 2h weapon to be placed
in the right hand even if there is something held in the left-

I would suggest to "simply" disable the attacks
(greyed out , very much like when you just used an attack)
until the other hand gets vacant.

Maybe display a message, for people who do not dig it:
2h weapon attacks disabled. The left hand is occopied by another item.
------------------------------------------------------------------------
So in order: (a "no" ends loop)
event of right hand interaction
check for right hand: 2h weapon yes/no
yes.. check for left hand: occupied? yes/no
yes--
display message
and
disable attacks

event left hand interaction:
1
an item is put into left hand
check for right hand .. holding a 2h weapon?
yes..
display message, disable attacks (or vice versa)

2
item is removed from left hand
check right hand.. 2handed item?
yes..
enable attacks

Tom_
didn´t know that you were working on a clone.. nice -°<

items having all the same size is a good thing.
Why punish the player?
In DM terms I imagine a 2h weapon to be slightly larger than the standard item, when held in the action hand
Else it would be displayed in normal size, just like the other items.
rings would be displayed a bit smaller than usual, but take up the
same space as normal. When held in the action hand, you
get a more detailed view(magnified)

This makes me wonder if dungeon strikes back would allow for
different sized items? Not everywhere, to keep the feel etc..
like only concerning the action hand
an alternate picture is shown when certain criteria are met, and maybe in the torso part as well.

Just a side thought:
position change of slots, or the "check slot" idea:
do you then have option on stackable slots?
like a stairway, each slot is slightly being overlapped by the above.
so you could check for similar instances of an item and then allow for putting them on top of another..or display a number for
each instance on the spot, make a maximum of 5 or so...
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

would keep the single item swap...Why punish the player?
why not allow for a 2h weapon to be placed
in the right hand even if there is something held in the left-

I would suggest to "simply" disable the attacks
(greyed out , very much like when you just used an attack)
until the other hand gets vacant.
I did this in my aborted CSBwin dungeon like this - the attack was negated with a 'you can't do this one handed' message unless you had a huge strength or fighter level
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Beo: maybe a huge priest level would have helped as well
..for all those strength potions! ;)
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

As of DSB 0.23, pretty much the whole inventory screen can be rearranged.

The number of inventory slots is now arbitrary, and their locations can all be defined by the dungeon designer. The various hardcoded methods for determining if an item can fit in an inventory slot have been replaced by a sys_inventory. Currently it's just an emulation of the old way, but, of course, now it can be overridden by the designer. (And will have to e if you change the inventory system drastically!)

In addition, the 2 slots at the top of the game screen (by default the left and right hands of each champion) can be redefined.
Post Reply