Raised This Month: $ Target: $400
 0% 

L4D2 (Stripper) - Is it possible to add new vscript events?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kanashimi
Junior Member
Join Date: Jan 2023
Old 05-16-2023 , 12:24   L4D2 (Stripper) - Is it possible to add new vscript events?
Reply With Quote #1

Hello,

This is probably going to be my first time actually figuring out how to use Stripper. I wanna add new .nut event scripts in certain areas of the game. I'm trying to make more quiet moments and trigger areas to prevent Tanks/Witches

Example: After leaving saferoom in c2m5_concert > Fire script to silence the director (ProhibitBosses = true, SpecialRespawnInterval = 999999, CommonLimit = 0)
Kanashimi is offline
3ipKa
Member
Join Date: Jul 2013
Location: Western Siberia
Old 05-18-2023 , 14:32   Re: L4D2 (Stripper) - Is it possible to add new vscript events?
Reply With Quote #2

Hi. If you are going to do it with Stripper:
-you can dump all entities list with stripper_dump command (addons\stripper\dumps\map_name.cfg for example c2m5_concert.0000.cfg)
-and find there BeginScript, what entities send commands to director
-as we can see through all list, there are no scripts director executes, so let's make own
-create c2m5_concert.cfg in addons\stripper\maps\
put there lines:

Code:
modify:
{
	match:
	{	
		;let's take logic_auto, as we need entity to send command, maybe director can do it for itself, IDK
		"hammerid" "2404832"
	}
		;insert new line for execution by director
	insert:
	{
		"OnMapSpawn" "director,BeginScript,your_nut_file.nut,0,-1"
	}
}
-create your_nut_file.nut in left4dead2\scripts\vscripts\
-put there:
Code:
Msg("Quieting director\n");

DirectorOptions <-
{
	ProhibitBosses = true
	SpecialRespawnInterval = 999999
	CommonLimit = 0
}
The same trick you can do with other maps. Somewhere you can edit existing lines and scripts of events or triggers. To create your own trigger, I think, you should to know origins and bounds, to spawn it properly. My example for c1m1_highway:
Code:
modify:
{
	match:
	{	
		;trigger id
		"hammerid" "999996"
	}
	delete:
	{
		;in my case trigger send command to director to execute the script, I just replaced it
		"OnTrigger" "director,BeginScript,C2_highway_ambush,1,-1"
	}
	insert:
	{
		"OnTrigger" "director,BeginScript,C2_highway_ambush_edit,1,-1"
	}
}
C2_highway_ambush_edit:
Code:
Msg("Initiating Ambush_edited\n");

DirectorOptions <-
{
	// This turns off tanks and witches.
	ProhibitBosses = false
	DisallowThreatType = ZOMBIE_TANK
}
Default .nut files you can find, for example, here https://github.com/Stabbath/L4D2-Dec...led%20VScripts

Last edited by 3ipKa; 05-18-2023 at 14:37.
3ipKa is offline
Kanashimi
Junior Member
Join Date: Jan 2023
Old 05-18-2023 , 18:36   Re: L4D2 (Stripper) - Is it possible to add new vscript events?
Reply With Quote #3

Quote:
Originally Posted by 3ipKa View Post
Hi. If you are going to do it with Stripper:
-you can dump all entities list with stripper_dump command (addons\stripper\dumps\map_name.cfg for example c2m5_concert.0000.cfg)
-and find there BeginScript, what entities send commands to director
-as we can see through all list, there are no scripts director executes, so let's make own
-create c2m5_concert.cfg in addons\stripper\maps\
put there lines:

Code:
modify:
{
	match:
	{	
		;let's take logic_auto, as we need entity to send command, maybe director can do it for itself, IDK
		"hammerid" "2404832"
	}
		;insert new line for execution by director
	insert:
	{
		"OnMapSpawn" "director,BeginScript,your_nut_file.nut,0,-1"
	}
}
-create your_nut_file.nut in left4dead2\scripts\vscripts\
-put there:
Code:
Msg("Quieting director\n");

DirectorOptions <-
{
	ProhibitBosses = true
	SpecialRespawnInterval = 999999
	CommonLimit = 0
}
The same trick you can do with other maps. Somewhere you can edit existing lines and scripts of events or triggers. To create your own trigger, I think, you should to know origins and bounds, to spawn it properly. My example for c1m1_highway:
Code:
modify:
{
	match:
	{	
		;trigger id
		"hammerid" "999996"
	}
	delete:
	{
		;in my case trigger send command to director to execute the script, I just replaced it
		"OnTrigger" "director,BeginScript,C2_highway_ambush,1,-1"
	}
	insert:
	{
		"OnTrigger" "director,BeginScript,C2_highway_ambush_edit,1,-1"
	}
}
C2_highway_ambush_edit:
Code:
Msg("Initiating Ambush_edited\n");

DirectorOptions <-
{
	// This turns off tanks and witches.
	ProhibitBosses = false
	DisallowThreatType = ZOMBIE_TANK
}
Default .nut files you can find, for example, here https://github.com/Stabbath/L4D2-Dec...led%20VScripts
That's amazing that the Dark Carnival script worked. You mention we can replace editing scripts, I used vscripts_dump by Silvers to dump all vscripts in the game to modify what's there. However, I wanna add new event triggers during campaign.

For example: In No Mercy Chapter 3 The Sewers (c8m3_sewers), Immediately after Survivors leave the Safe Room
Code:
Msg("Prevent Bosses\n")

DirectorOptions <-
{
	ProhibitBosses = true
}
(It's to prevent the Tank spawning in the linear corridor right after spawn, and I want to plan this also for Dead Air at c11m2_offices.)

Once the Survivors leave the fast food restaurant door, I wanna fire another .nut script to re-enable.
Code:
Msg("Enable Bosses\n")

DirectorOptions <-
{
	ProhibitBosses = false
}
Something like that essentially. I've seen someone use Stripper to have Death Toll Sewer be from a button to start a crescendo to a scavenger event so hopefully it's possible to make new .nut event triggers in campaigns.
Kanashimi is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode