"Player" pet from shadow master template

Weekly updated column for helping skill development. Users can't directly post requests but a PM or mail can be sent to Skill-Clinician.

Moderator: Skill Clinician

Post Reply
Crozain
Posts: 2
Joined: Fri Sep 18, 2020 2:55 pm
Denmark

"Player" pet from shadow master template

Post by Crozain » Mon Nov 02, 2020 8:06 pm

Hi everyone,

Lately i have been trying to make a clone of a paladin character from shadow master skill template. I have read through multiple threads where community members attempt to create a pet from SM, however i havent found any threads where someone created a shadow master with a melee character graphic.

All my attempts failed, however two of them came somewhat close:

Attempt a, my SM pet was invisible but moving around, i could see the light emitting in some radius from the pet.
to me this indicated that animations, extracted from the PA folder located in d2char.mpq, wasn't applied right, however looking in monstats2 all the animations (HD TR and so on) was enabled and files for the animations could be found in the PA folder. data\global\monster\PA.

the only way to get this working fully, was to enable bossinv in MonStats.txt however this results in the pet to dupe the players torso and weapon which i am not particularly interested in.

Attempt b, SM pet was fully visible as a paladin however unable to move.
I think the problem here stems from ShadowMaster AI being incompatible with the many animations applied on a player character, even if the animations duped to monsters folder.
however trying to mitigate this problem by making a identical setup with shadowmaster entry in monstats2 yielded no results.

my approaches are primarily from kb/viewarticle?a=265, kb/viewarticle?a=314 and viewtopic.php?t=51502

User avatar
Ogodei
Senior Moderator
Angel
Posts: 516
Joined: Thu Mar 10, 2016 8:31 am
Italy

Hand-picked

Re: "Player" pet from shadow master template

Post by Ogodei » Tue Nov 03, 2020 5:18 pm

the player-like look the Shadowmaster has is given by the state that it's assigned to the pet when it's summoned. Have a look at the 'aurastate' of the vanilla shadowmaster's summoning skill, and you'll see that it's called 'shadowwarrior'. If you take a look to said state in states.txt you will see that it's a morphing state that switches the monster's graphics to those of a player class (more info on it into the states.txt fileguide). You will basically have to clone the shadowwarrior state and change the kind of graphics used.
Also make sure to edit monequip.txt accordingly in order to give your pet the proper items it needs to look the way you want (i.e sword and shield)

Crozain
Posts: 2
Joined: Fri Sep 18, 2020 2:55 pm
Denmark

Re: "Player" pet from shadow master template

Post by Crozain » Tue Nov 03, 2020 7:14 pm

Ogodei wrote:
Tue Nov 03, 2020 5:18 pm
the player-like look the Shadowmaster has is given by the state that it's assigned to the pet when it's summoned. Have a look at the 'aurastate' of the vanilla shadowmaster's summoning skill, and you'll see that it's called 'shadowwarrior'. If you take a look to said state in states.txt you will see that it's a morphing state that switches the monster's graphics to those of a player class (more info on it into the states.txt fileguide). You will basically have to clone the shadowwarrior state and change the kind of graphics used.
Also make sure to edit monequip.txt accordingly in order to give your pet the proper items it needs to look the way you want (i.e sword and shield)
Hi Ogodei, seems i get the opportunity to thank you for your wonderful guides and help you've offered on the keep which has helped me a great deal in my modding endevour.
as it is now, i've made a state that works the same way shadowwarrior does. However the pet is only visible ingame if i enable bossinv from States.txt in which case my characters equipment is duped, well only gfx wise i believe (tested with a weapon that aplied amp on striking which did not work)

if the pet is invisible it must be a graphic/animation error. right now, i've extracted PA folder into global/monsters/PA, and in monstats2.txt i have enabled all between HD to S1 and mDT to mRN.

User avatar
Spectrum
Posts: 69
Joined: Mon May 12, 2003 12:40 pm
Location: Denmark
Denmark

Re: "Player" pet from shadow master template

Post by Spectrum » Sat Nov 06, 2021 11:05 am

