Author Topic: Script-friendly default taunts  (Read 2869 times)

0 Members and 1 Guest are viewing this topic.

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: Script-friendly default taunts
« Reply #20 on: March 25, 2016, 12:37:55 pm »
I don't think the server should deal with specific keys. It shouldn't have to care at all about the specific device used on the client (keyboard, mouse.. whatever). It's more sane to go with generic commands like suggested on the first post (/action1, /action2, etc). It's also less things to worry about on the scripting engine *and* on each individual script. Tracking binding configs for each player on the script side sounds like it would be annoying (for both, whoever makes the script and the player - now you have to configure bindings on each server).

These actions commands don't need to be actual commands. It could be implemented as some kind of generic input system. I picture it as some kind of bitfield sent along with normal player input data (assuming there is some network packet for that). This way there would be no flooding problem.

With the new key bindings system helloer mentioned the client could have a few actions bound by default (let's say up to /action4), but should be able to bind an arbitrary amount. For the case where the client doesn't have the required action bindings it could go with the auto-bind solution, with some pattern maybe (like, use whatever is empty near WASD first). Auto-bind should be a temporary thing, nothing that gets stored on the client side. The server should be able to somehow request these bindings from each player so it can show proper command help (like "/mine (ctrl+m)").

Offline L[0ne]R

  • Soldat Beta Team
  • Rainbow Warrior
  • ******
  • Posts: 2078
  • need a life. looking for donors.
Re: Script-friendly default taunts
« Reply #21 on: March 25, 2016, 03:49:03 pm »
What if you have something more complicated though, like a weapon shop ala Counter-Strike? It would be confusing if weapons are bound to something other than number keys - for example instead of using 1234567890 keys they would be auto-assigned to 3456789QTY. IMO scripts should still have the ability to bind to specific keys.

How about this hybrid idea?:

1. When player joins a server - the only input a server can read are regular /commands like we have now (either typed manually, or by using /action# taunts). Any custom server bindings will be disabled.
--- This is useful for a basic set of essential actions that player has full control over. He can set them up however he wants while preventing conflicts.
--- 10 keys can be dedicated for /action taunts, which should be enough for all essential actions in most scripts, even complicated ones.

2. Server should be given the ability to trigger "menu state" for the player. When "menu state" is ON - all player input would be disabled (including movement and shooting), and server can provide its own input instead.
--- This is useful for anything that doesn't need to be used mid-combat. It gives server owners freedom to bind anything to anything without conflicts, as long as "menu state" is ON.

IMO this solution is a step forward since it gives both the player and server their own "territory" in which they are in control.
One problem remains is that on non-scripted servers those /action taunts are wasted. But perhaps it's a non-issue considering how many keys are still available.
« Last Edit: March 25, 2016, 03:53:32 pm by L[0ne]R »

L[one]R, INF veteran
maps - remakes: inf_Warehouse ; inf_Fortress ; inf_(Sun)Rise ; inf_Outpost ; inf_Abel ; inf_Moonshine