Jump to content


Photo

Please clarify the TP2 file for me


74 replies to this topic

#31 agb1

agb1
  • Modders
  • 403 posts
  • Gender:Male

Posted 21 December 2016 - 04:57 PM

The reason the TP2 is not working as you intended is that the SAY commands are actually patch commands that modify the file currently being copied.  Therefore, you need all of those SAY commands to follow immediately after the CRE file COPY command.

 

I usually indent SAY commands with a tab or a couple of spaces to make it clear that they are attached to the preceding COPY.

 

The COPY of the sounds should come before the other COPY or after all of the SAY commands.

 

As for opcodes, look at some items with attached abilities and effects using Near Infinity.  Each effect is a fixed-size block of data in the resource file (ITM, SPL, etc.).  The opcode is just a number that specifies a type of effect.  It tells the game how to interpret the other parameters.  An ability is something you can click from the toolbar; an ability can have one or more effects (each with an opcode) that specify what the ability will actually do when you click it.  An item can also have direct effects (attached directly to the item, not part of a specific ability on the item).  Direct effects are applied whenever you equip or use the item.


BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#32 agb1

agb1
  • Modders
  • 403 posts
  • Gender:Male

Posted 21 December 2016 - 05:09 PM

Oh, also - the sound files you use in [ ] brackets can't be longer than 8 characters.


BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#33 WarChiefZeke

WarChiefZeke
  • Members
  • 42 posts

Posted 21 December 2016 - 05:37 PM

And it works. You've truly been a great help agb, always a timely response that usually gets right to the heart of the problem. Now to finish adding the rest of the soundset.


Edited by WarChiefZeke, 21 December 2016 - 05:38 PM.


#34 WarChiefZeke

WarChiefZeke
  • Members
  • 42 posts

Posted 25 December 2016 - 03:43 PM

What is the best way to avoid stutter bugs? I am basically finished at this point and am playtesting through. Quests, interjections, journals, cutscenes all good, but chapter related dialogues such as the one after slaying Mulahey cause permanent stuttering afterwords. I have no idea what could be causing this in the code, as it all looks good to me. The sample:

 

IF
InParty(Myself)
See(Player1)
Global("i!chapter3talk","GLOBAL",0)
CombatCounter(0)
Global("Chapter","GLOBAL",3)
Dead("Mulahey")
THEN
RESPONSE #100
SetGlobal("i!chapter3talk","GLOBAL",1)
StartDialogueNoSet(Player1)
END

 

Dialogue is conditioned to run upon the variable being set to 1, and it does.



#35 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 5809 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 25 December 2016 - 05:30 PM

What is the best way to avoid stutter bugs? I am basically finished at this point and am playtesting through. Quests, interjections, journals, cutscenes all good, but chapter related dialogues such as the one after slaying Mulahey cause permanent stuttering afterwords. I have no idea what could be causing this in the code, as it all looks good to me. The sample:

 

IF
InParty(Myself)
See(Player1)
Global("i!chapter3talk","GLOBAL",0)
CombatCounter(0)
Global("Chapter","GLOBAL",3)
Dead("Mulahey")
THEN
RESPONSE #100
SetGlobal("i!chapter3talk","GLOBAL",1)
StartDialogueNoSet(Player1)
END

 

Dialogue is conditioned to run upon the variable being set to 1, and it does.

Well, you can check that it's the case here... by for example installing the LStest mod temporarily. Temporarily as it disables the cutscenes from being ran, but it can be uninstalled easily so it has no permanent bad effects. So play the game until you get the stutter, save, exit, install the mod and see it's cause, and verify it by looking at the scripts with Near Infinity for example, uninstall the LStest mod, fix the cause and proceed.

The mod allows you to detect that the specific script is actually ran and at what stage ... so from that you can then determine of what's the cause of the stutter ...


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.

Here's how to install all the stable mods you ever really could want to Infinity Engine games.


#36 WarChiefZeke

WarChiefZeke
  • Members
  • 42 posts

Posted 25 December 2016 - 06:58 PM

hm, that mod doesn't seem to like many custom scripts in the npc project and wouldn't install. but installed partially as some of the saves- but only some- are shouting the script, and cutscenes still work :undecided:

 

...and now i realize the real problem isn't even the dialogue but in my quest script which starts a timer at the start of chapter 3 which starts the quest at the end.


Edited by WarChiefZeke, 25 December 2016 - 07:06 PM.


#37 Roxanne

Roxanne
  • Modders
  • 893 posts
  • Gender:Not Telling

Posted 26 December 2016 - 01:37 AM

 

What is the best way to avoid stutter bugs? I am basically finished at this point and am playtesting through. Quests, interjections, journals, cutscenes all good, but chapter related dialogues such as the one after slaying Mulahey cause permanent stuttering afterwords. I have no idea what could be causing this in the code, as it all looks good to me. The sample:

 

