Resetting practices

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
1 year 4 months ago #7418 by Sascha
Resetting practices was created by Sascha
Is there a way for an Imm to reset a player's practices to 0, and wipe out whatever the character has practiced, so the player can start again without making a new character? Am I missing a very basic command?

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

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

More
1 year 4 months ago #7420 by Treblin
Replied by Treblin on topic Resetting practices
Set playername prac x

Skillset playername 'skillorspellname' x

X = a number 0 to 100 equalling the percentage its learned, 0 being unlearned

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

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
1 year 4 months ago #7421 by Sascha
Replied by Sascha on topic Resetting practices
Thanks! What I meant is, is there a way to do it as a bulk action to wipe out all skills/spells with one command, and return all the characters pracs to their max available so it's as if they have practiced nothing at all? I'm thinking of a full practice wipe and reset, not doing it selectively.

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

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

More
1 year 4 months ago #7422 by Treblin
Replied by Treblin on topic Resetting practices
Ah sorry misunderstood.

You could technically use the advance command to set the character back to level one. This will reset all skills and spells. You can then.advance them back to their original level. This is a very sloppy way to handle it but works. Just note this will reroll the players hp mana and moves and when advancing back upwards. As well if the player had practices they will keep them and get new ones added to that number resulting in the player potentially gaining more than intended.

Tl;dr. There's no stock answer.

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

More
1 year 4 months ago - 1 year 4 months ago #7424 by Fizban
Replied by Fizban on topic Resetting practices
I just wrote this in a few minutes but it should work.
ACMD(do_pracreset)
{
  struct char_data *victim;
  int i;

  if (*argument) {
    if (!(victim = get_char_vis(ch, argument, NULL, FIND_CHAR_WORLD))) {
      send_to_char(ch, "That player is not here.\r\n");
      return;
    }

  } else {
    send_to_char(ch, "Reset whose practices?\r\n");
    return;
  }
  if (GET_LEVEL(ch) <= GET_LEVEL(victim)) {
    send_to_char(ch, "Maybe that's not such a great idea.\r\n");
    return;
  }
  if (IS_NPC(victim)) {
    send_to_char(ch, "NO!  Not on NPC's.\r\n");
    return;
  }
  for (i = 1; i <= MAX_SKILLS; i++)
    SET_SKILL(victim, i, 0);

  switch (GET_CLASS(victim)) {

  case CLASS_MAGIC_USER:
  case CLASS_WARRIOR:
  case CLASS_CLERIC:
    break;

  case CLASS_THIEF:
    SET_SKILL(victim, SKILL_SNEAK, 10);
    SET_SKILL(victim, SKILL_HIDE, 5);
    SET_SKILL(victim, SKILL_STEAL, 15);
    SET_SKILL(victim, SKILL_BACKSTAB, 10);
    SET_SKILL(victim, SKILL_PICK_LOCK, 10);
    SET_SKILL(victim, SKILL_TRACK, 10);
    break;
  }
  GET_PRACTICES(victim) = 0;
  if (IS_MAGIC_USER(victim) || IS_CLERIC(victim))
    GET_PRACTICES(victim) += ((MAX(2, wis_app[GET_WIS(victim)].bonus)) * GET_LEVEL(victim));
  else
    GET_PRACTICES(ch) += ((MIN(2, MAX(1, wis_app[GET_WIS(victim)].bonus)) * GET_LEVEL(victim)));

  send_to_char(ch, "%s", CONFIG_OK);
  save_char(victim);
}

Slap that in act.wizard.c

and add this in the appropriate spot in interpreter.c
{ "pracreset"  , "pracr"     , POS_DEAD    , do_pracreset  , LVL_GRGOD, 0 },

Lastly add
ACMD(do_pracreset);

in act.h
Last edit: 1 year 4 months ago by Fizban.
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
  • Gold Boarder
  • Gold Boarder
More
1 year 4 months ago - 1 year 4 months ago #7430 by Sascha
Replied by Sascha on topic Resetting practices
I'm going to try this today. If it works (and I have no reason to think it won't, it looks clean) I think this would be a great addition to the next release. Here are some reasons why.

First, I like player retention. If someone is new to the game and doesn't understand practices overall, this gives the ability for them to re-allocate their practices instead of quitting and going somewhere else. Or, worse, turning on the TV...

Second, I like game history. When you have a player throw time and energy building their character, and the character becomes part of the culture of the game because of legendary exploits or just being an all-around cool character, this allows them to send their character in a new direction instead of making a new one. In a worse-case scenario it could stop a player from quitting entirely because they are so enamored with this one character name and reputation that they just don't want to play anything else.

Third, I like player control of their own character destiny. If they go initially with light things like dodge and parry, and then something happens to them in game and they think for roleplay reasons they should switch to being more tankish, this allows them to move into their own story arc so to speak and back it up with skills available to them.

