Jump to content

DA:O Mod - Spawn an ally NPC in Archdemon Fight


Pyroblasta

Recommended Posts

The best way to do this is to not touch the core scripts at all. IF you edit the core scripts you run a very high risk of breaking your game and if you want to release this, of breaking other people's games or break compatibility.

 

What you should do is use your own scripts, plots, and a duplicate Lanaya.

 

Here's how I would do it:

 

1. Create your creature from scratch. Make a new Lanaya, choose from the default AL packages for her class, give her a rank, and be certain you have set her to friendly so she will actually fight. Also, be sure to give her some equipment. You don't want her running around naked.

 

2. Create a plot to check if Lanaya has already been added. For this I used xxx_create_lanaya, but you can name it whatever you want. Give it one flag, I used Lanaya_Created, again you can use whatever you want tho.

 

3. Create my own script capturing the necessary flags....here's one you can use. Copy and paste it using your own coordinates, utc, required plots, etc....I assumed you were wanting her to use the rooftop area....you will need to get your own coordinates....the ones I used are actually for lothering (I copied and pasted from an existing script I use)….so they won't work there.

#include "utility_h"
#include "wrappers_h"
#include "plt_ntb000pt_main"
#include "plt_xxx_create_lanaya"

void main()
{
    object oRooftop = GetObjectByTag("cli220ar_fort_roof_1");
    object oLanaya = GetObjectByTag("xxx_lanaya");
    location vLanayaLocation = Location(GetArea(oRooftop), Vector(267.584,187.429,1.64715), -193.7);
    //Use your own coordinates
   
   
    if(IsObjectValid(oRooftop))
    {
        if (!WR_GetPlotFlag(PLT_XXX_CREATE_LANAYA, LANAYA_CREATED)&&
            WR_GetPlotFlag(PLT_NTB000PT_MAIN, NTB_MAIN_ZATHRIAN_SACRIFICES_HIMSELF) &&
            WR_GetPlotFlag(PLT_NTB000PT_MAIN, NTB_MAIN_ELVES_PROMISED_ALLIANCE))
            {
                CreateObject(OBJECT_TYPE_CREATURE, R"xxx_lanaya.utc", vLanayaLocation);
                SetImmortal(oLanaya, TRUE);  //will be more lore friendly- Lanaya lives in game)
                AddNonPartyFollower(oLanaya); //If you want Lanaya to follow you around
                WR_SetPlotFlag(PLT_XXX_CREATE_LANAYA, LANAYA_CREATED, TRUE);
            }
        if (!WR_GetPlotFlag(PLT_XXX_CREATE_LANAYA, LANAYA_CREATED)&&
            WR_GetPlotFlag(PLT_NTB000PT_MAIN, NTB_MAIN_ZATHRIAN_KILLED_BY_PC) &&
            WR_GetPlotFlag(PLT_NTB000PT_MAIN, NTB_MAIN_ELVES_PROMISED_ALLIANCE))
            {
                CreateObject(OBJECT_TYPE_CREATURE, R"xxx_lanaya.utc", vLanayaLocation);
                SetImmortal(oLanaya, TRUE);  //will be more lore friendly- Lanaya lives in game)
                AddNonPartyFollower(oLanaya); //If you want Lanaya to follow you around
                WR_SetPlotFlag(PLT_XXX_CREATE_LANAYA, LANAYA_CREATED, TRUE);
            }
    }   
}

4. Create a PCRSCR_xxx gda with the area information and the script ^^^ up there in step 3 and you're done.

Edited by LadyHonor
Link to comment
Share on other sites

To TSM - I'm positively sure that my custom endgame Lanaya's UTC is Lieutenant rank.

 

 

 

 

To LH - Success! For the most part:

 

 

I had done most of what was written in the script above while creating Lanaya. Mostly using game core resources but you do have a valid point and I see how messing with core scripts breaks the game or compatibility.

 

1. Lanaya is no doubt custom made and Lieutenant rank. Lanaya's gear is custom upgraded and made specifically for this fight. It's equivalent of either a powerful endgame Mage in origins or a entry level Awakening Mage.

 

2. Created a custom plot flag and named it accordingly...

 

3. Followed the script above using my own vector coordinates. Slight difference is when the Archdemon HP hits 1% it will have Lanaya as Nonparty Follower removed. When the Archdemon is dying it will warp Lanaya and the other Lieutenant allies out of the stage for the final cutscene.

 

One version is immortal Lanaya, other version is mortal like the other followers. I turned off the equipment drops chance this means if mortal Lanaya goes down, no loot like the others.

 

4. Created a PRCSCR so the game adds my customized content.

Using the climax army script and setting immortal turns Lanaya to a training dummy.

Defaulting to the creature_core is the best work around.

 

 

I was close but never thought about using the AddNonPartyFollower command.

Many thanks for putting together all of this for me. Amazing efforts and knowledge you have there LH.

 

 

 

As for releasing this, I'm not sure if anybody in the Nexus community cares enough to have a Lanaya Follower. I had never released a mod before and if nobody really cares about this kind of mod then there is no need for me read up and understand all the strict guidelines just to release a mod like this.

Edited by Pyroblasta
Link to comment
Share on other sites

You're very welcome and I'm glad I could help. I would have done this sooner, but I've been very busy the past month and when I checked in on the forums I was using my cellphone. It isn't easy writing a script on a phone. lol But every thing I know came from asking questions in the forums and reading tons of tutorials. It gets easier the more you do it. Oh, and as for releasing it, you wanted it, others might. Just be sure if you that you list all of the core files you modified so people can check for compatibility. Me personally, I don't care if people like or want my mods....I make them because I enjoy modding and share them because if I like them someone else might as well. If they don't, they're free to uninstall them. :P

 

Best of luck!

Link to comment
Share on other sites

  • 1 year later...

I can not wait to see your mod online I had the same idea just that I did not give myself such a bad life just modify the utc of Zathrian from strong drakon to that of the elf simply and activate it by invoking the dalish and voila ... I melt halfway for me.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...