Specialized guildmaster spec-proc

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 4 months ago #7258 by Sascha
Specialized guildmaster spec-proc was created by Sascha
So I'm looking to do several things with guildmasters and their related practices in an effort to refine the immersion of my game. This is a "help, how do I?" post.

First, I'd like to make it so the guildmasters only teach the skills related to their class. For example, the warrior guildmaster to only teach warrior skills.

Then, I'd like the guildmasters to teach same-class skills at a lower practice cost than cross-class skills. For example, if a warrior comes to the warrior guildmaster to learn kick, the prac cost to do so would be different than if a rogue wanted to learn kick at the warrior guildmaster.

Finally, I would like to have some guildmasters teach tiered skills. For example, all rogues could learn sneak at a generic rogue guildmaster, but to learn pick they'd have to find a specific guildmaster.

I found a suggestion regarding some of this related to scripts and some code changes to reflect the skill learned via the script when typing 'practice' but my intuition tells me there's more to it than that. Can anyone help me break this down?

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
3 years 4 months ago #7263 by WhiskyTest
Replied by WhiskyTest on topic Specialized guildmaster spec-proc
My thoughts on how to achieve this:

1.) Guildmaster will only teach the skills of their class
The mob needs to be given a class
-or-
The mob needs to be given skills it can teach

2.) Guildmaster teaches these skills to other classes at a different cost
The mob needs to be given a class
-or-
The skills need to be assigned to a specific class somehow

3.) Certain skills require specialized guildmaster
The mob needs to be given skills it can teach, and only teaches those skills

Based solely off your description I would go with setting a class for the guildmaster, and assigning skills to the guildmaster.

The code changes for this would be:
allow Mobs to be given classes and skills, medit changes for builders, save and read to disk.
Changes to the 'practice' command to alter the costs, and to check if the guildmaster knows the skill that is being learnt.

Decent amount of work, but you can tackle it in parts. I'd suggest starting by adding classes to mobs and see how you get on with that.

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

