I don't particularly care for the CS script editor. It would be great if scripts could be exported so I can edit them in emacs. But I'm not sure what the best way to export them and then import them back in would be.
Anybody done this?
Thanks.
Copy/paste. tongue.gif

Alternatively, you can use an editor like MWEdit instead of the CS for making mods.
QUOTE(Jac @ Aug 29 2008, 01:41 AM) *
Alternatively, you can use an editor like MWEdit instead of the CS for making mods.

I never got MWEdit to work well under wine, the script face was always far to small.
QUOTE(Yacoby @ Aug 29 2008, 03:07 PM) *
I never got MWEdit to work well under wine, the script face was always far to small.


Well, you did better than me, I haven't gotten MWEdit to start up at all under Wine. I'll have to give it another go.

If your problem is with font size, I believe that winecfg should now allow you to increase the Screen Resolution under the Graphics tab. You might give that a try. This generally makes default menus/fonts bigger. A trick for older wines was to edit your system.reg and change the hex value for LogPixels.
QUOTE(john.moonsugar @ Aug 29 2008, 09:19 PM) *
Well, you did better than me, I haven't gotten MWEdit to start up at all under Wine. I'll have to give it another go.

Using a default install of 0.9.59 with some MFC dlls copied from windows (If you start from the terminal, and read the output, it should list the dll(s) you need)

QUOTE
If your problem is with font size, I believe that winecfg should now allow you to increase the Screen Resolution under the Graphics tab. You might give that a try. This generally makes default menus/fonts bigger. A trick for older wines was to edit your system.reg and change the hex value for LogPixels.

I will have a look thanks for the tips smile.gif
QUOTE(Yacoby @ Aug 29 2008, 04:33 PM) *
Using a default install of 0.9.59 with some MFC dlls copied from windows (If you start from the terminal, and read the output, it should list the dll(s) you need)


Yes, I think that's my problem. Looking at the wine error log it mentions a number of dlls that are not found.
But I cannot copy from windows, as I do not own a copy of windows.
I suspect I can install them from various sources, the linux "winetricks" script is often handy for that purpose.
The problem is, I am completely ignorant of what dll names mean in Windows and what packages they come from.
I've found that MWEdit has a problem saving scripts, so I tend to use it only to help with formatting and then copy/paste the scripts anyway. Is there a new version out now? Because my copy is over 6 months old now, and it's even listed in the readme that saving scripts and importing them back into the mod is flaky.
QUOTE
The problem is, I am completely ignorant of what dll names mean in Windows and what packages they come from.

tbh you could just google the dll names and download them. If not, just PM me a list.

QUOTE
I've found that MWEdit has a problem saving scripts

What is the problem? I just hit "compile" and then "save".

QUOTE
Is there a new version out now? Because my copy is over 6 months old now, and it's even listed in the readme that saving scripts and importing them back into the mod is flaky.

I couldn't find that in the readme shrug.gif

The only thing that I don't trust MWEDIT to do is to manipulate dialog, and the only reason that failed is probably because I didn't load Morrowind.esm shrug.gif
According to Mr. Cellophane, MWEdit doesn't handle dialogue very well, but he could have been using an older version. As for the scripts, pressing the complie, then save buttons should compile and save them. cool.gif You'll need to load the master files that have the script functions you want if you want to use them - they don't load automatically like they do in the CS.
QUOTE(Jac @ Aug 30 2008, 03:06 PM) *
You'll need to load the master files that have the script functions you want if you want to use them - they don't load automatically like they do in the CS.


All functions are loaded, they don't rely on master files. However, object refs do, so for example, you can't do player->setHealth 0 without either loading the master files, or even better allowing MWEdit to use the extra script records.
QUOTE(Stuporstar @ Aug 30 2008, 03:12 AM) *
I've found that MWEdit has a problem saving scripts, so I tend to use it only to help with formatting and then copy/paste the scripts anyway. Is there a new version out now? Because my copy is over 6 months old now, and it's even listed in the readme that saving scripts and importing them back into the mod is flaky.
I am using MWEdit 0.6.1; it is still beta (something does not work) and still invaluable (working things are fantastic).
Safest way of use for me so far is:
1. always format/debug in MWEdit until MWEdit compile the script
2. if you have to compile necessary known legal code that MWEdit does not understand (I.E. object.variable references), just comment for a moment to be able to compile the rest; if you have code that can be translated to MWEdit standard (I.E. == instead of =, if conditions alway between brackets), follow MWEdit standard.
3. when the script compile in MWEdit (and thus is 99% syntax error free) remove comment to legal code previously commented if needed, copy/paste the script to TESCS and recompile it in TESCS.

