can DSB do DM2 inventory stuff?

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
b1llygo4t
Apprentice
Posts: 30
Joined: Tue Sep 01, 2009 1:53 am
Location: my house

can DSB do DM2 inventory stuff?

Post by b1llygo4t »

such as:

-2 handed fighting
-drawing items from the right handed scabbard/left handed pouch via an empty handed attack command?
-item bonuses work from scabbard/pouch?
-dump items into inventory by dropping an item on the champions stat box?
-make containers/maps/ect contents appear on the dungeon hud?
-map (how detailed/close to dm2?)

a few other odds n ends of questions:
-can champions be put back into mirrors? with their items? with current health/stam/mana?
-can an action be performed from clicking on a monster?
-can monsters be friendly?
-can items be given a chance of rusting/breaking?
-can all the hud and menu sprites be replaced? can i move the sleep/menu/X buttons around?
-can i define the number AND placement of items within a container? (RTC would only allow the 8 item cascade layout for containers set for 8 spaces or the "place anywhere" layout for 1-7 or 9-inf containers. i would like to create my own layouts for containers)
-same as above but the number and placement of inventory spaces? armor/mouth/eye icons?

an advanced question or two
-are there global tile items? for example, can i tell ALL the floor tiles on the map to trigger a relay if a specific item hits the floor? instead of placing a trigger on every single tile? if so can it be turned if/on/off?
-can an empty party be teleported to a specific tile if all the party dies or the party becomes empty? (ex. teleport empty party to prison area/char select tile)

i know thats a bunch of questions, i may add more. i just now had a look at the editor and im slowly becoming unlost...
potion? what potion?
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: can DSB do DM2 inventory stuff?

Post by Gambit37 »

I think you can do most of what you asked for -- but it would require a lot of custom coding. It really depends how good a programmer you are. You'll need to read up on DSB functions and know some Lua. The basics are easy to get to grips with (changing images, etc.) -- other more complex stuff will require you to pull apart the base code to understand how it all works, so that you can then override it. I'm not a very good programmer so I find it slow, but my understanding is slowly increasing...

Friendly monsters is something I've not looked at yet, but it should be possible if you override their normal AI routines.

I don't know if you can check something hitting the floor in the entire dungeon without using triggers.... there's probably a way, Sophia will surely have a suggestion here.

As for interface changes: I've been developing a new interface for a DSB project and it's going pretty well, I'm very pleased with the results :)
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: can DSB do DM2 inventory stuff?

Post by Sophia »

I'll just run down the list. My replies are marked with arrows.

-2 handed fighting
:arrow: Yes, it's doable and been done. You can define click zones to trigger methods, and attack methods have a "triggering location," like left hand, right hand, or whatever. The "idleness" timer is global, but it's not too hard to build something on top of this.

-drawing items from the right handed scabbard/left handed pouch via an empty handed attack command?
:arrow: Yes, quite doable. Look at how methods for bows and thrown weapons grab more ammo; you can probably build something off of that.

-item bonuses work from scabbard/pouch?
:arrow: Yes. They have their own from_ and to_ properties so functions can be called. There is also from_anywhere and to_anywhere which works for things like the rabbit's foot where you get the bonus simply for possessing it. (This is how it works in DM, and, to the best of my knowledge, not how it works in RTC)

-dump items into inventory by dropping an item on the champions stat box?
:arrow: Yes, it does this already. How it works is controlled by sys_put_away.

-make containers/maps/ect contents appear on the dungeon hud?
:arrow: There are multiple ways to do this. The best way depends on what you want to do. :)

-map (how detailed/close to dm2?)
:arrow: Yes, you can make just about any kind of map you want. The CSB magic map has been implemented, as well as a couple of variants on a full screen map.

-can champions be put back into mirrors? with their items? with current health/stam/mana?
:arrow: Yes. All of this is easy. Look into dsb_champion_fromparty.

-can an action be performed from clicking on a monster?
:arrow: Yes. Monsters can have clickzones, but they don't by default.

-can monsters be friendly?
:arrow: As Gambit said, you'll have to write a custom AI. Ian_scho was doing some work on this.

-can items be given a chance of rusting/breaking?
:arrow: Absolutely. There is no built-in mechanic for it, but it's fairly easy to do with swaps. Take a look at the ruster included with the test dungeon to get an idea of the kinds of things you can do.

-can all the hud and menu sprites be replaced? can i move the sleep/menu/X buttons around?
:arrow: Yes.

-can i define the number AND placement of items within a container? (RTC would only allow the 8 item cascade layout for containers set for 8 spaces or the "place anywhere" layout for 1-7 or 9-inf containers. i would like to create my own layouts for containers)
:arrow: Yes. DSB containers, scrolls, and anything else that appear in the lower right corner of the inventory are called "subrenderers" and are entirely reconfigurable by the dungeon designer.

-same as above but the number and placement of inventory spaces? armor/mouth/eye icons?
:arrow: Yes. You'll have to reconfigure the inventory_info table instead, but it's still perfectly doable.

-are there global tile items? for example, can i tell ALL the floor tiles on the map to trigger a relay if a specific item hits the floor? instead of placing a trigger on every single tile? if so can it be turned if/on/off?
:arrow: It's not doable, but it's generally not needed-- if you want to know whether a specific item has been dropped, the more "DSB-like" way to do it is simply to give that item's arch an on_drop. Otherwise, let me know what you're trying to do, and I can help.

-can an empty party be teleported to a specific tile if all the party dies or the party becomes empty? (ex. teleport empty party to prison area/char select tile)
:arrow: At the moment, no, but only because sys_everyone_dead is hardcoded to always go to game over. I could change this relatively easily and then you'd be able to do this.
User avatar
b1llygo4t
Apprentice
Posts: 30
Joined: Tue Sep 01, 2009 1:53 am
Location: my house

Re: can DSB do DM2 inventory stuff?

Post by b1llygo4t »

thanks for the fast and comprehensive reply! I'll play around with it and see what i can do
potion? what potion?
Post Reply