Include scripts are great and super include is a lifesaver, but which include script is the function you want in? Well, if you have power-bar, you can search the descriptive text for the function and power bar will narrow the field considerably. I have found this to be a very helpful timesaver.
How I determine what include script a function is in.
Débuté par
M. Rieder
, avril 25 2012 09:33
#1
Posté 25 avril 2012 - 09:33
#2
Posté 25 avril 2012 - 10:20
ouch
After you learn more about those includes and gain experience, you will avoid that the stock vanilla includes as much as possible. A good tool to use is doxygen, which can create call graphs, links for functions reference, how things are included. If you were to look at it visually, of how many files end up being include every time you include one, well it makes the head hurt.
I generally excerpt what i need from whereever it is, make a single larger include just for what i am working on, strip out any gunk which does not fit, revise anything which is obviously awful, rename functions in case i do need to increase what's included, see if it's missing anything, if so find those functions in the include spiderweb and put them right where i need. More work, but it also means i have control of everything and don't introduce weird issues that can take weeks to track down, and I also understand ALL of my code I am using.
And from what i've seen of the other old timers, I am not alone in prefering to do things this way. The term garbage in, garbage out is very applicable.
After you learn more about those includes and gain experience, you will avoid that the stock vanilla includes as much as possible. A good tool to use is doxygen, which can create call graphs, links for functions reference, how things are included. If you were to look at it visually, of how many files end up being include every time you include one, well it makes the head hurt.
I generally excerpt what i need from whereever it is, make a single larger include just for what i am working on, strip out any gunk which does not fit, revise anything which is obviously awful, rename functions in case i do need to increase what's included, see if it's missing anything, if so find those functions in the include spiderweb and put them right where i need. More work, but it also means i have control of everything and don't introduce weird issues that can take weeks to track down, and I also understand ALL of my code I am using.
And from what i've seen of the other old timers, I am not alone in prefering to do things this way. The term garbage in, garbage out is very applicable.
#3
Posté 26 avril 2012 - 07:32
NWN Lexicon 1.69?
#4
Posté 07 mai 2012 - 07:04
According to the description of Super Include, "When you find a function that sounds interesting, right click it and select “Go to definition”. This will take you to the actual library that defines the function." Is that what you mean?
#5
Posté 07 mai 2012 - 08:26
Tchos wrote...
According to the description of Super Include, "When you find a function that sounds interesting, right click it and select “Go to definition”. This will take you to the actual library that defines the function." Is that what you mean?
I never knew that existed. Thanks, I'll try that.
#6
Posté 07 mai 2012 - 09:10
M. Rieder wrote...
Tchos wrote...
According to the description of Super Include, "When you find a function that sounds interesting, right click it and select “Go to definition”. This will take you to the actual library that defines the function." Is that what you mean?
I never knew that existed. Thanks, I'll try that.
This only works for the ones that show up in BLACK (via Super Include)
#7
Posté 07 mai 2012 - 09:42
They show up in black whenever you have a script open that has an included function, which is the time you want to check which library it's from. It's not specific to Super Include.
#8
Posté 08 mai 2012 - 07:36
The only time a scripter wouldnt know which library a function was in would be when they were using a file with some 40-odd includes eg Super Include
I was going to specify but the logic as I understood it was clear
I was going to specify but the logic as I understood it was clear
#9
Posté 08 mai 2012 - 06:39
If you need more than that plugin provides, take a look at doxygen, it creates a searchable documentation of all the scripts. It also does graphs showing how complex the includes are, and showing ALL the includes a particular super include is referencing, including anything those includes are including. The stock code is very prone to what is described as super includes.
You can create a chm file, or set it up on a webserver, or just use it as a locally opened file in you web browser. It works with standard nwscript files since they work just like C code. This is all searchable, and it's a lot easier to read than the raw code comments.
( i have a post somewhere which has links to my doxygen commented nwscript.nss file, which should be helpful as well )
You can create a chm file, or set it up on a webserver, or just use it as a locally opened file in you web browser. It works with standard nwscript files since they work just like C code. This is all searchable, and it's a lot easier to read than the raw code comments.
( i have a post somewhere which has links to my doxygen commented nwscript.nss file, which should be helpful as well )
#10
Posté 09 mai 2012 - 03:22
ok that does it ... installing
ahhh, that felt good --
o_O
i need to tweak some options
ahhh, that felt good --
o_O
i need to tweak some options
#11
Posté 09 mai 2012 - 05:20
Bah! - who needs plugins? I prefer the old-fashioned approach, whereby I journey through the dark labyrinths of code, interpreting arcane comments and following the clues, until I eventually find the +5 function treasure at the end. Or I get killed by a beholder.





Retour en haut






