Server Totals
Wilderness - (2)
Mikona - (1)
Ferrell - (0)
Le'Or - (0)
Elysia - (0)
M'Chek - (0)
Deglos - (0)
Visimontium - (0)
Underdark - (0)
Total players: 3
Gallery
  • Pages of the Book
    Album name: DM Events
    Uploaded by: Ronan
    Uploaded: Wed Aug 20, 2014 12:04 am

Links Menu

Odd item creation

Moderators: Nighthawk4, Dungeon Masters

PostAuthor: Serineth Swiftpaw » Fri Apr 01, 2005 9:37 pm

Another two questions Doug. I need this to evade Avlis spellhooking (it may not even be added to Avlis, but it would be nice) as it is supposed to change the person into a Red Dragon, and only a Red Dragon (I won't go into all the details, as it is very long, and very complicated).

Second, I have modified the 2da file, but now the script wont let me use my modified thing, i.e. I have made a young with the name "POLYMORPH_TYPE_RED_DRAGON_Y" but the script won't let me put that as the creature to polymorph into. What do I need to do there?

Thanks again.
Serineth "Wildmane" Swiftpaw
User avatar
Serineth Swiftpaw
Apprentice Scholar
 
Posts: 914
Joined: Tue Dec 28, 2004 2:13 am

PostAuthor: Serineth Swiftpaw » Mon Apr 04, 2005 12:32 pm

dougnoel wrote:
Serineth Swiftpaw wrote:hmm, that gets me a Young Dragon, but I'd need to use the Adult Dragon as a base model (as the Ancient's abilities that it's hide gives aren't mentioned in there, it says it uses the same hide as the adult, but that is impossible) so I still have the problem of the Adult not being able to breathe fire... and the Young one wouldn't be able to either.

Any ideas how I can implement the fire breathing? That is the main concern right now...

Fire breathing is implemented in polymorph.2da. The only other way to do it is the way we did races, or use an inventory item with a special ability. You could probably make a plot potion that would do this.


I'm trying this now, but I can't ever get it to have more than one use. also, regardless of if I use Unique Power, or Unique Power Self Only, it never gives me a targetter... Any ideas?
Serineth "Wildmane" Swiftpaw
User avatar
Serineth Swiftpaw
Apprentice Scholar
 
Posts: 914
Joined: Tue Dec 28, 2004 2:13 am

PostAuthor: dougnoel » Mon Apr 04, 2005 3:48 pm

Serineth Swiftpaw wrote:I'm using the 2da from the HotU dat, is there a COPAP one?

No. Avlis has it's own, which is where the Tlincalli, Lupin and Avlis dragon entries are.

