![Photo](http://www.shsforums.net/uploads/photo-1809.gif?_r=0)
Modding for Beginners
#21
-Ashara-
Posted 24 February 2004 - 07:20 AM
http://dragonlance.t.../iesdp/main.htm
at night
outdoors
should be
TIMEODAY(NIGHT), AreaType(OUTDOOR) - check the appropriate arguments in the IDS files.
if you want just to make notes to yourself, use
//// in front of the text, this way the programknows it's not the code.
THEN GOTO TsujathaLoveTalk11a means that you stay with the sme speaker file (ie you still continue talking to Tsujatha, not changing to say, Imoen) and TsujathaLoveTalk11a is simply the name of the block wich contains Tsujathat's reply. So it can be anything, the mani thing you have it somewhere. If you want to exit on PC's remark use EXIT after PC's reply....
It is also a good idea to have the capital consistent in the file naming. Here:
Global("Lovetalk","LOCALS",0)
DO ~SetGlobal("LoveTalk","LOCALS",1)~
What you are doing you are checking in the first line that variable "Lovetalk" does not exist, then you set the same variable "Lovetalk" to 1 to let the game know that the conversation happened.
I, again, recommend the Road to Banter which explains these things in much more details and very accurately.
#22
-jcompton-
Posted 24 February 2004 - 07:23 AM
You'll find that AreaType() and TimeOfDay() take care of those issues.IF
~Global("TsujathaRomanceActive","GLOBAL",1)
Global("Lovetalk","LOCALS",0)
Global("TsujathaMatch","GLOBAL",1)
GlobalTimerExpired("TsujathaRomance","GLOBAL")
at night
outdoors
THEN BEGIN TsujathaLoveTalk1
SAY ~blah blah blah~
DO ~SetGlobal("LoveTalk","LOCALS",1)~
IF ~~ THEN REPLY ~blah blah blah~ DO ~RealSetGlobalTimer("TsujathaRomance","GLOBAL",30)~ THEN GOTO TsujathaLoveTalk11a
IF ~~ THEN REPLY ~blah blah blah~ DO ~RealSetGlobalTimer("TsujathaRomance","GLOBAL",30)~ THEN GOTO TsujathaLoveTalk12a
IF ~~ THEN REPLY ~blah blah blah~ DO ~RealSetGlobalTimer("TsujathaRomance","GLOBAL",30)~ THEN GOTO TsujathaLoveTalk13a
END
No. Any DO action must be part of a transition... again, learn the structure and some of these questions will answer themselves.
THEN BEGIN TsujathaLoveTalk1
SAY ~blah blah blah~
IF ~~ THEN REPLY ~blah blah blah~ DO ~SetGlobal("LoveTalk","LOCALS",1) RealSetGlobalTimer("TsujathaRomance","GLOBAL",30)~ THEN GOTO TsujathaLoveTalk11a
IF ~~ THEN REPLY ~blah blah blah~ DO ~SetGlobal("LoveTalk","LOCALS",1) RealSetGlobalTimer("TsujathaRomance","GLOBAL",30)~ THEN GOTO TsujathaLoveTalk12a
IF ~~ THEN REPLY ~blah blah blah~ DO ~SetGlobal("LoveTalk","LOCALS",1) RealSetGlobalTimer("TsujathaRomance","GLOBAL",30)~ THEN GOTO TsujathaLoveTalk13a
END
Also, are the numbers for "Lovetalks" correct??
It is impossible to answer this question without knowing what the script that controls the romance looks like.
All a romance in BG2 is, is a series of dialogues governed by a script. By convention, the script watches a variable called LOVETALK.
So, if your script expects the romance to start at LOVETALK=0, expects you to set a 30-second timer in the dialogue and set LOVETALK to 1... then it's correct. If not, it's not.
#23
Posted 24 February 2004 - 01:58 PM
Do not try to code complex lovetalks and banters , and cutscenes right away.
1. Figure out how to make a simple new npc from scratch (there is a tutorial ->
at the Forgotten Wars Projects by Ghreyfain.
http://www.spellhold...orials/weidunpc
2. Make your npc (ie his cre file, his simple bcs, his joining dialog, and the tp2 file that will install him as well as figure out how do you install a new mod - by making a Setup-mymod.exe file
3. Test your new npc - add him to the game scripts.
After you do all this and post yor first screenshot with your new npc 'in your game' - come back and ask more questions about how you code a romance for him.
By the way - Forgotten War Projects is good place to ask for help on basics - jcompton even runs a one-day-npc contest
After you get your npc figured out and a game with him - start coding his romance and test after adding each new dialog - to make sure it actually 'works' in the game.
By then you will have a much better idea of what questions to ask.
Freedom cannot be equated with goodness, virtue, or perfection. Freedom has its own unique self-contained nature; freedom is freedom ? not universal goodness. Any confusion or deliberate equalization of freedom with goodness and excellence is in itself negation of freedom, and acceptance of the path of restraint and enforcement.
Nikolai Berdyaev - Christian Existentialist, Philosopher of Freedom.
The Longer Road mod
Redemption mod
Bitter Grey Ashes
#24
-jcompton-
Posted 24 February 2004 - 02:03 PM
#25
Posted 24 February 2004 - 06:11 PM
![:D](http://www.shsforums.net/public/style_emoticons/default/biggrin.gif)
![:unsure:](http://www.shsforums.net/public/style_emoticons/default/unsure.gif)
Sillara
#26
-Ashara-
Posted 08 March 2004 - 01:44 PM
Trying to do: Have dialogues prompted by NPC's BSC file to happen at the entry to a certain area.
Problem: have stuttering bugs so far, trying to apply the "Yoshimo speaks of Renal"-like script
Hypothetic solution:
On BSC file has the following 2 Blocks:
IF
InParty(Myself)
AreaCheck("FW____")
Global("DialogueName", "LOCALS", 0) ---> to check that dialogue had not run previously if a few areas can spawn it
Global("ScriptName", "GLOBAL", 0)
THEN
RESPONSE#100
SetGlobal("ScriptName", "GLOBAL", 1) ---> to have it in the condition of the ONLY dialogue I want to hear in that area, no more than that
END
Code the NPC's talk on J file.
in NPC's J-file put the conditions on the talk:
Global("DialogueName", "LOCALS", 0)
SetGlobal("ScriptName", "GLOBAL", 1)
Add the second scripted block in BSC looking like this:
IF
InParty(Myself)
AreaCheck("FW____")
Global("DialogueName", "LOCALS", 0)
Global("ScriptName", "GLOBAL", 1)
THEN
RESPONSE#100
StartDialogueNoSet(Player1)
SetGlobal("ScriptName", "GLOBAL", 2)
END
Am I on the right track or forgetting something essential still??????
#27
Posted 08 March 2004 - 03:40 PM
His script:
//Cailean complains about the Docks
IF
InParty(Myself)
AreaCheck("AR0300")
Global("FWCaileanQuestCompleted","GLOBAL",0)
Global("FWCaileanDocksWarning","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("FWCaileanDocksWarning","GLOBAL",1)
StartDialogNoSet(Player1)
END
His xxJ.dlg file:
//Cailean comments on entering the docks.
IF ~AreaCheck("AR0300") Global("FWCaileanQuestCompleted","GLOBAL",0) Global("FWCaileanDocksWarning","GLOBAL",1)~ THEN BEGIN CaileanDocksWarning
SAY ~Docks! Thieves! Blah!~ // he doesn't really say this
IF ~~ THEN DO ~SetGlobal("FWCaileanDocksWarning","GLOBAL",2)~ EXIT
END
#28
-Ashara-
Posted 08 March 2004 - 07:32 PM
It's working with two blocks as well, I have checked it, though it is not that elegant. Logic is all the same here, I just reset the variable in the script, not dialogue. The biggest thing is to use the J file and DialogueNoSet combination as opposite to B file and Interact.
![-_-](http://www.shsforums.net/public/style_emoticons/default/sleep.gif)
I am doing NPC-NPC talks the same way, starting with a SAY block in J file and then EXTERNing into the CHAIN3. I tried just to start a CHAIN in J file and it did not work for me.
#29
Posted 09 March 2004 - 05:20 AM
#30
-Ashara-
Posted 09 March 2004 - 06:57 PM
#31
Posted 10 March 2004 - 02:19 AM
SofT
#32
Posted 10 March 2004 - 07:04 AM
#33
-Ashara-
Posted 10 March 2004 - 07:11 AM
![:rolleyes:](http://www.shsforums.net/public/style_emoticons/default/rolleyes.gif)
The parsing errors are your typos basically (missing tildas mostly, lol or incorrectly spelled IDS's or functions...), and I actually LOVE them since they are so easy to see when debugging - the weidu gives you the line# where the error had happened.
![:wub:](http://www.shsforums.net/public/style_emoticons/default/wub.gif)
#34
Posted 10 March 2004 - 02:45 PM
Here is an example TsujathaLoveTalk (DO NOT READ if you don't want it to be spoiled):
=====================================================
IF
~Global("TsujathaRomanceActive","GLOBAL",2)
Global("TsujathaLoveTalk","LOCALS",39)
Global("TsujathaMatch","GLOBAL",1)
Global("TsujathaVirgin","GLOBAL",1)
GlobalTimerExpired("TsujathaLoveTalkTime","GLOBAL")~
THEN BEGIN TsujathaLoveTalk20A
SAY ~XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX~
IF ~~ THEN REPLY ~XXXXXXXXXXXXXXXXXXXXXXXXX~ DO ~SetGlobal("LoveTalk","LOCALS",40) RealSetGlobalTimer("TsujathaRomance","GLOBAL",30)~ THEN GOTO TsujathaLoveTalk20A1a
IF ~~ THEN REPLY ~XXXXXXXXXX~ DO ~SetGlobal("LoveTalk","LOCALS",40) RealSetGlobalTimer("TsujathaRomance","GLOBAL",30)~ THEN GOTO TsujathaLoveTalk20A2a
IF ~~ THEN REPLY ~XXXXXXXXXXXXXX~ DO ~SetGlobal("LoveTalk","LOCALS",40) RealSetGlobalTimer("TsujathaRomance","GLOBAL",30)~ THEN GOTO TsujathaLoveTalk20A3a
END
=====================================================
This LoveTalk, along with all the others, is in the BTSUJAT.D file. I want to be able to CHAIN what Tsujatha says because, as you can see in this one, his responses are sometimes a bit long. How do I chain just Tsujatha's lines? Can someone please take this, change it to a chained LoveTalk, and re-post it in this thread, please?? Thanks a million all you patient and helpful modders out there! You will be rewarded with a great mod for your efforts!!!
SofT
P.S. This problem has been solved, so I have removed the spolier. Thanks a million Kismet.
#35
Posted 10 March 2004 - 02:54 PM
![:)](http://www.shsforums.net/public/style_emoticons/default/smile.gif)
SAY ~Something~
= ~I'm still saying something~
= ~This is a really long something that I'm saying.~
IF ~~ THEN REPLY ~Done yet?~
etc.
Which, by the way, is covered in the weidu readme. http://www.weidu.org...eiDU.html#htoc8
#37
-Ashara-
Posted 14 March 2004 - 04:44 PM
Example: Jaheira initiates the talk with PC, but after PC's reply is chosen it shows on the screen as Coran's remark (Coran stnding next to Jaheira).
I am using APPEND to B-file and the script is something like shown below. Do I need to add anything to make sure that she converses with PC, not with the next NPC? (Erm...texts are not included in the mod)
IF WEIGHT #-1 ~See(Player1)
Global("JAPC2","LOCALS",0)~ THEN BEGIN JAPC2
SAY ~Blah-blah, <CHARNAME>?~ [JAHEI99]
IF ~~ THEN REPLY ~Yeah.~ DO ~SetGlobal("JAPC2","LOCALS",1)~ GOTO JAPC2.1
IF ~~ THEN REPLY ~NAY!~ DO ~SetGlobal("JAPC2","LOCALS",1)~ GOTO JAPC2.2
IF ~~ THEN REPLY ~Oh, go nug Khalid already!~ DO ~SetGlobal("JAPC2","LOCALS",1)~ GOTO JAPC2.3
END
#38
-jcompton-
Posted 15 March 2004 - 11:51 AM
It's nothing to do with the DLG coding, everything to do with how you call the conversation.Uhm...by some reason in the talks between NPCs and PC the remarks of the PC get assigned to the NPC closest to the speaking NPC.
Basically, whoever ends up as the target of the Interact() or Dialogue() command is the person who ends up appearing in the replies. Note that this is, ultimately, a cosmetic issue since it only shows up in the scrollback, but if you absolutely positively want the PC's name to appear there, you must use Interact(Player1) or Dialogue(Player1). Using something like Interact([PC]) will just pick any party member (either at random or whoever's closest to Jaheira, can't recall how it works.)
#39
-Ashara-
Posted 15 March 2004 - 12:55 PM
#40
Posted 23 March 2004 - 10:59 PM
Thanks in advance!
Sillara