Debugging of entire mods:
- load the .esp AND required masters in MWEdit, as MWEdit does not load master by default.
- set View/Options/Warning level >= Default
- set View/Viewchanged
A. - Edit/Compile active scripts
- right click the compilation errors report, copy, paste into notepad (or another text editor), close compilation errors report
- start debugging scripts you see in notepad error report from bottom, repeating steps 1..3 until you sanitize all scripts in the report
- repeat from step A if needed until all the scripts in your mod are cleaned like an elven ass.

[edit]typos


[edit2] a tip:
if a script does not compile but MWEdit does not report error line, it is often a script length/too many nested ifs problem
For anybody interested in exporting/importing scripts, I think I have found a way to use MWEdit 0.6.1 scripts export/import (at least, it works with my Windows XP home).
1. in MWEdit scripts tab, select all scripts you want to export, right click and Export... to your chosen folder
2. leave MWEdit in the background, load the exported scripts (MWEdit creates one scriptname.txt for each scriptname) in your preferred text editor and do all your search/replace, editing and such
3. when done editing, focus MWEdit again, select File\Import\Script(s)... option.
4. here is the tricky part: the problem with MWEdit Beta scripts importing (or with Windows dialog) seems to be related to the length of the file names buffer: if filenames list is more than about 200 characters long, it seems MWEdit ignores it and does nothing. So we need to break the list in smaller parts.
In the "Select scripts to import" dialog, select all previously exported scripts but DO NOT PRESS OPEN BUTTON; instead, copy/paste the content of the File Name field into a blank text document (which I assume will be in your preferred text editor). Then , break the long, unique file list line in more lines of about 200 characters max.
CODE
example: the file list
"DL_PublicLock30.txt" "LB_TEST.txt" "Lb_SmokeScript.txt" "Lb_SmokeScript3.txt" "Lb_SmokeScript2.txt" "lb_level8.txt" "lb_level7.txt" "lb_level6.txt" "lb_level5.txt" "lb_level4.txt" "lb_level3.txt" "lb_level2.txt" "lb_level1.txt" "LB_Global.txt" "LB_CrimeScript.txt" "LB_CrimeGuardScript.txt" "LB_CrimeCommentScript.txt" "DL_StoreLock60.txt" "DL_StoreLock40.txt" "DL_ResLock60.txt" "DL_ResLock50.txt" "DL_ResLock30.txt" "DL_ResLock20.txt" "DL_PublicLock60.txt" "DL_PublicLock40.txt"
should be divided into 3 lines;
"DL_PublicLock30.txt" "LB_TEST.txt" "Lb_SmokeScript.txt" "Lb_SmokeScript3.txt" "Lb_SmokeScript2.txt" "lb_level8.txt" "lb_level7.txt" "lb_level6.txt" "lb_level5.txt" "lb_level4.txt" "lb_level3.txt"

"lb_level2.txt" "lb_level1.txt" "LB_Global.txt" "LB_CrimeScript.txt" "LB_CrimeGuardScript.txt" "LB_CrimeCommentScript.txt" "DL_StoreLock60.txt" "DL_StoreLock40.txt" "DL_ResLock60.txt"

"DL_ResLock50.txt" "DL_ResLock30.txt" "DL_ResLock20.txt" "DL_PublicLock60.txt" "DL_PublicLock40.txt"
5. for each of the (now short enough) file list line, copy it in the MWEdit "Select scripts to import" dialog File Name field, and click Open button to import each line separately. You should be able to realize if importing is working from a noticeable delay; if there is no delay, probably the list line is not short enough and MWEdit ignored it so you have to shorten the line and retry.
6. Enjoy/edit/compile your batch edited scripts inside MWEdit

There is not a direct way to import back all the scripts in TESCS, but it can be done using Enchanted Editor:
1. save your MWEdit edited mod with a different name (I.E. myModNew.esp)
1.b (safety step) load myModNew.esp in TESCS, save it from TESCS
2. open myMod.esp and myModNew.esp in Enchanted Editor
3. copy and paste the scripts from myModNew.esp to myMod.esp
4. save updated myMod.esp
5. load myMod.esp in TESCS (with Wrye GMST vaccine also loaded to avoid problems if myMod.esp has not Tribunal/Bloodmoon as masters) , Script Edit, Recompile all

[Edit] added safety step 1.b
Submit a Thread