Forums
Games
Cyberpunk 2077 Thronebreaker: The Witcher Tales GWENT®: The Witcher Card Game The Witcher 3: Wild Hunt The Witcher 2: Assassins of Kings The Witcher The Witcher Adventure Game
Jobs Store Support Log in Register
Forums - CD PROJEKT RED
Menu
Forums - CD PROJEKT RED
  • Hot Topics
  • NEWS
  • GENERAL
    THE WITCHER ADVENTURE GAME
  • STORY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 THE WITCHER TALES
  • GAMEPLAY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 MODS (THE WITCHER) MODS (THE WITCHER 2) MODS (THE WITCHER 3)
  • TECHNICAL
    THE WITCHER THE WITCHER 2 (PC) THE WITCHER 2 (XBOX) THE WITCHER 3 (PC) THE WITCHER 3 (PLAYSTATION) THE WITCHER 3 (XBOX) THE WITCHER 3 (SWITCH)
  • COMMUNITY
    FAN ART (THE WITCHER UNIVERSE) FAN ART (CYBERPUNK UNIVERSE) OTHER GAMES
  • RED Tracker
    The Witcher Series Cyberpunk GWENT
THE WITCHER
THE WITCHER 2
THE WITCHER 3
MODS (THE WITCHER)
MODS (THE WITCHER 2)
MODS (THE WITCHER 3)
Menu

Register

Complete D'Jinni NWNScript function reference...

+
U

username_2075278

Senior user
#1
Oct 5, 2008
Complete D'Jinni NWNScript function reference...

