Aller au contenu

Photo

Opening multiple scripts


  • Veuillez vous connecter pour répondre
41 réponses à ce sujet

#1
sapientCrow

sapientCrow
  • Members
  • 64 messages
Is there a method I can save a batch of scripts that I can open later?
I want to find a method that does not involve opening that little bloody window and scrolling through all the scripts in the toolset.
Any ideas or solutions?

#2
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
You have the script pane on the left, that just has your custom scripts for that particular module. With a good naming scheme, it's not that hard to scroll through. For creature event scripts, you can import/export script sets from the properties tab. It's also pretty easy just to start typing in the search box to narrow down the list- again, a good naming scheme makes things easier. If there's a batch of scripts you need to constantly open, just give them a prefix that sticks them at the top of the list. If you just need to look at them, not edit them, you can just open them up with notepad.

#3
kevL

kevL
  • Members
  • 4 052 messages
this doesn't directly solve, but you could set up an editor that invokes Skywing's Advanced Script Compiler (stand-alone app)

#4
Morbane

Morbane
  • Members
  • 1 883 messages

kevL wrote...

this doesn't directly solve, but you could set up an editor that invokes Skywing's Advanced Script Compiler (stand-alone app)


kevL
would Skywings ASC work the same way as nssclc in PNP2?

#5
kevL

kevL
  • Members
  • 4 052 messages
nssclc is a huge cludge compared to ASC. (at least as i remember it)

compare the hoops ya gotta run through to install it, against Sky's 400kb self-contained standalone app.

Your editor's command call would have to be different; here's what i use:

-aglo -i . -v1.69 %f


( don't know what PNP2 is..)

Modifié par kevL, 19 novembre 2013 - 08:29 .


#6
Morbane

Morbane
  • Members
  • 1 883 messages
programmer's notepad 2

it can be used as an external compiler with nssclc

i was wondering if the ASC could be implemented in the same way - i dont really want to do command line -

if you are familiar at least basically how nssclc was installed - with dlls from nwn2 etc

then i imagine ASC may be able to be used with PNP2 as a gui -

i was hoping kevL you would have some insight on how to do the same thing with the ASC

from what i think i understand the ASC does not require those dlls -

nssclc wasnt intended to improve on the toolset compiler - in fact it was exactly the same thing but able to run externally in various editors - it saves heaps of time by not needing to have the toolset running and the game loads faster for testing.

i know ASC can do things like bulk compiles - but all i really need and would hope to use is the external capability and perhaps improved compiles with something like the command call you suggested for a standardised everyday usage.

if all i need to do is point PN2 to the ASC exe and punch in the command calls - i could do that easily -

but if there is more to it than that - could you enlighten me please?

i would experiment but if i mess it up - - - i prefer to have a clear direction

tbh my scripts arent exactly huge or ground breaking - so would i really benefit from the ASC that much?

thanks :)

#7
Morbane

Morbane
  • Members
  • 1 883 messages
oh ya, i have the toolset dll of the ASC - it is a huge improvement - with better error reporting etc

so to have that externally without needing to relearn command line usage - ya - would b cool

#8
kevL

kevL
  • Members
  • 4 052 messages
well i haven't used PnP2 so can't say for sure,

by 'command line' I mean the ASC *can be* executed from a dos-like command window; but when invoking it from an editor it's just an app that sits on your hardrive somewhere and in the editor you'd fill out things like:

path to executable
dir to start in
parameters to pass to executable
save file before executing the ASC
capture console output (success/error messages appear in an editor window)
scroll to last line (of console window)
then each editor has its own set of parameters that can be used in addition to the parameters of the ASC

(%f in my example above represents the file I want to compile) So i have

Execute
F:\\asc.exe
Start in
%p (dir of .nss)
Parameters
-aglo -i . -v1.69 %f
Hint (that appears in the editor's menu)
Advanced Script Compiler or ASC


Note that the ASC i'm referring to here is *not* the .Dll that goes in the toolset heirarchy. It needs no .dll's, .tlk's (for error messages, it has its own as you've seen in the toolset). The standalone ASC can bulk compile or single comple. It's much simpler to rig than nssclc and there's no going back...

Morbane wrote...

if all i need to do is point PN2 to the ASC exe and punch in the command calls - i could do that easily -



#9
kevL

kevL
  • Members
  • 4 052 messages
oh, the one thing you'll want to do at the command line is simply run the asc executable so you can see the help, that Sky has generously laid out for us

that's where you'll find my switches and gain insight



[edit] if i do a batch i use a batchfile that looks like this:

for /r "C:\\Documents and Settings\\<user>\\My Documents\\Neverwinter Nights 2\\override" %%1 in (.) do asc.exe -aglo -i . -v1.69 -y "%%1\\*.nss"

pause

not ideal because my #includes are rather spread out in different dir's, but it chugs through

[edit2] err, that's for my entire override, this is for less than that (a directory + subdirs):


for /r . %%1 in (.) do f:\\asc -aglo -i . -v1.69 -y "%%1\\*.nss"

pause


good luck, friend

Modifié par kevL, 19 novembre 2013 - 01:48 .


#10
ColorsFade

ColorsFade
  • Members
  • 1 267 messages
Good naming conventions save searching. I never have to scroll through my scripts thanks to naming conventions and useful prefixes.

#11
sapientCrow