Did you ever fix your invisibility problem? I ask because I am having a similar problem today. I was able to create a skill that lets my sorceress summon a flying scimitar. Alas, my scimitar is invisible (though I can hear it buzzing and see it moving around because of aura effects etc).

User avatar
loclazy
Posts: 11
Joined: Mon Nov 15, 2021 12:02 pm
United States of America

Re: "Player" pet from shadow master template

Post by loclazy » Tue Nov 30, 2021 6:37 pm

Spectrum wrote:
Sat Nov 06, 2021 11:05 am
Did you ever fix your invisibility problem? I ask because I am having a similar problem today. I was able to create a skill that lets my sorceress summon a flying scimitar. Alas, my scimitar is invisible (though I can hear it buzzing and see it moving around because of aura effects etc).
I'm trying to do the exact same thing as Crozain was doing, or basically, making a skill that classes able to summon a rare-equipped clone of themselves, will update you with my findings! since Amazon had her summon skill already, I think I'll upgrade her AI first.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 446
Joined: Fri Dec 01, 2017 2:08 am

Re: "Player" pet from shadow master template

Post by Cypress » Thu Dec 02, 2021 11:58 pm

Hi Spectrum, try not using the shadowmaster state. Transforming monsters into characters will cause invisibility, unless they are an original shadowmaster, shadowwarrior, valkyrie or have bossinv=1. Since you want a flying scimitar, you don't need the state that causes transformations, you can just use the monster's original graphics.

Hi loclazy.

Things to note:
(1) There is a hardcoded issue here. Namely, in monstats.txt: shadowwarrior and shadowmaster. These monsters are hardcoded to utilize character graphics without relying on bossinv. You can clone every piece of the shadows, except for the monster. You cannot make use of baseid connection either, it is hardcoded to the specific row.
(2) A monster that attempts to use character graphics via the state will become invisible, unless it is shadowwarrior or shadowmaster (or valkyrie).
(3) By default, shadowwarrior and shadowmaster have code=k9. This is an invisible token with all animmodes, which is used for the pre-form of a few monsters. The vines also use this code. This is the form (i.e. nothing) you will see if you do not use the hardcoded monster since it will be unable to transform into a character even with the proper state.

There are a few solutions. The most obvious is to use the intended, hardcoded monster rows, although that only works if you plan on only having a few monsters with the player's appearance. Crozain also found that bossinv=1 will make the monster visible and be equipped as you are, which is very functional, but will not be desirable if you want the monster to appear with a specific equipment set.

The final and most difficult solution is Crozain's second attempt, that is, re-creating the character as a monster. This has two major drawbacks: the monster's monequip settings and appearance will not match, you have to manually match them via monstats2; and your mod will be a lot bigger, since you will have to include the entirety of a character twice (the paladin for example will add an extra ~54 mbs to your mod; all the characters together will add hundreds of mbs). The process itself mostly isn't that bad though, all you really need to do is move CHARS to MONSTERS and then configure them appropriately in monstats2; you don't need to worry about animdata since that is already set.

Also for some reason I couldn't get helms to show up properly with their original names when converting characters into monsters, so I had to rename the files, for example from MSK to BLD (fortunately there are programs for mass file renaming, so that can be done in seconds). From what I can tell, the player-used names for helmets are invalid in monstats2.txt (maybe they did this intentionally so that shadows would not appear to have helmets despite having helmets equipped?)

If you get stuck converting the player to a monster, you can follow this guide: https://d2mods.info/forum/kb/viewarticle?a=265 and apply it to your shadowwarrior/shadowmaster clone.