More
3 years 4 months ago #7272 by Parnassus
Replied by Parnassus on topic Specialized guildmaster spec-proc
Well, Fizban always said something like most code could be replaced with triggers. I don't know how difficult the code would be but a trigger is possible. It would have to be a pretty long trigger or a large group of triggers. However, you'd be able to have a trigger check for class and give a cost depending on the class. I think a "nop" payment would work better than a bribe trigger. You'd need to enter in each skill (that's the long part), do an ifcheck or case to see if that class is allowed to learn the skill and set a price. I'd do this using "set" along with the cost of the skill.
Forum trigger code (won't work in the game):
switch %skill.name%
 case kick
     if %actor.class% == warrior
        set kick 100
     elseif %actor.class% == rogue
        set kick 200
     else
        set kick 0
     endif
 break
nop %actor.gold (%kick%)%
%set% %actor.skill% whateverpercentage
I don't know if the skills are set up this way so this might need to be coded. The syntax is actually:
skillset <name> '<skill>' <value>
but I don't know if that would work in a trigger.

You've mentioned that you want builders to be able to add a spec-proc without needing a coder. Using triggers would work with this.

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

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 4 months ago - 3 years 4 months ago #7273 by Sascha
Replied by Sascha on topic Specialized guildmaster spec-proc
Could be a way to approach it, absolutely. Thank you so much! I don't mind spec-procs overall; they execute quickly. In a prior mud what I (and other Imms would do) was create a mob, add the SPEC flag, and then a list would come up of existing spec-procs and ask which one to add. For me, that was a lot easier than having to go into the code to designate a mob with a spec-proc in there and then wait for reboot for it to take effect. That's what I was hoping could be done here, actually, and bypass triggers altogether because otherwise I have to double-check the triggers written by builders, make sure they're in line with balance, design plans, etc. and so forth - which could be a time sink for me in the long run which could delay in expansion roll-outs.

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

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

More
3 years 4 months ago #7275 by WhiskyTest
Replied by WhiskyTest on topic Specialized guildmaster spec-proc
The challenge with adding spec-procs to mobs at runtime is then loading them back from disk.
It's easy enough to add a spec-proc to a mob, but as soon as you copyover the change is lost. I gett error messages about attempting to assign specials to non existant mobs.

I think it's because spec-procs are added to the mob_index once all mobs are loaded, rather than during index booting for mobs. I'm not very familiar with that part of the code which doesn't help.

Maybe there is a way to re-read all the mob files again during the assigning_functions phase, but that would be double handling...

Further thinking required

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

More
3 years 4 months ago #7276 by WhiskyTest
Replied by WhiskyTest on topic Specialized guildmaster spec-proc
OK I have a work around for this.
It turns out that rooms are cycled through during assign_rooms() so I don't feel so bad about my implementation.

The patch includes additions to medic so builders can add a Spec-Proc on the fly.
It saves the spec-proc number to disk using a new mob_special value called spec_proc.
During boot time interpret_espec() will look for "SpecProc" and save the value to the prototype.

When assign_mobiles() runs, it checks through the mob_index and if the spec_proc value is anything other than -1 it will assign the spec_proc to the mobile.

Note: it is entirely possible to assign object and room spec_procs to mobiles, so I don't know what the consequences of that will be. There doesn't seem to be any way to distinguish which spec_procs are for mobs/objs/rooms.

If anyone has any cleaner way of implementing this, or bug fixes etc, please post them up.
Attachments:

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

More
3 years 4 months ago #7277 by WhiskyTest
Replied by WhiskyTest on topic Specialized guildmaster spec-proc
tbaMUD does have skillset code in it, which is fantastic.
An example that increases a characters Armor skill by 5 each time:
eval x %actor.skill(armor)% + 5
%actor.skillset("armor" %x%)%
%echo% Armor is now %actor.skill(armor)%

Sascha as a suggestion to address the balance and quality control issues you could have pre-made triggers that only one person can edit. (ie: put them in a special zone and restrict editing)
Then all builders wishing to add guildmasters must use the provided triggers.

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

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #7431 by Sascha
Replied by Sascha on topic Specialized guildmaster spec-proc
It may be that two cups of coffee isn't enough yet this morning, but did you actually write and release a patch for this, Whisky? I don't see it in this thread, only mention of it. If you did, can you please point me to it? You know me - I'm always up to trying whatever you put together. :) Thanks!

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
3 years 3 months ago #7432 by Fizban
Replied by Fizban on topic Specialized guildmaster spec-proc
There's an attachment attached to his post two above yours. I think that's the spec-proc code he was referencing in his post.

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

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #7434 by Sascha
Replied by Sascha on topic Specialized guildmaster spec-proc
Gotcha, thank you. I thought there wasn't enough coffee, yet...

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.

  • Sascha
  • Sascha's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 2 months ago #8325 by Sascha
Replied by Sascha on topic Specialized guildmaster spec-proc
Revisiting this...

So I have a mob that will successfully teach a skill via a trigger. In this case, it is sneak. When my tester practices, we see this:
prac
The following skills are available:  
Skill Name | % Trained In Skill
Sneak      | 0%  

219hp 436mn 703mv>
prac sneak
You practice for a while...

219hp 436mn 703mv>
prac
The following skills are available:  
Skill Name | % Trained In Skill
Sneak      | 12%  

219hp 436mn 703mv>
prac sneak
You practice for a while...

219hp 436mn 703mv>
prac
The following skills are available:  
Skill Name | % Trained In Skill
Sneak      | 24%  

219hp 436mn 703mv>
prac sneak
You practice for a while...

219hp 436mn 703mv>
prac
The following skills are available:  
Skill Name | % Trained In Skill
Sneak      | 36%  

219hp 436mn 703mv>

However, when we go to check pracs, it doesn't show up:
prac
You have 111 practice sessions remaining.
You know of the following spells:
adder tongue          (not learned)
aligning the matrix   (not learned)
arrows of fire        (awful)
blindness             (superb)
blossoms of fire      (not learned)
call lightning        (not learned)
compulsion            (not learned)
control weather       (not learned)
craft                 (not learned)
create food           (not learned)
create water          (not learned)
cure blind            (not learned)
cure critic           (not learned)
cure light            (not learned)
curse                 (not learned)
darkness              (not learned)
earthquake            (not learned)
fear                  (not learned)

[ Return to continue, (q)uit, (r)efresh, (b)ack, or page number (1/2) ]
finder                (not learned)
fireball              (not learned)
flame tongues         (not learned)
folded light          (not learned)
group heal            (not learned)
hardened air          (not learned)
harm                  (not learned)
heal                  (not learned)
lightning bolt        (not learned)
mount                 (average)
remove curse          (not learned)
remove poison         (not learned)
reveal                (not learned)
sense life            (not learned)
shield of air         (not learned)
shocking grasp        (not learned)
sleep                 (not learned)
strength              (not learned)
tame                  (not learned)
word of recall        (not learned)

219hp 436mn 703mv>

Though when activating it, it works, and is reflected in stat:
You are known as XXX, the level 40 female Magic User
Str: [12/0]  Int: [15]  Wis: [14]  Dex: [13]  Con: [9]  Cha: [8]
AC: [80+0/10], Hitroll: [-2], Damroll: [ 4]
Gold: [     1004], Bank: [     2600] (Total: 3604) 
Affected by: SNEAK 

So my question is, how do I get the items practiced separately via triggers to reflect in prac overall? Anyone have 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
2 years 2 months ago - 2 years 2 months ago #8327 by Papaya Pete
Replied by Papaya Pete on topic Specialized guildmaster spec-proc
Hmmm, the one thing I noticed at first was the list of skills when you type "prac" doesn't show the skill hide. Your test character is a magic user; the code doesn't assign that skill to that class, so it won't show up in the list when you type "practice."

Your tester likely has the sneak skill at 36%; the command "sneak" doesn't have an if statement that checks the user's class, so if your tester's got the skill trained via scripts the code will allow her to perform the skill. If this isn't what your goal is regarding skill training, you'll have to throw in an if statement or some other method for checking the class and denying all those non-thieves the chance to steal their secrets.

Edit: huh, I should've scrolled up to see what the whole topic was. My mistake!
Anyways, one way you could try and solve this is actually assign every skill you want to be cross class to every single class, but throw in a check to see if the character has any training in said skill. If they have at least 1% in it, then write the line out normally. If the skill is a big fat 0, don't print out the line. For example, your above "practice" skill list would end up looking like this:
prac
You have 111 practice sessions remaining.
You know of the following spells:
arrows of fire        (awful)
blindness             (superb)
mount                 (average)

219hp 436mn 703mv>

Some players might not like this because they may not know what skills are available for them to learn. However, trainers at different guilds list what they teach using your scripts, am I right? Problem solved! And it also opens the door to hiding some skills that are very potent, giving determined (or those with way too much time on their hands) players something to search for and discover.
Last edit: 2 years 2 months ago by Papaya Pete.

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

Time to create page: 0.131 seconds