kolessios / insource-legacy

Modified version of Source Engine "Alien Swarm". Not suitable for production use.
Other
13 stars 5 forks source link

[IDEA] Port "The Director" to Source 2013 #20

Open FriskTheFallenHuman opened 6 years ago

FriskTheFallenHuman commented 6 years ago

just like to the Bots code why not import the director code into Source SDK 2013

kolessios commented 6 years ago

Yeah, it is a good idea, although the Director needs more work, for now its functionality is basic.

FriskTheFallenHuman commented 6 years ago

for Insource you can create a gamemode that the director takes control of a horde system for example a zombie survival that the number of "childs" created increment according two factors:

  1. if in the server there is much players
  2. if a player kill a certain number of zombies
FriskTheFallenHuman commented 6 years ago

just like to Gmod's Zombie survival gamemode

kolessios commented 6 years ago

I try to make the Director as flexible as possible, for now you can configure certain options using commands (the prefix "director_"), however for a more extreme customization, the Director is exposed to VScript, so you can modify or overwrite certain functions using Squirrel.

For example: https://github.com/WootsMX/insource-games/blob/master/apocalypse/scripts/vscripts/director/test_duel.nut (It is one of the tests I did to modify the maximum number of units that the Director can create, it was some time ago so I doubt it will continue to work.)

Source SDK 2013 does not have VScript, so all the functionality will have to be written in C++ or commands.

To find out what functions you can modify/overwrite from the Director in VScript, you can see the source code and find something like this: https://github.com/WootsMX/insource/blob/master/game/server/in/director.cpp#L1273

In this case, the Director is asked to execute the "GetMaxUnits" function of the file /scripts/vscripts/director/mapname.nut, if the function exists and returns a number greater than 0, then that value is used.