I was trying to find out how to display an image on the screen, to make a simple version of the sex cutscene, so I needed to find out what functions the NWN Script compiler understands. So I was digging through my Witcher installation trying to find the NSS compiler and library files, when I found something even more useful - the file which provides the context sensitive help text for the NSS editor. It's called nss.api and you will find it somewhere like
Code:
C:\Program Files\The Witcher\System\Scintilla\nss.api
I've written a very rough rough parser which parses this file into Wiki markup and added the results to the D'Jinni wiki, here.Some words of caution:
  • I (obviously) haven't tested all these functions - there are 872 of them
  • I haven't even tried to translate those functions documented in Polish (a substantial minority)
  • This data is almost certainly copyright BioWare and CD Project Red (although in my defence the file doesn't acually say so), so I may get asked to take the page down..
  • The formatting isn't perfect (it was a very rough parser)
As well as function definitions the file also contains a large number of constant definitions many of which are equally helpful. If people pester me I'll wikify these as well.If someone wants to break my one humungous page into individual pages of each function, that would be useful (but of course a lot of work). The functions could then be categorised by area, which would be useful.I hope this is useful to everyone...And the punchline? As far as I can see there is no function to display a TGA (or any other) image to the screen, so my work was in vain.
 
P

paulv

Senior user
#2
Oct 5, 2008
Simon? Would you like our mostly-interpreted of the nwscriptdefn file? Which lists tons of scripts and how to use them made for The Witcher?
 
G

Gamewidow

Forum veteran
#3
Oct 5, 2008
even if Simon doesn't, i do :)
 
A

ailinon

Senior user
#4
Oct 6, 2008
Simon, I think I have just the thing for you.How to make an illustration cutscene1. Prepare an image as a nice high-resolution picture (2048x2048 is nice, 1024x1024 would be slightly stretched on 1280x# displays); the image should be in the top 2048x1152 area).2. Save the image as fb_blablabla.dds (whatever, as long as it's exactly 12 characters until the dot, this is important)3. Copy fb1_01_01_01.mdb to fb_blablabla.mdb and hex-edit it to replace all "fb1_01_01_01" with your "fb_blablabla" (the name has exactly 12 chars, that's why it was important).This gives you a model of a flat "billboard" image with your illustration on it. Now, what to do with it:1. Create a cutscene and place the billboard in it somehow (replace an existing object, or hide this object underground...)2. Place a camera looking at it and do whatever you want. Zoom in, zoom out, pan around it...3. Oops, your illustration is likely to be too dark! Let's pump up the ambient, and kill the color glow while we're at it. Add this line when your illustration appears, in a "LUA Line" track: console "mainscene.ambient 1 1 1"; g_CameraGob:StopFullScreenEffect("ColorGlow")And, when you're done, at the end of the cutscene, put console "mainscene.ambient 0 0 0"; g_CameraGob:StartFullScreenEffect("ColorGlow") to bring things back to normal.(if anyone wonders, it can all be found out by analyzing one of the fb* cutscenes.)That should do it.-- Sinus
 
U

username_2075278

Senior user
#5
Oct 6, 2008
PaulV said:
Simon? Would you like our mostly-interpreted of the nwscriptdefn file? Which lists tons of scripts and how to use them made for The Witcher?
Click to expand...
Pleasepleasepleaseplease PRETTY Please!
 
U

username_2075278

Senior user
#6
Oct 6, 2008
Ailinon said:
Simon, I think I have just the thing for you.
How to make an illustration cutscene1. Prepare an image as a nice high-resolution picture (2048x2048 is nice, 1024x1024 would be slightly stretched on 1280x# displays); the image should be in the top 2048x1152 area).2. Save the image as fb_blablabla.dds (whatever, as long as it's exactly 12 characters until the dot, this is important)3. Copy fb1_01_01_01.mdb to fb_blablabla.mdb and hex-edit it to replace all "fb1_01_01_01" with your "fb_blablabla" (the name has exactly 12 chars, that's why it was important).This gives you a model of a flat "billboard" image with your illustration on it. Now, what to do with it:1. Create a cutscene and place the billboard in it somehow (replace an existing object, or hide this object underground...)2. Place a camera looking at it and do whatever you want. Zoom in, zoom out, pan around it...3. Oops, your illustration is likely to be too dark! Let's pump up the ambient, and kill the color glow while we're at it. Add this line when your illustration appears, in a "LUA Line" track: console "mainscene.ambient 1 1 1"; g_CameraGob:StopFullScreenEffect("ColorGlow")And, when you're done, at the end of the cutscene, put console "mainscene.ambient 0 0 0"; g_CameraGob:StartFullScreenEffect("ColorGlow") to bring things back to normal.(if anyone wonders, it can all be found out by analyzing one of the fb* cutscenes.)That should do it.-- Sinus
Click to expand...
That does indeed look like exactly what I want! Thank you very much.
 
A

ailinon

Senior user
#7
Oct 6, 2008
Pipe up if you get it to work properly. You know, places to go, orens to earn... ;P
 
U

username_17

Forum veteran
#8
Oct 6, 2008
PaulV said:
Simon? Would you like our mostly-interpreted of the nwscriptdefn file? Which lists tons of scripts and how to use them made for The Witcher?
Click to expand...
I could use this too, please... :)@Simon: Thanks, Simon, this is really useful... ;)
 
U

username_2075278

Senior user
#9
Oct 6, 2008
Ailinon said:
Simon, I think I have just the thing for you.
How to make an illustration cutscene1. Prepare an image as a nice high-resolution picture (2048x2048 is nice, 1024x1024 would be slightly stretched on 1280x# displays); the image should be in the top 2048x1152 area).2. Save the image as fb_blablabla.dds (whatever, as long as it's exactly 12 characters until the dot, this is important)3. Copy fb1_01_01_01.mdb to fb_blablabla.mdb and hex-edit it to replace all "fb1_01_01_01" with your "fb_blablabla" (the name has exactly 12 chars, that's why it was important).This gives you a model of a flat "billboard" image with your illustration on it. Now, what to do with it:1. Create a cutscene and place the billboard in it somehow (replace an existing object, or hide this object underground...)2. Place a camera looking at it and do whatever you want. Zoom in, zoom out, pan around it...3. Oops, your illustration is likely to be too dark! Let's pump up the ambient, and kill the color glow while we're at it. Add this line when your illustration appears, in a "LUA Line" track: console "mainscene.ambient 1 1 1"; g_CameraGob:StopFullScreenEffect("ColorGlow")And, when you're done, at the end of the cutscene, put console "mainscene.ambient 0 0 0"; g_CameraGob:StartFullScreenEffect("ColorGlow") to bring things back to normal.(if anyone wonders, it can all be found out by analyzing one of the fb* cutscenes.)That should do it.-- Sinus
Click to expand...
I've done all that. I now have a huge, black square that slides into place at the right moment...But it's completely black.Does this mean my DDS is not in the right place (it does show up under 'DirectDraw surface textures) or is there something else which could be wrong?
 
M

Michael_DarkAngel

Senior user
#10
Oct 6, 2008
A simple question, but sometimes its the simple things that get overlooked.Is your DDS height and width sizes a factor of 2? For example 1024x1024, 512x512, 512x256. Height and width do not have to be equal, but they do need to be a factor of 2.
 
G

Gamewidow

Forum veteran
#11
Oct 6, 2008
it is definitely 2048 x 2048 .. so i think we are OK there
 
A

ailinon

Senior user
#12
Oct 7, 2008
Is the DDS's name correctly referenced by the MDB? Has the engine been reloaded (sometimes it's needed)? Is the black square lit by any lights (pump ambient up)?-- Sinus
 
J

jbaudrand

Senior user
#13
Oct 8, 2008
:-[ can we have the script's list too?
 
Share:
Facebook Twitter Reddit Pinterest Tumblr WhatsApp Email Link
  • English
    English Polski (Polish) Deutsch (German) Русский (Russian) Français (French) Português brasileiro (Brazilian Portuguese) Italiano (Italian) 日本語 (Japanese) Español (Spanish)

STAY CONNECTED

Facebook Twitter YouTube
CDProjekt RED Mature 17+
  • Contact administration
  • User agreement
  • Privacy policy
  • Cookie policy
  • Press Center
© 2018 CD PROJEKT S.A. ALL RIGHTS RESERVED

The Witcher® is a trademark of CD PROJEKT S. A. The Witcher game © CD PROJEKT S. A. All rights reserved. The Witcher game is based on the prose of Andrzej Sapkowski. All other copyrights and trademarks are the property of their respective owners.

Forum software by XenForo® © 2010-2020 XenForo Ltd.