Jump to content


Photo

Putting it all together


  • Please log in to reply
123 replies to this topic

#1 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 18 September 2007 - 07:04 PM

Anyone know where I can find a tutorial for putting all the files of a mod together for Weidu? I don't know exactly what files I need, how I need to organize them, and how to write the tp2 file for it all, as well as there everything goes. Help would be greatly appreciated.

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#2 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 18 September 2007 - 07:17 PM

The absolute best way to learn is to look at how other mods do it. There are plenty of them out there, and they all have the relevant files/structure/tp2 code necessary.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#3 Miss Sakaki

Miss Sakaki

    Modder

  • Modder
  • 505 posts

Posted 19 September 2007 - 01:25 AM

Have a look at theacefes' NPC tutorial, it has a nice no-nonsense explanation on how to set out a simple tp2.

#4 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 19 September 2007 - 02:34 AM

Ordinarily, I'd recommend building your tp2 as you go, so you don't accidentally forget to compile files.

But there is nothing wrong with using a well-organized mod as a model for building your tp2.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#5 Solaufein

Solaufein

    No fate but what we make

  • Modder
  • 263 posts

Posted 19 September 2007 - 04:24 AM

Using another mods as a template and adding in your own file names is the easiest and quickest way to do it.
Her lips were red, her looks were free
Her locks were as yellow as gold
Her skin was white as leprosy.
The Nightmare Life-in-Death was she,
Who thicks man's blood with cold.

Samuel Taylor Coleridge

http://teambg.net
The Undying
 

#6 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 20 September 2007 - 08:05 PM

Okay, here's what I have so far, please say something if something's out of place, I need to add something, or anything of the sort:

Dialogues Folder has BT1Dar.d, T1Dar.d, and T1DarJ.d

Scripts has T1AR0400, T1Dar.baf, T1DarD.baf, and T1Maz.baf

Creatures has T1Dar.cre

Portraits has T1DarL, T1DarM, and T1DarS

Music has T1DarTheme and T1DarMazTheme


Anything need changing before I start working on the tp2 and whatnot?

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#7 theacefes

theacefes

    Probably swearing

  • Modder
  • 1782 posts

Posted 20 September 2007 - 09:15 PM

Are your music files wavs or oggs?
DO ~SetGlobal("omgBbqRomanceActive","GLOBAL", 2)~

 
Gibberlings Three - IE Modding Community


#8 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 21 September 2007 - 04:38 AM

They're in .wav format at the moment.

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#9 theacefes

theacefes

    Probably swearing

  • Modder
  • 1782 posts

Posted 21 September 2007 - 10:06 AM

Ah okay. If you want to save download size...you may want to consider using oggs. Just a suggestion.
DO ~SetGlobal("omgBbqRomanceActive","GLOBAL", 2)~

 
Gibberlings Three - IE Modding Community


#10 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 21 September 2007 - 10:10 AM

There anything I need to change/add in the whole setup, though?

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#11 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 21 September 2007 - 10:15 AM

Where's T1DarP.d?

Other than that, looks fine.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#12 theacefes

theacefes

    Probably swearing

  • Modder
  • 1782 posts

Posted 21 September 2007 - 10:24 AM

You need to convert the wavs to oggs, put them in preferrably an "audio" folder, create an install bat file and an uninstall bat file, and then have the command for decoding the oggs into wavs in your tp2s.


Here is Auren's batch files which decode the oggs into wavs (since BG2 cant play oggs)

// Her install file (This is saved as "aurenaudio.bat" and can be made with a text editor)

@echo off 
@echo Installing audio... 

cd override 
oggdec K#Aure*.ogg	// basically any ogg beginning with K#Aure will be decoded.  Note that I can only put two more characters to name my ogg.  ie:	 K#Aure01.ogg//
del K#Aure*.ogg 
del oggdec.exe 

@echo Finished installing audio.

Her uninstall batch file, named aurenaudiouninstall.bat

@echo off 
@echo Uninstalling audio... 

cd override 
del K#Aure*.wav 

@echo Finished uninstalling audio.

I would put these in a Batch Files folder.

And...here is my Tp2.


COPY ~AurenAseph/audio/K#blank.mus~ ~music~   //Copies your blank mus file (you *do* have this right?)
COPY_EXISTING ~songlist.2da~ ~override~
SET_2DA_ENTRY 0 2 3 ~K#BLANK.MUS~

 COPY		 ~AurenAseph/audio~ ~override~  //copies all your sound files into the game
 AT_INTERACTIVE_EXIT ~AurenAseph/BatchFiles/aurenaudio.bat~ //runs the decoding of the ogg files into wav files 
 AT_INTERACTIVE_UNINSTALL ~AurenAseph/BatchFiles/aurenaudiouninstall.bat~  //will remove the wavs files from the game upon uninstall


