Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#515333 10/07/14 01:16 PM
Joined: Jun 2014
S
Sly0 Offline OP
apprentice
OP Offline
apprentice
S
Joined: Jun 2014
I have some basic and advanced questions about NPCs. I'll post all relevant questions and answers into this post. Don't feel shy to ask own questions here as well, we can collect them and turn it into some sort of "NPC configuration-FAQ" to make it easier for fellow modders who struggle with this as well.

I will ask more questions once I get the current one solved.

Let's start with something fairly basic:
I intend on making certain NPCs hostile per default, but I cannot figure out how to do it.
Setting the Alignment to Evil NPC doesn't seem to do what I need, they still just stand around and do nothing.
Did anyone figure out how to set some to hostile?

I have an AI Seeder and generated a path, reloaded my map and tried, but to no avail. Do I have to have a specific player alignment to make them attack me? If so, which one?

Sly0 #515337 10/07/14 01:18 PM
Joined: Jul 2014
E
stranger
Offline
stranger
E
Joined: Jul 2014
because the developers did not originally plan to make "modules"
see http://www.larian.com/forums/ubbthreads.php?ubb=showflat&Number=515330#Post515330

at this moment you can do:
- copy game script from main module (combat and other script you need).

Sly0 #515341 10/07/14 01:20 PM
Joined: Jul 2014
E
stranger
Offline
stranger
E
Joined: Jul 2014
Or recreate module with dependence (main data), but in game you catch "standart quest" and other (main game init).

Sly0 #515349 10/07/14 01:29 PM
Joined: Jul 2014
M
stranger
Offline
stranger
M
Joined: Jul 2014
Setting alignment to Evil NPC should work; it does for me. All I did was add a miner NPC to my level and changed his alignment. I have main mod and main set as dependencies in module settings though.

My problem is getting new NPCs to defend themselves without using the Evil NPC alignment.

Sly0 #515354 10/07/14 01:36 PM
Joined: Jul 2014
E
stranger
Offline
stranger
E
Joined: Jul 2014

> My problem is getting new NPCs to defend themselves without using the Evil NPC alignment.
you can manualy change factions relations in scripts.
like CharacterSetFaction("You Faction","Player Faction", 0);
// find FactionToFaction function.

0 - enemy.
0.5 - neutral.
1 - friend.

"You Faction" - npc faction ("Good NPC" or "Evil NPC")
"Player Faction" - faction of player object (like "Player NPC")

Last edited by editorman; 10/07/14 01:37 PM.
Joined: Jul 2014
M
stranger
Offline
stranger
M
Joined: Jul 2014
It's not that I want them to attack the player outright, just to defend themselves against attack. When attacked they do not fight back and I'm not entirely sure why yet, might be something to do with lack of initialization.

Evil NPC seems to fight, but any other alignment refuses to defend itself so far..

Sly0 #516645 11/07/14 03:57 PM
Joined: Jun 2014
S
Sly0 Offline OP
apprentice
OP Offline
apprentice
S
Joined: Jun 2014
Okay, I think I might run into trouble here as I lack the main module dependency.

Is there any way to add it afterwards? I tried to do so through the module settings but it won't let me add anything. :S
I have already made a fair amount of level work, do I have to recreate the module from scratch or can I migrate everything somehow?

Sly0 #516751 11/07/14 06:05 PM
Joined: Jul 2014
M
stranger
Offline
stranger
M
Joined: Jul 2014
Originally Posted by Sly0
Okay, I think I might run into trouble here as I lack the main module dependency.

Is there any way to add it afterwards? I tried to do so through the module settings but it won't let me add anything. :S
I have already made a fair amount of level work, do I have to recreate the module from scratch or can I migrate everything somehow?

While I thought you would be able to add it, what you can do is make a new mod and just copy the files from your old mod into it; it shouldn't have much issue, but take a backup of your mod first.

Sly0 #517062 12/07/14 01:14 AM
Joined: Jun 2014
S
Sly0 Offline OP
apprentice
OP Offline
apprentice
S
Joined: Jun 2014
Thanks! I will try that out asap and report back!

Yeah, when I opened the Module Settings clicking on + or - (if something is in the list and even selected) makes absolutely no difference, which makes me think, that this function is simply broken.

Sly0 #517987 13/07/14 03:19 AM
Joined: Jun 2014
S
Sly0 Offline OP
apprentice
OP Offline
apprentice
S
Joined: Jun 2014
It still doesn't work as desired. Maybe the test-playercharacter should have a special attitude?

Can someone who got it working check the settings of playercharacter and foes, please?


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5