Gaming Zone > Unreal Tournament 2004
Manta Run Assists
Ekulz:
Hi friends,
It has come to my attention recently that manta drivers aren't scoring points for assists and I wanted to share my findings. I contacted Piglet and Nardaq about the issue and apparently the point system is disabled while admins review the point structure. I understand the need to review this to prevent lower skilled players scoring higher as this could effect the stat system/balancer and I wanted to create a discussion around the subject so others can give their opinions.
Questions I have:
- Is it possible to edit the score system for manta runs separately to individual flag runs?
- Will reducing wingman cap points also reduce points for other flag runners?
- What are the proposed reductions in points for both driver and wingman?
I look forward to your responses, thanks! :cheers:
Piglet:
Hi,
As per Discord chat: My take on it is that the most points you could get for an assist was 15 and that it was important that they were given to ensure that the taxi driver was ranked appropriately highly. A good driver is more useful to a team than the dummy on the wing and should get full credit and a high pph ranking for the balancer to use at round start.
Here's the code and the configuration. I would welcome any input as to issues seen in the code, and code changes that would fix it.
Configuration:
--- Code: ---[MiA_FlagrunAssist.mutFlagrunAssist]
ScoreMethod=1
MaxScore=15
MaxAdren=25
--- End code ---
--- Code: ---//============================================================================
// $Id: mutFlagrunAssist.uc by Jrubzjeknf
//============================================================================
class mutFlagrunAssist extends Mutator config(MiA_FlagRunAssist);
var CTFFlag RedFlag, BlueFlag;
var Mia_FlagrunInfo RedInfo, BlueInfo;
var config int ScoreMethod, MaxScore, MaxAdren;
//============================================================================
// PostBeginPlay
//
// Because the flags don't exist yet when this function is called, a timer is
// started to find them on level startup instead.
//============================================================================
function PostBeginPlay()
{
Super.PostBeginPlay();
SetTimer(1, true);
}
//============================================================================
// Timer
//
// Finds flags, saves their reference and spawns a Mia_FlagrunInfo for them.
//============================================================================
function Timer()
{
local CTFFlag F;
if(Level.Game.GameReplicationInfo.bMatchHasBegun) //Match started!
{
foreach AllActors(class'CTFFlag', F) //Find flags.
{
if ( F.TeamNum == 1 )
BlueFlag = F;
else
RedFlag = F;
}
if(RedFlag != None && BlueFlag != None) //Spawn Infos and set variables in those.
{
RedInfo = Spawn(class'Mia_FlagrunInfo', RedFlag);
BlueInfo = Spawn(class'Mia_FlagrunInfo', BlueFlag);
RedInfo.EnemyTeamInfo = BlueFlag.Team;
BlueInfo.EnemyTeamInfo = RedFlag.Team;
RedInfo.EnemyTeamScore = BlueFlag.Team.Score;
BlueInfo.EnemyTeamScore = RedFlag.Team.Score;
RedInfo.ScoreMethod = ScoreMethod;
RedInfo.MaxScore = MaxScore;
RedInfo.MaxAdren = MaxAdren;
BlueInfo.ScoreMethod = ScoreMethod;
BlueInfo.MaxScore = MaxScore;
BlueInfo.MaxAdren = MaxAdren;
SetTimer(0, false);
}
}
}
static function FillPlayInfo(PlayInfo PlayInfo)
{
local byte Weight; // weight must be a byte (max value 127?)
Weight=1;
Super.FillPlayInfo(PlayInfo);
PlayInfo.AddSetting(Default.FriendlyName, "ScoreMethod", "Select one", 0, Weight++, "Select", "0;Points every second carrying;1;Points in proportion to time carrying");
PlayInfo.AddSetting(Default.FriendlyName, "MaxScore", "Max Score for helping", 0, Weight++, "Text", "2;0:99");
PlayInfo.AddSetting(Default.FriendlyName, "MaxAdren", "Max Adren for helping", 0, Weight++, "Text", "2;0:99");
}
static function string GetDescriptionText(string PropName)
{
switch (PropName)
{
case "ScoreMethod": return "Method of points calculation";
case "MaxScore": return "Max score possible";
case "MaxAdren": return "Max Adrenaline possible";
}
return Super.GetDescriptionText(PropName);
}
//============================================================================
// Default Properties
//============================================================================
defaultproperties
{
GroupName="FlagrunAssist"
FriendlyName="Flagrun Assist"
Description="Flag run driver points."
ScoreMethod=1
MaxScore=15
MaxAdren=25
}
--- End code ---
--- Code: ---//============================================================================
// $Id: Mia_FlagrunInfo.uc by Jrubzjeknf
//============================================================================
class Mia_FlagrunInfo extends ReplicationInfo;
//============================================================================
// Variables
//============================================================================
var TeamInfo EnemyTeamInfo;
var float EnemyTeamScore;
var float TimeCarryingFlag;
var float FlagTakenTime;
var int ScoreMethod;
var int MaxScore;
var int MaxAdren;
struct VehicleDriverPoints
{
var Controller Driver;
var float TimeDriven;
};
var array<VehicleDriverPoints> VehicleDriverPointsArray;
//============================================================================
// PostBeginPlay
//
// Initiates flag monitoring.
//============================================================================
function PostBeginPlay()
{
Super.PostBeginPlay();
SetTimer(1, true);
}
//============================================================================
// Timer
//
// Checks if the flag carrier is sitting on a Vehicle. Every second he's sitting
// on one, the Vehicle driver gets an assist second. This will be used for
// giving the Vehicle driver points and adrenaline for the Vehicle run.
//============================================================================
function Timer()
{
local pawn Driver;
local Controller C;
if(Owner != None)
{
if(FlagTakenTime != CTFFlag(Owner).TakenTime) //the flag has just been taken, check it the flag has been captured between seconds.
{
CheckCapture();
FlagTakenTime = CTFFlag(Owner).TakenTime;
}
if(!Owner.IsInState('Home')) //The flag is being carried or has been dropped.
{
TimeCarryingFlag += 1;
if(CTFFlag(Owner).Holder != None &&
CTFFlag(Owner).Holder.Base != None &&
Vehicle(CTFFlag(Owner).Holder.Base) != None &&
Vehicle(CTFFlag(Owner).Holder.Base).Driver != None) //The flag carrier is sitting on an occupied Vehicle.
{
Driver = Vehicle(CTFFlag(Owner).Holder.Base).Driver;
if(Driver.GetTeamNum() == CTFFlag(Owner).Holder.GetTeamNum() && Driver != CTFFlag(Owner).Holder){ //The Vehicle driver is friendly (and not self!).
if (Driver.DrivenVehicle != None && Driver.DrivenVehicle.Controller != None){
C = Driver.DrivenVehicle.Controller;
}
else{
C = Driver.Controller;
}
UpdateTimeDrivenFor(C); //Give the driver seconds.
}
}
}
else if(TimeCarryingFlag != 0) //The flag is home, but has been carried. Check if the flag has been captured.
CheckCapture();
}
}
//============================================================================
// CheckCapture
//
// Check is the flag has been captured.
//============================================================================
function CheckCapture()
{
local int i;
local float RelativeTimeDriven;
local float Points;
local float Adren;
if(EnemyTeamScore != EnemyTeamInfo.Score)
{
EnemyTeamScore = EnemyTeamInfo.Score;
for(i=0; i<VehicleDriverPointsArray.Length; i++)
if(VehicleDriverPointsArray[i].Driver != None)
{
if (ScoreMethod == 1){
RelativeTimeDriven = VehicleDriverPointsArray[i].TimeDriven/TimeCarryingFlag;
Points = RelativeTimeDriven*MaxScore;
Adren = RelativeTimeDriven*MaxAdren;
}
else{
Points = min(VehicleDriverPointsArray[i].TimeDriven, MaxScore);
Adren = min(VehicleDriverPointsArray[i].TimeDriven*2, MaxAdren);
}
if(PlayerController(VehicleDriverPointsArray[i].Driver) != None)
PlayerController(VehicleDriverPointsArray[i].Driver).ClientMessage("Flag Run Assist! Points:"@string(int(Points * 100) / 100)$", Adrenaline:"@string(int(Adren * 100) / 100));
VehicleDriverPointsArray[i].Driver.PlayerReplicationInfo.Score += Points; //Flag carrier gets MaxScore points on flawless cap.
VehicleDriverPointsArray[i].Driver.Adrenaline += Adren; //Flag carriers get MaxAdren adrenaline.
}
}
TimeCarryingFlag = 0;
VehicleDriverPointsArray.Length = 0;
}
//============================================================================
// UpdateTimeDrivenFor: give current driver seconds.
// GetIndexOf: gets array index of current driver.
// AddToArray: add current driver to array.
//============================================================================
function UpdateTimeDrivenFor(Controller Driver)
{
local int i;
i = GetIndexOf(Driver);
if(i != -1)
VehicleDriverPointsArray[i].TimeDriven += 1;
else
AddToArray(Driver);
}
function int GetIndexOf(Controller C)
{
local int i;
for(i=0; i<VehicleDriverPointsArray.Length; i++)
if(VehicleDriverPointsArray[i].Driver == C)
return i;
return -1;
}
function AddToArray(Controller C)
{
local int i;
i = VehicleDriverPointsArray.Length;
VehicleDriverPointsArray.Length = i + 1; //VehicleDriverPointsArray.Length++; would make it crash 0_o
VehicleDriverPointsArray[i].Driver = C;
VehicleDriverPointsArray[i].TimeDriven = 1;
}
defaultproperties
{
}
--- End code ---
Stealer:
Have you got that many comments in the code piglet? I'm impressed, I've just realised where I've been going wrong in most of my coding :)) :)) :))
Unaben:
This is just losely connected but I don't thing flag returns should give flat X points, they should give more points the closer the flag is about to get captured, which could be calculated based on the flag carrier's time/distance etc.
Flenser:
Relatively, the person standing on a manta wing should get many fewer points than the manta pilot, since the pilot is the one with the skill.
I've been a little miffed that taking the flag gets zero adrenaline. My understanding is that's due to the method of repeatedly dropping/picking up the flag to quickly get to 100 adrenaline, but maybe then dropping the flag should remove the same amount that picking up the flag gets you?
Navigation
[0] Message Index
[#] Next page
Go to full version