Missile containers

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.
Post Reply
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Missile containers

Post by Adamo »

It`s a shame that DM has only four places for additional missiles (except left hand place). That means ninja can give only five shots (or throw dart 5 times), wchich reduces significantly his abilities (after throwing all the stuff from the four-cell-throwing-stuff-area, the player must press RMB and take another throwing item from regular backpack, wchich takes time; it`s not very handy when you`re surrounded, escaping from the worms, etc.; even having a ton of throwing rocks or arrows in the backpack, in fact you can use only 5 per character. Would it be possible to add missile containers (missile sack; a special kind of a bag or sack), placed in the quiver area that would hold all the throwing stuff (that is, rocks, darts, daggers, thrownig stars and shurikens, arrows and slayers)? That`d be a bag looking more or less like the coin/jewel container, but instead of holding valuables it hold missiles. If a charater has a sling and fires a rock, the engine takes another rock from a sack. If a character is throwing darts, the engine takes another dart, until he runs out of that kind of items.
Moreover, when you pick the missile-like item from the ground and "drop" it into the character`s bars, the engine automatically places it in the sack (or, if it`s not there, in the throwing items area; if it`s full, in the regular backpack).
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: Missile containers

Post by Joramun »

It's very easy to add in Lua. But since it's not vanilla DM, I doubt it will ever be included, or if it is, it will be as an example in a test dungeon.

You can train your lua/dsb by making such an object. I could probably do it quickly, but i don't have any time these days.
What Is Your Quest ?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Missile containers

Post by Sophia »

The base code already includes support for taking objects out of containers in the quiver, actually. No such objects exist in vanilla DM, but they do work, which you can play around with by adding something like this to the test_dungeon's objects.lua:

Code: Select all

obj.chest.fit_quiver = true
This will let you put a chest into the quiver. Then, get a chest ("Daroou" has one) and put some arrows in it and put it in the quiver, and go.

The "putting away" end of it hasn't been implemented in the base code, but, as Joramun said, it isn't that difficult to implement in Lua. You'll probably want to override mouse_into_quiver. (The basic one is in base/util.lua)
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Re: Missile containers

Post by zoom »

what is vanilla dm? like the original worked ?

*****anyway: for the kind of things Adamo wants

If that does not break the engine
I would suggest to introduce some new kind of items.

those that have numbers in the lower right corner.
like the quiver in eob, just movable of course.
or in wizardry, numbers indicated amount of said item

FUNCTIONS

To collect the arrows/put them into quiver

in inventory screen, place "quiver" on the square an arrow is positioned
and it gets merged into the quiver; so you could easily add 10 arrows.
Number increases.
Items would not swap, like normal.

If the quiver gets placed onto a different item, like a plate mail it swaps, of course.

optional: If you have poison arrows,
maybe a different, second number indicates those better missiles in the quiver..
--> the bow would then have !2! options :
"shoot (normal arrow)"
and then a "shoot2/poison shoot"



empty the quiver: (where have my arrows gone?)
place it in hand(action hand) and choose : empty quiver/drop on floor (good bad ugly?)

(the quiver still in action hand )
here you could also put the arrows onto the quiver and they would automatically merge in it.
(slower than the inventory "reverse swapping")
but would work (in my theory ) like a charm for collecting in dungeon view.


I may add that with this new item types you could also simulate clips for pistols etc..
to go with a sci fi dungeon maybe


alternative:
place quiver in hand, like a chest.
then you see the arrows, now with numbers.
empty hand clicks on arrow: get single arrow
arrow in hand clicks on arrow: merge into arrow with numbers and increase number



downsides:

someone has to do the dirty work and code this
weight still adds up, so a full quiver would weigh like, 15,3 kg?
maybe there is more downsides
numbers will feel odd for some players, likely destroying the immersive feel for them.
not vanilla,as i understand it.. thus not very desireable
all the coding set aside, if it were done ,would it work? I am not sure
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Re: Missile containers

Post by Adamo »

If that does not break the engine
I would suggest to introduce some new kind of items.
Break the engine in DSB? I guess almost everything is possible here :)

That`s what I was talking about. Missile containers - it might be a modified regular chest, or modified money box, that (if put in the proper place) would be used to pull out missiles during the fight (by the engine, not a player). Modified chest, like a bag or something, contains 8 items, and devoted for that particular kind of items only. The question is, does 8 places, like in regular chest, is enough?

