svj Posted December 6, 2023 Posted December 6, 2023 (edited) My NPC is appearing successfully in game but when i talk to it the ingame it responds: Revan "has nothing to say to you." Yet i can see NPCs dialogue in Near Infinity. Edited December 6, 2023 by svj Quote
svj Posted December 6, 2023 Author Posted December 6, 2023 This is on Linux and i have tolowered everything. Quote
jmerry Posted December 6, 2023 Posted December 6, 2023 "<name> has nothing to say to you" means that none of the states in the NPC's dialogue have their conditions met. Look through the tree view for that character's dialogue. What are the conditions for the top-level states? You want to try to design these so that at least one is always met. Exactly one is easiest to work with, as then you don't have to worry about priority. Quote
svj Posted December 7, 2023 Author Posted December 7, 2023 This is my code for initial meeting notice the commented out condition that i used for testing even after commeting this condition out &(reinstalling the mod) the NPC has nothing to say. IF ~~ THEN BEGIN FirstMeeting SAY ~Greetings good <PRO_SIRMAAM> i would like to introduce myself to you. My name is Revan Artecratos formerly of mercenary persuasion and i would like to make a business proposition to you.~ IF ~/*!InParty("Jaheira")*/~ THEN REPLY ~What kind of proposition are talking about?~ GOTO rqProposition IF ~InParty("Jaheira")~ THEN REPLY ~(Suddenly his gaze notices Jaheira and his tone shifts completely) Apologies for wasting your time i will not bore you with this silly proposal, Farewell.~ EXIT IF ~~ THEN REPLY ~Not interested.~ GOTO OfferGold END Quote
argent77 Posted December 7, 2023 Posted December 7, 2023 As @jmerry suspected your code lacks a condition for the whole dialog state. Adding a simple "True()" condition should be enough to make the dialog work: IF ~True()~ THEN BEGIN FirstMeeting // ... END If you add more dialog states then you should replace "True()" with more specific conditions, e.g. "NumTimesTalkedTo(0)" for an initial greeting. Quote
svj Posted December 14, 2023 Author Posted December 14, 2023 (edited) IF ~~ THEN BEGIN RewardNegotiation SAY ~Listen i will give you 15000 no more no less.~ IF ~~ THEN REPLY ~No i wont do it.~ EXIT IF ~~ THEN REPLY ~Alright join my party.~ IF ~~ THEN DO ~JoinParty() SetGlobal("rqrevanjoined","LOCALS",1) SetGlobal("rqAgreedtoJob","GLOBAL",1)~ EXIT END I have this code in my join dialogue yet i do not see my rqprefixed GLOBAL in Near Infinity and of course my triggers do not work. Although i do see GLOBAL in game if i set it manually but it does not trigger desired action. Edited December 14, 2023 by svj Quote
CamDawg Posted December 14, 2023 Posted December 14, 2023 JoinParty clears any queued actions. Rearrange those so that JoinParty follows the SetGlobals. Quote
svj Posted December 17, 2023 Author Posted December 17, 2023 (edited) IF InParty("rqrev") !Dead("rqrev") Global("rqSpawnPentarchAmbush","GLOBAL",1) Global("rqSpawnPentarchsGoons","AR0500",0) THEN RESPONSE #100 SetGlobal("rqSpawnPentarchsGoons","AR0500",1) CreateCreature("rqfight9",[4409.285],0) // fighter CreateCreature("rqfight9",[4285.202],0) // fighter //CreateCreature("rqfight9",[3550.495],0) // fighter CreateCreature("rqcrobw9",[4294.172],0) // crossbowman CreateCreature("rqcrobw9",[4352.197],0) // crossbowman CreateCreature("rqcle13",[4381.111],0) // cleric //CreateCreature("rqcle13",[4437.257],0) // cleric CreateCreature("rqt12f13",[4407.276],0) // thief CreateCreature("rqt12f13",[4328.221],0) // thief CreateCreature("rqwizsla",[4437.168],0) // wizardslayer END So i have been using CreateCreature with Global to set to area code to create my creatures however this way the game will create creatures only if at the time of execution of script i am not in specified area. So should i move this createcreature code from my NPCs override script to area baf or is there other solution to my problem? Edited December 17, 2023 by svj Quote
jmerry Posted December 18, 2023 Posted December 18, 2023 (edited) The only thing wrong with that script block that I can see, if you have it attached to a creature, is that there's no way to ensure it runs in the right area and spawns the creatures there rather than spawning them in the active area. If you're inside a house, for example, spawning all those creatures somewhere off in the impassible void won't do a bit of good. So, obviously, this script block should either be inserted into the area script or have an area check attached to it. Now, if it's not running in the area you want it to run in, that means something else is wrong with the script you have that block in - most likely, some earlier block is executing repeatedly so the script never gets there. Even if you move this script block, that's something that you need to fix. Edited December 18, 2023 by jmerry Quote
svj Posted December 18, 2023 Author Posted December 18, 2023 IF InParty("rqrev") !Dead("rqrev") Global("rqSpawnPentarchAmbush","GLOBAL",1) Global("rqSpawnPentarchsGoons","AR0500",0) AreaCheck("AR0500") THEN RESPONSE #100 SetGlobal("rqSpawnPentarchsGoons","AR0500",1) CreateCreature("rqfight9",[4409.285],0) // fighter CreateCreature("rqfight9",[4285.202],0) // fighter //CreateCreature("rqfight9",[3550.495],0) // fighter CreateCreature("rqcrobw9",[4294.172],0) // crossbowman CreateCreature("rqcrobw9",[4352.197],0) // crossbowman CreateCreature("rqcle13",[4381.111],0) // cleric //CreateCreature("rqcle13",[4437.257],0) // cleric CreateCreature("rqt12f13",[4407.276],0) // thief CreateCreature("rqt12f13",[4328.221],0) // thief CreateCreature("rqwizsla",[4437.168],0) // wizardslayer END You meant something like this? 0x407E AreaCheck(S:ResRef*) Returns true only if the active CRE is in the area specified. Quote
svj Posted December 22, 2023 Author Posted December 22, 2023 (edited) EXTEND_BOTTOM BELMIN 0 IF ~See("rqrev") Inparty("rqrev") !StateCheck("rqrev",STATE_SLEEPING) Global("belminrevan","AR0700",0) ~ THEN GOTO BelminIntro END EXTEND_BOTTOM BELMIN 0 IF ~See("rqrev") Inparty("rqrev") !StateCheck("rqrev",STATE_SLEEPING) Global("belminrevan","AR0700",0) ~ THEN GOTO BelminIntro END APPEND BELMIN CHAIN ~BELMIN~ BelminIntro ~You! Vile and prideful elf! You dare to enter the city?!~ == BELMIN ~You! ELF! ARE YOU LISTENING TO ME?!~ == rqrevJ ~Dog that barks doesn't bite.~ == BELMIN ~I BELMIN GERGAS SHALL MAKE YOU PAY FOR YOUR SINS ELF FILTH!!!~ IF ~~ THEN DO ~Enemy() Attack("rqrev")~ EXIT END I have wrote this reaction to Belmin Gergas the elf hater i am getting compiler errors anybody knows why? [revan/d/rqbelmin.d] ERROR at line 15 column 1-9 Near Text: CHAIN Parsing.Parse_error ERROR: parsing [revan/d/rqbelmin.d]: Parsing.Parse_error ERROR: compiling [revan/d/rqbelmin.d]! Stopping installation because of error. Edited December 23, 2023 by svj Quote
jmerry Posted December 23, 2023 Posted December 23, 2023 CHAIN is its own top-level .D action. It does not go inside an APPEND; that's where the syntax error comes from. APPEND to BELMIN, and the next thing WeiDU sees isn't a state. Also, it's good practice to impose conditions on the starting point of a CHAIN; you don't want Belmin to try to initiate that every time anyone talks to him even if your new elf isn't in the party. Quote
svj Posted December 23, 2023 Author Posted December 23, 2023 EXTEND_BOTTOM BELMIN 0 IF ~See("rqrev") Inparty("rqrev") !StateCheck("rqrev",STATE_SLEEPING) Global("belminrevan","AR0700",0) ~ THEN GOTO BelminIntro END APPEND BELMIN IF ~~ THEN BEGIN BelminIntro SAY ~You! Vile and prideful! You dare to enter the city?!~ IF ~~ THEN DO ~SetGlobal("belminrevan","AR0700",1)~ GOTO BelminDisbelief END IF ~~ THEN BEGIN BelminDisbelief SAY ~You! ELF! ARE YOU LISTENING TO ME?!~ IF ~~ THEN EXTERN ~rqrevJ~ RevanAnswerToBelmin END // IF ~Global("belminrevan","AR0700",1)~ THEN BEGIN RevanAnswerToBelmin // SAY ~Dog that barks doesn't bite.~ // IF ~~ THEN EXTERN ~BELMIN~ BelminsFinalWords // END IF ~~ THEN BEGIN RevanAnswer SAY ~Dog that barks doesn't bite.~ IF ~~ THEN EXTERN ~BELMIN~ BelminsFinalWords END IF ~~ THEN BEGIN BelminsFinalWords SAY ~YOU SHALL PAY FOR YOUR SINS ELF FILTH!!!~ IF ~~ THEN DO ~Enemy() Attack("rqrev")~ EXIT END END So i wrote this just in case and this also gives me a compiler error namely the commented out portion which i have put in BEGIN rqrevJ Quote
svj Posted January 3 Author Posted January 3 (edited) BEGIN rqrugos CHAIN IF ~//True() Global("rqRevanMintiper","GLOBAL",3) InParty("rqrev") See("rqrev") !Dead("rqrev") !StateCheck("rqrev",STATE_SLEEPING)~ THEN rqrugos RugosIntro ~Greetings Captain.~ DO ~SetGlobal("rqRevanMintiper","GLOBAL",4)~ == rqrevJ ~We need to find out where is Mintiper Moonsilver our old enemy from Moonsea.~ == rqrugos ~Tell me what you have lets put this all together.~ == rqrevJ ~We have nothing but Mintipers name and i think most mercenaries are from same unit since they have same colors and they mostly use halberds and crossbows.~ = ~One more thing they recruited Prangl.~ == rqrugos ~Ha! i saw him outside of Umar Hills Tavern. Drink was always his weakness.~ == rqrevJ ~Umar Hills it is. Have you found any suitable mercenary contracts?~ == rqrugos ~Not yet but will visit old contact of mine as i have heard tavern rumor that he is searching for mercenaries.~ == rqrevJ ~When you will have something send messenger.~ == rqrugos ~Sending messages is not necessary and quite dangerous. Return here after you defeat Mintiper it would be quite dangerous to conduct business while he is alive.~ //DO ~SetGlobal("rqRevanMintiper","GLOBAL",5)~ EXIT /* ------------------------------------------------------------------- Rugos contract no.1 -------------------------------------------------------------------*/ IF ~Dead("rqmintip") Global("rqContractsRugosAvailable","GLOBAL",1) //Global("rqcontractMarcian","GLOBAL",1) ~ THEN BEGIN Rugos1OfferContract SAY ~Greetings, I am sure you are here for the mercenary contracts Revan talked to you about.~ IF ~~ THEN REPLY ~Yes he told me to talk to you.~ GOTO Rugos1Contract IF ~~ THEN REPLY ~Yeah that's not the case, Farewell.~ GOTO Rugos1Rejected END Compiling 37 dialogue files ... [revan/d/rqrugos.d] PARSE ERROR at line 37 column 1-2 Near Text: IF syntax error [revan/d/rqrugos.d] ERROR at line 37 column 1-2 Near Text: IF Parsing.Parse_error ERROR: parsing [revan/d/rqrugos.d]: Parsing.Parse_error ERROR: compiling [revan/d/rqrugos.d]! Stopping installation because of error. ERROR Installing [Golden Horse mercenary company (Requires Throne of Bhaal)], rolling back to previous state Will uninstall 33 files for [SETUP_REVAN.TP2] component 0. Uninstalled 33 files for [SETUP_REVAN.TP2] component 0. ERROR: Parsing.Parse_error Why this thing causes parse error? inaccurate at that. Both chain and second snippet do compile if they are in separate BEGINs but together they throw parse error Edited February 29 by svj Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.