Author Topic: newbie to weiDu  (Read 7092 times)

josh_clue

  • Guest
newbie to weiDu
« on: November 08, 2002, 03:57:19 AM »
MODERATOR EDIT: Much of the material below is very out of date and represents bad WeiDU practice these days. Please see this thread http://forums.fwstudios.net/index.php?showtopic=3675 for better techniques.



well, as indicated above, i am a newbie to using weiDu.
i would like to ask for your help.

1. how do i add MY OWN text descriptions for items that i created without
  messing up the dialog or string references in my game?

2. next in the following .d file, what goes into the "#"? is it supposed to be
  like a string reference? i think my two problems are related.

BEGIN ~TRIAL~

IF ~NumTimesTalkedTo(0)
~ THEN BEGIN 0
SAY ~Mmm... Hello!~ [] /* # */
  IF ~~ THEN REPLY ~Hi Who are you?~ /* # */ GOTO 1
  IF ~~ THEN REPLY ~Hey!~ /* # */ GOTO 2
END

3. a WAV file goes into the "[]", right?
4. what if i wanted my npc to have a portrait when they talk like minsc,  
  irenicus, etc?

questions 3 and 4 are not required to make the dialog, right? so i think i better concentrate on getting my 1st two questions answered. i'm really afraid of messing up my BG2:ToB by interfering with the strings.

oh, and could you guys show me by means of examples? i read through the basics by Japheth and the documentation included and i am still stumped.

thanks!

cheers! :unsure:
« Last Edit: October 20, 2003, 08:34:40 PM by jcompton »

Sir Kalthorine

  • Guest
newbie to weiDu
« Reply #1 on: November 08, 2002, 06:28:45 AM »
Quote
well, as indicated above, i am a newbie to using weiDu.
i would like to ask for your help.

1. how do i add MY OWN text descriptions for items that i created without
  messing up the dialog or string references in my game?

Yay! A newbie question that I can answer (I think!) - apologies for the childish enthusiasm, but I am still a newcomer myself so its nice to be able to help out. :)

Basically, make the item as normal but don't bother entering any text details like its name or description.  Then, just make sure you use the following lines (the example being taken from a .tp2 file for the NPC I am working on):

Code: [Select]
COPY ~Chrysta\CHHELM.itm~ ~override\CHHELM.itm~
    SAY NAME1 ~Chrysta's Elven Tiara~
    SAY NAME2 ~Chrysta's Elven Tiara~
    SAY DESC ~This delicate crystal tiara is... (etc.)~

Hope that helps! :D
                   

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
newbie to weiDu
« Reply #2 on: November 08, 2002, 09:59:39 AM »
#2: Nothing goes in there. Those are commented-out references. /* */ encompasses comments. WeiDU generates those commented references (which are indeed the string reference) when you decompile a .dlg, but for creating your own .d file, it's not at all meaningful.

#3: Yes.                    
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Quitch

  • Perfection
  • Planewalker
  • *****
  • Posts: 270
  • Making the world a better place for evil
newbie to weiDu
« Reply #3 on: November 08, 2002, 10:19:45 AM »
#4. You'll need to edit the NPCs CRE using a tool like NearInfinity.  Then it's simply a matter of telling the CRE the name of the portraits and ensuring WeiDU copies them to the override.                    
Past: Ascension
Present: Return to Windspear
Future: Imoen Relationship
"Perfection has no deadline"

josh_clue

  • Guest
newbie to weiDu
« Reply #4 on: November 08, 2002, 04:34:25 PM »
wow. that was pretty fast for good and clear replies to all my newbie questions!

thanks! i'll be sure to try the stuff out!

5. oh, what about creature names? i modified one from an existing .CRE file using Near Infinity but changing the name ALSO CHANGED THE NAME OF THE ORIGINAL CREATURE i got the file from. could you type in a code for me just like you guys did up there?  :rolleyes:

i think i just need the code with the "SAY DESC" stuff. thanks again!!!

oh, yeah, you guys were right the weiDu dialog does take some time, but after just a few hours of working on it, it is starting to make sense to me now... (slow, huh?)                    

Offline weimer

  • Moderator
  • Planewalker
  • *****
  • Posts: 2222
  • Gender: Male
    • WeiDU and Weimer Mods
newbie to weiDu
« Reply #5 on: November 08, 2002, 05:48:40 PM »
This TP2 code should handle installing a CRE and giving it a new name:

COPY ~mymod/myNPC.cre~ ~override/myNPC.cre~
  SAY NAME1 ~Paksenarrion Dorthansdotter~
  SAY NAME2 ~Paksenarrion Dorthansdotter~

