Nexus Modding > Scripting

Campaign Scripting

<< < (4/4)

Mularac:
On a different aspect of campaign scripting, does any of you have any practice and expertise on writing the briefings parts? 'cause I'm a bit at a lost here...
The other I was trying to code a simple briefing for the campaign, featuring a close up on the system, a dialog, then a circle linked to a box with  a ship, a close-up to an other nav-point of the system, an other dialog with an other circle or triangule linked to an other box with an other ship and finall a zoom on the 1° location.
This is what I wrote, however, it doesn't work properly at all, it just ends before the first box with the ship appears.... I've also tried it with different coding, but I always got it wrong at some point... if anyone has any idea what the commands are or some useful advice, I'm all ears, I'm flying blind here...


--- Code: ---Mission 1 1 //4
System "Middle of Nowhere"

////////////////////////////////////////////////////////////////////////////////
// briefing items

HideLoc "fleet_Player"

: midNowhere

CamMove
dur 0
Target "Middle of Nowhere" 10.0  -60.8459 14.7765 35.9832
END

resp
wait 1

BOX
DurText
Pos 50 50
From 50 50
To 350 350
ColorPreset 1
EfxBlinkIn
EfxFadeOut
Title "104_title_1"
Pic "..NPC26still"
Text "104_brief_1"
END

resp
wait 6

BOX
DurText
Pos 100 100
From 120 120
To 390 390
ColorPreset 1
EfxBlinkIn
EfxFadeOut
Title "104_title_2"
Pic "..NPC10still"
Text "104_brief_2"
END

WaitText
wait 1

wait 1

CAMMOVE
Dur 2
Target "nav_Middle of Nowhere" 1.7712  -29.796 50.661 130.5329
END

resp
wait 3

close midNowhere

: firObj

wait 1

GRAPH
Shape 10
Pos 544 373
Size 41
ColorPreset 1
EfxZoomIn
EfxFadeOut
END

BOX
DurText
Pos 50 50
From 50 50
To 350 350
ColorPreset 1
EfxBlinkIn
EfxFadeOut
Title "104_title_1"
Pic "..NPC26still"
Text "104_brief_3"
END

Resp
Wait 1

BOX
dur 5
Pos 647 414
To 921 554
ColorPreset 1
EfxBlinkIn
EfxFadeOut
From 547 374
Title "104_title_4"
ShipClass #Ship_Battlestation
MeshCamDist 2572
END

waittext
wait 5
close firObj

: secObj
resp
wait 2

CAMMOVE
Dur 4
Target "astfld_nav_Middle of Nowhere III" 28.7712  69.796 -65.661 13.5329
END

resp
WaitText
Wait 1

BOX
DurText
Pos 50 50
From 50 50
To 350 350
ColorPreset 1
EfxBlinkIn
EfxFadeOut
Title "104_title_1"
Pic "..NPC26still"
Text "104_brief_4"
END

resp
wait 1

GRAPH
Shape 10
Pos 544 373
Size 41
ColorPreset 1
EfxZoomIn
EfxFadeOut
END

Resp
Wait 1
BOX
Pos 647 414
To 921 554
ColorPreset 1
EfxBlinkIn
EfxFadeOut
From 547 374
Title "104_title_4"
ShipClass #Base_hatak_dock
MeshCamDist 2572
END

wait 10
Close secObj

: getBack
CAMMOVE
Dur 2
Target "nav_Middle of Nowhere" 28.7712  129.796 65.661 13.5329
END

wait 2
close getBack

--- End code ---

for example, to what does the command "resp" refer to? Why does the "target" command needs 4 numerical entries? To what aspect does the "pos", "to", "from" commands of the box make reference to in the screen?

The Old Dragon:
Hi there Mularac,

The only thing I can think of at the moment for why it's crashing is that the game can't find the required class or tex file. Maybe it's something similar to the loadout screen? That always crashed on me untill you discovered that it needed a certain tex file to link to. Other than that, it's the blind leading the blind I'm afraid.

As for your other questions...

Resp:  
Don't really know, but briefings tend to have problems if it's not included..

Four numerical values for 'Target' command:
Three are positional data, while the fourth is the distance from target. Don't know which is which, you'll just have to experiment.

Relevance of the 'Pos', 'From' & 'To':

   Pos = This is the location of the upper left corner of the box. Kind of like a 'locator'.

   From = Looking through a New Conflicts briefing, all the 'From' data is the same as the 'Pos' data. Don't know if this is coincidence or requirement (more experimenting), but this command effectively says "start the box here" .Again, it refers to the upper left corner.
   To = While this one refers to the lower right corner saying "end the box here".

Don't quote me on this as it's quite a bit of supposition and theory... but it sounds good.  :D

Mularac:
Uhm, sorry, I think you misunderstood me, the briefing is not crashing, it's just ending.

The Old Dragon:
Oh, my apologies. In that case I've got absolutely no idea.
Unfortunately, much of the campaign scripting is still a mystery  :(

Mularac:
yeah, the resp thing was the bugger. I just added it in between of every box, graph and pretty much any single action I wrote... it works like a charm now.

Navigation

[0] Message Index

[*] Previous page

Go to full version