NSC Script-Problem
#1 -Arren-
Posted 03 August 2009 - 12:34 PM
I have a strange problem with my mod. After my NPC joins the party his override script is set to "none". The CRE file of my NPC has got the correct entry before installing, after installing and even after the NPC was created via script it has got the correct script assigned. And after he joins all modding hell is breaking loose.
Since I?m just starting I follow the various tuts very accurately and don?t do fancy stuff. I just use JoinParty() and set a variable. Somebody got an idea?
so long
Arren
#2
Posted 03 August 2009 - 02:00 PM
In the state that has JoinParty() add
ChangeAIScript("script_name",OVERRIDE) //replace script_name with your script's name.
I think that this will ensure that your script is properly assigned.
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm
#3
Posted 04 August 2009 - 12:12 AM
I also created a new CRE and new Scripts and Dialogs, but the Problem still exists.
I use a Vanilla-BGT Installation, with no Mods, just the Textpacks and some Bugfixes.
#4
Posted 04 August 2009 - 06:46 AM
Well, you would need to reinsure it by ActionOverride()I don't know why the script is getting changed on you, but you could try the following and see if it helps you...
In the state that has JoinParty() add
ChangeAIScript("script_name",OVERRIDE) //replace script_name with your script's name.
I think that this will ensure that your script is properly assigned.
So it would go like this:
ActionOverride("DV",ChangeAIScript("script_name",OVERRIDE))Where the "DV" is the creatures Script Name(editable with .cre editors like Near Infinity), inside the quotemarks.
Deactivated account. The user today is known as The Imp.
#5
Posted 05 August 2009 - 12:59 AM
IF ~~ THEN BEGIN 1-2 SAY ~Mir gehts gut. Kann ich mich dir anschließen?~ IF ~~ THEN REPLY ~Ja, klar.~ DO ~SetGlobal("##dbjoined","GLOBAL",1) JoinParty() ActionOverride("##db",ChangeAIScript("##db",OVERRIDE))~ EXIT IF ~~ THEN REPLY ~Ne du, grad nicht.~ EXIT END
Still doesn't work.
This is freakin, I´m very sure that my code match the codes in the tuts and compiling works without any problems.
I don't know what's going wrong.
That's bad I can't mod anything while my NSC has not a script...
#6
Posted 05 August 2009 - 02:31 AM
#7
Posted 05 August 2009 - 04:18 AM
APPEND ~pdialog.2da~ ~##db ##dbP ##dbJ ##dbD ##db25P ##db25J ##db25D ##db25~ UNLESS ~##db~ APPEND ~interdia.2da~ ~##db ##dbB ##db25B~ UNLESS ~##db~
If not, then no, I only append this 2DAs. Which should I also append?
(Sorry, it´s my first time as a BG-Modder, I don´t know exactly what you mean...)
#8
Posted 05 August 2009 - 04:37 AM
Edited by Taimon, 05 August 2009 - 04:38 AM.
#9
Posted 05 August 2009 - 05:51 AM
Okay, that´s a good idea^^If all else fails attach your work in progress here, so that other people might have a closer look at it.
The file contains the NPC I created.
If somebody could take a look at him and maybe find the error, I would be very happy.
Thanks a lot. db.rar 473.21K 176 downloads
#10
Posted 05 August 2009 - 08:35 AM
I added a simple block to the override script to check whether the script is run.
IF InParty(Myself) THEN RESPONSE #100 DisplayString(Myself,1234) END
#11
Posted 05 August 2009 - 10:50 AM
Maybe their`s something with the Installation, huh?
I think I try a complete new-one, then I will look.
Thanks @all
(If a few more people could try, if it works for them, it would be perfect!Thanks!)
#12 -kaschpakopp-
Posted 05 August 2009 - 03:59 PM
I added two things to his script. As you can see, first he spams his line. after he joins, he displays it once and then no more. because his override script entry's gone the way of all flesh...
#13
Posted 05 August 2009 - 10:21 PM
I'd say, there is something in the area script of AR0015 (candlekeep prologue), that messes with your override script.
Could be the HP adjustment, that Ascension64 did come up with.
/Edit:
If you give your NPC at least 2 XP, he should not be affected.
Edited by Taimon, 05 August 2009 - 10:40 PM.
#14
Posted 06 August 2009 - 06:50 AM
THANKS Taimon and all other of course also.
After I give my NPC 20 XP, it now works perfectly and he has his script.
Thanks a lot!
But what WAS exactly the problem? sorry, but I don´t get it...
#15
Posted 06 August 2009 - 11:27 AM
The whole HP adjustment process is only done if your player has 0 or 1 XP.