Replace Paks with whatever your CRE's name should be. See Sola, Valen, Kelsey, Tashia (etc.) for other fields you might want to change while you're there.                    

josh_clue

  • Guest
newbie to weiDu
« Reply #6 on: November 09, 2002, 02:51:59 AM »
okay! i'll try that out! wow, the people here really answer fast!

6. i noticed that you can still keep the BG1 proficiencies even in BG2. question: will the old proficiencies from BG1 (large sword) work when i transfer a creature (.CRE) to BG2 (large sword = bastard and long sword bonuses)?

i was planning on transferring a creature from BG1 =] BG2 but i dunno how to convert these proficiencies using NI. i know i should have posted it at their site but maybe u guys could help me out. thanks!
 :blink:                    

Offline weimer

  • Moderator
  • Planewalker
  • *****
  • Posts: 2222
  • Gender: Male
    • WeiDU and Weimer Mods
newbie to weiDu
« Reply #7 on: November 09, 2002, 05:40:03 PM »
Giving a CRE a few pips in "Large Sword" in the main part of the CRE file will have *no effect* on their use of a Long Sword. You must attach BG2-style profs using permanent effects. Look at sola5.cre for an example of how to do this.

I'm not sure exactly what you are converting, but the basic answer is "no, you'll have to do the work by hand".

However, note that most "monster" CREs do not actually use profs -- they just have "set" THAC0s and use special undroppable "weapons" that play the role of their innate attacks. In 99% of all cases, their weapons are neither long swords nor daggers -- they respond to no proficiency at all.                    

josh_clue

  • Guest
newbie to weiDu
« Reply #8 on: November 10, 2002, 04:01:52 AM »
i see... i will most definitely look that up! thanks!

um... more questions (i hope i'm not too bothersome to you IE mod-making gurus out there!) :ph34r:

7. when writing up journal entries, how do i ensure that it goes into the "quests" part of the journal? how do i make an entry in the "quests" part disappear and add a new one to the "done quests" part? could you teach me in code pls? examples have been extremely helpful. :blink:

8. i know i shouldn't ask you guys this, but here goes: how do i make a creatures' body disappear after it dies? its a question for Near Infinity user, i know, but if you could help me out, it would be much appreciated!

cheers! :)                    

Offline weimer

  • Moderator
  • Planewalker
  • *****
  • Posts: 2222
  • Gender: Male
    • WeiDU and Weimer Mods
newbie to weiDu
« Reply #9 on: November 10, 2002, 06:08:39 PM »
7. No idea, I don't use the journal.

8. Set the "No Corpse" flag at the top of the CRE file in Near Infinity.                    

Sim

  • Guest
newbie to weiDu
« Reply #10 on: November 11, 2002, 10:05:29 AM »
For the journal entries, you have to add the string to the TLK, and specify the strref to add using the AddJournalEntry(I:Entry*,I:Type*JourType) action, which allows the 'section' of the journal to be specified.


So, for example, to add strref 1 to the quests section, you would use:

AddJournalEntry(1,QUEST)


Later on, if you want to erase this entry and add strref 2 to the done quests section, you would use:

EraseJournalEntry(1)
AddJournalEntry(2,QUEST_DONE)                    

josh_clue

  • Guest
newbie to weiDu
« Reply #11 on: November 11, 2002, 11:07:50 AM »
for mr weimer:
thank you for your patience and that simple solution to the "body disappearing problem" usig Near Infinity!

for mr sim:
sorry, but i don't get it.  :unsure:
using WeiDu, how would i put the appropriate entry in the appropriate journal section? i am making the entry as an add-on using WeiDu, and therefore there is NO STRREF, right? would it look something like this?:

AddJournalEntry(~aran told me i gotta kill bodhi~,QUEST)

is this right? i am supplying a text to add to the journal on the "quests" section... and for the other part:

EraseJournalEntry(~aran told me i gotta kill bodhi~)
AddJournalEntry(~well, i killed bodhi. yahay!~,QUEST_DONE)

