Difference between revisions of "Fixing the AddTopic Bug"

34 bytes added ,  05:35, 21 December 2009
m
Corrected an incorrect piece of information
imported>Dev akm
(raw paste)
 
imported>XJDHDR
m (Corrected an incorrect piece of information)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=Dealing With the GREETING AddTopic Bug=
by motub
Just to summarize the issue for those just joining our program, the GREETINGS/Add Topics box bug is one that a lot of modders miss when creating their mods, because 1) it's a bug in a perfectly legitimate CS function that one thinks one ought to be able to use; and 2) the bug is only triggered under specific circumstances that many modders and users don't necessarily encounter, because it requires both the affected mod and another mod which changes GREETINGS to be loaded after the affected mod.
Just to summarize the issue for those just joining our program, the GREETINGS/Add Topics box bug is one that a lot of modders miss when creating their mods, because 1) it's a bug in a perfectly legitimate CS function that one thinks one ought to be able to use; and 2) the bug is only triggered under specific circumstances that many modders and users don't necessarily encounter, because it requires both the affected mod and another mod which changes GREETINGS to be loaded after the affected mod.


Line 15: Line 11:
Fortunately, once you identify the mods affected (easy enough, because they're the ones that inexplicably have no new topics for the NPCs), they are quite easy to fix in the CS, by removing the topics from the Add Topics box and adding them instead to the Result Script:
Fortunately, once you identify the mods affected (easy enough, because they're the ones that inexplicably have no new topics for the NPCs), they are quite easy to fix in the CS, by removing the topics from the Add Topics box and adding them instead to the Result Script:


  1. Open the affected mod in the CS.
# Open the affected mod in the CS.
 
# Go to the Characters => Filtered Dialogue menu.
  2. Go to the Characters => Filtered Dialogue menu.
# Select GREETINGS (which will have an * asterisk after it, indicating that it has been changed by the mod).
 
# Scroll down the GREETINGS list and look for the dialogue topics that have a * asterisk before the dialogue in the upper section of the window-- so you'll see a topic name in the first column and "* Whatever the NPC actually says" in the second column, and select the first of these dialogue lines.
  3. Select GREETINGS (which will have an * asterisk after it, indicating that it has been changed by the mod).
# In the rightmost box in the lower half of the window when you have selected an individual topic, you should see one or more topics listed in the box labeled "Add Topics". These are the problem, or rather these are the uses of the bugged function of the engine-- if another mod loads after this one that also changes GREETINGS (whether the second mod itself AddsTopics or not), these topics will not be loaded correctly, resulting in a broken mod. What you need to do is move these topics one box to the left, to the Result Script, so that they will be added, no matter what. It's real easy.
 
# Point your mouse cursor at the first topic in the Add Topics box, so you can see the tooltip that tells you the name of the topic (you can't extend the box or make the columns wider, so this is the only way to see the full name).
  4. Scroll down the GREETINGS list and look for the dialogue topics that have a * asterisk before the dialogue in the upper section of the window-- so you'll see a topic name in the first column and "* Whatever the NPC actually says" in the second column, and select the first of these dialogue lines.
# Then click on the end of the last line in the Result Script box to get a text cursor, and hit Enter to start a new line if necessary, then type: '''AddTopic <name of the topic you just noted>'''  There is no space between "Add" and "Topic" (the command the game recognizes is AddTopic not "Add Topic"), and capititalization of the A in Add and the T in Topic is not required, it is just to make the script look neater.
 
# If this is the only topic added for that particular line of dialogue, then click the "Compile" button next to the Result Script. If multiple topics are added, then add them to the Result Script, one to a line, as before, then click the Compile button. If you get an error saying that the topic is not recognized, you've spelled the topic name wrong; point your mouse cursor at the topic in the Add Topics box again and correct.
  5. In the rightmost box in the lower half of the window when you have selected an individual topic, you should see one or more topics listed in the box labeled "Add Topics". These are the problem, or rather these are the uses of the bugged function of the engine-- if another mod loads after this one that also changes GREETINGS (whether the second mod itself AddsTopics or not), these topics will not be loaded correctly, resulting in a broken mod. What you need to do is move these topics one box to the left, to the Result Script, so that they will be added, no matter what. It's real easy.
# When the Result Script compiles successfully, select each topic in the Add Topics box, right-click and choose "Remove" (or Delete, whatever it says, just "the selection that gets rid of the entry" smile.gif), until the Add Topics box is empty.
 
# Repeat for all GREETINGS dialogs changed by this mod that use the Add Topics box.
  6. Point your mouse cursor at the first topic in the Add Topics box, so you can see the tooltip that tells you the name of the topic (you can't extend the box or make the columns wider, so this is the only way to see the full name).
# SAVE THE EDITED PLUGIN.
 
# That's it; you've fixed the GREETINGS/AddTopics box bug for your copy of that mod, and may now load it anywhere in the load order and it will work fine.  
  7. Then click on the end of the last line in the Result Script box to get a text cursor, and hit Enter to start a new line if necessary, then type:
 
      AddTopic <name of the topic you just noted>
 
      There is no space between "Add" and "Topic" (the command the game recognizes is AddTopic not "Add Topic"), and capititalization of the A in Add and the T in Topic may not be required, but then again it may, so just do it, to be safe.
 
  8. If this is the only topic added for that particular line of dialogue, then click the "Compile" button next to the Result Script. If multiple topics are added, then add them to the Result Script, one to a line, as before, then click the Compile button. If you get an error saying that the topic is not recognized, you've spelled the topic name wrong; point your mouse cursor at the topic in the Add Topics box again and correct.
 
  9. When the Result Script compiles successfully, select each topic in the Add Topics box, right-click and choose "Remove" (or Delete, whatever it says, just "the selection that gets rid of the entry" smile.gif), until the Add Topics box is empty.
 
  10. Repeat for all GREETINGS dialogs changed by this mod that use the Add Topics box.
 
  11. SAVE THE EDITED PLUGIN.


  12. That's it; you've fixed the GREETINGS/AddTopics box bug for your copy of that mod, and may now load it anywhere in the load order and it will work fine. It looks complicated when you read it like this, but trust me, it's really simple when you see it in the CS in front of you.
It looks complicated when you read it like this, but trust me, it's really simple when you see it in the CS in front of you.


== Credits ==
Special thanks to '''motub''' on the Elder Scrolls Forums for writing the original article that this is based on.


[[Category:Troubleshooting]]
[[Category:Troubleshooting]]
[[Category: Dialogue Functions]]
Anonymous user