AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [L4D2] VScript Coop Framework (https://forums.alliedmods.net/showthread.php?t=331310)

jeremyvillanueva 03-14-2021 15:33

[L4D2] VScript Coop Framework
 
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

Dragokas 03-16-2021 12:48

Re: [L4D2] VScript Coop Framework
 
Any example how to use it?
I don't know Spanish.

There are some sm_ commands in github, but I don't see any sp file registering them.

Silvers 03-20-2021 07:35

Re: [L4D2] VScript Coop Framework
 
This is neat and shows good usage of the VScript Replacer plugin! I like how the scripts are pointing to 1 file and then the VScript using switch() depending on the map. Good stuff, thanks for sharing.

jeremyvillanueva 03-22-2021 11:44

Re: [L4D2] VScript Coop Framework
 
Thanks Silver!! That way it's jetSetWilly II method.
I hope that a lot of people may inspect and try to make plugins
vscript based on its own,

Quote:

Originally Posted by Dragokas (Post 2740657)
Any example how to use it?
I don't know Spanish.

There are some sm_ commands in github, but I don't see any sp file registering them.

Hi Dragokas!! Of course I'm writing a guide on the first post thanks!

I have updated the first post

santdrback 07-05-2021 22:13

Re: [L4D2] VScript Coop Framework
 
You can remove the option that players teleport at all times alone with other players is very annoying and when lifting I don't understand how that works, how do I disable it?
sorry for my english , i speak spanish

jeremyvillanueva 07-14-2021 11:23

Re: [L4D2] VScript Coop Framework
 
Hi,
I'm very happy that you are using it!
I just noted that behaviour, and I disabled it,
you can disable this feature in the coop.nut file
like this:
https://www.fase33.com/Sin%20t%C3%ADtulo.png
Please download the last version on the github,
I speak Spanish too :)

santdrback 08-21-2021 15:04

Re: [L4D2] VScript Coop Framework
 
Quote:

Originally Posted by jeremyvillanueva (Post 2752831)
Hi,
I'm very happy that you are using it!
I just noted that behaviour, and I disabled it,
you can disable this feature in the coop.nut file
like this:
https://www.fase33.com/Sin%20t%C3%ADtulo.png
Please download the last version on the github,
I speak Spanish too :)

thank you so much , muchas gracias esto era lo que necesitaba porque mucho se desbalanceaba el juego. lo seguire usando esta muy chevere

jeremyvillanueva 09-29-2021 14:50

Re: [L4D2] VScript Coop Framework
 
wow that's nice, you can find on me on Discord, I have a server running it, it's very nice having people cooperating

Best wishes

santdrback 10-22-2021 18:42

Re: [L4D2] VScript Coop Framework
 
Quote:

Originally Posted by jeremyvillanueva (Post 2752831)
Hi,
I'm very happy that you are using it!
I just noted that behaviour, and I disabled it,
you can disable this feature in the coop.nut file
like this:
https://www.fase33.com/Sin%20t%C3%ADtulo.png
Please download the last version on the github,
I speak Spanish too :)

esto no funciono a todos les pulse "false" y sigue telenstraportando , dont work for me :( i send you PM , just wait for you respond.
esperare tu respuesta que esta muy bueno tu trabajo, lo que la malogra es el telenstraporte q es muy random y en cualkier momento te telenstraporta, y hay un bug cuando un charger te atrapa se vuelve lento pero si el cliente se ba , se queda con el efecto de lento.
im waiting for you , nice work <3

chunklight 03-02-2024 10:49

Re: [L4D2] VScript Coop Framework
 
Can anyone tell me if it is possible to change the flashlight fov with this? I have seen conflicting things.


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

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