PlayerOptions.lua

PlayerOptions.lua

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

PlayerOptions.lua

Post by FLOZi »

Not exactly a serious feature request as a 'throw it out there in case anyone else thinks it could be useful'.

Akin to engineoptions.lua (is that even still needed?) and modoptions.lua, but allows you to set keys on a per player basis, might already be possible via e.g. chobby and writing stuff to files with widgets or using lua messages.

Trivial example use case:

Game allows you to choose which nation you play as.

You choose Germans.

Player options allows you to select whether you start with a Tiger tank or a Mortar team.
User avatar
ThinkSome
Posts: 387
Joined: 14 Jun 2015, 13:36

Re: PlayerOptions.lua

Post by ThinkSome »

Wouldn't this be very, very game specific though? And does Nemo's zombies not solve this in one way already (that is probably much more user friendly than writing Lua).
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: PlayerOptions.lua

Post by Google_Frog »

Akin to engineoptions.lua (is that even still needed?) and modoptions.lua, but allows you to set keys on a per player basis, might already be possible via e.g. chobby and writing stuff to files with widgets or using lua messages.
None of this hax is required as what you want is already implemented via entirely sane means. Custom player keys and custom team keys already exist (see Spring.GetPlayerInfo Spring.GetTeamInfo). Custom keys have been used by Springie to set custom commanders for a long time. I've been using them extensively in singleplayer chobby as a reliable way to send data ingame before luarules initializes. However, it is a hard task to implement this generically for everyone on uberserver.

I don't think this is feasible:
Trivial example use case:

Game allows you to choose which nation you play as.

You choose Germans.

Player options allows you to select whether you start with a Tiger tank or a Mortar team.
This simple request has many requirements and depends on many people. You need to:
  • Decide upon a file that games can include to define teamOptions or playerOptions (akin to modOptions). This involves getting the agreement of enough people responsible for the infrastructure below.
  • Implement something that allows lobbies to read this file (I think this is the job of unitsync).
  • Add commands to uberserver for setting/viewing the new options.
  • Have sufficiently many autohosts implement the new option.
  • Have sufficiently many lobbies implement the new option.
  • By the end of this process, after gathering the agreement and work of everyone, you need to somehow end up with a non-static config system. Your example has players choosing options based on their previous option choices. ModOptions has already run the gauntlet and did not make it in with branching choices.
Post Reply

Return to “Feature Requests”