Aller au contenu

Photo

Cutscene bars are missing


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

#1
MayCaesar

MayCaesar
  • Members
  • 159 messages

Sorry for creating a thread for such a basic problem, but after googling and tinkering with the toolset for over a dozen hours I've run out of ideas.

 

I am learning the toolset and currently trying to make a NWN2-style cutscene. I use a usual SpeakTrigger trigger to launch the conversation when the PC enters a certain area, and in the trigger's "Variables" property I specify "CutsceneBars = 1", plus in the conversation's options I specify "Neverwinter Nights 1-style Dialogue" as False.

 

Here is the problem. The cutscene (conversation) launches as expected, however it looks like this (red circled are the conversation lines):

 

fnH5dhO.jpg

 

As you can see, the cutscene bars are missing, making the text nearly unreadable. Interestingly, the cutscene bars are working in a tutorial module I downloaded, where the same way of conversation set up is used. I've been comparing the tutorial module and mine for eternity, and I just don't see any difference in how we do it - however in the tutorial module cutscene bars are working, while in mine they aren't.

 

What could be causing this behavior? I don't want to upload my module since it is 20MB, but maybe someone has encountered something similar? 



#2
rjshae

rjshae
  • Members
  • 4 485 messages

That should work. The cutscene bars is being set in the DoSpeakTrigger routine in ginc_trigger. You could temporarily override that script and have it report on the bDisableCutsceneBars setting.



#3
MayCaesar

MayCaesar
  • Members
  • 159 messages

I figured it out! Turns out, in the trigger "Variables" property, the Variable Type for CutsceneBars was set to be Floating Point for some reason, while it should have been Integer. I am not sure why the editor initially set it to be Floating Point, but, once I changed it into Integer, cutscene bars appeared in the conversation. Apparently 1 as Floating Point is not automatically converted into 1 as Integer.

 

Thanks for the support! ;)


  • rjshae aime ceci

#4
kamal_

kamal_
  • Members
  • 5 240 messages

fnH5dhO.jpg

 

It's a ufo! They've invaded Faerun!

 

/not saying aliens programmed nwn2, but aliens programmed nwn2.

 

// I've watched too many ufo/ghost videos on youtube where they have to circle things in red to point them out.



#5
kevL

kevL
  • Members
  • 4 056 messages

hopefully we don't have to rely on this guy <_<  when the invasion comes



#6
MayCaesar

MayCaesar
  • Members
  • 159 messages

But it has already come!

 



#7
MayCaesar

MayCaesar
  • Members
  • 159 messages

Since I've already created this thread and I don't want to spam the forums with countless threads on minor problems, I might as well post it here.

 

I am learning scripting, and I have some problems compiling most basic scripts. Very often a script will compile normally, but when I try to insert it as an action into conversation, it would render unhandled exception. After advanced script compiler installation, unhandled exception no longer occurs, and instead the toolset will say the following:

 

The script failed to compile. Do you want to remove all parameters?

 

For example, this is a simple teleporting script I am trying to implement, and this error occurs.

void main (object oSubject, object oWaypoint)
{
   location lWaypointLocation = GetLocation(oWaypoint);
   AssignCommand(oSubject, ActionJumpToLocation(lWaypointLocation));
} 

How can the script compile successfully and then recompile with error, every time? Is there something about the way scripting is implemented in the toolset I am not aware of?



#8
4760

4760
  • Members
  • 1 204 messages
It's been a while since I opened the toolset, but I think the conversations parameters are limited to strings and numbers (integers and floating point values).
That means oSubject and oWaypoint should be defined with a GetObjectByTag statement, and their tags (sSubject and sWaypoint for example) be passed to main ():

void main (string sSubject, string sWaypoint)
{
object oSubject = GetObjectByTag(sSubject);

etc...


If oSubject is the main PC, give sSubject the value "$PC".

#9
MayCaesar

MayCaesar
  • Members
  • 159 messages

Thank you, that must have been it. I changed object parameters into strings and there is no error anymore when I add this script to a conversation. However, it doesn't seem to be doing anything. Again, same happened to a few other scripts I've tried. I have the impression that I am systematically doing something wrong. Unfortunately, no errors show up anywhere, so I cannot know at which point exactly the script is failing (and adding lines to generate some debugging output didn't render any problems). Here is the script I am trying to run currently:

void main (string sSubject, string sWaypoint)
{
   object oSubject = GetObjectByTag(sSubject);
   object oWaypoint = GetObjectByTag(sWaypoint);
   location lWaypointLocation = GetLocation(oWaypoint);
   AssignCommand(oSubject, ActionJumpToLocation(lWaypointLocation));
} 

In the conversation, I use it with parameters sSubject="$PC" and sWaypoint="wp_putPC_GuardConversation" (tag of the waypoint). I've read somewhere that, in case of a waypoint, one needs to remove "wp_" part in case of waypoints, so I tried removing it, but still nothing is happening.

 

Is there any way to get a proper debugging information out of this script? Guides do not seem to talk much about debugging, unfortunately.



#10
Tchos

Tchos
  • Members
  • 5 042 messages

$PC doesn't work with GetObjectByTag.  It works with GetTarget.  You use it because the PC never has a tag.  You need to include the library that defines GetTarget.  Check almost any ga_ script (most of them make use of GetTarget) to see which library it is.

 

But there should already be a ga_ script that's set up to do this for you, so you shouldn't need to write a new one.



#11
MayCaesar

MayCaesar
  • Members
  • 159 messages

Thank you, this worked! 

 

I found a huge compilation of global functions here ftp://neverwintervault.org/rolovault/projects/nwn2/nwn2scripts/90/NWN2_Stock_Scripts_VOL_I.pdf. I didn't think so many useful functions existed already. I think you just saved me a few weeks of frustration trying to invent a wheel. ;) There indeed was a function doing exactly the same as what I tried to implement.



#12
Tchos

Tchos
  • Members
  • 5 042 messages

Yes, the global functions are mainly very good and useful.  (Or maybe I'm just deceiving myself into believing so, since they remind me of the good old days when I was first learning this toolset a couple of years ago).



#13
MayCaesar

MayCaesar
  • Members
  • 159 messages

I found that a lot of them have extra functionality that might not be needed in most cases, so their efficiency can definitely be improved - but they also save a lot of time which people would otherwise have to spend coding basic functions.

 

---

 

I have an interesting question regarding NWN2-style conversations I haven't found an answer to. Playing through Tales from the Lake of Sorrows module, I found that non-voiced lines going after each other are very inconvenient. They are shown a certain time before disappearing, but, since you never know this time, you cannot confidently skip them once you're done reading since you can accidentally skip the next line if you click right after it appears, and sitting there waiting for the line to change in silence isn't fun either.

 

I would like to make it so the lines are shown indefinitely, or for a very long time, before disappearing, so the player would just click after he's read the line. So far the only solution I came up with was importing a long (32 minutes long) empty *.wav file emulating voice acting, so the lines are shown for 32 minutes before disappearing. It works, but it is far from elegant solution. Is there a better way to go about it?