Player Resource Consortium

 

Author Topic: Turn monster abilities to have a recharge time and to scale appropriately  (Read 8121 times)

0 Members and 2 Guests are viewing this topic.

May 29, 2012, 04:52:56 AM
  • Sr. Associate
  • ****
  • Posts: 271
  • Karma: +0/-0
  • Gender: Male
    • View Profile

where does one modify the monster abilities (listed under the "monster ability" tab) in order to make them more similar to the PnP?
My first PrC+Q module (and 1st mod ever): Revamped OC

http://neverwinter.nexusmods.com/mods/163


May 29, 2012, 10:51:05 AM
Reply #1

where does one modify the monster abilities (listed under the "monster ability" tab) in order to make them more similar to the PnP?

Find their scripts in the spells.2da.  The NWN Wiki is also a good place to find out.
« Last Edit: May 29, 2012, 10:52:49 AM by DM Heatstroke »
HEATSTROKE


May 29, 2012, 11:44:01 AM
Reply #2
  • Sr. Associate
  • ****
  • Posts: 271
  • Karma: +0/-0
  • Gender: Male
    • View Profile

ah those abilities (like Bodak's death gaze or cockatrice's petrify touch) are considered as spells?

apparently, an example is that it should work already

Quote
//::///////////////////////////////////////////////
//:: Dragon Breath Fire
//:: NW_S1_DragFire
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
    Calculates the proper damage and DC Save for the
    breath weapon based on the HD of the dragon.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 9, 2001
//:://////////////////////////////////////////////

const string DRAGBREATHLOCK = "DragonBreathLock";


//modified to use the breath include - Fox
#include "prc_alterations"
#include "prc_inc_breath"

void main()
{
    // Check the dragon breath delay lock
    if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK))
    {
        SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon");
        return;
    }

    //Declare major variables
    int nAge = GetHitDice(OBJECT_SELF);
    int nDCBoost = nAge / 2;
    int nDamageDice;
    struct breath FireBreath;

    //Use the HD of the creature to determine damage and save DC
    if (nAge <= 6) //Wyrmling
    {
        nDamageDice = 2;
    }
    else if (nAge >= 7 && nAge <= 9) //Very Young
    {
        nDamageDice = 4;
    }
    else if (nAge >= 10 && nAge <= 12) //Young
    {
        nDamageDice = 6;
    }
    else if (nAge >= 13 && nAge <= 15) //Juvenile
    {
        nDamageDice = 8;
    }
    else if (nAge >= 16 && nAge <= 18) //Young Adult
    {
        nDamageDice = 10;
    }
    else if (nAge >= 19 && nAge <= 21) //Adult
    {
        nDamageDice = 12;
    }
    else if (nAge >= 22 && nAge <= 24) //Mature Adult
    {
        nDamageDice = 14;
    }
    else if (nAge >= 25 && nAge <= 27) //Old
    {
        nDamageDice = 16;
    }
    else if (nAge >= 28 && nAge <= 30) //Very Old
    {
        nDamageDice = 18;
    }
    else if (nAge >= 31 && nAge <= 33) //Ancient
    {
        nDamageDice = 20;
    }
    else if (nAge >= 34 && nAge <= 37) //Wyrm
    {
        nDamageDice = 22;
    }
    else if (nAge > 37) //Great Wyrm
    {
        nDamageDice = 24;
    }

    //create the breath - 40' ~ 14m? - should set it based on size later
    FireBreath = CreateBreath(OBJECT_SELF, FALSE, 40.0, DAMAGE_TYPE_FIRE, 10, nDamageDice, ABILITY_CONSTITUTION, nDCBoost);

    //Apply the breath
    PRCPlayDragonBattleCry();
    ApplyBreath(FireBreath, GetSpellTargetLocation());

    //Apply the recharge lock
    SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE);

    // Schedule opening the delay lock
    float fDelay = RoundsToSeconds(FireBreath.nRoundsUntilRecharge);
    SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(FireBreath.nRoundsUntilRecharge) + " rounds.");

    DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK));
    DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now"));
}

but when opening it in the toolset, it says that those 2
#include "prc_alterations"
#include "prc_inc_breath"
are not found. is that normal?
« Last Edit: May 29, 2012, 12:07:59 PM by Dark_Ansem »
My first PrC+Q module (and 1st mod ever): Revamped OC

http://neverwinter.nexusmods.com/mods/163


May 29, 2012, 03:23:02 PM
Reply #3
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

but when opening it in the toolset, it says that those 2
#include "prc_alterations"
#include "prc_inc_breath"
are not found. is that normal?
By default prc_include.hak is not added to mod during installation. It's only needed to compile prc scripts, and we don't recommend doing that in Toolset (use prc script compiler or advanced script compiler).


May 29, 2012, 04:46:22 PM
Reply #4
  • Sr. Associate
  • ****
  • Posts: 271
  • Karma: +0/-0
  • Gender: Male
    • View Profile

My first PrC+Q module (and 1st mod ever): Revamped OC

http://neverwinter.nexusmods.com/mods/163


May 30, 2012, 03:05:48 AM
Reply #5
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile



May 30, 2012, 03:12:09 AM
Reply #6
  • Sr. Associate
  • ****
  • Posts: 271
  • Karma: +0/-0
  • Gender: Male
    • View Profile

My first PrC+Q module (and 1st mod ever): Revamped OC

http://neverwinter.nexusmods.com/mods/163


June 19, 2012, 09:06:57 AM
Reply #7
  • Sr. Associate
  • ****
  • Posts: 271
  • Karma: +0/-0
  • Gender: Male
    • View Profile

My first PrC+Q module (and 1st mod ever): Revamped OC

http://neverwinter.nexusmods.com/mods/163


June 19, 2012, 10:33:18 AM
Reply #8

so it already implements a recharge time, even for dragons?

I doubt it.  The "recharge time" you are talking about would be part of the creatures AI, not the breath weapon itself.
HEATSTROKE


June 19, 2012, 10:51:36 AM
Reply #9
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

I doubt it.  The "recharge time" you are talking about would be part of the creatures AI, not the breath weapon itself.
Actually the code for dragon breath weapons does contain recharge counter, but I imagine this will only work if the dragon has unlimited uses of breath weapon. I haven't noticed any AI conflicts, but I haven't really payed any attention for this aspect of the game.


June 19, 2012, 02:20:19 PM
Reply #10
  • Sr. Associate
  • ****
  • Posts: 271
  • Karma: +0/-0
  • Gender: Male
    • View Profile

My first PrC+Q module (and 1st mod ever): Revamped OC

http://neverwinter.nexusmods.com/mods/163


June 19, 2012, 02:27:57 PM
Reply #11
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

how could I set unlimited breath weapon?
Appearently it's not possible - I'm starting to think that there's a bug in PRC code. Reacharged breath works for shifters with unlimited breath uses, but it probably breaks 'regular' dragons. I'll have to check that in game.


June 19, 2012, 04:50:23 PM
Reply #12
  • Sr. Associate
  • ****
  • Posts: 271
  • Karma: +0/-0
  • Gender: Male
    • View Profile

My first PrC+Q module (and 1st mod ever): Revamped OC

http://neverwinter.nexusmods.com/mods/163