IF
InParty(Myself)
See(Player1)
Global("i!chapter3talk","GLOBAL",0)
CombatCounter(0)
Global("Chapter","GLOBAL",3)
Dead("Mulahey")
THEN
RESPONSE #100
SetGlobal("i!chapter3talk","GLOBAL",1)
StartDialogueNoSet(Player1)
END

 

Dialogue is conditioned to run upon the variable being set to 1, and it does.

Well, you can check that it's the case here... by for example installing the LStest mod temporarily. Temporarily as it disables the cutscenes from being ran, but it can be uninstalled easily so it has no permanent bad effects. So play the game until you get the stutter, save, exit, install the mod and see it's cause, and verify it by looking at the scripts with Near Infinity for example, uninstall the LStest mod, fix the cause and proceed.

The mod allows you to detect that the specific script is actually ran and at what stage ... so from that you can then determine of what's the cause of the stutter ...

 

The dialogue itself needs to contain DO~SetGlobal("i!chapter3talk","GLOBAL",2)~ at some point, otherwise it will repeat.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#38 WarChiefZeke

WarChiefZeke
  • Members
  • 42 posts

Posted 26 December 2016 - 10:25 AM

Luckily, i've already been doing that for all starting conversation responses, just to be doubly sure convos don't repeat.

 

Anyway, virtually everything seems to work now, the quest script was the last buggy thing, so once I do a full wipe and re-install to get LStest off of my system (long story short, it bugged out and won't uninstall) i'm gonna complete this playthrough and then, I suppose, release the BG portion of this mod somewhere.

 

This never could have been done without your guys help, as I would have ragequit due to these rather simple issues had I been trying to solve them on my own :)

 

Now to actually play SOD and decide if i'm gonna mod for it :D



#39 WarChiefZeke

WarChiefZeke
  • Members
  • 42 posts

Posted 28 December 2016 - 05:20 PM

Does anyone have any suggestions on how I should handle the transition between SOD and BG1? I really have no idea how to go about this.

 

There are basically two ways for this character to show up, importing from a save game or, if they are not with you in the final battle, being added to some fitting area. So in other words it's not much different than the BG2/TOB transition, so at least this is good practice. I'm assuming it will then be necessary to change banter files with the character, and this should be done by the TP2 correct?


Edited by WarChiefZeke, 28 December 2016 - 05:20 PM.


#40 WarChiefZeke

WarChiefZeke
  • Members
  • 42 posts

Posted 28 December 2016 - 09:29 PM

:laugh: :laugh: :laugh: from now on i'm gonna give it as least a couple days of trying it out before i turn to help. i was able to change the dialogue file upon switching over to SOD from ganking Sarevok rather then new gaming it by a simple script command which was tested and worked. Maximum derp.


Edited by WarChiefZeke, 28 December 2016 - 09:29 PM.


#41 agb1

agb1
  • Modders
  • 403 posts
  • Gender:Male

Posted 29 December 2016 - 06:46 AM

You have two options: you can keep the same dialogue files for BG1 and SoD and check the CHAPTER and ENDOFBG1 global variables to control which dialogues get triggered, or you can create new dialogue files just for SoD.

