Of races and item usage / interaction...

gestalt17

First time out of the vault
I've been playing around with a custom Dogmeat recruit for the original campaign (using Redux 1.3), and I've noticed a few things:

- Setting the "Race Type" to "Dog" forces Dogmeat to use the "MutantDog.spr" sprite. He can disarm mines with a usage animation (scratching with his hind leg), but if given a mine from another recruit, he is unable to plant it.

- Setting the "Race Type" to "Wolf" forces Dogmeat to use the "Wolf.spr" sprite, which can be colored to look more like a German Shepard (in line with Fallout 4's version). However, this variant of Dogmeat does not seem to have any usage animations, and cannot even interact with anything, let alone disarm/plant mines.

- Playing around with other Race Types such as "UniqueOther" yielded nothing better.

The main point is, I'm trying to create a canine recruit capable of a limited range of basic object interaction like some of the other BOS/Humanoid races... still can't use firearms or melee weapons (no need for that), but able to do simple things such as opening doors, disarming/planting traps (with their mouths?), etc... but none of the currently available races in the game provide a good combination.

Any ideas where to go from here? Should I (and how to) create a new race? Do I need to edit any sprites? Hell, can the FT Improver utility help at any stage along the way?
 
He I have some pointers for you. A bit of work, but you'll manage!

The way to use UniqueOther or UniqueHumanoid race is to specify a custom sprite to the entity a little bit below (under Image-Sprite). You will find it easily. The difference between UniqueOther and UniqueHumanoid is that UniqueOther don't play any sounds and UniqueHumanoid play some human sounds (when hurt for example). There may be some other differences like basic resistances and stats but I don't know them much.

If you use about any other race, the custom sprite option will be of no use at all. Like you said, it is assigned automatically. Some races like "GunTurret01" also work with custom sprite (that is why I was able to assign the race "GunTurret01" to a bookshelves in my mod and give it a shelves sprite). The particularity of "GunTurret01" is that its blood is black like a robot.

If you want to make more actions with your custom sprite recruits (like dogs), there is only one thing to do : modify the sprite itself. The sprite controls the possibility of using objects and doing actions. It is as simple as that, if the proper animation does not exist in the sprite, the character will do nothing. If the action exists (even without a proper animation), then the action is possible. The reason why the dog can disarm mines is probably because it uses the animation "MagicHands" that almost all sprite have.

To modify a sprite, you need to use a program called "Sprite Editor". You can find it in many places. If you want to add for example a melee attack to a sprite (like club or knife), you first need to add the proper animation, then you need to assign animation frames to it (I did that with existing animation frames from other animations like punch and else). Somewhere in the animation (Sequence frame), you need to add the term "Sound" for a sound to be played during the attack, then at the end of the animation sequence, you need to add the term "Hit" for the character to actually hit another character during the attack. You do the same for the guns but this is a little bit more complicated, as you must use the term "Fire (3 args)" with 3 parameters to specify from where exactly in the X Y Z axis the bullet will start to move. The term "Fire (3 args)" also work for throwing.

That's it! If you need some examples to imitate, check an existing sprite that contains all the moves a player can actually do, like the basic TribalMale sprite.
 
Thanks, that clears things up quite a bit.

With the help of JarekFall's Sprite Creator, I've been able to spend a good deal of time exploring "TribalMale.spr" and comparing it to the canine ones. You're right, it appears humanoids have multiple variations of the MagicHands animation sequence, based on both stance (CrouchMagic & ProneMagic) and relative position of target interactable (StandMagichigh & StandMagiclow)... not to mention having to repeat them all for the eight cardinal / ordinal directions, heh.

I think, with a bit of practice, I should be able to take some pre-existing sequences (and the images that comprise them) to make new "StandMagichigh" & "StandMagiclow" sequences for the Wolf sprite. That is, as long as I make sure to include the appropriate *special* frames and parameters (like "Sound" or "Time of displaying" etc.) where they belong. Hopefully afterwards, a custom "Dogmeat.spr" with the extra actions will combine seamlessly with races like "UniqueOther" (assuming I don't care about extra sounds which "UniqueOther" lacks) and give me the canine companion I've always wanted.

Cheers again for pointing me in the right direction.
 
Made some progress. Using my new "Dogmeat.spr" sprite, I've created a new recruit under the "UniqueOther" race and set him loose in Brahmin Woods with an AP mine in his starting inventory. Thanks to some newly defined "StandMagichigh", "StandMagiclow" & "StandPickup" sequences, our intrepid canine friend was not only able to plant & disarm the mine, but was also able to interact with other objects, such as looting the corpse of the poor raider that stepped on the aforementioned trap, and opening doors.

However, I noted that Actors using the "UniqueOther" race all defaulted to using the humanoid "Punch" & "Kick" series of melee attacks. In an effort to change this, I tried to switch the race back to "Wolf" to make use of their "Snap" & "Maul" attacks, but doing so prevented me from using my "Dogmeat.spr" sprite. Renaming it to "Wolf.spr" and backing up the original didn't do much; the in-game recruit simply reverted back to the Wolf state mentioned in the opening post, where it couldn't make use of any interaction animations, regardless of whether they existed in the sprite file or not.

So I resorted to opening up both "core/tables/races.txt" and "core/locale/game/race.txt" and adding additional lines in an attempt to define a new "Dogmeat" race with RaceIndex 46 (right below the last entry, "UniqueOther" // 45), and tie the "dogSnap" & "dogMaul" entities to it in the Unarmed Tables.

// Race PhysicalType TraitType RaceIndex
{ {Dogmeat}, {Dog}, {Dog}, }, // 46

Sadly, my new race definition does not seem complete, as it failed to appear in the Race Type dropdown field in the FT Entity Editor.

Any ideas on where to go from here?
 
Hum... I am surprised to hear that it does not work for you to select the wolf race and modify wolf.spr sprite directly for it to follow your intentions. It should work. But I don't think it is the best solution anyways, because if any wolf in the game can now open doors and disarm mines that could be a bit weird...

There may be some ways to work out the punch or kick problem. Try sticking on UniqueOther race and modify it in the table like : { {UniqueOther}, {Dog}, {Dog}, }, // 45. I am almost certain adding new races won't work at all. I tried this already and it didn't work. I assumed at that time I had to stick with the races already there...
 
Turns out that neither the "core/tables/races.txt" or "core/locale/game/race.txt" were affecting the state of the FT game or editor, regardless of any changes made to them. Editing the "UniqueOther" race to use "Dog" for both the PhysicalType & TraitType yielded no results, other than keeping the recruit on Punch and Kick.

Outside of some cryptic "Import XXX" commands in the Campaign Editor part of the FT Editor, I don't see any reliable way to "compile" any changes made to the core tables into the base game. If I'm feeling adventurous one day, I might experiment with a clean install....

Oh well, can't have everything. In any case, the damage values only differ by as much as 5-10 points between humanoid and canine melee attacks (with canines coming out on top), so I'll just roleplay it as a dog who's not as combat-oriented, in return for some deity-like intelligence and paws with good dexterity.

Thanks Hugo for staying all the way to the end.
 
It's a pleasure to put my brain to the cause sometimes! :D

Thinking about it, I think I understand why the new animations can't really work if you choose a race like "dog" and modify the sprite to add the chosen animations. I noticed a while earlier than you can't assign any race to a player or recruit and expect to always work. When assigning new sprites (races) to prefab characters (wanted to have some starting characters to use the mutant, raider, super-mutant and other sprites), I noticed at that time that many races don't support the stand/crouch/prone positions even if theses animations exists in the sprite... Seems like the hard-coded features know that theses particular races (like dog) don't need some specific animations and will not use them even if they exist. Seems you are really stuck with "UniqueOther".

There may be something to do with renaming the "weapons" like punch and kick for something else (you do that under core/locale/game/weapons.txt) that could fit the dog too like "unarmed" or "attack". You can also try to give the dog a non-lootable weapon like "dogSnap" under weapons/punches in each hand and see what happens. If you can take that weapon out or if the weapon don't show because it is non-lootable then it is wasted energy I am sorry.

Another thing... If you use custom armors with FT Improver then you are screwed because the dog will be able to wear the armors and change it's appearance to a human wearing that armor! I solved this problem by giving the dog 1 charisma and all human recruits a minimum of 2 of charisma. Then ALL armors, unarmed weapons and other problematic objects that should not be used by dogs or other animals have a required stat of 2 Charisma. A lot of work, but I tested it and it works good. It is nice also because you can assign any wearable or usable object to stop working if used by a dog.
 
Back
Top