nillerusr / source-engine

Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
Other
1.36k stars 221 forks source link

Add Lua, vscript (squirrel) or C# scripting to use in the game development #243

Open LegendaryGuard opened 1 year ago

LegendaryGuard commented 1 year ago

Although it seems ambitious at first, it's a big suggestion, it could take effort to implement something like that.

What that improvement would do is make it easier for modders and game devs to make Source Engine games/mods using those programming languages.

Looks like the engine has Lua implemented, isn't it? Not sure if it's enabled, I saw something related in the source code: utils/dmxedit/luamain.cpp I wonder how to use and do some test.

There's a dev guide about engaging Lua: https://developer.valvesoftware.com/wiki/Embedding_Lua_in_the_Source_Engine

Moreover, some reference and history about Lua, in Quake 3, it had some type of development like this to apply: https://www.quake3world.com/forum/viewtopic.php?f=16&t=43869


On the other hand, I thought about implementing C# scripting, that's something like Godot and Unity do.

Just wondering if it's worth.

steadyfield commented 1 year ago

I think it may be a better choice to port mapbase to the engine. The mapbase mod supports vscript (squirrel). And also adds a lot of entities. I can make scripts (cfg or vscript squirrel) to spawn these entities in any map. Someone has tried to port mapbase to the nillerusr's engine (https://github.com/nillerusr/source-engine/pull/171) but it is suspended due to personal issues. It would be great if someone else can port mapbase to the nillerusr's open source engine. Also, there is already open source mod that attempt to add lua to the gameplay. You can check out the hl2sb mod ported to nillerusr's engine from the valve's steam version engine, by ItzVladik: https://github.com/ItzVladik/source-engine However, the mod has a lot of bugs to be fixed. At least for the windows version, the lua SWEPS doesn't seem to work correctly. The author himself may have little time in improving the mod. For the Steam version, it seems that the mapbase mod is also more complete than hl2sb mod. The entropy zero mod is also based on the code of mapbase mod.

LegendaryGuard commented 1 year ago

I think it may be a better choice to port mapbase to the engine. The mapbase mod supports vscript (squirrel). And also adds a lot of entities. I can make scripts (cfg or vscript squirrel) to spawn these entities in any map. Someone has tried to port mapbase to the nillerusr's engine (#171) but it is suspended due to personal issues. It would be great if someone else can port mapbase to the nillerusr's open source engine. Also, there is already open source mod that attempt to add lua to the gameplay. You can check out the hl2sb mod ported to nillerusr's engine from the valve's steam version engine, by ItzVladik: https://github.com/ItzVladik/source-engine However, the mod has a lot of bugs to be fixed. At least for the windows version, the lua SWEPS doesn't seem to work correctly. The author himself may have little time in improving the mod. For the Steam version, it seems that the mapbase mod is also more complete than hl2sb mod. The entropy zero mod is also based on the code of mapbase mod.

That's nice. I guess it would be useful to create custom mutators, custom weapons and gamemodes like Prop Hunt, right?

ItzVladik commented 1 year ago

We should get together and do Half-Life 2: Sandbox, because pretty soon, I'm going into the army and no one will do it instead of me. With Lua scripting, we can make Prop Hunt and other cool gamemodes and not only that. Also, I can give Half-Life 2: Sandbox developer discord tag. (Ye, he contacted with me)

LegendaryGuard commented 1 year ago

We should get together and do Half-Life 2: Sandbox, because pretty soon, I'm going into the army and no one will do it instead of me. With Lua scripting, we can make Prop Hunt and other cool gamemodes and not only that. Also, I can give Half-Life 2: Sandbox developer discord tag. (Ye, he contacted with me)

Yikes! That doesn't look good. So, who will take care of the stuff? I hope you've someone/some people involved in the project.