Topic Info Scripts - Non-Unique Names!

Post » Mon Jun 18, 2012 12:32 pm

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 1Scriptname TIF__0200C74B Extends TopicInfo Hidden;BEGIN FRAGMENT Fragment_0Function Fragment_0(ObjectReference akSpeakerRef)Actor akSpeaker = akSpeakerRef as Actor;BEGIN CODENewStartQuest.ArmyMenuChoice = 1;END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentARTLALStartQuest Property NewStartQuest Auto

So as I'm building the dialogue menu for my alt-start mod (since using messagebox menus is utterly broken) and I've come to the point where I need to start inserting my fragment scripts. The above is one. It has a pretty big problem. The name it got "TIF__0200C74B" has nothing to uniquely identify what mod it goes to. This seems to me like it's going to run into a huge number of collisions with other scripts somewhere down the line from other mods when the files containing the source and/or compiled code get overwritten by each other and things start happening that nobody can diagnose.

There's no way to prevent someone from coming along with a different mod that also happens to have TIF__0200C74B as a filename. At the very least, it should be inserting the owning quest's name into the fragment file's name the same way quest stage fragments do. Not only because it'll prevent naming collisions, but because it'll make it easier to find in the folder by sight.

Note that this also doesn't need someone else's mod to come along and overwrite. You could end up colliding with yourself in your own development.
User avatar
Stace
 
Posts: 3455
Joined: Sun Jun 18, 2006 2:52 pm

Post » Mon Jun 18, 2012 11:35 am

In your Papyrus preferences, you should be able to set a prefix for your scripts, so the game will put that at the beginning of all of them. That could be used to avoid collisions.
User avatar
Motionsharp
 
Posts: 3437
Joined: Sun Aug 06, 2006 1:33 am

Post » Mon Jun 18, 2012 8:16 am

Oh, excellent. That's very good to know. Thanks for that. It will at least keep scripts I make from eating scripts other people make, but setting that won't prevent you from clashing with yourself at some point.
User avatar
michael danso
 
Posts: 3492
Joined: Wed Jun 13, 2007 9:21 am

Post » Mon Jun 18, 2012 8:27 am

The "Advanced" tab near the fragment script in the Quest Stages tab of the Quest window has a "Rename Script" button.
Is this what you mean?
User avatar
Carlos Rojas
 
Posts: 3391
Joined: Thu Aug 16, 2007 11:19 am

Post » Mon Jun 18, 2012 11:59 am

No, he's talking about the prefix option in File->Preferences->Scripts
User avatar
remi lasisi
 
Posts: 3307
Joined: Sun Jul 02, 2006 2:26 pm

Post » Mon Jun 18, 2012 5:49 am

No, he's talking about the prefix option in File->Preferences->Scripts

The "Advanced" tab near the fragment script in the Quest Stages tab of the Quest window has a "Rename Script" button.
Is this what you mean?
^ That's another solution as well.
User avatar
Rachael Williams
 
Posts: 3373
Joined: Tue Aug 01, 2006 6:43 pm

Post » Mon Jun 18, 2012 6:51 am

No, that solution won't work for topic info fragments. Those filenames are chosen by the system.
User avatar
Oscar Vazquez
 
Posts: 3418
Joined: Sun Sep 30, 2007 12:08 pm

Post » Mon Jun 18, 2012 5:32 am

No, that solution won't work for topic info fragments. Those filenames are chosen by the system.

As far as I am aware, it stores ALL fragments relevant to that particular form/quest into that one file. Could be remembering this wrong... but I was pretty sure thats how it worked as I had to sift through dozens of unnamed functions (Names like "Function Fragment_139") in that one file.
User avatar
Tina Tupou
 
Posts: 3487
Joined: Fri Mar 09, 2007 4:37 pm

Post » Mon Jun 18, 2012 4:28 am

Aah, no, it looks like quest stages fragments are stored in a "quest script", like QF_something, while dialogue is in a file that looks like "TIF_something".

HOWEVER, topic info fragments also have an "Advanced" tab and a "Rename Script" button.
User avatar
Austin Suggs
 
Posts: 3358
Joined: Sun Oct 07, 2007 5:35 pm

Post » Mon Jun 18, 2012 12:43 pm

HOWEVER, topic info fragments also have an "Advanced" tab and a "Rename Script" button.
Which, in my experience, didn't work. Unless you consider mods with scripts that don't fire to be working :P
User avatar
Phillip Hamilton
 
Posts: 3457
Joined: Wed Oct 10, 2007 3:07 pm


Return to V - Skyrim