tes3cmd or other command line script compiler?

Post » Sun Mar 13, 2016 12:01 am

I'm trying to use tes3cmd (version 0.37v) to automatedly replace text in scripts



tes3cmd modify --type scpt --replace "/old_text/new_text/" plugin.esp

That's working except that the scripts still need to be manually opened, compiled and saved. tes3cmd output reports "SCDT: Bytecode:(compiled script code)" before saving but opening the .esp in the text editor only the uncompiled text is replaced. Is there any known trick to get tes3cmd to compile the modified scripts or any other command line tool that could do the job?

User avatar
Harry Leon
 
Posts: 3381
Joined: Tue Jun 12, 2007 3:53 am

Post » Sun Mar 13, 2016 2:58 am

I know john.moonsugar planned to add script compiling into tes3cmd, but as of the latest version it hasn't been implemented.



Sadly the only programs I know of that are capable of compiling scripts are the TESCS and MWEdit (possibly OpenCS as well - haven't tried it). The good thing is that some of them are open source though, so using their code to make your own compiler should be doable.



There's also some good documentation over http://www.uesp.net/morrow/tech/mw_esm.txt that could help with manually compiling a script. Since tes3cmd can write what ever you want to a script's SCDT subrecord, you could in theory write your own compilation function and call it from the command line with -run. For simple scripts making a compiled version might not even be all that difficult.


An alternative would be to just open up the plugin in MWEdit and do edit->compile active scripts.

User avatar
Dan Scott
 
Posts: 3373
Joined: Sun Nov 11, 2007 3:45 am


Return to III - Morrowind