Objects contaning items eg Herbs

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Trego
Artisan
Posts: 174
Joined: Tue May 26, 2009 2:03 pm
Location: Brunei

Objects contaning items eg Herbs

Post by Trego »

I want to create a container (like a money box) that can hold herbs: flowers, mushrooms, etc.

The current items that can be contained are:
Tiny, Arrows, Keys, Coins, Small, Darts, Scrolls, Gems, Medium, Rocks, Flasks, Valuables, Large, Stars, Huge, and Daggers.

I could clone one of those items as a herd type, eg clone stars to have herb images (minus the attack method), but I don't want people to be able to put stars into the container if they happen to find stars.

Any ideas?

And what is a 'valuable' defined as, neck items, rings, and crowns?
It's not a bug in the program, I've just gone and done something weird.
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Objects contaning items eg Herbs

Post by Gambit37 »

This is where a little knowledge of RTC internals would help, though you can normally work it out from the objects menu.

Most items are categorised internally by their object prefix: MONSTER_, FLOORITEM_, etc. However, there's nothing in the Objects menu that lists VALUABLES_, so there must also be another internal flag for such items. I'm guessing Keys are identified as such.

Do you only want to limit the items to be herbs? I think the best way would be to allow only "Tiny" items. Only Rings, Gems, Coins & Keys are tiny as far as I'm aware and if a player wants to put these in their herb pouch I think that's OK ;-)
User avatar
Trego
Artisan
Posts: 174
Joined: Tue May 26, 2009 2:03 pm
Location: Brunei

Re: Objects contaning items eg Herbs

Post by Trego »

Valuables = coins and gems; the money box in DMII contains valuables.

I would prefer only Herb type things, but a key chain does sounds like a good idea too.
It's not a bug in the program, I've just gone and done something weird.
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Objects contaning items eg Herbs

Post by Gambit37 »

Is there a STORED action? Can we detect when an item is stored in a container? If so, you could run an action every time something is placed in your herb pouch -- simply check if it's a herb and if not, return it to the player's hands.

I'm speaking conceptually, I don't know if this is possible. ;-)
User avatar
Trego
Artisan
Posts: 174
Joined: Tue May 26, 2009 2:03 pm
Location: Brunei

Re: Objects contaning items eg Herbs

Post by Trego »

I don't think there is a store/d action, but I could (but won't) have an attack method added to the herds that activate a counter and remove the object (only if the box is on the/a character) from the hand, on viewing the box the contents will be recorded as info, not images, using a substitution string showing the numbers on the counters.
It's not a bug in the program, I've just gone and done something weird.
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Objects contaning items eg Herbs

Post by Sophia »

If you clone a dart, and set its name to "THROWING STAR" and image and attack methods to those of a throwing star, then clone all your herbs from the real throwing star, your "star" method works fine because what you're using as a throwing star is a dart to the game engine.

This little kludge will only work a limited number of times, mind you, because RTC lacks any generic way to specify what you can put into a container.
User avatar
b1llygo4t
Apprentice
Posts: 30
Joined: Tue Sep 01, 2009 1:53 am
Location: my house

Re: Objects contaning items eg Herbs

Post by b1llygo4t »

i was disappointed to see you cant create your own exception. same thing with the shoot command. oddly the ven and firebombs arent considered as flasks by containers, but are labeled as flasks.

i cant find a way for the engine to detect things in a container, or put things in one

key rings rock
potion? what potion?
Post Reply