Jump to content

Agent

Former Developers
  • Posts

    1271
  • Joined

  • Last visited

Posts posted by Agent

  1. Here is the TSVehicle crate.

    class Rx_CrateType_TSVehicle extends Rx_CrateType;
    
    var transient Rx_Vehicle GivenVehicle;
    var config float ProbabilityIncreaseWhenVehicleProductionDestroyed;
    var array > Vehicles;
    
    function string GetPickupMessage()
    {
    return Repl(PickupMessage, "`vehname`", GivenVehicle.GetHumanReadableName(), false);
    }
    
    function string GetGameLogMessage(Rx_PRI RecipientPRI, Rx_CratePickup CratePickup)
    {
    return "GAME" `s "Crate;" `s "tsvehicle" `s GivenVehicle.class.name `s "by" `s `PlayerLog(RecipientPRI);
    }
    
    function float GetProbabilityWeight(Rx_Pawn Recipient, Rx_CratePickup CratePickup)
    {			
    local Rx_Building building;
    local float Probability;
    
    if (CratePickup.bNoVehicleSpawn || Vehicles.Length == 0)
    	return 0;
    else
    {
    	Probability = Super.GetProbabilityWeight(Recipient,CratePickup);
    
    	ForEach CratePickup.AllActors(class'Rx_Building',building)
    	{
    		if((Recipient.GetTeamNum() == TEAM_GDI && Rx_Building_WeaponsFactory(building) != none  && Rx_Building_WeaponsFactory(building).IsDestroyed()) || 
    			(Recipient.GetTeamNum() == TEAM_NOD && Rx_Building_AirStrip(building) != none  && Rx_Building_AirStrip(building).IsDestroyed()))
    		{
    			Probability += ProbabilityIncreaseWhenVehicleProductionDestroyed;
    		}
    	}
    
    	return Probability;
    }
    }
    
    function ExecuteCrateBehaviour(Rx_Pawn Recipient, Rx_PRI RecipientPRI, Rx_CratePickup CratePickup)
    {
    local Vector tmpSpawnPoint;
    
    tmpSpawnPoint = CratePickup.Location + vector(CratePickup.Rotation)*450;
    tmpSpawnPoint.Z += 200;
    
    GivenVehicle = CratePickup.Spawn(Vehicles[Rand(Vehicles.Length)],,, tmpSpawnPoint, CratePickup.Rotation,,true);
    
    GivenVehicle.DropToGround();
    if (GivenVehicle.Mesh != none)
    	GivenVehicle.Mesh.WakeRigidBody();
    }
    
    DefaultProperties
    {
    BroadcastMessageIndex = 14
    PickupSound = SoundCue'Rx_Pickups.Sounds.SC_Crate_VehicleDrop'
    
    Vehicles.Add(class'TS_Vehicle_Titan');
    Vehicles.Add(class'TS_Vehicle_Wolverine');
    Vehicles.Add(class'TS_Vehicle_HoverMRLS');
    Vehicles.Add(class'TS_Vehicle_TickTank');
    Vehicles.Add(class'TS_Vehicle_ReconBike');
    Vehicles.Add(class'TS_Vehicle_Buggy');
    }

    Yosh previously suggested that there's an off-by-one error, but there's not, and here's why. Rand() generates a "random" number number between 0, and the input - 1; in this instance, Vehicles.Length == 6, so Rand(Vehicles.Length) would generate a number between 0 (Titan) and 5 (Buggy). Adding a one to this wouldn't fix the problem -- it would just add a bug, instead.

    From a theoretical standpoint, I don't see anything wrong with this crate. From a practice standpoint, I have no idea why TS Buggys are so rare. Resolving this would likely involve using or writing some other sort of Rand()-type function.

    Tl;dr: The crate's code isn't broken, but it's broken.

  2. Actually, there was a point where suicides counted as a kill as well. I think that was one of the first things I fixed haha.

    It wrecked my K/D in-game as a result though, because I have a tendency to just run up to people as an engineer with C4...

    • Haha 1
  3. I've been making an effort to make more posts and be overall more communicative, but I post most frequently when a bug is fixed.

    Plus, your second question actually amused me because the admin password isn't mentioned as an option or anything in the launcher, so I looked up the proper config variable so that you don't have to make a batch file for launching your server. It's good information to know.

  4. There are two ways to set your admin password:

    Method 1:

    1) Open UDKGame\Config\UDKGame.ini

    2) Scroll to the [Engine.AccessControl] section

    3) Look for the line that looks like this: AdminPassword=

    4) Change the aforementioned line to: AdminPassword=your_admin_password

    Method 2:

    In your server batch file, specify ?AdminPassword=your_admin_password just as you would any other option.

  5. You can host a server on your local network, and then proceed to play purely on your local network using local IP addresses. Since this traffic never leaves the local network, it can't be affected by external firewalls -- just make sure no other firewalls block the application (i.e: add an exception for it in Windows firewall).

    The default port for the server will be 7777.

    Edit: To clarify, this will only permit local play. If you're looking for internet play, and your ISP is blocking this traffic for whatever crazy reason, then this wont be on any help.

    I do recall UDK supporting steam sockets, which are generally useful for things like NAT traversal, so you may want to look into that and see if it helps any maybe?

  6. I meant to make a sticky thread about that after the patch, but never got around to it. This is partly because there is still a 30-second timeout issue when using HTTP redirects.

    In short, you just need to upload your files to a web server, all in the same directory (no folders). In the following example, the address "http://example.com/renx/downloads/" is used (aka: CHANGE THIS).

    After uploading your files to a webserver, in UDKEngine.ini:

    1) Check if a section named [ipDrv.HTTPDownload] exists.

    2a) If this does not exist: Add the following block to the ini file

    2b) Modify the settings to reflect the following

    [ipDrv.HTTPDownload]

    RedirectToURL=http://example.com/renx/downloads/

    UseCompression=False

    3) You *might* need to set "MaxDownloadSize" to "0" (i.e: "MaxDownloadSize = 0") in the same file, in the [ipDrv.TcpNetDriver] section.

    UDK is peculiar about file case-sensitivity, so you may have to set some file names to all lower-case (though some must not be all lower-case).

    If you want to get adventurous, check out the link below for full details about redirection, as well as compression. I haven't covered compression at all, so if you're wanting the absolute smallest downloads, check it out.

    http://wiki.unrealadmin.org/Redirection_and_Compression

    Edit: Also, it occurred to me that since this thread is genuinely useful for modders (causing it to grow to 10 pages and nearly 7000 views) and timeless, so I stickied it.

  7. There are non-marathon servers, such as ConstructiveTyranny and TheMatrixRen, both of which are marked have AOW (All Out War) in their name. EKT servers are generally marathon, and tend to stay active for a variety of reasons, but are not the only active servers. You can also see the Game Length in the launcher after selecting a server (0 means marathon).

    Other than that, we're glad you like the game, and I look forward to seeing you in-game! :P

×
×
  • Create New...