Maybe it could be possible to create a "virtual containers" (by sacrifising existing inventory cells? if else, where?), each for one type of missiles, placed somewhere in the inventory, that could hold for example 99 arrows (or a rocks, darts etc). But the main problem would be the indicators, that shows how much arrows left in the container (ask Sophia).

The best would be simply creating 7 different movable missile containers (with greater capacity than 8 items, but 8 would be eventually ok; there`s no need to change the whole chest structure): one for only arrows, one for only slayers, one for only rocks, one for only darts, one for only daggers and one for only rocks, wchich - placed in a proper place - supplies a player of missiles. Each holding only one type of items not to make a mess. As usable just as a chests, but much lighter than a chest of course.
There`s also a problem with picking up missiles after a finished battle - each missile picked up from the floor and dropped into the character`s equipment without even switching to the inventory mode (= by clicking an item on the character`s bars), should go directly into its proper missile container (arrows to the quiver, rocks to the "bag for the rocks", etc.).
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Re: Missile containers

Post by zoom »

by breaking the engine I was referring to "not applicable" "not of interest" "too complicated to introduce".
no reply from Sophia speaks for itself I guess. ;)
Not to criticize that at all, don´t get me wrong. There is already a "could work this way " proposition
plus all of a sudden I "fake" interest in DSB, but I just could not help it to post my thoughts on that container matter..
better would be to get in synch with dsb first (try existant stuff and learn that) before doing -or even thinking !!- any of the weird off-the-roof stuff above. anyways.
Real introduction of these "numbered items" would break the existant state of DSB. read through it again, if it is ordered enough..

For your thoughts: Adamo, I think you make it too complicated. yet you are thinking in terms of existing stuff -which is good, really.

In real life, you can put rocks and arrows in the same container. why restrict it in-game? ;)

why matter if its 12 or 30 arrows in the quiver (or whatever) You could not tell the difference, so you only need a graphic that represents a "bunch of arrows"
not exactly exact numbers on screen.
whatever-
it is senseless.
You could -just a thought - make a quiver that holds arrows and have the engine do the following if it is near full capacity:
create a container that has 0 kg in one spot and put the arrows there, aso. So you could have 8x7x8arrows(a chest in a chest for each space in the first chest)
the code should do all the creating and stuff... just as sophia suggested 2000 words earlier :)
User avatar
Mystic_Unicorn
Journeyman
Posts: 89
Joined: Sun Jul 14, 2002 3:00 pm
Location: Czech republic
Contact:

Re: Missile containers

Post by Mystic_Unicorn »

I like this idea. Actually Im implementing that right now. Im calling that Item preferation :)
Mystic Unicorn - Deep cave developer
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Missile containers

Post by Sophia »

zoom wrote:no reply from Sophia speaks for itself I guess. ;)
I was actually just trying to think of a good response. ;)

The concept of "item stacks" has come up a few times. It's a good thought, for some things (like arrows), though it would be a terrible pain to try to handle generally. I think for specific cases, a terribly hacked-up sys_inventory would be able to do what you want. It would have to check if you were trying to exchange an arrow with an arrow, and, instead of allowing that, swap the arrow that is already in the inventory for some sort of "bundle" object.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Re: Missile containers

Post by Adamo »

