Progress and problems: characters and cutscenes

+
Progress and problems: characters and cutscenes

Right! As usual, two steps forward, one step back, two more hoops to jump through.The steps forward are(i) I have a cutscene that works! (fanfare of trumpets)(ii) Hela now appears when you start the module (louder fanfare of trumpets)But before I get too full of myself...(ib) the cutscene only plays in the cutscene editor - it does not play when the module starts (whoopee cushion sound)(iib) Hela's dialogue does not work - and I'm not sure why.(whoopee cushion sound)So, from the top, my bvmainstart script now says this:void main(){ PlayCutscene( "bvintro"); EnableSpawnPhase( "ss_bvhela", TRUE);}I've got this script called from both 'On module started' and 'On client enter'. Furthermore I know it is running, because if it doesn't run Hela doesn't appear.But the cutscene does not play.Meantime, Hela's NPC file for the appropriate phase has 'bvhela_suicide' as the name of its Dialogue file, and, as it's chosen from a list, it can hardly be the wrong name. And, yes, the dialogue file exists and has appropriate content. But when I click on Hela in the game (running inside D'Jinni) I get a message about a bad dialogue file.Damn!
 
I'm sure you have already read this, but on the off chance that you haven't, this may be useful:http://djinni.wikia.com/wiki/Launching_a_cutsceneThat page has a few more bits of code shown as required for the cutscene.
 
STGhost said:
I'm sure you have already read this, but on the off chance that you haven't, this may be useful:http://djinni.wikia.com/wiki/Launching_a_cutsceneThat page has a few more bits of code shown as required for the cutscene.
Yes, I know. And the next thing to try is a trigger. But I don't want a trigger, I want it to launch immediately on module startup...
 
Hmmm in NWN you almost always had to have DelayCommand for things that start OnClientEnter and involve the PC.
 
STGhost said:
Hmmm in NWN you almost always had to have DelayCommand for things that start OnClientEnter and involve the PC.
Ah! Good thought. Will try that!Having tried it void main(){ DelayCommand( 25, ActionDoCommand( PlayCutscene( "bvintro"))); EnableSpawnPhase( "ss_bvhela", TRUE);}still not working. Bother!I'm also getting tired so will probably call it a night.
 
Hmmm wish it worked...Though have you tried using something else than ActionDoCommand for that? I'm thinking that particular code would need an executing object. Been about two years since I last coded for PWs so my memory is a bit hazy on that.
 
STGhost said:
Hmmm wish it worked...Though have you tried using something else than ActionDoCommand for that? I'm thinking that particular code would need an executing object. Been about two years since I last coded for PWs so my memory is a bit hazy on that.
I really wish we had the source for the start-up script of Price of Neutrality. Has anyone found that?
 
Afaik the new module can be opened in the editor so you should be able to see the script? (well at least that was how it worked in NWN)
 
STGhost said:
Afaik the new module can be opened in the editor so you should be able to see the script? (well at least that was how it worked in NWN)
Yes, it can. And all the scripts appear to be there in source form - and I've copied them all over to UNIX so I can grep them. But teh module properties have neither an 'On client enter' not 'On module loaded' nor 'On module started', so it's not at all obvious what script is run on startup.I'll get there.
 
Hmm which scripts are attached to the starting inn and the starting play area?You could also try making it onEnter (for the starting area) instead so the player enters there first and then the cutscene plays.
 
Price of Neutrality has their start script in the Area Properties of Kaer Morhen under "On Enter". It uses a Local Int to tell the game to run initialization the first time the game is played, and then to skip that portion of code every time after.
 
Right - just to say where I'm up to:Cutscenes are mostly fine - indeed, rather magnificent, in fact.There are two ways of defining NPCs, one using Spawnset files and intended for less important characters, the other using Story NPC files and intended for more important characters. Thanks to help from Vaernus I can now cause characters defined using Spawnset files to start, by callingEnableSpawnPhase("yourspawnsetfilenamewithoutfiletype", TRUE);from my startup script. But I can't get characters defined through Story NPC files to start at all.Any help most gratefully received.
 
Did you check if those are valid objects or use a debug to check if you are calling using the right string/object/reference?
 
STGhost said:
Did you check if those are valid objects or use a debug to check if you are calling using the right string/object/reference?
Did I check if what are valid objects? The NPCs are valid objects, but they don't fire up on their own despite having valid spawm points and action points set up for them, and (thus far) I haven't found a way to fire them up from a script.
 
Don't quote me on this, but I believe they are controlled by a "Story Phase" that must be activated prior to the NPCs spawning. There is a script that activates the phase, and any Story NPC on that phase spawns. When the story phase changes, the new NPCs spawn or change actions/locations.We have strictly used Spawnsets for all NPCs in Deception, plot or not, and found it much easier to deal with. You need attention to detail to ensure every quest NPC has a 24-hour schedule, but otherwise it's a simple process of enabling and disabling spawn phases as quests progress (which is actually something that can be set as a quest phase is complete in quest file, don't know if that applies to Story NPCs though).
 
To avoid a doubled thread I place my problem here...My cutscene works fine and is also starting fine, but.... there is a strange graphical problem when playing a test-game (in Djinni and in normal game). And I get an lua error while running the testgame in Djinni:
Lua error: gui.lua:1456: attempt to index global `g_CameraGob' (a nil value)stack traceback: gui.lua:1456: in function `fuHandler' gui.lua:1938: in function (C-side caller: OnGuiEvent)
???If anybody can tell me what this is and how to fix it, that would be great.
 
When exactly does this bug (this is a bug, not your fault, definitely) appear? You said the cutscene works, so... when?The Lua error is also a bug, one internal function gives another function bad parameters. Are you changing some weird camera parameters in the cutscene, or what?In other words - more info please. :)
 
There are two templates and one camera in it and it works fine when I press "stop" and then "play" in the cutscene itself. But when gametesting in Djinni this bug appears. I followed the instructions from the Wiki on making this cutscene, so I don't know what I've could have done wrong. All I changed between was the name of the camera, but before adding it to the cutscene properties, only put dialog and this camera in. Cutscene properties are set most on default except the start entry: False or True isn't relevant, this happens with both entrys.Could it be something in the start script? Because there is no OnEndScript in the cutscene, I leave those in the script empty...?
void main(){ object oPC = GetFirstPC(); // trying to make the cutscenes working //SetCutsceneMode(GetFirstPC(),TRUE); BlackScreen(oPC); DelayCommand(1.0, PlayCutscene("hr_cut_intro01", 1, 1, 1, 0)); //BlackScreen(oPC); SetCutsceneMode(GetFirstPC(),FALSE); DelayCommand(3.0, FadeFromBlack(GetFirstPC()));
EDIT: I just see, that the Lua error appears when I load/open the cutscene in the editor, but is this the thing that makes my screen looking like a washed picture?
 
For PlayCutscene, the second parameter should be a script you want to call after the cutscene ends. In your code, you have a "1" in that parameter which would cause it not to work or crash. If there is no script needed, set second parameter as "" and it should be fine. So it would be:
DelayCommand(1.0, PlayCutscene("hr_cut_intro01", "", 1, 1, 0));
 
Top Bottom