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

TnZ Scripting Tricks FAQ

+
Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
Next
First Prev 4 of 7

Go to page

Next Last
N

nandusso

Senior user
#61
Aug 30, 2008
Surely there's a more professional way... but you could use a GlobalFlag as a global variable. When the script runs checks also the flag value, then sets it to 1 when creates the wall , and to 0 when the wall is destroyed.bye..ops! while I was writing AILINON has put the "professional way". :)
 
N

nayava

Senior user
#62
Aug 30, 2008
Great I will try it when I finally found this invisible blocking placeable game widow wrote about.
 
A

ailinon

Senior user
#63
Aug 30, 2008
Automated NPC-to-NPC dialogues have a common problem: they run too fast, as the game doesn't compute each line's timing properly. If the lines had their voice files attached, they'd follow that - but we modders usually have no voice actors available.Here's a workaround: attach fake voice files, containing several seconds of plain silence, to time the dialogues properly.Attached: pieces of silence, from 1 second to 10 seconds.
 
N

nayava

Senior user
#64
Aug 30, 2008
So you were able to create an working NPC-to-NPC dialogue? Could you please describe how exact did you do that?
gamewidow said:
I'm fairly sure there are invisible obstacles in the Price of Neutrality (check the perimeter of the valley) ...so you could use those, then destroy them after the fight as Ailinon suggested
Click to expand...
I can not remember or find any invisible obstacle in m1. Where did you "see" them?
 
A

ailinon

Senior user
#65
Aug 30, 2008
There are two scenarios: random dialogues, when npc_john meets npc_kate, or location-based dialogues, when npc_john and npc_kate execute their w_h_chat or w_h_tablechat actions facing each other.First of all, edit dlgcategories.2da and add a line to it, containing:Label = john-and-kateOwnerTag = npc_johnInterlocutorTag = npc_kateDialogMask = dlg_john_kate (or "dlg_john_kate01:5" for a random range from dlg_john_kate01 to dlg_john_kate05)Now, create the dialog file - the black lines will be spoken by the OwnerTag NPC, the blue lines (normally spoken by the player) - by the InterlocutorTag NPC.Now whenever an NPC with tag "npc_john" meets an NPC with tag "npc_kate", this dialogue is supposed to be executed. This is the "random meeting" scenario. However, I couldn't make it work - perhaps there's something damn obvious I missed.I got the location-based chat working. For this, you have to create two action points, facing each other, with the w_h_chat or w_h_tablechat action, and with "Dialog Category" containing the john-and-kate entry. Now whenever there are two NPCs at those locations (one will wait for the other to arrive), they will execute the dialogue.Here are the required elements again:- NPCs "npc_john" and "npc_kate" with w_h_chat action- two actionpoints with dialog category "john-and-kate"- a dlgcategories.2da entry: john-and-kate npc_john npc_kate dlg_john_kate- a dialogue file, dlg_john_kate.Done.Thanks go to TnZ who described this on the Polish forum.
 
N

nayava

Senior user
#66
Aug 30, 2008
Thanks. I worked a week on this without success. I tried every imaginable way, but never thought on the w_h_chat action.
 
U

username_17

Forum veteran
#67
Aug 31, 2008
Wow, thanks Ailinon, if I ever can get this to work, too.. my two women will no longer stand there looking at each other without saying a word. ;DEhem, and here is another stupid question: My first script is running when entering the module (it's in the module properties), and that script is running again every time when I load an old savegame. What line has to stand on end of the script to avoid it's running again while loading? Uhm, please don't laugh :wall:
 
A

ailinon

Senior user
#68
Aug 31, 2008
I'd just base it on a variable, set in the player's object:
Code:
object oPC = GetFirstPC();if (!GetLocalInt(oPC,"SCRIPT_ALREADY_RAN")) { // run script... SetLocalInt(oPC,"SCRIPT_ALREADY_RAN",1);}
Or, if that fails (if the player character doesn't exist at that point... could be) you might try setting the variable in the module object itself (instead of GetFirstPC() use GetModule()).Standard warnings: dry code, guesswork. :)-- Sinus
 
N

nayava

Senior user
#69
Sep 1, 2008
Someone know how to open the scripts from m0?
 
G

Gamewidow

Forum veteran
#70
Sep 1, 2008
have you tried importing the .mod files (these correspond to the various chapters in the game) in the modules folder ? this is just a guess, but it's worth a look if you have not already tried
 
N

nayava

Senior user
#71
Sep 1, 2008
There are just a few scripts in it. The script I need is not present.
 
A

ailinon

Senior user
#72
Sep 1, 2008
There were no scripts distributed in readable, .nss form in the base game, only the .ncs compiled form. There are some in the Neutrality module, and these cover some of the base functionality as well. So unless I'm badly mistaken, the only scripts you can really read into are scripts\inc\*.nss and the *.nss from Neutrality.-- Sinus
 
N

nayava

Senior user
#73
Sep 4, 2008
Has still nobody an idea how I could create an invisible wall?
 
A

ailinon

Senior user
#74
Sep 4, 2008
Sorry for neglecting you for so long :)Here's a wall for you. 2m long, 1m high, 20cm wide - I hope Geralt doesn't end up trying to climb it :)Instructions: unzip to your Data folder, or import into your module. Create any object and give it the ob_inviswall model - or create a placeable template for easy placement. This is just a "null" model and a wall-shaped collision model for it.Let me know if this works :)-- Sinus
 
N

nayava

Senior user
#75
Sep 4, 2008
Thanks, it works fine. Now I can finally devote myself the finishing of the order's arena for my adventure.
 
A

ailinon

Senior user
#76
Sep 4, 2008
Glad to hear it. I'll copy it over to the Polish forum as well, now that it's been tested. I didn't test it myself, so thanks for being my guinea pig ;)-- Sinus
 
N

nayava

Senior user
#77
Sep 4, 2008
Could you please, if it is possible enhance this with the cube out of white lines that has every placeable and the chance to use this?
 
A

ailinon

Senior user
#78
Sep 5, 2008
I'm not sure how to do that, I'm sorry. But if you just want a way to see the wall in the editor, just select Render -> Geometry -> Show placeable collision geometry (pwk). You'll see the wall as a nice blue collision box.-- Sinus
 
N

nayava

Senior user
#79
Sep 5, 2008
Thanks. That way I can place a usable placeable with a cave entry appearance in front of the invisible wall.
 
A

ailinon

Senior user
#80
Sep 5, 2008
Ah, a clickable geometry, still invisible... I'll see if I can do that.-- Sinus
 
Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
Next
First Prev 4 of 7

Go to page

Next Last
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.