|
apprentice
|
OP
apprentice
Joined: Jul 2014
|
I have scoured through the goals, looked at charscripts, played with all relevant options in the SideBar (alignments, scripts) and I can not find how to have enemies initiate combat with my players.
I've watched the tutorial plenty of times, and I can only draw the conclusion that it's located somewhere in the Main mod's goals. The problem with copying over all of those goals to my mod is that upon building, I'll get tons of errors. I've tried copying over just _Combat also Alignment/Attitude and that doesn't seem to work either.
Has anyone found a solution to this? Maybe Larian can drop in and tell us what needs to be done in order for Evil NPCs to be hostile?
Last edited by docalypse; 28/07/14 10:19 PM.
|
|
|
|
enthusiast
|
enthusiast
Joined: Oct 2013
|
I have the same problem... I followed the video tutorial and surprise surprise no combat, I can't even trigger it *without* an enemy as there doesn't even seem to be a trigger function for this, you can only test when combat ends, but not make it actually start.... ;/
I have seriously no idea how Larian even got this working in their example mod, because from what they shown they certainly did NOT create a new mod. What they work with is clearly using modified assets from MAIN that we don't have. (otherwise their "goals" would not build without 70k errors and nothing would work without major fiddling). Or in essence, their tutorial uses assets we don't have access to.
At this point Larian should probably give us their tutorial assets before posting other videos, because while combat works fine if mod is dependent on main (no surprise) it works absolutely not at all for some reason when doing it in a new non-dependent mod. And as you say, there is no (obvious) way to import the main scripts without breaking the build function completely.
I have asked this before and nobody seemed to know how to fix this.
And yes.. I know I could work around it by making my mod within the campaign dependency itself, and build scripts on-top of that. But that's no way to make anything, it takes forever load, scripts take forever to build if you do this...
Surely someone must have figured out how to get combat and assorted basic gameplay functions working in a new non-dependent mod?
|
|
|
|
stranger
|
stranger
Joined: Jul 2014
|
I found the answer to this on this forum. I forget who posted it. If you create a standalone mod you need to do 1 of 2 things.
I could be slightly wrong on the details, but either set the alignment of the NPC you want to fight you as "0"
OR
set it to whatever alignment you want, such as "Evil NPC", but you have to copy over the Alignment file or folder from the main and put it into the corresponding directory in your mod's file location. I'm trying to find the forum post I found the solution on, but a quick search for "combat" or "alignment" is not yielding me the post. So fiddle with what I said or scour the forum, because the solution is in one of those posts. I'm not home right now so I can't look at the specific file location that I had to move.
I believe, essentially, the game doesn't know that Evil NPC and Hero Player1 or whatever your alignments are hate each other unless you provide the information with an alignments file. They actually have various levels of attitudes toward each other and so you can pick alignments based on this. An example is, you might not want a friendly AE spell to cause your friend to turn against you. So the proper alignments are important.
This was definitely breezed over in the tutorial videos, along with almost every other detail about how to get things to actually work.
Hope this helps! Sorry if it's vague and possibly incorrect.
|
|
|
|
apprentice
|
OP
apprentice
Joined: Jul 2014
|
Thank you so much for mentioning this. I did find the solution - it took a lot of searching, but I found it here on the forums.
In order to get combat to work on your independent mod, you must copy the folders ../(unpacked main)/Mods/Main/Story/Alignments to ../Mods/(your mod)/Story
and
(unpacked main)/Public/Main/ActionTemplates to ../Public/(your mod)
After doing this, combat worked! Yay!
|
|
|
|
enthusiast
|
enthusiast
Joined: Oct 2013
|
Oh my.. god, THANK YOU SO MUCH
You won't believe it, but that fixed it... the problem solution was 2 fold
I copied over alignment.lsx and groups.lsx into my mod folder same as it was in main and copied over action templates too in public/mod
Then I reset all alignments in the editor, changed player alignment to "Hero Player1" and the enemy to Evil NPC and suddenly the NPC in the scene correctly attacks the goblin in RT, and the goblin defends itself.
Something Larian should have mentioned in the videos... in big, fat, red notification letters. I never even considered the game would store alignments in a txt file.
Now this leaves me with just 1 problem.. how the heavens do I trigger combat with a script via trigger?
I could honestly hug you ;p My search skills fail me on this forum, i can't even find my own posts.
Last edited by eRe4s3r; 28/07/14 10:33 PM.
|
|
|
|
apprentice
|
OP
apprentice
Joined: Jul 2014
|
The only way I can think of how to do that is by making it ambush style combat like they showed in the tutorial video.
|
|
|
|
enthusiast
|
enthusiast
Joined: Oct 2013
|
The only way I can think of how to do that is by making it ambush style combat like they showed in the tutorial video. This doesn't quite entail my scenario. I want to make a situation where player enters a house, and it starts in TB mode without AI or ENEMIES shown, slowly as player walks through the house, explores things happen and eventually enemies appear (ie, they storm in). Mainly I want to do this because otherwise, I have to indeed make enemies spawn out of nowhere.. it would otherwise allow players to cheat the combat like they can in D:OS (ie, by attacking from sight boundaries) Bit stumped how to do this without teleporting enemies around like the tutorial.
|
|
|
|
apprentice
|
OP
apprentice
Joined: Jul 2014
|
Maybe you can have the enemies spawn from far away, path them to the house.
Is there not a script to make players enter combat when they enter a box/poly trigger? (set it to a timer perhaps, while the enemies are running for the house) I don't know if there is a call to initiate combat without enemies around though.
Or, you could hide a hostile rat somewhere that initializes combat, rat immediately casts invis on himself while the enemies run to the house...
|
|
|
|
enthusiast
|
enthusiast
Joined: Oct 2013
|
I haven't yet found any way to trigger combat with a pure script command ;/
|
|
|
|
stranger
|
stranger
Joined: Jul 2014
|
Thank you for posting this. It worked for me also.
It would be nice to have possibly one sticky dedicated to these key pieces of information so we can refer to them when needed.
|
|
|
|
stranger
|
stranger
Joined: Jul 2014
|
Can set combat with triggers(like ending conversation, or walking into a trigger/ or picking up an item you name it :P) by changing alignments (if you copied alignment.lsx file into YourMod/Story/Alignments/alignment.lsx )
example: IF DialogEnded("Text",_) THEN CharacterSetHasDialog(CHARACTER_charname,0); CharacterSetFaction(CHARACTER_charname,"Evil NPC");
or use CharacterSetRelationFactionToFaction CharacterSetRelationFactionToIndivFaction CharacterSetRelationIndivFactionToFaction CharacterSetRelationIndivFactionToIndivFaction
you can do that with the script
Last edited by antonowitch; 29/07/14 12:44 AM.
|
|
|
|
enthusiast
|
enthusiast
Joined: Oct 2013
|
Ah that's very helpful to know, thank you!
|
|
|
|
apprentice
|
apprentice
Joined: Aug 2014
|
I found the alignments folder, but where exactly is the ACtion file? do i have to manually unpack something?
|
|
|
Moderated by Bvs, ForkTong, gbnf, Issh, Kurnster, Larian_QA, LarSeb, Lar_q, Lynn, Monodon, Raze, Stephen_Larian
|
|