I plan to implement this in a way that has a cost to it and is rpishly explained in the game so that players have full control and they don't need to rely on an Immortal to do it for them. However, that cost needs to be rather high - they will need to work for this. Whether it's a quest completion, or quest points spent, it's going to not be a minimal or frivolous action.

Updated to add: Works like a charm. General note to anyone wanting to use this, be sure your classes match your game, as well as any base practices that you initially grant at at original character creation. My in-game help file for it is

PRACRESET PRACR

Usage: pracreset [target]

Pracreset resets all skills on the target to unlearned status, and resets the
target's available practice points to their maximum. The skills that are
automatically granted upon character creation remain but are set to their base
learned percentage for a level 1 character.

TL:DR - Thank you. :)

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000
Last edit: 1 year 4 months ago by Sascha.

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

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
5 months 4 weeks ago #8282 by Sascha
Replied by Sascha on topic Resetting practices
I'm not sure what happened but this seems to no longer work.

[ 715] Hawk's Square [ * ] [ City ][T 497 1219]
The heart of the city, the square is a large open grass area with a giant
leatherleaf tree at its center, where it provides shade for an ornate fountain.
Oversized benches seemingly made from a single piece of wood surround the
fountain, with beds of colorful flowers flowing like rivers. Several side
streets branch off further into the city.
[ Exits: n e s w ]
[728] The Founder's Monument for the City of Hawk's Gate rises from the ground.
[719] A three tiered fountain holds pools of clear water.
Vivtest the Hunter is standing here.
[726] [TRIGS] A washerwoman is here with a stack of laundry.

i1 510hp 110mn 92mv>
pracreset vivtest
That player is not here.

i1 510hp 110mn 92mv>

A Hawkguard has arrived.

i1 510hp 110mn 92mv>
pracreset washerwoman
That player is not here.


Clearly the player is in front of me, and for the washerwoman it should return "NO! Not on NPC's."

This is how the snippet currently looks in my game:
ACMD(do_pracreset)  /* Removes all practiced skills, resets prac points available */
{
  struct char_data *victim;
  int i;

  if (*argument) {
    if (!(victim = get_char_vis(ch, argument, NULL, FIND_CHAR_WORLD))) {
      send_to_char(ch, "That player is not here.\r\n");
      return;
    }

  } else {
    send_to_char(ch, "Reset whose practices?\r\n");
    return;
  }
  if (GET_LEVEL(ch) <= GET_LEVEL(victim)) {
    send_to_char(ch, "Maybe that's not such a great idea.\r\n");
    return;
  }
  if (IS_NPC(victim)) {
    send_to_char(ch, "NO!  Not on NPC's.\r\n");
    return;
  }
  for (i = 1; i <= MAX_SKILLS; i++)
    SET_SKILL(victim, i, 0);

  switch (GET_CLASS(victim)) {

  case CLASS_MAGICUSER:
      SET_SKILL(victim, SPELL_ARROWSOFFIRE, 5);
    break;

  case CLASS_WARRIOR:
       SET_SKILL(victim, SKILL_BASH, 5);
    break;

  case CLASS_HUNTER:
      SET_SKILL(victim, SKILL_KICK, 5);
    break;

  case CLASS_ROGUE:
    SET_SKILL(victim, SKILL_STEAL, 5);
    break;
  }
  GET_PRACTICES(victim) = 0;
  if (IS_MAGICUSER(victim) || IS_HUNTER(victim))
    GET_PRACTICES(victim) += ((MAX(2, wis_app[GET_WIS(victim)].bonus)) * GET_LEVEL(victim));
  else
    GET_PRACTICES(ch) += ((MIN(2, MAX(1, wis_app[GET_WIS(victim)].bonus)) * GET_LEVEL(victim)));

  send_to_char(ch, "%s", CONFIG_OK);
  save_char(victim);
}

Any ideas?

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

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

More
5 months 4 weeks ago #8284 by WhiskyTest
Replied by WhiskyTest on topic Resetting practices
 char arg[MAX_INPUT_LENGTH]; 

 one_argument(argument, arg);
  
  if (*arg) {
    if (!(victim = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD))) {
      send_to_char(ch, "That player is not here.\r\n");
      return;
    }

Also increase your awesome by changing the player not here message with this:
send_to_char(ch, "%s", CONFIG_NOPERSON);

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

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
5 months 4 weeks ago #8285 by Sascha
Replied by Sascha on topic Resetting practices
Et voila! Thanks, Whisky. :)

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

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

More
5 months 1 week ago #8292 by rudeboyrave
Replied by rudeboyrave on topic Resetting practices
nice snip, this looks handy

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

Time to create page: 1.543 seconds