sapientCrow
  • Members
  • 64 messages
Thanks for the information.
What I am trying to do is create a method in which I can have a module or some other method open the scripts I most commonly open to edit.
I have not worked with actually crafting a module yet because all I am doing is dealing with scripts right now and so the method I have been using is open conversation/script which can not be scaled when open and shows everything

#12
ColorsFade

ColorsFade
  • Members
  • 1 267 messages
I don't know what the toolset is like for you, but if I get too many things open it likes to crash on me.

I don't think I ever have more than 8 files open at one time. And I'm going to open an area, I try and really limit other things I have open.

Seems like if I keep the number of tabs down in the 4-to-6 range, my toolkit never crashes.

#13
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
Just start a new module, you can always export the scripts later to your actual work.

Once you've edited and saved a script, the saved script will show up in a pane on the left, the scripts tab. Only the scripts you've edited for that particular module show up there, so it's real easy just to double-click and open the one you want.

#14
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Lugaid of the Red Stripes wrote...

Just start a new module, you can always export the scripts later to your actual work.

Once you've edited and saved a script, the saved script will show up in a pane on the left, the scripts tab. Only the scripts you've edited for that particular module show up there, so it's real easy just to double-click and open the one you want.


This is a reallly good point. 

When I started writing the custom Ai for my campaign I started with a separate module, since it was all just script work. I had one test area to try things out. When I got it working, I'd just copy the scripts over to my campaign folder and start using them. 

#15
andysks

andysks
  • Members
  • 1 645 messages
I got a test module, where all haks, erfs, new scripts etc are first tested, before I put them in the real work. It only has 1 exterior area, just grass. After something is tested, gets deleted.
For naming conversions, I also found a system of my own.
For example
Door tags start with dr
Creature tags with c_
etc.
After that, comes a prefic of the module
dr_el_*
And then the rest.

When I first started, I thought "Nah, how many scripts I will need anyway". Wrong :D. I realized after the first module that it is a lot and one needs good naming.

#16
Morbane

Morbane
  • Members
  • 1 883 messages
oh ya!

got it working in programmers notepad 2

and just for kicks i now have external compiling with both ASC and nssclc with PN2

thanks for your help kevL :happy:


edit: unfortunately ASC.exe does not have active auto complete and parameter hints when used this way - 

- so in essence "fancy colors" adds that capability - just for information's sake  :D

Modifié par Morbane, 20 novembre 2013 - 02:18 .


#17
Morbane

Morbane
  • Members
  • 1 883 messages
sorry for hijacking your thread sapientCrow ;)

#18
sapientCrow

sapientCrow
  • Members
  • 64 messages
cool cool...
So with the notepad are you able to simply open the script and then use a gui command while it is open for it to compile the script?
I would definitely much rather have that as a solution than opening the toolset every time I want to edit something and compile it.
Do you still have to run the compile from the dos line when using pnp2?

#19
kevL

kevL
  • Members
  • 4 052 messages

sapientCrow wrote...

cool cool...
So with the notepad are you able to simply open the script and then use a gui command while it is open for it to compile the script?

yeh that's the idea

I would definitely much rather have that as a solution than opening the toolset every time I want to edit something and compile it.
Do you still have to run the compile from the dos line when using pnp2?

will let Morbane tell us about it. ..I may be getting YATE (yet another text editor) <- :blink:

Modifié par kevL, 20 novembre 2013 - 06:42 .


#20
Morbane

Morbane
  • Members
  • 1 883 messages
programmers notepad 2 is free and it loads fast

for a simple yet effective directions - get nssclc from the vault

but instead of installing nssclc - install Advanced Script Compiler.exe - from the vault

you can have both by the way - just assign a different "F" key for each one

then get fancy colors from the vault and install it

viola! external compiling!


if you want to keep it simple - in the nssclc directions there is a part that requires you to copy several dlls etc from the NWN2 install directory - skip that part and go down to the part where it specifies the install notes for PN2 - follow those and just use the ASC.exe instaed of the nssclc.exe - that simple...

:innocent:

no - its not dos - it is in a GUI environment - basically - fancy colors provides parameter hints and autocomplete for functions - like the ASC dll that works in the toolset as an override to the stock compiler.

Modifié par Morbane, 20 novembre 2013 - 08:41 .


#21
Morbane

Morbane
  • Members
  • 1 883 messages
ive heard of YATE - is it like the linux vi?

ok i took a peek - not sure i would like that one - still looking though...

Modifié par Morbane, 20 novembre 2013 - 08:46 .


#22
Morbane

Morbane
  • Members
  • 1 883 messages
this is my main monitor with PN2 open and ready for nss files:
Posted Image
B)

Modifié par Morbane, 20 novembre 2013 - 09:19 .


#23
kevL

kevL
  • Members
  • 4 052 messages
^ hey that looks good.


YATE (yet another text editor) == PnP2



- notepad
- notepad++
- tednpad
- crimson editor
- context
- editpad
- notetab

( not all currently installed ) take a pick

#24
kevL

kevL
  • Members
  • 4 052 messages
Can you collapse the output window by pressing Esc ?

#25
Morbane

Morbane
  • Members
  • 1 883 messages
ine looked at

notepad++
crimson editor

im of the mind that programmers notepad 2 is better by far when considering once installed with ASC or the like - further customisation is just easier and looks better when running