Aller au contenu

Photo

How do you compile utility_h.nss ?


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

#1
JackFuzz

JackFuzz
  • Members
  • 408 messages
Anytime I try to compile utility_h.ss it says I need a main or startingconditional.

So then I added a void main and it compiled just fine.

But in game when cutscenes load the PrintToLog never writes to the log file.  I 'm wondering if my utility_h is not working and the game is using the original.

void CS_LoadCutsceneWithReplacements(resource rCutscene,
                                     string [] arActors,
                                     object [] arReplacements,
                                     string strPlot = "",
                                     int nPlotFlag = -1,
                                     string sTalkSpeaker = "")
{
    object oModule = GetModule();
                 
    SetLocalString(oModule, CUTSCENE_SET_PLOT, strPlot);
    SetLocalInt(oModule, CUTSCENE_SET_PLOT_FLAG, nPlotFlag);
    SetLocalString(oModule, CUTSCENE_TALK_SPEAKER, sTalkSpeaker);

        [b]PrintToLog("CUTSCENE FIRE:" + ResourceToString(rCutscene));[/b]
    
    LoadCutscene(rCutscene, OBJECT_INVALID, TRUE, arActors, arReplacements, TRUE);
}


#2
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
You don't compile headers, but compile the non-header scripts that include them. Just think of them as files that ultimately get cut-and-pasted into scripts that *do* have a main or StartingConditional function, only it happens when compiling the script.

Modifié par FollowTheGourd, 24 janvier 2010 - 05:18 .


#3
JackFuzz

JackFuzz
  • Members
  • 408 messages

FollowTheGourd wrote...

You don't compile headers, but compile the non-header scripts that include them. Just think of them as files that ultimately get cut-and-pasted into scripts that *do* have a main or StartingConditional function, only it happens when compiling the script.


None of the code I added to utility_h.nss is working though even when I compile the script that includes it.

Not even the simple code of writing to the log file which I always do and works 99% of the time.

Wait are you saying ANY script that includes Utility_h.nss will then compile utility_h.nss ?

Or is there a certain script that has to be compiled in order for it to compile utility_h.nss ?

Modifié par JackFuzz, 24 janvier 2010 - 05:31 .


#4
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
Any file in particular that includes it? The "referenced by" resource property in the toolset database shows it's used a lot (no surprises there).

Edit:

JackFuzz wrote...
Wait are you saying ANY script that includes Utility_h.nss will then compile utility_h.nss ?
Or is there a certain script that has to be compiled in order for it to compile utility_h.nss ?


You'd have to recompile any non-header files that depend on the header file (here utility_h) to see the changes, but the toolset ought to handle the dependcies unless something else is up. You won't get an NCS file for headers, but that's expected.

Or whatever, I guess you've hopped to the other thread with the same question now.

Modifié par FollowTheGourd, 24 janvier 2010 - 05:47 .


#5
JackFuzz

JackFuzz
  • Members
  • 408 messages

FollowTheGourd wrote...

Any file in particular that includes it? The "referenced by" resource property in the toolset database shows it's used a lot (no surprises there).

Edit:

JackFuzz wrote...
Wait are you saying ANY script that includes Utility_h.nss will then compile utility_h.nss ?
Or is there a certain script that has to be compiled in order for it to compile utility_h.nss ?


You'd have to recompile any non-header files that depend on the header file (here utility_h) to see the changes, but the toolset ought to handle the dependcies unless something else is up. You won't get an NCS file for headers, but that's expected.


Ok so if I make a change to utility_h.nss I have to compile all scripts that use it? Is there an easy way to do that?

I'd tried doing export with dependant resources and it exported 114 files.  I then started up the game and the printtolog line doesn't fire when a cutscene is triggered.

aaah man i need a break. This toolset is discouraging sometimes but I can't get upset because it's an in house app.

Modifié par JackFuzz, 24 janvier 2010 - 05:58 .


#6
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
I dunno then... but if a full export doesn't do it, I don't know what would. If you right-click on utility_h and select its properties, then there's a "referenced by" tab which should probably let you know what files will be affected by changes to it, and a subset of those files should be recompiled (the ones that aren't themselves headers #including utility_h, or at least just headers somewhere along the line).

Modifié par FollowTheGourd, 24 janvier 2010 - 07:21 .