View previous topic :: View next topic |
Author |
Message |
DoomerMrT Dominating!
Joined: 09 Mar 2007 Location: http://destiny-server.ath.cx/forums/
|
Posted: Tue Jun 29, 2010 12:35 pm Post subject: ACS: GiveTeamPoints, TakeTeamPoints |
|
|
There could be something like this to make team games more customizable via ACS. For example Kill the Cyberdemon just ends the map currently when a cyberdemon is killed on either team, and prints a message to the screen. With this ACS command, we could make the team actually score a point when kills the opposite team's cyberdemon. This command could be useful for CTF and TDM games too.
Code: | GiveTeamPoints(str team, int amount, bool announce) |
The "team" should be a string considering the future implementation of the TEAMINFO lump (if that ever becomes more than just a concept). Optionally you can choose if you want the announcer to tell the scoring or not. (0 means false, 1 means true, should be true if value not given)Announcing is only relevant in CTF mode.
Example:
Code: | GiveTeamPoints("Red", 1, 1); | //standard team
Code: | GiveTeamPoints("FancyColorTeam", 1, 0); | //TEAMINFO team
Taking points should work in a similar way:
Code: | TakeTeamPoints(str team, int amount) |
Unless there will be an implementation of losing points for the announcer, the announce part of taking points is pretty needless.
Example:
Code: | TakeTeamPoints("Red", 1); | //standard team
Code: | TakeTeamPoints("FancyColorTeam", 1); | //TEAMINFO team |
|
Back to top |
|
|
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Thu Jul 01, 2010 2:26 am Post subject: |
|
|
Nicely thought out, particularly the point removal side of things which wasn't something I'd ever gone as far as to consider.
This suggestion is something that I have really wanted to see added for a long time. Without it one has to resort to less-than-ideal, hackish methods to allow any sort of scoring of points, and under such circumstances the intermission scoreboard is less than capable of reflecting the true scores. |
|
Back to top |
|
|
BestOfTheWorst Unstoppable!
Joined: 02 Jun 2006
|
Posted: Thu Jul 01, 2010 4:06 pm Post subject: |
|
|
announcing sounds/messages should not be lumped with the score functions!
You've been looking too much at skulltag ACS functions
The announcing stuff should be done with existing ACS functions, ambientsounds and print messages/hudmessages.
Also the functions should not be that limited.. rather have something like this instead:
Code: | SetTeamScore (team, value)
GetTeamScore (team)
|
That's all you need for all possible manipulations of team scores |
|
Back to top |
|
|
EarthQuake Wicked Sick!
Joined: 02 Apr 2004 Location: Athens, Ohio. Dieblieber gonna getcha!
|
Posted: Thu Jul 01, 2010 10:49 pm Post subject: |
|
|
Teams should also be integers and not strings.
We need to agree upon which teams correspond to which values.
For example, ACS 1.49 has the following teams specified in zdefs for Skulltag:
Code: | // Skulltag Teams -----------------------------------------------------------
#define TEAM_BLUE 0
#define TEAM_RED 1
#define NO_TEAM 2 |
ZDoom itself doesn't have anything set for this purpose, and going for Skulltag compatibility is problematic because a value of 2 specifies "no team". ZDaemon will most likely need it's own definition for teams.
I think the most consistent numbering would be red (0), blue (1), green (2), and white (3). This is what values the "team" console variable accepts. It's also what TEAMINFO should use to define new teams.
Also the functions Worst suggested should have the "team" parameter as optional. If unspecified, it should affect the team of the activator. This would make using it in ENTER, RESPAWN, and DEATH scripts more flexible. |
|
Back to top |
|
|
BestOfTheWorst Unstoppable!
Joined: 02 Jun 2006
|
Posted: Fri Jul 02, 2010 4:36 pm Post subject: |
|
|
EarthQuake wrote: | Teams should also be integers and not strings.
| Yes, for the sake of having compability eventually with: GetPlayerInfo(PlayerNumber(), PLAYERINFO_TEAM)
EarthQuake wrote: |
We need to agree upon which teams correspond to which values.
I think the most consistent numbering would be red (0), blue (1), green (2), and white (3). This is what values the "team" console variable accepts. It's also what TEAMINFO should use to define new teams. |
If you think we should have better cross-port compability, then the values should match the ones GetPlayerInfo(PlayerNumber(), PLAYERINFO_TEAM) returns.
then numbers are based on the zdoom TEAMINFO lump
EarthQuake wrote: |
Also the functions Worst suggested should have the "team" parameter as optional. If unspecified, it should affect the team of the activator. This would make using it in ENTER, RESPAWN, and DEATH scripts more flexible. |
You can't have 'optional' parameters in ACS functions. While you can have certain values have special meanings (such as 0 meaning a activator property), it isn't necessary to do so here. rather we could have like Code: | int playerTeam = GetPlayerInfo(PlayerNumber(), PLAYERINFO_TEAM);
int playerScore = GetTeamScore (playerTeam);
SetTeamScore(playerTeam, playerScore + 1); |
this also means staying compatible with GetPlayerInfo..
It sucks though that ZDoom has the red and blue team otherway around than we do.. but then again those are just some numbers for functions.. |
|
Back to top |
|
|
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Fri Jul 02, 2010 5:57 pm Post subject: |
|
|
BestOfTheWorst wrote: | You can't have 'optional' parameters in ACS functions. |
That goes against my experience with it. What about commands like Acs_Execute which can be issued with only 2, or up to 5 paramters? |
|
Back to top |
|
|
BestOfTheWorst Unstoppable!
Joined: 02 Jun 2006
|
Posted: Fri Jul 02, 2010 6:07 pm Post subject: |
|
|
Those are line specials.
EDIT: and when you dont supply those parameters, a value of 0 is assumed..
For the engine these two are exactly the same:
Code: |
Acs_Execute(5);
Acs_Execute(5,0,0,0,0);
|
so 'left out' arguments are actually not left out, but filled with 0. |
|
Back to top |
|
|
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Fri Jul 02, 2010 11:02 pm Post subject: |
|
|
I'm sorry but that wentire post looks like a matter of semantics to me |
|
Back to top |
|
|
BestOfTheWorst Unstoppable!
Joined: 02 Jun 2006
|
Posted: Sat Jul 03, 2010 12:08 am Post subject: |
|
|
|
|
Back to top |
|
|
Doomination God like!
Joined: 23 Oct 2006 Location: It's NOT lupus. Posts: 6.022 x 10^23
|
Posted: Sat Jul 03, 2010 12:22 am Post subject: |
|
|
|
|
Back to top |
|
|
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Sat Jul 03, 2010 1:48 am Post subject: |
|
|
Yes, yes, obviously you can't show up to the compiler using any ACS command and try to pass some random number of params into it. But clearly it is possible, so if one were to create a new command then there is no reason this feature could not be integrated into it. |
|
Back to top |
|
|
BestOfTheWorst Unstoppable!
Joined: 02 Jun 2006
|
Posted: Sat Jul 03, 2010 9:20 am Post subject: |
|
|
Yeah, but you really don't want to implement function overloading in ACS..
And its pretty bad design to have some values or settings SET by actually NOT SETTING them. |
|
Back to top |
|
|
phenex2 Unstoppable!
Joined: 10 Jan 2008
|
Posted: Fri Sep 24, 2010 1:09 pm Post subject: |
|
|
is there a similar function for ACS in Zdoom?
if yes we could support it here as well. |
|
Back to top |
|
|
EarthQuake Wicked Sick!
Joined: 02 Apr 2004 Location: Athens, Ohio. Dieblieber gonna getcha!
|
Posted: Fri Sep 24, 2010 3:48 pm Post subject: |
|
|
Looks like Skulltag has a few specials regarding this:
http://zdoom.org/wiki/Team_GivePoints
http://zdoom.org/wiki/Team_Score
It's probably best that we support these instead of making up our own specials, for sake of compatibility. Note that one of the specials requires a "team" argument. Some thought needs to be put into what values ZDaemon would be using for each team (see rest of thread). |
|
Back to top |
|
|
DoomerMrT Dominating!
Joined: 09 Mar 2007 Location: http://destiny-server.ath.cx/forums/
|
Posted: Fri Sep 24, 2010 7:00 pm Post subject: |
|
|
While I agree that compatibility is important ZDoom doesn't have such functions because it is mostly a singleplayer port. Skulltag indeed has some but they are not very well thought out IMO so I think we should support worst's suggestion instead:
Code: | SetTeamScore (team, value)
GetTeamScore (team) |
These two are the only ones that are necessary for all possible manipulations of team scores. |
|
Back to top |
|
|
|