Raised This Month: $ Target: $400
 0% 

[L4D2] VScript Coop Framework


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
jeremyvillanueva
AlliedModders Donor
Join Date: Jan 2021
Location: dcord:Jeremy333#7632
Old 03-14-2021 , 15:33   [L4D2] VScript Coop Framework
Reply With Quote #1

Hi,

Explanation of how and why I did it and gratitude
Spoiler


I have created a framework that works in coop
which is aimed to be used to find functions and how does it works,
Or maybe using some of the features

https://github.com/jeremyvillanuevar/vscripts_custom


Using this Framework

Installation:
[REQUIRED] Install Silver's Plugin: [L4D2 & CS: GO] VScript File Replacer
First upload the vscripts_override.cfg from github file to left4dead2\addons\sourcemod\data
Copy all files from github to left4dead2\scripts\vscripts\vscripts_custom
Please read VScript Bible below

Explanation of Files:
coop.nut: Enables Scripted Mode: Scope and VScript Hooks and Callbacks
and Create Global Variables (used in all scopes)
debug.nut: Enable debugging as a DEBUG variable
amap.nut: Implement every script called in vscripts_override
working on the Local Scope (logic from JetSetWilly II).
a*.nut: (logic from JetSetWilly II).
modifydirector.nut: Balances the game variables based on players and difficulty
changing the Map Scope.
hooks.nut: Procedures attached (hooked) to Game Events.
showplayers.nut: Hud methods.
announcedirector.nut: Ads support methods.
debug_directoroptions.nut: Displays the DirectorOptions options for all Scopes.
VSLib: Rayman's Library1103


VScript BIBLE
VScripting is handled by scopes.
Scopes for scripting are:
1 DirectorBase (director_base.nut en este framework)
2 Map ([mapname].nut and [mapname_modename].nut)
3 Local / Script of the Moment ([anyscriptname].nut)
4 Mode / Challenge ([modename].nut)

Each scope has its own variables like the director's options
called DirectorOptions.

DirectorOptions is a table and in there
from it the parameters are saved as CommonLimit,
MaxSpecials, some of these are detailed
in the script of this framework: modifydirector.nut

Each parameter of DirectorOptions is executed by descent in VScripts
In this script order
4 Mode
3 Local
2 Map

The director's choices are made in order of the lowest, overwriting the others.
Example: CommonLimit parameter is DirectorScript.DirectorOptions.CommonLimit
In local // DirectorScript.MapScript.LocalScript.Director Options.CommonLimit = 0
In map // DirectorScript.MapScript.DirectorOptions.Comm onLimit = 9999
CommonLimit in-game would be 0 because local is more descending

When a vscript of a scope is executed
and calls making an include to another,
create everything in the same scope.
Example: VScript director_base.nut of scope 1 DirectorBase
includes a: includes tieh.nut, then tieh.nut
is in scope 1 DirectorBase

When generating a Scope 4 VScript, it automatically creates
includes from scripts of advanced programming.
For this, the vscript must be generated
named after the gamemode, such as coop.nut
Thus, the vscript mode "scripted mode" is enabled and you may use
map vscript with it like [mapname_modename], such as c1m1_hotel_coop.nut

Spanish Version on the GitHub


Credits:
Code:
@Tonblader
This guy made a lot of links that gave me cheers for being here.

[L4D2 & CS:GO] VScript File Replacer
Author: Silvers
https://forums.alliedmods.net/showthread.php?t=318024

[L4D2] vscripts2020-07-16
http://www.xygamers.com/forum.php?mo...read&tid=25602
Author: c_d..0g C_D.og

VSLib Library
https://steamcommunity.com/sharedfil.../?id=121070254
Developer Guide - Notifications
https://www.gamemaps.com/guide/24
Author: Rayman1103
https://steamcommunity.com/id/Rayman1103

Logic
Title: The Alternate Difficulties Mod (TADM)
Author Steam Alias: jetSetWilly II
Author URL: https://steamcommunity.com/id/jetsetwillyuncensored/
Version: 2.5
Programming Language: VScript

Rectus' Custom Weapons Example
https://steamcommunity.com/sharedfil.../?id=638790000
Custom Scripted Weapon Guide
https://www.gamemaps.com/guide/178
Author: https://steamcommunity.com/id/rectus

Valve
https://developer.valvesoftware.com/wiki/L4D2_Vscripts
New Documentation:
Left 4 Dead 2 VScript Framework's Processes
Map Scripts Loading
https://docs.google.com/presentation...it?usp=sharing

Last edited by jeremyvillanueva; 04-26-2021 at 14:31.
jeremyvillanueva is offline
 



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 11:23.


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