Modding for Beginners
#1
Posted 08 February 2004 - 04:59 AM
Sillara
#2
Posted 08 February 2004 - 05:56 AM
Ghrey's NPC tutorial really is a good place to start. The thread on the tutorial is chock full of good information on pitfalls to avoid so I'd recommend reading that too. http://www.shsforums...ay;threadid=678
WeiDU comes with a readme and some nice tutorials on some of the different functions. It also comes with a folder full of examples. I'd recommend reading them through, even if you don't understand everything (or anything) right off.
#3
Posted 09 February 2004 - 03:38 AM
I have three questions.
1) When making a joining dialogue, how do I script in a variable for the party attacking the NPC?
2) How do I script in a variable for the NPC to attack the party/turn hostile?
3) How do I have the NPC refuse to speak to the PC another time (i.e., So-and-so has nothing to say to you)?
Thanks!
Sillara
P.S. We have just begun our first bit of coding, and I have an enormous favor to ask of you experienced coders. Would one of you be willing to read over my joining dialogue to make sure that I am doing it properly? I would rather send it as an attachment than post it up for two reasons: it contains spoilers, and I would like to make sure I have it in the right kind of file. Thank you again!!!
#4
Posted 09 February 2004 - 04:58 AM
how come you always look so damn cool in every photo I see you in?!?
Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.
Still a cyberjock, still hacking the matrix, still unsure of what that means.
TeamBG member - http://www.teambg.eu
#5
Posted 09 February 2004 - 05:31 AM
(For those of you who have already read this post on the CoM board, sorry!)
I have three questions.
1) When making a joining dialogue, how do I script in a variable for the party attacking the NPC?
2) How do I script in a variable for the NPC to attack the party/turn hostile?
Do you want the NPC to attack the party as soon as he sees them or in the middle of the dialog? If it's the former I assume you could just flag him as "enemy" rather than "neutral" and then turn him neutral and stop the fight when his health gets to a certain level. If it's the latter then you'd use DO ~Enemy()~
3) How do I have the NPC refuse to speak to the PC another time (i.e., So-and-so has nothing to say to you)?
Give him dialog without any true conditions.
P.S. We have just begun our first bit of coding, and I have an enormous favor to ask of you experienced coders. Would one of you be willing to read over my joining dialogue to make sure that I am doing it properly? I would rather send it as an attachment than post it up for two reasons: it contains spoilers, and I would like to make sure I have it in the right kind of file. Thank you again!!!
You can always --traify it first so all we would see would be @1 instead of your actual dialog lines. As for the right kind of file, it just has to be a plain text file.
#6
Posted 09 February 2004 - 06:22 AM
Don't forget that besides your d-files (the ones with actual dialog), cre-files (the ones that contain basic information on your new npc) and bcs-files (the scripts that actually dictate your npc behavior) you also need a tp2 file - the file that installs all the above components and adds them to your game.
Also, one program that I think you need to have besides Context editor (http://fixedsys.com/...t/download.html) and Weidu (http://weidu.org/Wei...ADME-WeiDU.html) is the Near Infinity - the Infinity Engine Editor and Browser (http://www.idi.ntnu....i/download.html).
Hope it helps. You can send your files to me if you wish - simply PM or email at
ladydorotea@hotmail.com, and yes, as Seifer mentioned the best format is plain text. Just save your d-file as All-files xxx.d and it will be readable in any text editor (Notepad, Wordpad, Context etc) It is not desirable to use Word.
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
#7
Posted 15 February 2004 - 11:39 PM
Salvanas: Blah-blah-blah.
MyNPC: No! Blah-BLAH-blah.
Salvanas: You're right. Blah-BLAH-blah.
MyNPC: Stupid git.
END
I want my NPC's dialogue to interrupt/intercept the other person's speech and prevent it from advancing as well as having the guy respond to my NPC. How do I do that?
Thanks!
Sillara
#8
Posted 16 February 2004 - 04:30 AM
Thanks!
Sillara
#9
Posted 16 February 2004 - 05:57 AM
2) Bioware dialogues uses *ironic or emphatised* instead of "ironic or emphatized". it should be safe as long as there aren't /nearby, because in WeiDu /*this is a comment*/.
3) to indent, you can, in your .tra file (or in the hard-coded .d), write
@1 "line 1
line 2
linte 3"
(or SAY "line 1
line 2
line 3"
safely because each @ reference is long from " to the next " (I use ", having an italian keyboard, but WeiDU usually uses the tilde). WeiDU totally ignores indenting in both .d and .tp2 files.
Italian users: help test the Stivan NPC!
Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator
If possible, send diffs, translations and other contributions using Git.
#11
Posted 17 February 2004 - 01:40 AM
This time my question involves the PC's class. My NPC has class-specific dialogues with the PC, but I was wondering how to trigger that. What Global (or Local?) or whatever do I have to code in? Also, is there any way to check for the PC's kit? Or is the fighter class all that can be checked for, not the Wizard Slayer or Kensai or what-have-you?
Thanks again!
Sillara
#12
Posted 17 February 2004 - 02:27 AM
#13
Posted 18 February 2004 - 07:20 AM
Kit(Player1,KENSAY)
or whatever. Classes are: MAGE FIGHTER CLERIC THIEF BARD PALADIN DRUID RANGER FIGHTER_MAGE FIGHTER_CLERIC FIGHTER_THIEF FIGHTER_MAGE_THIEF MAGE_THIEF CLERIC_MAGE CLERIC_THIEF FIGHTER_DRUID FIGHTER_MAGE_CLERIC CLERIC_RANGER
Kits are:
ABJURER CONJURER DIVINER ENCHANTER ILLUSIONIST INVOKER NECROMANCER TRANSMUTER BERSERKER WIZARD_SLAYER KENSAI CAVALIER INQUISITOR UNDEAD_HUNTER FERALAN STALKER BEASTMASTER ASSASIN BOUNTY_HUNTER SWASHBUCKLER BLADE JESTER SKALD TOTEMIC_DRUID SHAPESHIFTER BEAST_FRIEND TALOS HELM LATHANDER MONK BARBARIAN WILDMAGE (TOB only, so if used you should create 2 separate .d or .baf, using UNLESS/IF, see Wei-DU instructions for .tp2)
Italian users: help test the Stivan NPC!
Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator
If possible, send diffs, translations and other contributions using Git.
#14
Posted 18 February 2004 - 08:08 AM
#15
Posted 18 February 2004 - 02:36 PM
@Kismet--does that mean that the game as it stands will not properly identify the kits? Hmm. In that case I may skip kit-specific classes, as repairing anything is WAY out of my league!!
Thanks for the help! I love this thread, too.
Sillara
#16
Posted 19 February 2004 - 07:50 AM
You can ask me if you need them, though they aren't really tested so far (my version of KIT.IDS file was already fixed so the commands find nothing to patch)
Ever forward, my darling wind...
#17
Posted 24 February 2004 - 03:14 AM
I have a slight problem with the NPC/NPC banters. We have no trouble chaining in the usual banters; it is the ones with a conditional response that we have trouble with. For example:
Tsujatha: Blah, blah, blah.
Imoen: You're really dull.
(If NOT in a romance with the PC)
Tsujatha: No, I'm not.
(If in a romance with the PC)
Tsujatha: Charname doesn't think so.
How do I code that? Thanks in advance for the help!
Sillara
P.S. Don't worry. That was not a REAL sample of the talks.
#18
Posted 24 February 2004 - 03:57 AM
(I'll use pseudo code here, since I dont know the script syntax)
Imoen says "You're really dull.";
IF (getGlobal('XRomanceActive') is '1') then X should say "<charname> doesn't think so...";
IF (getGlobal('XRomanceActive') is '2') then X should say "<charname>? Your sister seems to have something against me.";
IF (getGlobal('XRomanceActive') is '3') then X should say "So I've realized... What should I do to remedy that?" or maybe "Insinuate anything of the sort again and I will hang you using your reckless tongue!".
So the first time you take the NPC into the group, XRomanceActive should be set to 1 (unless any eventual romance restrictions aren't met). At some point in the romance, set it to 2. If charname tells the NPC off during a romance dialogue, set it to 3.
You can initiate all kinds of GLOBALs, if maybe your NPC insulted Aran Linvail during quests in chapter 3, set a variable AranPissed to 1, and you could edit arans dialogue for chapter 6 to deny you help with bodhi if aranpissed is 1.
Edit: To prevent misunderstandings, the pseudo code isn't actual script/dialogue. It is just some form of explanation of the sequence of events. Hopefully you'll be able to reinterpret it to real script/dialogue.
working jobs we hate so we can buy shit we dont need.
We have no purpose or place.
We have no great war, or great depression.
Our war is a spiritual war, our great depression is our lives." - Tyler Durden, Fight Club
#19
Posted 24 February 2004 - 04:28 AM
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
What does the "30" mean in the RealSetGlobalTimer? I know I can change it, but what does it mean?? Also, are the numbers for "Lovetalks" correct??
SofT
#20 -Sim-
Posted 24 February 2004 - 04:31 AM
And the 30 is seconds of real time.