Extra code ideas for items
Extra code ideas for items
My experience in the mud is moreso about ideas than coding. Speaking of which I am familiar with osetting and how code works. I'd like to add a thread here for builders looking for ideas for specially coded items. Items like relayerable scabbards, open/close cloaks and weapons that turn into other ones. Its more of an idea machine, if you don't know how to code it, you can still suggest it if you think it is possible in the current code and maybe an active builder will know how to code it and add it to their areas if they wish to in the future, or they might post the code here for general archiving.
I'll start:
Partially renameble scabbard/sheaths:
Like the puppets in the mud, these scabbards can be altered to show the pommel of the weapon currently inside them, basically, you sheath the weapon then can use a command to rename a part of the short description to include the pommel of the weapon: So a scabbard would become a scabbard with an ivory pommel sticking out of it, or an ivory pommeled scabbard. When you type draw, the scabbard automaticly resets because there is no longer a weapon in it.
I'll start:
Partially renameble scabbard/sheaths:
Like the puppets in the mud, these scabbards can be altered to show the pommel of the weapon currently inside them, basically, you sheath the weapon then can use a command to rename a part of the short description to include the pommel of the weapon: So a scabbard would become a scabbard with an ivory pommel sticking out of it, or an ivory pommeled scabbard. When you type draw, the scabbard automaticly resets because there is no longer a weapon in it.
Last edited by Gwain on Fri Feb 03, 2012 6:40 pm, edited 1 time in total.
Justice is not neccesarily honourable, it is a tolerable business, in essence you tolerate honour until it impedes justice, then you do what is right.
Spelling is not necessarily correct
Spelling is not necessarily correct
- Raona
- Staff
- Posts: 4944
- Joined: Fri Aug 19, 2005 3:40 pm
- Location: Waterdeep - Halls of Justice
- Contact:
Re: Extra code ideas for items
Elsewhere I've pined for items to give the light-fingered what's coming to them! Booby traps, so to speak, so if someone picks the shiniest thing in your inventory, they get a nasty surprise. But I've not put in the effort to try coding it myself, hence my plopping it down here for the taking.
Re: Extra code ideas for items
Also to add to the puppet scabbards, I'd use that on quivers or baskets, to classify the contents, like gold ore or ingots.
Justice is not neccesarily honourable, it is a tolerable business, in essence you tolerate honour until it impedes justice, then you do what is right.
Spelling is not necessarily correct
Spelling is not necessarily correct
Re: Extra code ideas for items
Item smotes
I've seem some of these on hard-set puppets, meaning puppets that you don't build, but are built by a builder. They have one command smote, they are very clever, I could see this applied to items used in smotes to generate smotes without the owner being included, such as foods or armour. For example, if you hold an apple with apple or foodsmote, you can go "a red apple dribbles juice all over Gwain's chin. This could also work for weapons in the sense of sentience, you can make weapons smote or even talk if it called for it. Great preexisting code.
I've seem some of these on hard-set puppets, meaning puppets that you don't build, but are built by a builder. They have one command smote, they are very clever, I could see this applied to items used in smotes to generate smotes without the owner being included, such as foods or armour. For example, if you hold an apple with apple or foodsmote, you can go "a red apple dribbles juice all over Gwain's chin. This could also work for weapons in the sense of sentience, you can make weapons smote or even talk if it called for it. Great preexisting code.
Justice is not neccesarily honourable, it is a tolerable business, in essence you tolerate honour until it impedes justice, then you do what is right.
Spelling is not necessarily correct
Spelling is not necessarily correct
Re: Extra code ideas for items
I really like the idea behind this! But would this specific line of code have to be manually applied to each item in game for this to work? Also, with the puppets you use puppetsmote, I believe it is, to make them work. Would we need to add something like an Ismote to make an item work?
Example Ismote apple drips dribbles juice all over $Gwain's chin.
You see "a red apple dribbles juice all over Gwain's chin"
Also, would there be restrictions on which items could actually use an smote or would they need to be set up to only use emotes? That way every random person in the game could not have a talking apple? lol Maybe just set it up as Imote and have that be unable to add speech text? Just throwing out ideas!
I am sure this would be some massive undertaking, but it could definitely add an exciting element to the game!
Example Ismote apple drips dribbles juice all over $Gwain's chin.
You see "a red apple dribbles juice all over Gwain's chin"
Also, would there be restrictions on which items could actually use an smote or would they need to be set up to only use emotes? That way every random person in the game could not have a talking apple? lol Maybe just set it up as Imote and have that be unable to add speech text? Just throwing out ideas!
I am sure this would be some massive undertaking, but it could definitely add an exciting element to the game!
Counting bodies like sheep...to the rhythm of the war drums. ~~~ Maynard
Re: Extra code ideas for items
I haven't looked very closely at the oprogs here, but this should be already doable via use_progs and wear_progs (for equipment) coupled with mpechoaround/at's, I would think. If incorrect, feel free to disregard me.
Re: Extra code ideas for items
Code: Select all
>intercept_prog desiredcommandhere~
if actorhasobjnum(QQ01)
mpforce $n smote whatever you want.
mpunintercept
else
mpunintercept
endif
~
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Re: Extra code ideas for items
I'd add that if you wanted to avoid the item being too smart, we could make it use emote. that way it uses colours and does not talk
Justice is not neccesarily honourable, it is a tolerable business, in essence you tolerate honour until it impedes justice, then you do what is right.
Spelling is not necessarily correct
Spelling is not necessarily correct
Re: Extra code ideas for items
Items should probably avoid emotes, to be honest... i'm not sure that would work as intended, though, once again, I haven't started tinkering with it yet (I haven't forgotten, boss man!) What I would recommend is actually just an mpechoat/around to simulate the emote function. It would essentialy be the same thing, except would allow more customisable messages. I.e., instead of $n (or $o for objects? Im on my phone, I can't remember) at the start of the "emote" you could have it anywhere in the print.
Excuse my rambling; I'm stuck in a van on the way to a job, and building discussion is infiniely more interesting than staring out the windshield -cough-
Excuse my rambling; I'm stuck in a van on the way to a job, and building discussion is infiniely more interesting than staring out the windshield -cough-
Re: Extra code ideas for items
Using a preset smote (a sound effect really) is the most efficient way to code this. e.g.
The result of which would like this if it were on, let's say, a sentient sword...
...instead of...mpforce $n smote takes a bite out of a juicy apple.
It is the extremely rare item that will have something like this:mpechoat $n {60}You take a bite out of a juicy apple.
mpechoaround $n @N {60}takes a bite out of a juicy apple.
Code: Select all
>intercept_prog action~
smote $0
~
action sings a song.
A sentient sword sings a song.
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Re: Extra code ideas for items
Yeah, that's what I was going for with my rambling. I misunderstood and thought we were looking for prints from the item itself, not a player-centric display.
Re: Extra code ideas for items
That would keep the more devious people in line
Justice is not neccesarily honourable, it is a tolerable business, in essence you tolerate honour until it impedes justice, then you do what is right.
Spelling is not necessarily correct
Spelling is not necessarily correct