Hope this helps!
DO ~SetGlobal("omgBbqRomanceActive","GLOBAL", 2)~

 
Gibberlings Three - IE Modding Community


#13 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 21 September 2007 - 11:18 AM

Berelinde, from what I saw, you only need a P dialogue file if the character can be kicked out and later re-invited. Darian returns home if he's ever kicked out.

Theacefes, I was told when setting up Darian's music that I didn't need to include anything like that-the feedback was that I could just add code to play the music directly from the folder.

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#14 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 21 September 2007 - 11:45 AM

Kivan returns home, too, but he's still got a P-file. Keep in mind that there are any number of reasons an NPC can be kicked out, and not all of them involve actually being kicked out. The other day, I was playing BG2, and Minsc was petrified by one of the halfling mages in the planar sphere. I happened to have a "stone to flesh" scroll to de-stone him, but he stood there all blue-circled, and gave his rejoining speech when I re-recruited him.

Did you have any plans in case Darian was petrified?

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#15 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 21 September 2007 - 11:48 AM

:unsure:

Don't guess I do. I've started writing Darian's tp2 file, but I'll need to do that pesky P file before I get too much further.

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#16 theacefes

theacefes

    Probably swearing

  • Modder
  • 1782 posts

Posted 21 September 2007 - 11:56 AM

Re: the music


Yes, you can just play it from the folder. My suggestion to you was for the purpose of making your download size smaller, since wavs tend to be large files. The code I gave you is for decoding oggs, which are much smaller, into wavs.
DO ~SetGlobal("omgBbqRomanceActive","GLOBAL", 2)~

 
Gibberlings Three - IE Modding Community


#17 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 21 September 2007 - 01:28 PM

Just checking I got the P file right, here's the contents:

BEGIN T1DarP

IF ~Global("T1DarJoined","Locals",1)~ THEN BEGIN Kick
SAY ~Are you certain you wish to part ways? I will return to Myrrhavin if so.~
++ ~No, I think we should remain together.~DO~JoinParty()~ EXIT
++ ~I believe this is where we part ways. Farewell, and good journeys.~ GOTO Farewell
END

IF ~~ THEN BEGIN Farewell
SAY ~Good journeys to you as well.~DO~SetGlobal("T1DarJoined","Locals",0) LeaveArea()~
END
EXIT

IF ~~ THEN BEGIN Return
SAY ~You have returned. Do you wish my assistance once again?~
++ ~Wipe that attitude off your face, and the answer will be 'yes'.~DO~SetGlobal("T1DarJoined","Locals",1) JoinParty()~
++ ~No, we should part ways.~DO~LeaveArea()~
END
EXIT

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#18 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 21 September 2007 - 02:34 PM

Okay, in addition, I have a few final questions:

To what file to I APPEND T1Maz.baf?

How do I compile the portraits and music in the tp2 file? I know I've asked before, but having it here as a reference would be very handy.

And lastly, I'm checking to see that I got this coding right:

COMPILE ~Darian\Dialogues\T1Dar.d~
COMPILE ~Darian\Scripts\T1Dar.baf~
EXTEND_TOP ~AR0400.bcs~ ~Darian\Scripts\T1AR0400.baf~
APPEND ~pdialogue.2da~ ~T1Dar T1DarP T1DarJ T1DarD T1Dar25J T1Dar25D T1Dar25~
UNLESS ~T1Dar~
APPEND ~interdia.2da~ ~T1Dar BT1Dar BT1Dar25~
UNLESS ~T1Dar~

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri


#19 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 21 September 2007 - 03:10 PM

For adding Mazzy's baf to her existing script, you can do this:

EXTEND_BOTTOM ~mazzy.bcs~ ~Darian/Scripts/T1Mazzy.baf~

For adding portraits and songs, it's just

COPY ~file path~ ~override~

Have you got the portraits assigned to him? If not, you're going to need to do so in the tp2.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#20 Tempest

Tempest

    Cue Ominous Music

  • Modder
  • 6572 posts

Posted 21 September 2007 - 03:17 PM

Nope, haven't got the portraits assigned or music scripting added. I'm doing the tp2 file now, and I want to make sure I'm doing it right. My goal is to have Darian out for alpha testing by Monday.

"The righteous need not cower before the drumbeat of human progress. Though the song of yesterday fades into the challenge of tomorrow, God still watches and judges us. Evil lurks in the datalinks as it lurked in the streets of yesterday, but it was never the streets that were evil." - Sister Miriam Godwinson, Sid Meier's Alpha Centauri