because there are no strrefs... help! thanks again for your time!
 :(                    

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
newbie to weiDu
« Reply #12 on: November 11, 2002, 11:10:48 AM »
Japheth once worked out how to do exactly what you want to do. When I see him next I'll send him your way.
                   
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Sim

  • Guest
newbie to weiDu
« Reply #13 on: November 11, 2002, 11:36:18 AM »
Ah... I don't know how that would work in WeiDU, sorry. I guess it doesn't make much sense to add a strref manually if you're using it.

The basic method will be the same, but someone with a better knowledge of WeiDU than me will need to confirm how to use strings in actions in a .D.                    

Kismet

  • Guest
newbie to weiDu
« Reply #14 on: November 11, 2002, 03:18:47 PM »
Japheth gave an example of adding/deleting journal entries in this thread.  It's a bit old so maybe that's not the best way to do it anymore.

Obsolete URL removed

Kismet (who's been digging around in the forums)                   
« Last Edit: July 10, 2005, 11:03:52 AM by jcompton »

japheth

  • Guest
newbie to weiDu
« Reply #15 on: November 11, 2002, 03:36:28 PM »
I'm just going to repost my old post here, because I left some things out of it anyways.

-----------------

Yes, I have successfully been able to add and delete journal entries using WeiDU. It's relatively simple. Just make sure to use the *exact* same string within your tp2 so WeiDU knows to replace your placeholder with the string's string reference.

Example:
BEGIN JIM

IF ~NumTimesTalkedTo(0)~ THEN BEGIN JIM1
SAY ~Hey, can you help me find my rabbit?~
IF ~~ THEN REPLY ~Sure Jim.~ DO ~AddJournalEntry(99999,QUEST)
SetGlobal("JimRabbitQuest","GLOBAL",1)~ EXIT
END

IF ~Global("JimRabbitQuest","GLOBAL",1)~ THEN BEGIN JIM2
SAY ~Have you found my rabbit?~
IF ~Global("RabbitFound","GLOBAL",1)~ THEN REPLY ~Yep, it's right here.~ DO ~EraseJournalEntry(99999)
AddJournalEntry(99998,QUEST_DONE)
SetGlobal("JimRabbitQuest","GLOBAL",2)~ EXIT
IF ~~ THEN REPLY ~Nope, sorry Jimbo.~ EXIT
END

IF ~Global("JimRabbitQuest","GLOBAL",2)~ THEN BEGIN JIM3
SAY ~Thanks again for saving my rabbit.~
IF ~~ THEN REPLY ~No problem Jim.~ EXIT
END

And then within your .tp2 file (the .tp2 file is the file you set up for installing your mod on the end users machine) you issue this statement.

COMPILE ~jim.d~


COPY ~override/jim.dlg~ ~override/jim.dlg~
REPLACE ~99999~ ~Finding Jim's Rabbit

You've been sent on a mission of the upmost importance. You need to find Jim's rabbit before the carrot stocks become completely depleted.~
REPLACE ~99998~ ~The Rabbit is Found

We've found Jim's rabbit.  The carrot stocks are saved.  Hazzah!~

So this will add the string specified to the dialog.tlk and then replace all instances of 99999 within jim.dlg with the updated string reference, as well as replacing 99998 with the QUEST_DONE journal string.

You can just follow this formula throughout your whole dialog but just decrease the numbers for different journal entries. (99997, 99996, etc.)

Note: When your journal entries are added to the game, it displays the first line in the dialog window, so it's best to set up your entries like this:

REPLACE ~99999~ ~This is the heading that appears in red or blue or green

This is the rest of the journal entry.  Blah, blah blah.~                    



[!--EDIT|japheth|Nov 11 2002, 07:37 PM--]

josh_clue

  • Guest
newbie to weiDu
« Reply #16 on: November 14, 2002, 03:04:32 AM »
;) hmmm... that was kinda a lot for me to digest... *ulp!*   :rolleyes:

i'll give it a try, though. on to the next question:

9. what if i already installed a MOD on my pc that makes use of the strref 99999? will using the same strref make my files incompatible with my add-in files and possibly other MODs? does that mean if i decide to make a MOD using the journal entry method you just taught me, i would have to check out other MODs with journal entries just to make sure that the strrefs don't overlap?  :(  :(  :(

thanks again!                    

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
newbie to weiDu
« Reply #17 on: November 14, 2002, 09:49:57 AM »
Quote
9. what if i already installed a MOD on my pc that makes use of the strref 99999?

Remember, it's not YOUR PC that matters, it's the PC where the mod gets installed. And it wouldn't matter if it were used _on that PC_, since that number is getting replaced. It would only matter if that number were used _in that DLG._

That said, literally tens of thousands of strings have to be added to a BG2 game before you get up to 99,999... but I believe you can use a larger number. Actually, you could use a smaller 5-digit number, too, a number that would already exist in the game, and then simply resolve not to use that number in your DLG (since you _can_ reference literal string numbers with SAY, as in SAY #30000)

Quote
will using the same strref make my files incompatible with my add-in files and possibly other MODs? does that mean if i decide to make a MOD using the journal entry method you just taught me, i would have to check out other MODs with journal entries just to make sure that the strrefs don't overlap?  :(  :(  :(

No, and no. WeiDU will append a new string, and put the number of that new string in place of the 99999 (or whatever) you put in the DLG action text.                    
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

josh_clue

  • Guest
newbie to weiDu
« Reply #18 on: December 01, 2002, 02:23:44 AM »
hey!!! after an almost 3 week hiatus, i'm back! and so are my newbie questions :o

i've managed to put together all the things you've been teaching me and it all seems to be falling nicely into place... but, still being in the newbie phase and all, i have another question--- not really a question but rather a request. so here it goes:

10. can you guys help me put together a TP2 file (is that the right name for it?)? i need examples on how to make that installer thingie i keep seeing with most of the other weiDu mods. i need an example on how to put in my own (a) items with their own names and descriptions, (B) dialogues, © creatures with their own names, (d) journal entries, (e) anything else you guys think i might need to know to put this all together.

i think i have a vague idea on how this is all done based on the help file that came along with weiDu but i still need the EXAMPLES of how its done. :blink:  thanks again for all your support. i think i'll have a mod out in 2 months or so... (i hope)  :(                    

josh_clue

  • Guest
newbie to weiDu
« Reply #19 on: December 01, 2002, 02:27:07 AM »
OOPS! i think that last message put in some smileys!

I'M RE-POSTING IT IN A CLEANER FORM. there... that's better

all seems to be falling nicely into place... but, still being in the newbie phase and all, i have another question--- not really a question but rather a request. so here it goes:

10. can you guys help me put together a TP2 file (is that the right name for it?)? i need examples on how to make that installer thingie i keep seeing with most of the other weiDu mods. i need an example on how to put in my own
     a. items with their own names and descriptions,
     b. dialogues,
     c. creatures with their own names,
     d. journal entries,
     e. anything else you guys think i might need to know to put this all together.

i think i have a vague idea on how this is all done based on the help file that came along with weiDu but i still need the EXAMPLES of how its done. :blink:  thanks again for all your support. i think i'll have a mod out in 2 months or so... (i hope)  :(                    

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
newbie to weiDu
« Reply #20 on: December 01, 2002, 11:19:39 AM »
I suggest you study the .tp2 files for these mods:

Solaufein
Valen
Kelsey-TOB

and you'll pretty well have all of your questions answered, except perhaps the Journal bit but I'll let uncle Japh come along and finish that lesson. :)

                   
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline weimer

  • Moderator
  • Planewalker
  • *****
  • Posts: 2222
  • Gender: Male
    • WeiDU and Weimer Mods
newbie to weiDu
« Reply #21 on: December 01, 2002, 03:17:02 PM »
Quote
but i still need the EXAMPLES

Have you considered using the mymod.tp2 file from the EXAMPLES folder in WeiDU as a guide? :-)                    

