Foe condition

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
6 months 3 days ago #7744 by Sascha
Foe condition was created by Sascha
Does anyone have a snippet for auto-reporting a foe's condition? For example, when in combat, it would show the opponent's condition so the player can judge if they're making a dent (or about to be seriously dented). I know you can get it by looking at the mob in combat (excellent condition, big nasty wounds and scratches, pretty hurt, etc). Players this week have been asking me if I have a toggle for them to see it in their command line, though.

Dovie'andi se tovya sagain. After the Breaking MUD, now in beta testing...

Please Log in or Create an account to join the conversation.

More
6 months 3 days ago #7745 by JTP
Replied by JTP on topic Foe condition
I have it shown in the prompt After HP, mana, move

Please Log in or Create an account to join the conversation.

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
6 months 3 days ago #7747 by Sascha
Replied by Sascha on topic Foe condition
Great! Do you have the code change to reflect that, and feel like sharing it?

To be clear, I'm looking for something that looks like this at the player's prompt when in combat:

139H 259M 72V - a buck - scratched>

You barely avoid a buck's fist as he takes a swing at you!
You barely pierce a buck.

Dovie'andi se tovya sagain. After the Breaking MUD, now in beta testing...

Please Log in or Create an account to join the conversation.

More
6 months 3 days ago #7748 by JTP
Replied by JTP on topic Foe condition
Its excatly like that, found it on circlemud.org

Please Log in or Create an account to join the conversation.

More
6 months 3 days ago #7753 by Papaya Pete
Replied by Papaya Pete on topic Foe condition
To be more precise I think JTP is referring to www.circlemud.org/pub/CircleMUD/contrib/...ers/prompt-fancy.txt
The following user(s) said Thank You: Sascha

Please Log in or Create an account to join the conversation.

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
6 months 2 days ago #7757 by Sascha
Replied by Sascha on topic Foe condition
Thanks for all the help, guys. :) I appreciate it!

Dovie'andi se tovya sagain. After the Breaking MUD, now in beta testing...

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #8164 by Parnassus
Replied by Parnassus on topic Foe condition
Now that I have a current version of TBA, I wanted to play with snippets. I'm hoping that someone can fix this snippet for me. I know that this is totally irritating for anyone who understands code because I treated it like a frankentrigger .

I got so many errors that I took it apart, shook it up, stuck parts of it into the existing code and left parts of it out. (Hmm, I wonder what these three screws are supposed to be for...) but now it actually runs (sorta).

I understand that the first error is that it says:
m) Mana Points M) Max Mana Points\r\n");
g) Gold M) Alignment\r\n");
and yeah, that doesn't go well. The alignment code is actually "a".

So this is what the output looks like:
> display all
100h(101H) 100m(100M) 99v(100V) XP:172021 Gold:6757 MoOkay.
The part after Gold:6757 is in red because the prompt thinks it's the mob prompt. Part of the text is a repeat of the last line sent to the screen.
Here's what happens while fighting:
99h(101H) 100m(100M) 99v(100V) XP:172030 Gold:6757 Align:(10%) Awful condition > >
-That 10% after the align is actually the mob percentage.

> display eEgax
XP:172081 Gold:6767 TNL:77919 Align:56 Mob: N/A> >
Here's what happens while fighting:
XP:172113 Gold:6767 TNL:77919 Align:56(20%) Pretty hurt > >
You can see that this is not too bad except that the (28%) looks like alignment when it's actually mob percentages.

This one is even better!
101h(101H) 100m(100M) 100v(100V) XP:172304 Gold:6767 AligThe creepy crawler is incapacitated and will slowly
die, if not aided.
(-30%)
Bleeding awfully from big wounds > >

First, I think the line length is too short. You can see that by the way it cuts off.
Second, I changed :
count = snprintf(prompt + len, sizeof(prompt) - len, " %sMob: %sN/A", CCNRM(d->character, C_NRM), CCRED(d->character, C_NRM));
to
count = snprintf(prompt + len, sizeof(prompt) - len, " %sMob: %sN/A", CCRED(d->character, C_NRM), CCNRM(d->character, C_NRM));
just to stop all the text on screen from being red. It seems to have also added an extra > to the prompt.

I've probably also done a lot of things in the most inefficient way possible. I also thought that the colours for hp, mana, moves were different but they're now all white. I'm not sure about that though.

This is the mess the current code is in:
Warning: Spoiler! [ Click to expand ]

If anyone wants to play with this trigger in its original form, there's a link further up but I'll repeat it .

Thanks for any help you can give me. I forgot that the bespoke prompt was there so I might try that one next but I'm still finding patches confusing.

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #8167 by WhiskyTest
Replied by WhiskyTest on topic Foe condition
Bespoke prompt is running on After the Breaking MUD, recommend testing it there and see if it meets your needs. Happy to help patch it in if you have questions

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #8173 by Parnassus
Replied by Parnassus on topic Foe condition
I think my brain is in shutdown mode right now but I've downloaded the bespoke and I'll look at it again when I have some time. So far the fancy-prompt is doing okay as long as I don't overload it. The part I really look forward to in your bespoke is the newline option. I've played on a mud with that prompt option and it just makes the prompt so much more versatile!

And, yeah, when I get around to it, I'll be in touch for more help :) Thanks.

Please Log in or Create an account to join the conversation.

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
1 month 2 weeks ago #8174 by Sascha
Replied by Sascha on topic Foe condition
The prompt is amazing and it's running beautifully at After the Breaking. It does everything that was on my wish list.

Dovie'andi se tovya sagain. After the Breaking MUD, now in beta testing...

Please Log in or Create an account to join the conversation.

More
3 weeks 5 days ago #8196 by Parnassus
Replied by Parnassus on topic Foe condition
The reason my prompt looks so odd is that the line is cut. It turns out that there's a reason the snippet says:
/* Note, prompt is truncated at MAX_PROMPT_LENGTH chars (structs.h) */

I raised the number and everything is now working fine.

structs.h
-#define MAX_PROMPT_LENGTH 96 /**< Max length of prompt */
+#define MAX_PROMPT_LENGTH 250 /**< Max length of prompt */

I didn't use the snippet "as is" so I can't verify that it can be put in and run without adjustments.

Since it's working pretty much the way I wanted it, it'll probably be a bit longer before I check out the bespoke prompt. Sorry about that.

Please Log in or Create an account to join the conversation.

More
3 weeks 5 days ago #8199 by JTP
Replied by JTP on topic Foe condition
The prompt code worked for me when i added it long time ago. I also had to increase prompt length though.

Please Log in or Create an account to join the conversation.

Time to create page: 1.658 seconds