Aller au contenu

Photo

Adding new NPC to party picker. He's not showing unless I override the area.


  • Veuillez vous connecter pour répondre
11 réponses à ce sujet

#1
DLAN_Immortality

DLAN_Immortality
  • Members
  • 481 messages
Okay, I have my new NPC and he can join the party.

I created 2 new excel files from party_picker.xls and PartyPicker.xls and created the the 2 GDAs, which I dumped in my mod's override. However, when the NPC joins my party, he does not appear in the party picker screen.

EDIT:

Seems the only way I can do this is if I override the char_stage area... if I try to use de prcsrc thing it doesn't work u_u


...thanks :-)

Modifié par DLAN_Immortality, 13 décembre 2009 - 05:39 .


#2
DLAN_Immortality

DLAN_Immortality
  • Members
  • 481 messages
Okay, we've been trying this sh*t for hours (gaaaah!!! :-D) and the "only" thing that seems to be giving us a problem is that we cannot use CreateObject to create a waypoint becaues we have to specify a resource template, but since it's a waypoint we don't know what it can be.

So, does anybody know how to add a new follower to the char stage to be picked into the party, in a way that does not override the entire char_stage (and therefore be incompatible with other mods)?


Halp :-D

Modifié par DLAN_Immortality, 13 décembre 2009 - 04:48 .


#3
DLAN_Immortality

DLAN_Immortality
  • Members
  • 481 messages
I'll do a shameless bump because I'm really stuck at this point.



Come on, is nobody able to add a new npc to the party picker?? :(

#4
Starlight

Starlight
  • Members
  • 407 messages
Maybe you could try to send a pm to Bioware's staffs or ask a question in the discussion session of DA toolset wiki?

Modifié par Starlight, 14 décembre 2009 - 07:31 .


#5
DLAN_Immortality

DLAN_Immortality
  • Members
  • 481 messages
I think I'll end up doing that because it seems nobody was able to do this yet.... u_u

#6
DLAN_Immortality

DLAN_Immortality
  • Members
  • 481 messages
UPDATE!!!!



Bryan was too kind to explain something to me, so if anybody else is searching for tutorials here's your answer:



At this point in time it's not possible to create a waypoint from a script.

Further: waypoints do not have resource templates and cannot be created with CreateObject.



Meaning: the char_stage needs to be overriden every time a new NPC is added to the party. This means that for now at least, any mod that adds a new NPC to the main campaign will not be compatible with one another :-(



Hopefully this can be fixed in a new toolset release though! Until then, we'll go ahead and override the area. :-)

#7
falranth

falranth
  • Members
  • 121 messages
But what about the existing characters? Would it override them?



Would you be able to check to see what characters are in the party, and then have it override with the appropriate version of the char_stage?

#8
Taleroth

Taleroth
  • Members
  • 9 136 messages

DLAN_Immortality wrote...

Meaning: the char_stage needs to be overriden every time a new NPC is added to the party. This means that for now at least, any mod that adds a new NPC to the main campaign will not be compatible with one another :-(

Hopefully this can be fixed in a new toolset release though! Until then, we'll go ahead and override the area. :-)

I'm thinking there is another alternative.  Add NPCs without using the party picker for them, integrate it into their dialogue.  It's far from seamless, granted.

Then again, that wouldn't be entirely compatible with another mod that added an NPC.  At least, you wouldn't be able to have both in the party.

#9
DLAN_Immortality

DLAN_Immortality
  • Members
  • 481 messages
falranth: Well, only in the party picker. Basically, I can delete everyone from there and leave only my NPC if I want to, but yeah, that's not what I want. It will be incompatible with any other mod that adds an NPC, though.

Taleroth: About adding the char forcibly, you can only do that if you have an open space in your party (if you are 3 or less), if not, the party picker always pops up. Also, that poses the problem of other chars joining the party and the possibility of losing the NPC...

Modifié par DLAN_Immortality, 14 décembre 2009 - 08:44 .


#10
Innodil Ath Nathosh

Innodil Ath Nathosh
  • Members
  • 28 messages
You CAN however create objects (and yes, also NPCs) using CreateObject and specifying a specific vector location your self.



So: how do you pull this off?



In the toolset, open the chargen "area". Check it out, play a waypoint where you want the character to be standing. "Turn" your waypoint so it's also facing the way you want your character to face. Then in the right bottom side of the toolset in the property inspector, with your new waypoint selected:

- write down the exact values (or copy/paste them somewhere safe) of both "orientation" and "position"

- DO NOT checkin the edited chargen area or export it...



Now create a script e.g. "npcname_chargen.ncs"



With:



#include "wrappers_h"



void main()

{

object oNPC = GetObjectByTag(“your_npc_tag″);

if (!IsObjectValid(oNPC ))

{

object oArea = GetObjectByTag(“char_stage”);

// NOW HERE USE THE NUMBERS YOU COPIED FROM YOUR WAYPOINT !

location lNPCloc= Location(oArea, Vector(X, Y, Z), ORIENTATION);

// Spawn the NPC

CreateObject(OBJECT_TYPE_CREATURE, R”your_npc_resource.utc”, lNPCloc);

oNPC = GetObjectByTag(“your_npc_tag″); //now it's there and a valid object

//This line is to compensate for a bug in the Location() constructor

SetOrientation(oNPC, ORIENTATION); //again paste the orientation value from your waypoint here

}



}



Now you create a PRCSRC file, enter a new line with the arealist to "char_stage" (i think it's the area tag because it doesn't have a area list specified (toolset should create a "default" arealist with the exact same name as the area) and as script you specify the script you made above.

Now export your script and try it out, NPC should spawn.



Note that the orientation can be a bit of a ****, so you might need to change your waypoint again and update the orientation in your script before you get it looking as you want.



I use this technique succesfully in my mod, although it is not in the char_stage area ...


#11
elys

elys
  • Members
  • 458 messages

DLAN_Immortality wrote...

falranth: Well, only in the party picker. Basically, I can delete everyone from there and leave only my NPC if I want to, but yeah, that's not what I want. It will be incompatible with any other mod that adds an NPC, though.

Taleroth: About adding the char forcibly, you can only do that if you have an open space in your party (if you are 3 or less), if not, the party picker always pops up. Also, that poses the problem of other chars joining the party and the possibility of losing the NPC...


Have you tried the following function to replace the Party Picker Area with your own ?
Note that this does resolve directly the multiple companion conflict problem, but I'm just curious Posted Image
But if it works, different addins could co-exist by switching various PartyPicker configuration thru a dialogue, or a special on-item-use script.

SetPartyPickerStage
Sets the party picker area name
Description:
Sets the party picker area name. Each module can have its own area void SetPartyPickerStage (
string sAreaName,
string s2DAName
)

Parameters:

sAreaName
- Name of the partypicker stage

s2DAName
- Name of the 2DA to use with the stage

Modifié par elys, 11 janvier 2010 - 03:22 .


#12
DLAN_Immortality

DLAN_Immortality
  • Members
  • 481 messages
Oh, guys, sorry about that. In the end I have it all solved. Sadly I had to override, but eh, who cares. I'm having to override other oc dlgs for interjections anyways so... :-(



Thanks a lot :-)