Welcome to the Builder Academy

Question melee health messages

More
26 Oct 2012 15:24 - 26 Oct 2012 15:25 #947 by wifidi
melee health messages was created by wifidi
Show melee combatants' worsening health messages. Toggleable. An improved version compared to always showing a health message each round unless it makes combatants feel like wimps the longer it takes for a worse message to show! A toggle can be programmed to continuously show health messages. Assumes the combatant can see or perceive the descriptive health of the opponent or own health without having to type look.
Attachments:
Last edit: 26 Oct 2012 15:25 by wifidi. Reason: substitute 'melee' for 'combat' in subject
The following user(s) said Thank You: zusuk

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

More
01 Nov 2012 15:49 - 01 Nov 2012 17:35 #968 by wifidi
Replied by wifidi on topic Re: melee health messages
Here's a tighter form of the same mod at the end of fight.c dam_message that should work:
Code:
/* if "a PC ch or victim" wants to see combat health msgs and the victim's health has changed */ if ((!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_COMBAT_HEALTH_MSGS) || !IS_NPC(victim) && PRF_FLAGGED(victim, PRF_COMBAT_HEALTH_MSGS)) && victim->combat_health_message != victim->prior_combat_health_message) { struct { char *self, *other, *text; } diagnosis[] = { { "", "", "" }, { "have", "has", "a few scratches." }, { "have", "has", "some small wounds and bruises." }, { "have", "has", "quite a few wounds." }, { "have", "has", "some big nasty wounds and scratches." }, { "are", "looks", "pretty hurt." }, { "are", "is", "in awful condition." }, { "", "", "" }, }; /* if victim wants to see */ if (!IS_NPC(victim) && PRF_FLAGGED(victim, PRF_COMBAT_HEALTH_MSGS)) send_to_char(victim, "You %s %s\r\n", diagnosis[victim->combat_health_message].self, diagnosis[victim->combat_health_message].text); /* if ch (inflictor) wants to see */ if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_COMBAT_HEALTH_MSGS)) send_to_char(ch, "%s %s %s\r\n", GET_NAME(victim), diagnosis[victim->combat_health_message].other, diagnosis[victim->combat_health_message].text); /* to do: Technically any PC fighting the victim and wanting to see the victim's worsening reports should. A combat awareness skill could allow a player to see worsening reports of all combatants in the room. */ } } // dam_message end brace
The original post is 3.62. File copyover into 3.63 generates errors, so manually follow the 3.62 mod log and it should work as well in 3.63 as 3.62. Not compile checked. Feel free to code.
Last edit: 01 Nov 2012 17:35 by wifidi. Reason: to be more concise

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

More
03 Nov 2012 01:47 - 05 Dec 2012 16:04 #972 by wifidi
Replied by wifidi on topic Re: melee health messages
Attached is a patch for melee health messages for 3.62 or 3.63: PC's in the same fight see the worsening health of anyone in that fight. Also "look self", "look at self", "diagnose me" and "diagnose self" show "You..." instead of your character's name. A cool option is allowing dreaming characters to see the worsening health of their friends in the same room, area or MUD then not telling players about that feature.
Attachments:
Last edit: 05 Dec 2012 16:04 by wifidi. Reason: to delete commentary to the effect of "if only I were a better programmer"

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

More
20 Nov 2012 02:48 - 05 Dec 2012 16:16 #1072 by wifidi
Replied by wifidi on topic Re: melee health messages
This patch allows players to toggle their character to see NPC and their own character's melee health -- the 'look' health message -- as it changes in combat. Grouped characters toggled to see health messages see each others' health change unless away and asleep; grouped masters always see grouped members' health change.
Attachments:
Last edit: 05 Dec 2012 16:16 by wifidi. Reason: clarity

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

Time to create page: 0.176 seconds