|
|
apprentice
|
OP
apprentice
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?
|
|
|
|
stranger
|
stranger
Joined: Jul 2014
|
Or recreate module with dependence (main data), but in game you catch "standart quest" and other (main game init).
|
|
|
|
stranger
|
stranger
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.
|
|
|
|
stranger
|
stranger
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.
|
|
|
|
stranger
|
stranger
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..
|
|
|
|
apprentice
|
OP
apprentice
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?
|
|
|
|
stranger
|
stranger
Joined: Jul 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? 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.
|
|
|
|
apprentice
|
OP
apprentice
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.
|
|
|
|
apprentice
|
OP
apprentice
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?
|
|
|
Moderated by Bvs, ForkTong, gbnf, Issh, Kurnster, Larian_QA, LarSeb, Lar_q, Lynn, Monodon, Raze, Stephen_Larian
|
|
|