Jump to content

Editing Areas in the game


chibievil

Recommended Posts

So i recently got back into modding and would like to add my companion i created into denerim, every-time i export the map, it either says 'unable to load' or when it does the area is unchanged. is there any tutorial that tell me how exactly to do this, i searched far and wide on google, and all it does is show me how to make new maps and not modify in-game ones. Thanks.

Link to comment
Share on other sites

Here's step-by-step what you need to do. This assumes you've already created your companion and whatever special equipment you want to give him. This also does not take in account creating your own party picker to be used in the game. There are a few follower tutorials out there to show you how to do that.

 

1. Create a plot with flags to keep your companion organized, ie: create companion, hire companion, set companion in camp, set companion in party, fire companion, etc.

 

2. Create your plot script. You need to include your hiring, firing, set in party, set in camp flags in this script.

 

3. Create your PRCSCR script. In that script, you will need to include any plots in your headers that you want to check for your desired conditions, ie: in your post you said you only wanted your companion to appear if the pc is not a human noble. to do that you would need the backgrounds plot in your header.

 

Sample Script:

#include "wrappers_h"
#include "plt_gen00pt_backgrounds"
#include "plt_lhc_party"  //My plot

void main()
{
    if (WR_GetPlotFlag(PLT_GEN00PT_BACKGROUNDS, GEN_BACK_HUMAN_NOBLE) &&  WR_GetPlotFlag(PLT_LHC_PARTY, LHC_CREATE_PARTY) == FALSE)
    {
        object oArea = GetObjectByTag("den02ar_market");
        object oWilliam = GetObjectByTag("lhc_william");
        location vWilliamLocation = Location(GetArea(oArea), Vector(-2.25678,6.39973,0.0), 3.1);
        
        CreateObject(OBJECT_TYPE_CREATURE, R"lhc_william.utc", vWilliamLocation);
        WR_SetPlotFlag(PLT_LHC_PARTY, LHC_CREATE_PARTY, TRUE);  //VERY IMPORTANT TO SET THIS FLAG OR IT WILL CREATE ANOTHER INSTANCE OF YOUR CHARACTER EVERY TIME YOU ENTER DENERIM!!!
    }
}

4. Create your dialog to run your hiring/firing/whatever flags.

Link to comment
Share on other sites

Here's step-by-step what you need to do. This assumes you've already created your companion and whatever special equipment you want to give him. This also does not take in account creating your own party picker to be used in the game. There are a few follower tutorials out there to show you how to do that.

 

1. Create a plot with flags to keep your companion organized, ie: create companion, hire companion, set companion in camp, set companion in party, fire companion, etc.

 

2. Create your plot script. You need to include your hiring, firing, set in party, set in camp flags in this script.

 

3. Create your PRCSCR script. In that script, you will need to include any plots in your headers that you want to check for your desired conditions, ie: in your post you said you only wanted your companion to appear if the pc is not a human noble. to do that you would need the backgrounds plot in your header.

 

Sample Script:

#include "wrappers_h"
#include "plt_gen00pt_backgrounds"
#include "plt_lhc_party"  //My plot

void main()
{
    if (WR_GetPlotFlag(PLT_GEN00PT_BACKGROUNDS, GEN_BACK_HUMAN_NOBLE) &&  WR_GetPlotFlag(PLT_LHC_PARTY, LHC_CREATE_PARTY) == FALSE)
    {
        object oArea = GetObjectByTag("den02ar_market");
        object oWilliam = GetObjectByTag("lhc_william");
        location vWilliamLocation = Location(GetArea(oArea), Vector(-2.25678,6.39973,0.0), 3.1);
        
        CreateObject(OBJECT_TYPE_CREATURE, R"lhc_william.utc", vWilliamLocation);
        WR_SetPlotFlag(PLT_LHC_PARTY, LHC_CREATE_PARTY, TRUE);  //VERY IMPORTANT TO SET THIS FLAG OR IT WILL CREATE ANOTHER INSTANCE OF YOUR CHARACTER EVERY TIME YOU ENTER DENERIM!!!
    }
}

4. Create your dialog to run your hiring/firing/whatever flags.

Ok i did that, but i get this compile error, I am unsure If i did anything wrong :

http://i.imgur.com/EknhHBW.png

 

Link to comment
Share on other sites

actually, you need to remove the f's and add the rotation. you left it out. the coordinates are the first 3 numbers (-2.25678, 6.39973, 0.0) in my example and the rotation is the 3.1.

 

location vWilliamLocation = Location(GetArea(oArea), Vector(-2.25678,6.39973,0.0), 3.1);

Link to comment
Share on other sites

Yea I realized as soon as u posted that. Also the background we set still allows me to see her on the map as a human noble, not sure if its cos i used a save halfway through or something. Will try a different race tomorrow or something, its quite late took me all day to get my character into the game XD. But this is quite fun i realize now why people enjoy adding characters.

Edited by chibievil
Link to comment
Share on other sites

In line 7 try putting == FALSE after the backgrounds plot, ex:

if (WR_GetPlotFlag(PLT_GEN00PT_BACKGROUNDS, GEN_BACK_HUMAN_NOBLE) == FALSE &&  WR_GetPlotFlag(PLT_LHC_PARTY, LHC_CREATE_PARTY) == FALSE)

I'm not sure if that will work, but hey, it compiles. lol

 

And I agree! It is fun making new characters...at least most of it is. I *always* lose interests when I have nothing left to do but dialog. I *hate* dialog. I have a companion mod that adds 4 new followers and have finished everything...EXCEPT dialog. I have only completed one followers dialog after working on it for God only knows how long. I love everything else...scripting, building levels, etc....just can't force myself to jump on the convos.

Edited by LadyHonor
Link to comment
Share on other sites

  • Recently Browsing   0 members

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