Aller au contenu

Photo

Toolset testing flag?


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

#1
rjshae

rjshae
  • Members
  • 4 509 messages
Is there a flag that only gets set when you are running in the toolset (vs. running it as a game)?

I know you could use a custom test PC and check if that is in use, but I just wondered if there's a variable I could use instead to set up test conditions.

Thanks.

Modifié par rjshae, 15 septembre 2012 - 10:15 .


#2
Morbane

Morbane
  • Members
  • 1 883 messages
no, dont think so.

#3
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
I have a custom on-player-loaded script for my modules, and that's where I put all the testing stuff. Usually just auto-advancing the journal and giving items to the PC, but sometimes setting variables as well.

You could easily just set a module or global variable in that script, and then just comment it out before release.

#4
Morbane

Morbane
  • Members
  • 1 883 messages
You could try to search nwscript.nss for "module" or "toolset" - that is where all of the constants are?

#5
kamal_

kamal_
  • Members
  • 5 260 messages
I just put in a tester's equipment chest, and a tester npc to handle advancing journals, giving xp/gold and the like.

#6
kevL

kevL
  • Members
  • 4 078 messages
+1 LotRS's method, and encase it in

if (TRUE/FALSE)
{
// tester stuff
}


then switch TRUE <--> FALSE with an external script editor ...