ok, there`s even better solution: when next arrow is needed, the engine searches the same missile not only in these four special missile cells, as it was originally, but ANYWHERE in the inventory, no matter if it`s in a quiver, chest, etc.
Same with other missiles - if the rock was thrown, the engine searches for another rock in the inventory.
I think that`s very good. No need to create new containers or anything special. everything works just as original, but instead of searching items in four special cells, it looks everywhere, even in chests. Besides, everything works the same as usual.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Missile containers

Post by Sophia »

Adamo wrote:ok, there`s even better solution: when next arrow is needed, the engine searches the same missile not only in these four special missile cells, as it was originally, but ANYWHERE in the inventory, no matter if it`s in a quiver, chest, etc.
Same with other missiles - if the rock was thrown, the engine searches for another rock in the inventory.
This is certainly not hard to do at all, and for a custom dungeon, I could see it being something you'd want to do.

However, I think it is worthwhile to discuss if this is a reasonable thing to do by default. It diverges from DM in a way that, in my opinion anyway, doesn't just add usability (like clicking on the health bars automatically putting away a weapon does), but also changes the game a bit, because you can now carry/use a much larger amount of ammo. It, in effect, makes the quiver redundant because your entire inventory is now quiver.

I wonder why arrows weren't automatically taken from anywhere in the original DM, and what sort of gameplay considerations this created.
User avatar
Mystic_Unicorn
Journeyman
Posts: 89
Joined: Sun Jul 14, 2002 3:00 pm
Location: Czech republic
Contact:

Re: Missile containers

Post by Mystic_Unicorn »

Ill write what i took from this idea.

I have an item of specific type. For example arrow is a projectile. I also have containers which will accept only certain item types.

If i put an arrow to player stats(face) it will be putted into inventory. It means:

1) Look if in quiver slots is some container which can hold projectiles. If yes try to put arrow in it. If not then continue.
2) Look if in quiver slot is a space for an arrow. If yes try to put arrow in it. If not then continue.
3) Look if in ordinary inventory is a quiver. If yes try to put arrow in it. If yes try to put arrow in it. If not then continue.
4) Look if in ordinary inventory is a some sort of generic container(it accepts everything). If yes try to put arrow in it. If not then continue.
5) If yes try to put arrow in it. If not then continue.
6) Do nothing, keep item in hand.

This can be done for arrows, keys, ...

If u will take it like this vanilla will not be violated so much as if u create bundles of anything...
Mystic Unicorn - Deep cave developer
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Re: Missile containers

Post by zoom »

I will just comment on this:
but also changes the game a bit, because you can now carry/use a much larger amount of ammo. It, in effect, makes the quiver redundant because your entire inventory is now quiver.
You can carry essentially still the same amount of ammo, it is more readily available however. And that is the point.
I would say(nitpicking set aside) to remedy this " all too comfortable" - arrow pinching by a considerable time restriction.

(it takes time to get
this arrow out of the chest that is *somewhere* in the backpack, probably surrounded by the cheese crumbs of yesterday in the heat of a fight. And it does certainly not help that the darn mail aketon keeps getting entangled with the chest´s lid.
Better not to mention doing all this practically blindly with one hand in a not for the anatomy of the shoulder concipated kind of way)
--->> so you take the triple amount of cool-down time to get ammunition out of inventory into hand.

Thinking of the original quiver itself there really should be no time penalty apart from the existing one. imo
Thus the quiver still has its use and becomes a bit less redundant


then again having 5 arrows to fire seems not that much, really. (compared to real life)
!!
And all in all we could relatively safely un-nerv (=make stronger ) the use of projectiles, not projectiles themselves.
(I think they projectiles are relatively powerful. Imagine slayers or the simple axe..excessive amounts of incoming thrown stuff also distracts monsters; just like the influence of a priest spell..also a bit similar to poison clouds )

No one (or the majority here ?Adamo tries it seems, I used to 15 years back..)
does use projectiles anyways (because collect-issues..etc there is a thread somewhere)

For me it would be ill-logic to allow the putting in of arrows into everything in a scripted kind of way.
Getting the arrow - or whatever out again from anywhere is even more horrid.

so make the quiver bigger- or have an actual container (not a background graphic)
Still do restrict the overly use of bows, due to the
monster frightening effect.(they literally don´t want to get hit by the damage they see or feel )

ok.
in dm II there was that numen staff, it shot 3 fireballs in a row(single action)
I could imagine this with throwing knifes also. kind of a burst mode.
same for quiver positioned arrows.(remember linflas from middle earth..? practically no time penalty 1 second =3 Arrows fired)
that´s it from me.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Re: Missile containers

Post by Adamo »

but also changes the game a bit, because you can now carry/use a much larger amount of ammo. It, in effect, makes the quiver redundant because your entire inventory is now quiver.
it doesn`t make the quiver redundant, because quivers are still lot lighter than heavy chests ;)
an advantage of a container, that carries only one kind of item.