Serineth Swiftpaw wrote:Another two questions Doug. I need this to evade Avlis spellhooking (it may not even be added to Avlis, but it would be nice) as it is supposed to change the person into a Red Dragon, and only a Red Dragon (I won't go into all the details, as it is very long, and very complicated).

If you mean you want it to avoid the avlis-specific forms, then you will have to add completely new entries. I overwrote all the chromatic dragon entries for Avlis.

Serineth Swiftpaw wrote:Second, I have modified the 2da file, but now the script wont let me use my modified thing, i.e. I have made a young with the name "POLYMORPH_TYPE_RED_DRAGON_Y" but the script won't let me put that as the creature to polymorph into. What do I need to do there?

You need to create a constant value for it.
const int POLYMORPH_TYPE_RED_DRAGON_Y = 344;
Where 344 is the line number that POLYMORPH_TYPE_RED_DRAGON_Y occupies.
The const should be delcared ideally in an include file. Alternately you can put it before your main() statement in the file - or just use the number instead of POLYMORPH_TYPE_RED_DRAGON_Y.

Serineth Swiftpaw wrote:I'm trying this now, but I can't ever get it to have more than one use. also, regardless of if I use Unique Power, or Unique Power Self Only, it never gives me a targetter... Any ideas?

I would take a look at the fire breath code for wyrmlings and dragons. Basically, you get the direction the character is facing and spew the breath out in that direction. No need to target at all.

dougnoel
Team Member; Retired with Honors
 
Posts: 6265
Joined: Fri May 14, 2004 4:59 pm
Location: VA (GMT -4)

PostAuthor: Serineth Swiftpaw » Mon Apr 04, 2005 5:18 pm

Right, but if I go modifying the 2da, and would like it to be implemented universaly, what is the best thing to do? I couldn't use the Avlis one because then other worlds would end up with their people changing into the wrong things, and I cant use a standard one as that would mean the Avlis one would stop changing people to rocks and such. Thoughts? Anyway, I may as well scrap the idea of a young one, so I just need to figure out how to get our Adult Red to breathe fire :P
Serineth "Wildmane" Swiftpaw
User avatar
Serineth Swiftpaw
Apprentice Scholar
 
Posts: 914
Joined: Tue Dec 28, 2004 2:13 am

PostAuthor: dougnoel » Tue Apr 05, 2005 8:37 pm

Serineth Swiftpaw wrote:Right, but if I go modifying the 2da, and would like it to be implemented universaly, what is the best thing to do? I couldn't use the Avlis one because then other worlds would end up with their people changing into the wrong things, and I cant use a standard one as that would mean the Avlis one would stop changing people to rocks and such. Thoughts? Anyway, I may as well scrap the idea of a young one, so I just need to figure out how to get our Adult Red to breathe fire :P

Just make a post on the CoPaP dev board stating your intent to add a few lines to the 2da and why. Themi is the gatekeeper there. We can discuss the issue there. Then you can just add in your breath weapon to the 2da and be done. It's Avlis' responsibility to update our modified 2das. You don't have to worry about it. We may nerf or change the lines you add for Avlis, but again that's completely Avlis-sepcific. As long as you're clear on your intentions you don't have to worry about it.

dougnoel
Team Member; Retired with Honors
 
Posts: 6265
Joined: Fri May 14, 2004 4:59 pm
Location: VA (GMT -4)

PostAuthor: Serineth Swiftpaw » Thu Apr 07, 2005 11:38 am

It works!!! MWAHAHAHAHAH
*kisses Doug*

Adult Dragon with all standard Adult Dragoness but Fire Breathe based on characters current HD!

Awsome.

Right.. time to submit it... and have it rejected... :cry:
Serineth "Wildmane" Swiftpaw
User avatar
Serineth Swiftpaw
Apprentice Scholar
 
Posts: 914
Joined: Tue Dec 28, 2004 2:13 am

PostAuthor: Serineth Swiftpaw » Thu Apr 07, 2005 11:49 am

One last question Doug, are lines 107 and 108 free in Avlis'ss's... Polymorph.2da?
Serineth "Wildmane" Swiftpaw
User avatar
Serineth Swiftpaw
Apprentice Scholar
 
Posts: 914
Joined: Tue Dec 28, 2004 2:13 am

PostAuthor: dougnoel » Thu Apr 07, 2005 4:49 pm

Serineth Swiftpaw wrote:One last question Doug, are lines 107 and 108 free in Avlis'ss's... Polymorph.2da?

We haven't added any new lines. You should however, go to Bioware's site and make sure that you pad the 2da file accroding to their guidelines. I believe that info can also be found in the CEP docs somewhere.

dougnoel
Team Member; Retired with Honors
 
Posts: 6265
Joined: Fri May 14, 2004 4:59 pm
Location: VA (GMT -4)

PostAuthor: Serineth Swiftpaw » Thu Apr 07, 2005 9:42 pm

Rgr. For anyone that wonders what that means, for future reference: http://nwn.bioware.com/forums/viewtopic ... 8&forum=48

Padding to line 150...
Serineth "Wildmane" Swiftpaw
User avatar
Serineth Swiftpaw
Apprentice Scholar
 
Posts: 914
Joined: Tue Dec 28, 2004 2:13 am

PostAuthor: Serineth Swiftpaw » Thu Apr 07, 2005 11:27 pm

Ok, hit a wall Doug, the Fire Breath doesn't seem to work properly on either form. The DC seems stuck at 11 and the fire itself seemed to max out at 20. Now according to the Bioware script, it should scale...

Code: Select all
//::///////////////////////////////////////////////
//:: 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
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"

void main()
{
    //Declare major variables
    int nAge = GetHitDice(OBJECT_SELF);
    int nDamage, nDC, nDamStrike;
    float fDelay;
    object oTarget;
    effect eVis, eBreath;
    //Use the HD of the creature to determine damage and save DC
    if (nAge <= 6) //Wyrmling
    {
        nDamage = d10(2);
        nDC = 15;
    }
    else if (nAge >= 7 && nAge <= 9) //Very Young
    {
        nDamage = d10(4);
        nDC = 18;
    }
    else if (nAge >= 10 && nAge <= 12) //Young
    {
        nDamage = d10(6);
        nDC = 19;
    }
    else if (nAge >= 13 && nAge <= 15) //Juvenile
    {
        nDamage = d10(8);
        nDC = 22;
    }
    else if (nAge >= 16 && nAge <= 18) //Young Adult
    {
        nDamage = d10(10);
        nDC = 24;
    }
    else if (nAge >= 19 && nAge <= 22) //Adult
    {
        nDamage = d10(12);
        nDC = 25;
    }
    else if (nAge >= 23 && nAge <= 24) //Mature Adult
    {
        nDamage = d10(14);
        nDC = 28;
    }
    else if (nAge >= 25 && nAge <= 27) //Old
    {
        nDamage = d10(16);
        nDC = 30;
    }
    else if (nAge >= 28 && nAge <= 30) //Very Old
    {
        nDamage = d10(18);
        nDC = 33;
    }
    else if (nAge >= 31 && nAge <= 33) //Ancient
    {
        nDamage = d10(20);
        nDC = 35;
    }
    else if (nAge >= 34 && nAge <= 37) //Wyrm
    {
        nDamage = d10(22);
        nDC = 38;
    }
    else if (nAge > 37) //Great Wyrm
    {
        nDamage = d10(24);
        nDC = 40;
    }

    PlayDragonBattleCry();
    //Get first target in spell area
    oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE);
    while(GetIsObjectValid(oTarget))
    {
        if(oTarget != OBJECT_SELF && !GetIsReactionTypeFriendly(oTarget))
        {
            //Reset the damage to full
            nDamStrike = nDamage;
            //Fire cast spell at event for the specified target
            SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_DRAGON_BREATH_FIRE));
            //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
            if(MySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_FIRE))
            {
                nDamStrike = nDamStrike/2;
                if(GetHasFeat(FEAT_EVASION, oTarget) || GetHasFeat(FEAT_IMPROVED_EVASION, oTarget))
                {
                    nDamStrike = 0;
                }
            }
            else if(GetHasFeat(FEAT_IMPROVED_EVASION, oTarget))
            {
                nDamStrike = nDamStrike/2;
            }
            if (nDamStrike > 0)
            {
                //Set Damage and VFX
                eBreath = EffectDamage(nDamStrike, DAMAGE_TYPE_FIRE);
                eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
                //Determine effect delay
                fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
                //Apply the VFX impact and effects
                DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
                DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget));
             }
        }
        //Get next target in spell area
        oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE);
    }
}


Now I haven't done anything, the Ancient is still using the default code, so any idea why Firebreath would not be picking up the characters HD properly? ( tried leveling the character, is was doing a max of 4 damage at level 1 and around 20 at level 40...)
Serineth "Wildmane" Swiftpaw
User avatar
Serineth Swiftpaw
Apprentice Scholar
 
Posts: 914
Joined: Tue Dec 28, 2004 2:13 am

PostAuthor: Serineth Swiftpaw » Thu Apr 07, 2005 11:35 pm

Gah, ignore me Doug, forgot it only took Shifter and Druid levels into account. Works fine, I was using random classes in the test module. Seems like it is done and dusted. 2 scripts; 1 line each and two lines in the 2da file, not bad :)
Serineth "Wildmane" Swiftpaw
User avatar
Serineth Swiftpaw
Apprentice Scholar
 
Posts: 914
Joined: Tue Dec 28, 2004 2:13 am

Previous

Return to NWN Scripting

Who is online

Registered users: Akai, Google [Bot]