Aller au contenu

Photo

How I determine what include script a function is in.


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

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
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.

#2
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
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.

#3
Morbane

Morbane
  • Members
  • 1 883 messages
NWN Lexicon 1.69?

#4
Tchos

Tchos
  • Members
  • 5 080 messages
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
M. Rieder

M. Rieder
  • Members
  • 2 530 messages

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
Morbane

Morbane
  • Members
  • 1 883 messages

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
Tchos

Tchos
  • Members
  • 5 080 messages
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
Morbane

Morbane
  • Members
  • 1 883 messages
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 :)

#9
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
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 )

#10
kevL

kevL
  • Members
  • 4 075 messages
ok that does it ... installing


ahhh, that felt good --


o_O
i need to tweak some options

#11
Dann-J

Dann-J
  • Members
  • 3 161 messages
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.