If you create new dialogue files just for SoD, they should be added to BDDialog.2DA and BDBanter.2DA, which are the SoD equivalents of the pdialog.2da and interdia.2da files (https://gibberlings3..._bgee/index.htm).

The game will automatically assign dialogue files to your NPC when it joins/leaves the party and at the BGEE->SoD transition (after Sarevok's defeat) based on the contents of the files above. Specifically, the dialogue files listed with your NPC's scriptname/DV in the respective 2DAs.

Assuming you don't use separate dialogue files, here is an example of a chapter check:

Global("Chapter","Global",7)

This is true only during chapter 7, which is the final BG1 chapter and also the SoD prologue chapter. Chapters 8 - 13 are SoD (13 is also BG2's first chapter for EET games).

You can also use ENDOFBG1 - this global variable will return 1 after the death of Sarevok. It is set to 2 after Siege of Dragonspear -> Shadows of Amn transition. In other words you can use it to filter content designed only for BG:EE part of the story (or only for BG2 if you set the trigger to check if the result equals 2).

In other words, Global("endofbg1","GLOBAL",1) is only true after Sarevok is defeated, so that plus chapter 7 means SoD prologue is in progress.

You can also use GlobalLT and GlobalGT (less than / greater than) to match a range of chapter values.. Or, for example, GlobalLT("endofbg1","GLOBAL",2) is true until the BG2 SoA transition/start in chapter 13, so it covers both BGEE and SoD content. That one is useful for EET compatibility.

BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip


#42 WarChiefZeke

WarChiefZeke
  • Members
  • 42 posts

Posted 29 December 2016 - 08:30 AM

Nice, that helps a lot, thanks. The dialog parts are working fine but i'm assuming the new banter files for SOD are why the banter files are not.

 

Having that one variable that checks for the end of BG1 saves me quite a bit of time coding the reset of all variables upon transfer to SOD.

 

Is there a script command to change your banter file name like there is for your dialogue?



#43 Roxanne

Roxanne
  • Modders
  • 893 posts
  • Gender:Not Telling

Posted 29 December 2016 - 08:52 AM

Nice, that helps a lot, thanks. The dialog parts are working fine but i'm assuming the new banter files for SOD are why the banter files are not.

 

Having that one variable that checks for the end of BG1 saves me quite a bit of time coding the reset of all variables upon transfer to SOD.

 

Is there a script command to change your banter file name like there is for your dialogue?

You may use (in the NPC's override script) something like

StartDialogue("BMySoD",[PC])

Which should make your NPC use the BMySoD banter file for this specific dialogue. Otherwise it would be better to use the assignment in BDBanter.2da like in agb1's excellent turorial.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#44 Roxanne

Roxanne
  • Modders
  • 893 posts
  • Gender:Not Telling

Posted 29 December 2016 - 08:56 AM

You have two options: you can keep the same dialogue files for BG1 and SoD and check the CHAPTER and ENDOFBG1 global variables to control which dialogues get triggered, or you can create new dialogue files just for SoD.

If you create new dialogue files just for SoD, they should be added to BDDialog.2DA and BDBanter.2DA, which are the SoD equivalents of the pdialog.2da and interdia.2da files (https://gibberlings3..._bgee/index.htm).

The game will automatically assign dialogue files to your NPC when it joins/leaves the party and at the BGEE->SoD transition (after Sarevok's defeat) based on the contents of the files above. Specifically, the dialogue files listed with your NPC's scriptname/DV in the respective 2DAs.

Assuming you don't use separate dialogue files, here is an example of a chapter check:

Global("Chapter","Global",7)

This is true only during chapter 7, which is the final BG1 chapter and also the SoD prologue chapter. Chapters 8 - 13 are SoD (13 is also BG2's first chapter for EET games).

You can also use ENDOFBG1 - this global variable will return 1 after the death of Sarevok. It is set to 2 after Siege of Dragonspear -> Shadows of Amn transition. In other words you can use it to filter content designed only for BG:EE part of the story (or only for BG2 if you set the trigger to check if the result equals 2).

In other words, Global("endofbg1","GLOBAL",1) is only true after Sarevok is defeated, so that plus chapter 7 means SoD prologue is in progress.

You can also use GlobalLT and GlobalGT (less than / greater than) to match a range of chapter values.. Or, for example, GlobalLT("endofbg1","GLOBAL",2) is true until the BG2 SoA transition/start in chapter 13, so it covers both BGEE and SoD content. That one is useful for EET compatibility.

An overview of the new chapter sequence for all of EET is here

http://gibberlings3....913#entry242897

 

@agb1

This is an excellent tutorial for all modders interested in SoD/EET modding/addition to their mods-

It should be secured to one of the "how to..." threads for easier reference.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#45 agb1

agb1
  • Modders
  • 403 posts
  • Gender:Male

Posted 29 December 2016 - 08:57 AM

A creature has only one dialogue file assigned to it at any given moment.  When the NPC joins the party, the game sets the NPC's current dialogue file to the "joined" dialogue file (from pdialog.2da - or BDDialog.2da during SoD only).  When the NPC leaves the party (kicked out), the game sets the NPC's current dialogue file to the "post" dialogue file (from same 2da).

 

The banter dialogue file is not stored on the creature itself, but rather is accessed periodically from interdia.2da or bdbanter.2da (during SoD only), specifically whichever row of that 2DA file has the NPC's script name in the first column.

 

The dream/sleep script works similarly (it's specified in pdialog.2da -- or in BDDialog.2da during SoD only).  That isn't a dialogue file itself, note -- it is a BCS file that runs when the player clicks on the party-rest button.  Often it initiates dialogue via StartDialogue or a similar script action.

 

See https://gibberlings3...bgeeactions.htm (search for StartDialogue and StartDialogueNoSet).  The latter initiates dialogue using the NPC's currently assigned dialogue file, and in my view it is good practice to use that unless you explicitly want to change the NPC's currently assigned dialogue file.


BiG World Fixpack (community collection of mod fixes and compatibility patches, with user-friendly cross-platform script)

 

BiG World Setup (tool to automate best-practice installation of Infinity Engine mods on Windows, with conflict analysis)

Latest version:    https://bitbucket.or.../get/master.zip




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users