Zoom, I wanted a party to have unlimited amount of missiles, because I practically didn`t use missiles in the game. It was too annoying to search all that stuff in the inventory, when you`re out of ammo in "proper" inventory cells. Also, picking up the stuff from a ground after finished battle and finding a place tu put it was annoying (DSB doesn`t have that problem now).
This can give a great advantage to the ninjas. Besides, maybe the damage caused by missiles should be halved.. or a designer shouldn`t put a lot of missiles in his dungeon (at least on the beginning, when the monsters are rather weak). It depends.

As for the original dungeon, it should be optional, because it changes the gameplay.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Missile containers

Post by Sophia »

zoom wrote:I would say(nitpicking set aside) to remedy this " all too comfortable" - arrow pinching by a considerable time restriction.
This isn't a a bad idea, but the problem is, if you can click into the inventory and grab the arrow faster than the auto-reload-- which is a possibility-- it starts to seem strange. The delays involved in grabbing the next arrow from the quiver are currently fast enough you wouldn't see any gain from doing manually, and it's about equal to the bow's cool-down time, so you can't take another shot anyway. I don't want to increase the bow's cool-down time dramatically, because you might decide to do something other than shoot arrows when you run out of readily available arrows.

Honestly, this thread is kind of meandering all over the place. I think it'd be worthwhile to take a step back and look at the issue we're really trying to solve. As I understand it, the issue is:
:arrow: Only being able to shoot 5 arrows (or any other missile item) at a time is kind of annoying.

There are a few ways to solve this: Quiver container objects, automatically searching the backpack, "item stacks," and so on. DSB could do the first two easily, and the third one not-so-easily. It seems like custom dungeon designers would do whatever suits their dungeon best. I'm hesitant to change the base code too dramatically because some of this is "part of DM" in that it's clunky, but it's also part of the game. Being able to stack up 10 arrows in a single inventory slot would (besides requiring lots of Lua hacking for either me or someone else) probably seem very un-DM.

It seems to me the best solution for someone who wants more ammo to shoot in their custom dungeon would be to just implement something like the DM2 quiver. This doesn't require nearly the amount of hacking (half of it's done in the base code already) and would pretty much do the same thing.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Re: Missile containers

Post by zoom »

just want to say this without making too much fuzz:
This isn't a a bad idea, but the problem is, if you can click into the inventory and grab the arrow faster than the auto-reload-- which is a possibility-- it starts to seem strange.
well. certainly, but you can still run around in dungeon view, a big plus,
getting melee attacks or spells in**, while the engine searches for ammunition.
given,it is more wow-ish than dm-ish :waiting to press a button(more a convenience than speed thingy)

I don't want to increase the bow's cool-down time dramatically, because you might decide to do something other than shoot arrows when you run out of readily available arrows.
It does not matter. You still can do something different.
And the cooldown only increases when there is a "no ammo" message.
engine then searches for arrows, you can swap for a melee weapon etc or wait for it.
it does not interfere with spells. ok, if you drop the bow the cool down time should instantly be 0 again--> search aborted
just my 2 thoughts on that matter. sorry to make this meander once again..
**
ok, thing here: I seldom play with 1 champion, maybe that is part of the problem.
I always considered dm to be a game for 4 champions. So you got a back row and a front row.
for solo parties this is kind of obsolete.
Post Reply