Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Savegame and scripts


schatten
 Share

Recommended Posts

Scripts themselves are not saved in the game, but the state of values in the scripts are.

 

If you have a script that is set to 'update', then removing the mod will not stop that script from continuing to run. In my mod, I have an activator the player can pull that will disable all 'onUpdate' scripts that are running, and it also removes unique items to my mod from the players inventory as well as cleaning up a few other things.

 

If the player deletes the scripts from the script folder (not a likely event) then they will error out and also stop running.

 

Other than knowing that, use scripts all you want in your mod. My mods tend to be script heavy (several hundred for my Levelers Tower mod.)

Link to comment
Share on other sites

  • 2 weeks later...

I don't use BSA, and I have also heard they can be troublesome in a BSA. But since I do not use them, I could not confirm it.

 

All my objects are in special folders, so they are not MIXED in with the vanilla game objects.

 

Such as, objects in my Textures folder are in maker and mod named folders:

 

Data\Textures\WillieSea\LevelersTower\

 

I find this the best method for keeping your stuff separate from other mods and vanilla files.

 

 

As for the scripts, they have to go in the scripts folder. Just name then with the prefix of your mod, like for my mod Levelers Tower, I name the scripts:

 

Levelers***.psc

 

Where *** is an identifier for what the script does. Such as "EntranceDoor".

LevelersEntranceDoor.psc

Link to comment
Share on other sites

Another stupid question.

My mod has two masters, Sky and patch. The name of my dialog scripts is blah02formidblah (not on my homepc so can't check it and how the naming convention is. But I am sure that the CK has done the naming and the name of the mod is not in the name of the fragment). If I use your method I would have to redo all the fragments.

When I do another mod or use another mod, in this case, it could be possible that the name of the script fragment may be identical?

Link to comment
Share on other sites

You might find the tutorial on How to Package Your Mod worth a look. I sure wish I had seen this early on, as it would have saved me a ton of grief.

 

I don't think the CK will give the same name to fragments from different mods. If there were problems with name collision, nobody would ever be able to install multiple mods without problems! I'm sure it must be using some algorithm to generate a unique identifier for fragment names.

 

However, if you want your fragment names to have a unique prefix special to you or a particular mod, you can go to File -> Preferences -> Scripts in the CK and set a prefix that it will use when creating new fragment names. You can also go through existing quests and use the Rename Script button on the Advanced tab to rename existing fragments to add a prefix,

 

Most modders learn to keep their meshes and textures separate by using subfolders with names unique to the modder or mod, as Willie mentioned. Unlike Willie, I also have a unique subfolder for my script source. The source needs to be in Data\Scripts\Source when it is compiled, but it can be in a subfolder for distribution, like the subfolders for the DLC script source.

 

This makes it easier for users to find and browse your scripts using an external editor, though they will have to copy them up to the main Source folder if they actually want to compile them. But, how often will they need to do that, given that you will also be distributing the pex files for those scripts? The only reason to provide the source is for those who want to know how you did something, and maybe copy your source into their own scripts. Some modders don't provide their source at all, since it isn't required for their mod to run.

 

The main problem with scripts and BSAs seems to be that the CK archiver is incredibly stupid and does not always pick up all the files that are needed, particularly scripts. I can't even get the CK archiver to run without crashing, and I make my BSA archives manually, which solves the problem.

 

I think there can be other problems when trying to distribute modified Beth scripts in a BSA, where they may not override the vanilla versions in the Skyrim or DLC BSA files. In that case you need to provide the compiled scripts as loose files.

  • Upvote 1
Link to comment
Share on other sites

Thanks, mate. Very helpful. :buddy:

I have changed the setting for future scripts. :)

Sadly, I have like 300 fragments (TIF__Blah) and I am not going to change them manually. :(

 

Here some additional info:

http://webcache.googleusercontent.com/search?q=cache:5Qvb8Y7b_M8J:www.gameskyrim.com/conflicts-papyrus-fragments-maybe-rare-but-inevitable-t257825.html+&cd=3&hl=de&ct=clnk&gl=de&client=firefox-a

Link to comment
Share on other sites

Here is how to fix it:

 

With some help I made a TES5Edit Script:

unit UserScript;

var
  slScripts: TStringList;

function Initialize: integer;
begin
  slScripts := TStringList.Create;
end;

function Process(e: IInterface): integer;
var
  s: string;
  i: integer;
  sl: TStringList;
begin
  if ElementType(e) = etMainRecord then
    if ElementExists(e, 'VMAD') then
      Process(ElementBySignature(e, 'VMAD'))
    else
      Exit;

  // recursively process all child elements
  for i := 0 to ElementCount(e) - 1 do
    Process(ElementByIndex(e, i));
  if Name(e) = 'scriptName' then begin
    if SameText(Copy(GetEditValue(e), 1, 5), 'TIF__') then
      SetEditValue(e, '[4 letter or number prefix]_' + GetEditValue(e));
  end;
  if Name(e) = 'fileName' then begin
    if SameText(Copy(GetEditValue(e), 1, 5), 'TIF__') then
      SetEditValue(e, '[4 letter or number prefix]_' + GetEditValue(e));
  end;
end;

end.


Then rename your files with this batch script

 

forfiles /M TIF__[whatever your mod index is]*.pex /C "cmd /c ren @file [4 letter or number prefix]_@file"

 

This stuff should work but I haven't tested it yet, fully.

Edited by schatten
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...