Jump to content


Photo

newbie to weiDu


  • Please log in to reply
36 replies to this topic

#1 josh_clue

josh_clue
  • Member
  • 47 posts

Posted 08 November 2002 - 01:57 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://www.shsforums...?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:

#2 Sir Kalthorine

Sir Kalthorine

    Order of Radiant Ugliness

  • Modder
  • 2188 posts

Posted 08 November 2002 - 04:28 AM

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):

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

KACH_TS.jpg Chrysta... could helping her to uncover her past threaten your own future?

"Pity the land in need of Heroes."- Bertolt Brecht
"A little madness, now and then, is relished by the wisest men." - Willy Wonka


#3 -jcompton-

-jcompton-
  • Guest

Posted 08 November 2002 - 07:59 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.

#4 Quitch

Quitch

    Perfection

  • Modder
  • 1132 posts

Posted 08 November 2002 - 08:19 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.

#5 josh_clue

josh_clue
  • Member
  • 47 posts

Posted 08 November 2002 - 02:34 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?)

#6 weimer

weimer
  • Member
  • 1569 posts

Posted 08 November 2002 - 03:48 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.

#7 josh_clue

josh_clue
  • Member
  • 47 posts

Posted 09 November 2002 - 12:51 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:

#8 weimer

weimer
  • Member
  • 1569 posts

Posted 09 November 2002 - 03:40 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.

#9 josh_clue

josh_clue
  • Member
  • 47 posts

Posted 10 November 2002 - 02:01 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! :)

#10 weimer

weimer
  • Member
  • 1569 posts

Posted 10 November 2002 - 04:08 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.

#11 -Sim-

-Sim-
  • Guest

Posted 11 November 2002 - 08:05 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)

#12 josh_clue

josh_clue
  • Member
  • 47 posts

Posted 11 November 2002 - 09:07 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!
:(

#13 -jcompton-

-jcompton-
  • Guest

Posted 11 November 2002 - 09:10 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.

#14 -Sim-

-Sim-
  • Guest

Posted 11 November 2002 - 09:36 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.

#15 -Kismet-

-Kismet-
  • Guest

Posted 11 November 2002 - 01:18 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.

http://www.shsforums...f80556f224bdd08

Kismet (who's been digging around in the forums)

#16 japheth

japheth

    Codewalker

  • Member
  • 317 posts

Posted 11 November 2002 - 01:36 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.~
Check out BG1Tutu.

#17 josh_clue

josh_clue
  • Member
  • 47 posts

Posted 14 November 2002 - 01:04 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!

#18 -jcompton-

-jcompton-
  • Guest

Posted 14 November 2002 - 07:49 AM

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)

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.

#19 josh_clue

josh_clue
  • Member
  • 47 posts

Posted 01 December 2002 - 12:23 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) :(

#20 josh_clue

josh_clue
  • Member
  • 47 posts

Posted 01 December 2002 - 12:27 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) :(