And to Crozain, as to why your second attempt is unable to move (I do realize it's been more than a year, but I figure I might as well include this just in case anyone else gets tripped up): check monstats.txt. Shadowwarrior and shadowmaster have velocity and run=0. This is because they are normally transformed into assassins, which means they would inherit the assassin's movement speed, therefore not needing any base movement speed.

User avatar
loclazy
Posts: 11
Joined: Mon Nov 15, 2021 12:02 pm
United States of America

Re: "Player" pet from shadow master template

Post by loclazy » Fri Dec 03, 2021 4:25 am

Beautiful, thank you very much, Cypress!

I think I will follow suit with the Final Solution, as I have been merging mods, especially those GUI mods that allow expanded storage and extra mercenary equipment slots. Those are quite big with lots of GUI changes.

User avatar
loclazy
Posts: 11
Joined: Mon Nov 15, 2021 12:02 pm
United States of America

Re: "Player" pet from shadow master template

Post by loclazy » Fri Dec 03, 2021 8:49 am

Cypress wrote:
Thu Dec 02, 2021 11:58 pm
Hi Spectrum, try not using the shadowmaster state. Transforming monsters into characters will cause invisibility, unless they are an original shadowmaster, shadowwarrior, valkyrie or have bossinv=1. Since you want a flying scimitar, you don't need the state that causes transformations, you can just use the monster's original graphics.

Hi loclazy.

Things to note:
(1) There is a hardcoded issue here. Namely, in monstats.txt: shadowwarrior and shadowmaster. These monsters are hardcoded to utilize character graphics without relying on bossinv. You can clone every piece of the shadows, except for the monster. You cannot make use of baseid connection either, it is hardcoded to the specific row.
(2) A monster that attempts to use character graphics via the state will become invisible, unless it is shadowwarrior or shadowmaster (or valkyrie).
(3) By default, shadowwarrior and shadowmaster have code=k9. This is an invisible token with all animmodes, which is used for the pre-form of a few monsters. The vines also use this code. This is the form (i.e. nothing) you will see if you do not use the hardcoded monster since it will be unable to transform into a character even with the proper state.

There are a few solutions. The most obvious is to use the intended, hardcoded monster rows, although that only works if you plan on only having a few monsters with the player's appearance. Crozain also found that bossinv=1 will make the monster visible and be equipped as you are, which is very functional, but will not be desirable if you want the monster to appear with a specific equipment set.

The final and most difficult solution is Crozain's second attempt, that is, re-creating the character as a monster. This has two major drawbacks: the monster's monequip settings and appearance will not match, you have to manually match them via monstats2; and your mod will be a lot bigger, since you will have to include the entirety of a character twice (the paladin for example will add an extra ~54 mbs to your mod; all the characters together will add hundreds of mbs). The process itself mostly isn't that bad though, all you really need to do is move CHARS to MONSTERS and then configure them appropriately in monstats2; you don't need to worry about animdata since that is already set.

Also for some reason I couldn't get helms to show up properly with their original names when converting characters into monsters, so I had to rename the files, for example from MSK to BLD (fortunately there are programs for mass file renaming, so that can be done in seconds). From what I can tell, the player-used names for helmets are invalid in monstats2.txt (maybe they did this intentionally so that shadows would not appear to have helmets despite having helmets equipped?)

If you get stuck converting the player to a monster, you can follow this guide: https://d2mods.info/forum/kb/viewarticle?a=265 and apply it to your shadowwarrior/shadowmaster clone.

And to Crozain, as to why your second attempt is unable to move (I do realize it's been more than a year, but I figure I might as well include this just in case anyone else gets tripped up): check monstats.txt. Shadowwarrior and shadowmaster have velocity and run=0. This is because they are normally transformed into assassins, which means they would inherit the assassin's movement speed, therefore not needing any base movement speed.
Hi Cypress, I just checked and Bossinv is no longer available in current D2R files, and D2R will not read the new monster folder (which is the PA folder copied from Chars) in Global/Monsters path.

User avatar
Spectrum
Posts: 69
Joined: Mon May 12, 2003 12:40 pm
Location: Denmark
Denmark

Re: "Player" pet from shadow master template

Post by Spectrum » Fri Dec 03, 2021 10:04 am

Thanks for the replies. In my case, I was in D2R and I fixed my invisibility problem by updating monsters.json as described in this thread: How to clone monsters and make them visible in D2R mode? Or change monster appearance?

Post Reply

Return to “Skill Clinic”