Skip to content

Animal Companion/Familiar scaling question

Is it possible to make it so that Animal Companions and Familiars scale with character level rather than class level? If so what would I need to modify to make this happen? Thank you in advance!

Comments

  • BalkothBalkoth Member Posts: 161
    Just to clarify, you're saying you want something like a Druid 1/Fighter 39 to have the same power of animal companion as a Druid 40?
  • Nic_MercyNic_Mercy Member Posts: 420
    Balkoth wrote: »
    Just to clarify, you're saying you want something like a Druid 1/Fighter 39 to have the same power of animal companion as a Druid 40?

    Yes. I realize the balance issues, but I'd still like to know if its possible to do.
  • BalkothBalkoth Member Posts: 161
    I was going to suggest a scripted solution to simulate it but the gap would simply be too large.

    I'd probably look into how Druid and Ranger are defined as boosting Animal Companion in the 2das and add that to every single class.
  • Nic_MercyNic_Mercy Member Posts: 420
    Balkoth wrote: »
    I was going to suggest a scripted solution to simulate it but the gap would simply be too large.

    I'd probably look into how Druid and Ranger are defined as boosting Animal Companion in the 2das and add that to every single class.

    I'll take a look at the 2da's then! Thanks for the suggestion!
  • Nic_MercyNic_Mercy Member Posts: 420
    edited August 2023
    So even though I just don't have the brain power to do real scripting, I tried to write a script to make Familiars/Animal Companions scale with total hit dice... but it won't compile. Can anyone see what's wrong and a way to make this script work?
    // Function to get the total hit dice of the character.
    int GetTotalHitDice(object oPC)
    {
        // Assuming the total hit dice is stored in a variable called "total_hit_dice."
        // Modify this line according to how your game stores the total hit dice value.
        int totalHitDice = GetLocalInt(oPC, "total_hit_dice");
    
        // If the total hit dice is zero or less (invalid value), default to a level of 1.
        if (totalHitDice <= 0)
            return 1;
    
        return totalHitDice;
    }
    
    // Function to summon the animal companion with a level equal to the total hit dice of the character.
    void SummonAnimalCompanion(object oPC)
    {
        // Get the total hit dice of the character.
        int level = GetTotalHitDice(oPC);
    
        // Check if the character already has a animal companion. If yes, destroy it before summoning a new one.
        object oAnimalCompanion = GetAnimalCompanion(oPC);
        if (GetIsObjectValid(oAnimalCompanion))
            DestroyObject(oAnimalCompanion);
    
        // Summon the animal companion at the character's location with the determined level.
        oAnimalCompanion = CreateAnimalCompanion(oPC, GetLocation(oPC), level);
    
        // Optional: You can do additional customizations for the animal companion here, such as setting its appearance, name, etc.
    
        // Associate the animal companion with the character.
        SetMaster(oAnimalCompanion, oPC);
    }
    
    // Main function that calls the animal companion summoning process.
    void main()
    {
        object oPC = GetAnimalCompanionMaster();
    
        if (!GetIsObjectValid(oPC))
            return;
                // Get the total hit dice of the character.
        int level = GetTotalHitDice(oPC);
    
        // Check if the character already has a animal companion. If yes, destroy it before summoning a new one.
        object oAnimalCompanion = GetAnimalCompanion(oPC);
        if (GetIsObjectValid(oAnimalCompanion))
            DestroyObject(oAnimalCompanion);
    
        // Summon the animal companion at the character's location with the determined level.
        oAnimalCompanion = CreateAnimalCompanion(oPC, GetLocation(oPC), level);
    
        // Optional: You can do additional customizations for the animal companion here, such as setting its appearance, name, etc.
    
        // Associate the animal companion with the character.
        SetMaster(oAnimalCompanion, oPC);
    
        SummonAnimalCompanion(oPC);
    }
    
  • ForSeriousForSerious Member Posts: 466
    edited August 2023
    SummonAnimalCompanion is a built-in function. You probably cannot override it. As in: You need to give your function another name.
    You can delete your GetTotalHitDice function and just use the built-in GetHitDice();
Sign In or Register to comment.