Tsuru

  • Guest
newbie to weiDu
« Reply #22 on: December 01, 2002, 11:01:47 PM »
I can verify that all the above examples work for learning this. I was actually able to make a working tp2 without bugging one person after studying them for a bit :)

                   

josh_clue

  • Guest
newbie to weiDu
« Reply #23 on: December 27, 2002, 06:26:48 AM »
:) hey! i haven't checked in here for a long time! i'm almost done with the mini-MOD i've been working on. i just have a few more questions (oh no!).

11. is there any way to make my NPC INITIATE the conversation? i.e. the NPC would talk to the character upon seeing him/her (not requiring the player to click on the NPC to start dialogue) could you type out the syntax required to do so?

12. does anyone out there know how to add music to an area? i don't seem to understand how this stuff works.  :blink:

my actual priority is to get the answer for number 11
thanks again to all you guys! to weimer and the other guys: your .tp2 files are an excellent source of the basics in MOD making and distribution. YOU ROCK!!!

                   

japheth

  • Guest
newbie to weiDu
« Reply #24 on: December 27, 2002, 11:15:14 AM »
Quote
11. is there any way to make my NPC INITIATE the conversation? i.e. the NPC would talk to the character upon seeing him/her (not requiring the player to click on the NPC to start dialogue) could you type out the syntax required to do so?

All you need to do is create a script like so:

IF
     Global("NPCInitiated","GLOBAL",0) // Doesn't have to be called this, it can be called anything else
     See(Player1) // I can see the PC
     Allegiance(Myself,NEUTRAL) // I'm not hostile
     !Dead(Myself) // I'm not dead
THEN
     RESPONSE #100
          SetGlobal("NPCInitiated","GLOBAL",1) // Setting the global to one to ensure that the dialogue initiation only happens once
          StartDialogueNoSet(Player1) // Starts a dialogue with Player1
END

After creating the script, just add that block to their existing script, or make it a script all it's own.  And then add it to the script slot that you think you want it in.  (The override script slot is usually a safe bet since it never changes unless you specifically change it outside of the game with NI or some other type of cre editor.)                    

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: