Page 1 of 2

Editing Onslaught Lockers

Posted: Wed 30 Jul , 2014 7:30 pm
by Rymosrac
Maybe I'm missing something obvious, but is there a way on my end to modify which weapons are placed in the weapons lockers for ONS?

Re: Editing Onslaught Lockers

Posted: Wed 30 Jul , 2014 8:19 pm
by Azarael
It should use Swap's settings.

Re: Editing Onslaught Lockers

Posted: Wed 30 Jul , 2014 8:42 pm
by Rymosrac
That was my first thought, so I opened up swap and removed everything from every slot swap. (That's what I'm shooting for, is empty lockers. BW not playing nice with some other obscure gametypes because reasons.)
Didn't seem to have any effect, guess I'll try editing swap in the .ini file.

Edit: Cut everything out of the swap lines in BWProOffline.ini (as well as the default swaps), removed everything from the ingame swap settings as well. Results: In both Swap and Swap (system), you spawn with nothing in ONS (as desired) but the lockers still have the same assortment of weapons. The mutator description for Swap (system) references UT2004.ini, but I couldn't find anything in there regarding weapon swap settings, and assume it's talking about the ones in BwProOffline.ini.
Must be SOMEWHERE that I'm overlooking.

Re: Editing Onslaught Lockers

Posted: Thu 31 Jul , 2014 2:54 am
by Rymosrac
Well, think I figured out why swap wasn't doing crap.

Image

angry_stare

Re: Editing Onslaught Lockers

Posted: Thu 31 Jul , 2014 7:16 am
by Rymosrac
Starting to think I've gone off in completely the wrong direction by assuming the ONS lockers were at all relevant to my problem. The offending gametype attempts to spawn all players with all default UT2004 weapons (minus the obviously omitted superweapons and lightning gun using the following code:
function AddGameSpecificInventory(Pawn P)
{
local Inventory Inv;

Super.AddGameSpecificInventory(P);

P.CreateInventory("XWeapons.BioRifle");
P.CreateInventory("XWeapons.FlakCannon");
P.CreateInventory("XWeapons.LinkGun");
P.CreateInventory("XWeapons.Minigun");
P.CreateInventory("XWeapons.RocketLauncher");
P.CreateInventory("XWeapons.ShockRifle");
P.CreateInventory("UTClassic.ClassicSniperRifle");
P.CreateInventory("Onslaught.ONSGrenadeLauncher");
P.CreateInventory("Onslaught.ONSAVRiL");
P.CreateInventory("Onslaught.ONSMineLayer");

for (Inv = P.Inventory; Inv != None; Inv = Inv.Inventory)
{
if (Weapon(Inv) != None)
{
Weapon(Inv).MaxOutAmmo();
}
}
}
This is undesirable since I want to run said gametype with loadout. The current result of attempting to do so is that you spawn with your selected loadout + a random smattering of around ten other BW weapons, so everyone's got a G5, HAMR, a dozen assault rifles and SMG's, etc. Obviously bad. Presumably those replacements are controlled by some of the ballistic swap code somewhere, and setting those replacements to be blank should fix my issue - but attempts to change swap settings through the ingame menu or any of the swap lists I can find in the .ini files is having any effect.

If I were competent, I'd just decompile the relevant .u, gut the function, and recompile. But then there's sticky morality concerns about changing and redistributing someone else's work. Plus I'm just plain too inexperienced to pull it off and it seems like a far more complicated solution than just blanking out the ballistic swap settings.

Re: Editing Onslaught Lockers

Posted: Thu 31 Jul , 2014 1:01 pm
by Azarael
Which gametype is it? No matter what happens, BW will use CheckReplacement to convert standard weapons which are created. Your best bet is actually to nix the function.

Re: Editing Onslaught Lockers

Posted: Thu 31 Jul , 2014 3:04 pm
by Rymosrac
That game type in question is capture-strike. It's basically a simple CTF rework that makes it round-based with no or limited respawns and a dedicated attack/defense team each round. Most "recent" version can be found here:

http://unrealtournament2004.filefront.c ... rike;30674

Tried contacting the original author, but all I could scrounge up is a yahoo email he was using in 2003. Predictably, no response. I can decompile the .u using UE Explorer and change the relevant code in the decompiled .uc easily enough using WOTgreal - but saving the modified .uc and then recompiling the whole thing is giving me headaches.

Re: Editing Onslaught Lockers

Posted: Thu 31 Jul , 2014 3:08 pm
by Azarael
In UT2004.ini, there are EditPackages lines. Add the package name to the end, then make sure your classes are in UT2004/IntendedPackageName/Classes. Use the command "ucc make" from the command line. Ensure the original package does not exist.

Re: Editing Onslaught Lockers

Posted: Thu 31 Jul , 2014 3:17 pm
by Calypto
Please don't use WOTgreal as a formal decompilation utility. There is a chance that the finished result will not compile afterward. Instead, use:

Code: Select all

cd c:\ut2004\system
ucc batchexport PackageName.u class .uc \PackageName\Classes
The finished result will be in your UT2004 directory.

Re: Editing Onslaught Lockers

Posted: Thu 31 Jul , 2014 3:23 pm
by Rymosrac
Error'd out like mad. Pretty sure because it can't find the mod's .utx. Where do I need to put that for the compile?

The entire mod is literally just:
>CaptureStrike.u
>CaptureStrike.ucl
>CaptureStrike.utx

Does the .ucl need to be somewhere, or should that be generated by the compile?