Removing unremovable items
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

-
- Artisan
- Posts: 187
- Joined: Sat Jan 22, 2005 2:50 pm
- Location: Ipswich, UK
Removing unremovable items
If a character is wearing an "unremovable" (ie - cursed) item of clothing, how do I in the editor create a potion or spell to remove the item. I'm sure this is possible as I'm sure I've seen posts about it before, but I can't find an action for remove curse item.
Ideally, I'd like to create a potion which when drunk allows the character to remove an unremovable item of clothing, although a spell would be just as good. Or a spell which creates a potion to do it, even better.
Ideally, I'd like to create a potion which when drunk allows the character to remove an unremovable item of clothing, although a spell would be just as good. Or a spell which creates a potion to do it, even better.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
No - if an object is unremovable, then it's unremovable; that's it - you can't change it at run-time.
What you can do however is swap the unremovable object that your character is wearing for one that is removable.
So, for your potion what you need to do is set its CONVERT_CONSUME action to perform the action SWAP_CHARACTER_BODY and give it the first object of your unremovable object and the second object of the removable one.
Does that make sense - if not, let us know...
What you can do however is swap the unremovable object that your character is wearing for one that is removable.
So, for your potion what you need to do is set its CONVERT_CONSUME action to perform the action SWAP_CHARACTER_BODY and give it the first object of your unremovable object and the second object of the removable one.
Does that make sense - if not, let us know...
-
- Artisan
- Posts: 187
- Joined: Sat Jan 22, 2005 2:50 pm
- Location: Ipswich, UK
Hmm
Hmmm,
The problem with this is that you would need to know in advance which item was being worn - and create a different potion to remove each type of cursed item. What is needed is a way to say "swap whatever item is being worn with the same one which is removable"
Otherwise, what exactly is the point of the unremovable flag? Why would anyone want to play a dungeon where they might end up wearing a cloth sack that they can't remove for the rest of the game?
The problem with this is that you would need to know in advance which item was being worn - and create a different potion to remove each type of cursed item. What is needed is a way to say "swap whatever item is being worn with the same one which is removable"
Otherwise, what exactly is the point of the unremovable flag? Why would anyone want to play a dungeon where they might end up wearing a cloth sack that they can't remove for the rest of the game?
No, you can tell the potion to initiate all the actions and of course only one will be valid, if infact anythign is beign worn at all : )
You could even make a 'strength' for curses, by having cursed_item_steength_2 - > cursed item 1 and cursed item_1 - > normal item - so need two potions
Different levels of potion could then have broader swaps associted - all soudns complex, but then you have a large amount of optiosn instead of simple unsetting a cursed flag. You could even have a delayed effect whereby the normal item is swapped back to a cursed item again if they dont' take it off their body!
The idea of a flag in an item is Just like you can't uncurse an item now - there is no flag so no remove remove curse, instead you have sword and sword_cursed etc. Properties are hard coded but the engine can swap items really easily, rather than swag flags.
You could even make a 'strength' for curses, by having cursed_item_steength_2 - > cursed item 1 and cursed item_1 - > normal item - so need two potions
Different levels of potion could then have broader swaps associted - all soudns complex, but then you have a large amount of optiosn instead of simple unsetting a cursed flag. You could even have a delayed effect whereby the normal item is swapped back to a cursed item again if they dont' take it off their body!
The idea of a flag in an item is Just like you can't uncurse an item now - there is no flag so no remove remove curse, instead you have sword and sword_cursed etc. Properties are hard coded but the engine can swap items really easily, rather than swag flags.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
Re: Hmm
One could argue that that's a feature!Chaos Awakes wrote:The problem with this is that you would need to know in advance which item was being worn - and create a different potion to remove each type of cursed item.
But anyway, you can have a potion that removes all cursed items with the current mechanics. For example, instead of your consume action directly activating the ACTION_SWAP, you could have it activate a special relay for removing curses - that relay then activates a whole bunch of ACTION_SWAP action wallitems; one for each type of cursed item that's in the dungeon. That way, when you drink your anti-curse potion it will swap any cursed item for its non-cursed equivalent.
There's no such concept of "the same one". To the engine, there's no difference between an apple / bow / suit of armour etc (at least in that respect); they're all just objects and you can swap any object for any other.Chaos Awakes wrote:What is needed is a way to say "swap whatever item is being worn with the same one which is removable"
If you think about it, the only thing that makes them "the same" is the fact that you've presumably got similar, if not identical, graphics / name for them...neither of which the engine cares about as they are purely designed for the user.
It also makes the engine alot more flexible, for example you could create a potion that changes your armour into apples; although why you'd want to is another matter altogether ;-)
It's to prevent items of that object type from being removed - nothing more, nothing less.Chaos Awakes wrote:Otherwise, what exactly is the point of the unremovable flag?
Well you wouldn't - but the dungeon designer who would include such items would also include some way of removing it.Chaos Awakes wrote:Why would anyone want to play a dungeon where they might end up wearing a cloth sack that they can't remove for the rest of the game?
********************
I think what's missing here is the conceptual distinction between objects and items.
Objects are like templates - abstract concepts of how something should perform.
Items are specific instances of something.
For example; "apple" is an object with properties such as a weight and being edible. *THIS* apple is an item with properties such as a location in the dungeon.
The removable flag is a property of an object; i.e. an abstract property belonging to all items that have that object type. If you have a cursed item, it just means that the object type is unremovable (rather than the item itself). So if you want you character to remove *THIS* cursed armour, then you have to swap the item for a completely different item which has an object type that is removable.
To be more specific, the item itself does not have the property of removability and therefore there isn't a flag you can toggle for that item that the character is wearing.
I hope all that makes sense and gives you a better insight as to how the mechanics can be made to work under the covers. As ever, any questions just fire away...
-
- Artisan
- Posts: 187
- Joined: Sat Jan 22, 2005 2:50 pm
- Location: Ipswich, UK
Cool
Thanks George, I like the idea of firing a relay that swaps out all the cursed items.
The main problem is that there are no docs, so I have no idea what is available until I stumble across it. For example, whenever you release a new version there is a great list of new features but I never seem to be able to find any of them because I don't know where to look in the editor.
The main problem is that there are no docs, so I have no idea what is available until I stumble across it. For example, whenever you release a new version there is a great list of new features but I never seem to be able to find any of them because I don't know where to look in the editor.
Sophia will be trying to release a newer editing doc at some point I assume, and the 0.37 one is available already, but 0.38 / 39 has added alot of stuff.
All actions will be either direct items in the action menu, or wallitems in the wallitem list usually
Doens't take too long to scan through them by tryign to create new items etc and seeign the unusually named ones ; )
All actions will be either direct items in the action menu, or wallitems in the wallitem list usually
Doens't take too long to scan through them by tryign to create new items etc and seeign the unusually named ones ; )
- TheMormegil
- Adept
- Posts: 213
- Joined: Thu Apr 10, 2003 10:23 am
- Location: Wales
This is interesting because then you would be wearing apples, which you can't do otherwise!It also makes the engine alot more flexible, for example you could create a potion that changes your armour into apples; although why you'd want to is another matter altogether![]()
Maybe you could have a 'big pockets' spell where it swaps a large object into your pocket. Again, hard to see why you'd want to!
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact: