AAO25.com

Assist => Feedback & Suggestions => Bug Reports => Topic started by: Go_Cat75 on Friday, February 10, 2012, 08:29:55 AM

Title: OpenWeaponSlots
Post by: Go_Cat75 on Friday, February 10, 2012, 08:29:55 AM
Any guys that know what there doing to fix this?..  I have this so far..

V2.6.0 AGP_Gameplay.u file:

Gameplay.u Has a reference to weapon slots in V2.5 but not V2.6?

http://dl.dropbox.com/u/16681/AGP_Gameplay.u
http://dl.dropbox.com/u/464376/aac_maap/AGP_Gameplay.7z - Decompiled version of above link


I can also see a reference in the AGP_Interface.u file both versions so could be something there also.

It is for the Tournament section of code:
"Check this to open all weapon slots regardless as to the number of players on each team"


ini file where the command is normally set to enable on later versions:

[AGP.AGP_GameInfo]
; Type of game play (MILES, Live Fire) - see documentation or use Command Post to adjust
; Force Live Fire: FORCE_Normal
; Force MILES: FORCE_MILES
; USe Map Default: FORCE_None
ForceGameplay=FORCE_None

; When true, bOpenAllWeaponClassSlots will make every weapon class available selectable.
bOpenAllWeaponClassSlots=True


Title: Re: OpenWeaponSlots
Post by: Spanky on Friday, February 10, 2012, 13:38:55 PM
Here's some pitiful code I compiled which didn't work, even after several modifications.

Code: [Select]
//=============================================================================
// File: slots.uc
// Description: An attempt at opening all weapon slots
// Date: 7 February 2012
// Author: Nate "Spanky" Rowe
//=============================================================================

class slots extends mutator;

var bool bTournamentOpenAllWeaponClassSlots;

event PreBeginPlay()
{
  Level.Game.BaseMutator.AddMutator(self);
}

function PostBeginPlay()
{
Log("tournament mode~~~~~~~~~~~~~~~~~~~~~~~~");
Super.PostBeginPlay();
bTournamentOpenAllWeaponClassSlots = true;
}
Title: Re: OpenWeaponSlots
Post by: BlueBlaster on Friday, February 10, 2012, 14:53:35 PM
Did you test that in tournament mode or normal mode? I know it's a dumb question, but it's easy to make mistakes.

BTW Spanky, I looked thru some stuff there and you can do something like this:
Code: [Select]
var config bool bOpenAllWeaponClassSlots;

function int OpenAllSlots() {
    return bOpenAllWeaponClassSlots;
}

There's code like this in AGP_GameDeathMatch. I'm wondering if it would work this way since I assume thats the way it's done in 2.6 with the ini file.
Title: Re: OpenWeaponSlots
Post by: Spanky on Friday, February 10, 2012, 15:05:44 PM
I tested in regular mode as that's our goal :)
Title: Re: OpenWeaponSlots
Post by: BlueBlaster on Friday, February 10, 2012, 15:19:29 PM
Well I wouldn't think it would work in regular mode if it says bTournamentOpenAllWeaponClassSlots lol
Title: Re: OpenWeaponSlots
Post by: Jonnym on Friday, February 10, 2012, 15:21:15 PM
I was thinking the same thing
Title: Re: OpenWeaponSlots
Post by: Spanky on Friday, February 10, 2012, 15:22:28 PM
-_- I was thinking that it was just a named bool that could be set in any gameplay.
Title: Re: OpenWeaponSlots
Post by: Jonnym on Friday, February 10, 2012, 15:26:57 PM
This is all wrong

Code: [Select]
class slots extends mutator;

var bool bTournamentOpenAllWeaponClassSlots;

event PreBeginPlay()
{
  Level.Game.BaseMutator.AddMutator(self);
}

function PostBeginPlay()
{
Log("tournament mode~~~~~~~~~~~~~~~~~~~~~~~~");
Super.PostBeginPlay();
bTournamentOpenAllWeaponClassSlots = true;
}

You are defining a local variable and then setting that local variable, that will not have an affect on anything.
Title: Re: OpenWeaponSlots
Post by: BlueBlaster on Friday, February 10, 2012, 15:28:09 PM
Hahaha, I can see how you would think that Spanky. But don't forget that theres bools attached to certain functions.

As a side-note, I'd still like to know where all the u code is hiding lol. Remember spanky, if you decompile them you just get each class header lol >:(
Title: Re: OpenWeaponSlots
Post by: Spanky on Friday, February 10, 2012, 15:28:34 PM
I never claimed I was a UScript coder :) I had to add the var so it would compile, otherwise UMake would bitch at me. I tried many things, that's just the last version of the script and one of the versions that compiled.
Title: Re: OpenWeaponSlots
Post by: BlueBlaster on Friday, February 10, 2012, 15:36:55 PM
Honestly I don't know what to do with this because I think in 2.5 the only option is for tournament mode. We probably have to code for it to work in regular mode, but I don't really know what to actually do hahaha. I'm not sure how to tell the game, hey enable all these weapon slots. I should stick to maps only lol.
Title: Re: OpenWeaponSlots
Post by: Jonnym on Friday, February 10, 2012, 15:39:23 PM
someone get crusade, he would know...
but on the other hand if we wake him up he might make some hacks aswell.
Title: Re: OpenWeaponSlots
Post by: Spanky on Friday, February 10, 2012, 15:44:46 PM
VendorX is anti-cheat. I'll pester him about this when I see him on again.
Title: Re: OpenWeaponSlots
Post by: Go_Cat75 on Friday, February 10, 2012, 19:50:31 PM
i'm shocked none of crusades old serer mods did this, maybe he didnt make a mod for it cos its too difficult to bother with

With weapon forcing and pick your own gun he probably didnt see the point i'm guessing.

Spanky have you tried the code with the word Tournament removed? the ini file does not include it for global so I wouldnt think the code would either.
Title: Re: OpenWeaponSlots
Post by: Spanky on Friday, February 10, 2012, 19:58:35 PM
Nah, I'm not going to bother with it anymore. UScript is one of those odd things that doesn't usually supply errors or ways to improve code. I find working with PHP a lot easier. I will ask VendorX about it, I'll just show him this thread so he can laugh at my attempts :D
Title: Re: OpenWeaponSlots
Post by: Go_Cat75 on Friday, February 10, 2012, 23:07:34 PM
I know it might not seam like a big deal to open weapon slots but there are Many players that want it and I hope someone at least can continue to look at this.

If someone could help me with the basics I will research what I can find, there may be something in later versions that will help.

I'm not sure what stop's us from taking the V2.6 file and using it assuming it works for win/mac/linux.

I did try this at the server level but server won't start.
Title: Re: OpenWeaponSlots
Post by: Spanky on Friday, February 10, 2012, 23:38:42 PM
I'm not sure what stop's us from taking the V2.6 file and using it assuming it works for win/mac/linux.

I did try this at the server level but server won't start.

You just explained "what stop's us". Can't copy files from other versions, the bytecode changes in other builds. It takes someone knowledgeable in UScript and AA source code to do this (if it's even possible...). There's nothing stopping you from learning UScript yourself, there's plenty of information available on various hacking forums as well as the UnrealWiki.
Title: Re: OpenWeaponSlots
Post by: BlueBlaster on Friday, February 10, 2012, 23:44:17 PM
To anyone who keeps coming here and asking if someone can do this:
Is there a way to do this? Yes, totally possible.
Do I know how to do it? I don't understand u-script :)
BUT I WANT ALL THE SLOTS OPEN BECAUSE ASDASFUAGSFUASFIANSF!? U-script.
Title: Re: OpenWeaponSlots
Post by: Go_Cat75 on Saturday, February 11, 2012, 04:33:11 AM
http://archive.forum.americasarmy.com/viewtopic.php?t=313222&page=1&highlight=

That's for AA3.x not AA2.x
Title: Re: OpenWeaponSlots
Post by: Go_Cat75 on Saturday, February 11, 2012, 06:55:06 AM
smarter then the average bear aye Boo-Boo
  Well its not my ability its my knowledge that is lacking with code, but I'll give it a hard try..

Here is the AA V2.8.5 UScript code for bOpenAllWeaponClassSlots=True for multiplayer mode.

BITFIELD bOpenAllWeaponClassSlots : 1;   //Offset:0xA68 Size:0x4 BitMask:0x1 Flags:0x44000

Does this help?

////////////////////////////
// Name: AAGP_GameInfo
// Class: UScript
// Size: 0xCC - 0xAA0
// Flags: | CLASS_Compiled | CLASS_Config | CLASS_Parsed | CLASS_Localized |
////////////////////////////
class DLL_IMPORT AAGP_GameInfo : public AGameInfo
{
public:
   class AAI_Interface * AI_global;   //Offset:0x9D4 Size:0x4 Flags:0x0
   class AScreenplay * _Screenplay;   //Offset:0x9D8 Size:0x4 Flags:0x0
   BITFIELD bDeadGame : 1;   //Offset:0x9DC Size:0x4 BitMask:0x1 Flags:0x0
   BITFIELD bNoInventory : 1;   //Offset:0x9DC Size:0x4 BitMask:0x2 Flags:0x0
   BYTE ForceGameplay;   //Offset:0x9E0 Size:0x1 Flags:0x44000
   BITFIELD bDemoExploreTheArmyMode : 1;   //Offset:0x9E4 Size:0x4 BitMask:0x1 Flags:0x44000
   TArray< class AInternetInfo *> AuthList;   //Offset:0x9E8 Size:0xC Flags:0x400000
   INT MaxAuthConnections;   //Offset:0x9F4 Size:0x4 Flags:0x0
   INT ServerAuthFailures;   //Offset:0x9F8 Size:0x4 Flags:0x0
   FLOAT NextAuthTime;   //Offset:0x9FC Size:0x4 Flags:0x0
   BITFIELD fAuthNotAvailableLastAuthAttempt : 1;   //Offset:0xA00 Size:0x4 BitMask:0x1 Flags:0x0
   BITFIELD bFakeFail : 1;   //Offset:0xA00 Size:0x4 BitMask:0x2 Flags:0x0
   BITFIELD bEnableMapTesting : 1;   //Offset:0xA00 Size:0x4 BitMask:0x4 Flags:0x44000
   BITFIELD bEnableCodeTesting : 1;   //Offset:0xA00 Size:0x4 BitMask:0x8 Flags:0x44000
   BITFIELD bDisableTakeDamageViewShift : 1;   //Offset:0xA00 Size:0x4 BitMask:0x10 Flags:0x44000
   BITFIELD bDEBUGDisablePlayerVehicles : 1;   //Offset:0xA00 Size:0x4 BitMask:0x20 Flags:0x0
   BITFIELD bDEBUGDisableAIVehicles : 1;   //Offset:0xA00 Size:0x4 BitMask:0x40 Flags:0x0
   INT iMaxAINPCsToSpawn;   //Offset:0xA04 Size:0x4 Flags:0x44000
   FLOAT fpMaxNPCToPlayerRatio;   //Offset:0xA08 Size:0x4 Flags:0x44000
   INT iMaxPlayerVehiclesToSpawn;   //Offset:0xA0C Size:0x4 Flags:0x0
   INT iMaxAICivilianNPCsToSpawn;   //Offset:0xA10 Size:0x4 Flags:0x0
   INT iMaxAISpotterNPCsToSpawn;   //Offset:0xA14 Size:0x4 Flags:0x0
   INT iMaxAIVehiclesToSpawn;   //Offset:0xA18 Size:0x4 Flags:0x0
   INT iMaxT62sToSpawn;   //Offset:0xA1C Size:0x4 Flags:0x0
   INT iMaxBMPsToSpawn;   //Offset:0xA20 Size:0x4 Flags:0x0
   INT iMaxBTRsToSpawn;   //Offset:0xA24 Size:0x4 Flags:0x0
   BITFIELD bAutoAT : 1;   //Offset:0xA28 Size:0x4 BitMask:0x1 Flags:0x44000
   TArray< class ANPCPlayerStart *> anpcpsPSToSpawn;   //Offset:0xA2C Size:0xC Flags:0x400000
   INT iNPCPSSpawnIndex;   //Offset:0xA38 Size:0x4 Flags:0x0
   INT iNPCsSpawned;   //Offset:0xA3C Size:0x4 Flags:0x0
   INT iPlayersSpawned;   //Offset:0xA40 Size:0x4 Flags:0x0
   INT iMustSpawnNPCsSpawned;   //Offset:0xA44 Size:0x4 Flags:0x0
   INT iCivilianNPCsSpawned;   //Offset:0xA48 Size:0x4 Flags:0x0
   INT iNPCSpottersSpawned;   //Offset:0xA4C Size:0x4 Flags:0x0
   INT iT62sSpawned;   //Offset:0xA50 Size:0x4 Flags:0x0
   INT iBMPsSpawned;   //Offset:0xA54 Size:0x4 Flags:0x0
   INT iBTRsSpawned;   //Offset:0xA58 Size:0x4 Flags:0x0
   INT iAIVehiclesSpawned;   //Offset:0xA5C Size:0x4 Flags:0x0
   FLOAT fpNPCSpawnDelay;   //Offset:0xA60 Size:0x4 Flags:0x44000
   FLOAT fpNPCInitialSpawnDelay;   //Offset:0xA64 Size:0x4 Flags:0x44000
   BITFIELD bOpenAllWeaponClassSlots : 1;   //Offset:0xA68 Size:0x4 BitMask:0x1 Flags:0x44000
   FLOAT fpAIDifficultyLevelVisionModifer;   //Offset:0xA6C Size:0x4 Flags:0x0
   FLOAT fpAIDifficultyLevelHearingModifer;   //Offset:0xA70 Size:0x4 Flags:0x0
   FLOAT fpAIDifficultyLevelExperienceModifer;   //Offset:0xA74 Size:0x4 Flags:0x0
   FLOAT fpAIDifficultyLevelWeaponAccModifer;   //Offset:0xA78 Size:0x4 Flags:0x0
   FLOAT fpAIDifficultyLevelWeaponRangeModifer;   //Offset:0xA7C Size:0x4 Flags:0x0
   FLOAT fpAIDifficultyLevelMortarSkillModifer;   //Offset:0xA80 Size:0x4 Flags:0x0
   FLOAT fpAIDifficultyLevelMentalStateModifer;   //Offset:0xA84 Size:0x4 Flags:0x0
   class FString ServerToursDownloadServer;   //Offset:0xA88 Size:0xC Flags:0x444000
   class USound * sndESSS2Introduction;   //Offset:0xA94 Size:0x4 Flags:0x0
   INT iDelayedRoundStartTimeSeconds;   //Offset:0xA98 Size:0x4 Flags:0x44000
   BITFIELD bDisableESS : 1;   //Offset:0xA9C Size:0x4 BitMask:0x1 Flags:0x44000

   virtual ~AAGP_GameInfo();
   // Functions

};
Title: Re: OpenWeaponSlots
Post by: Go_Cat75 on Saturday, February 11, 2012, 07:22:16 AM

unless u wanna slap
bOpenAllWeaponClassSlots=True
in the correct spot in the 2.5 ini and hope for a miracle....

Been there done that (step 1 about 4 weeks ago) no miracle still.

This is for V2.6.0 but I have this for - AGP_GameDeathMatch.MatchOver.OpenWeaponClass.uc
Found it in the AGP_Gameplay.u file

Not sure this is what we want, but if I find the right code here couldnt we recompile the V2.5 file with the code and get this to work?

function OpenWeaponClass ()
{
  local(None) Controller C;

  C // 0x00000019 : 0x0000
  switch (return ControllerList) // 0x0000001D : 0x0006
  {
    stop // 0x00000025 : 0x0011
}
Title: Re: OpenWeaponSlots
Post by: Go_Cat75 on Saturday, February 11, 2012, 10:12:29 AM
Looks like the multiplayer openweapon slots was not introduced until V2.8.0...  I though it was earlier.
Title: Re: OpenWeaponSlots
Post by: Spanky on Saturday, February 11, 2012, 14:59:53 PM
VendorX is working on this. He just supplied me with the first test mod but it crashed the server. Probably won't be long before there's a working version.
Title: Re: OpenWeaponSlots
Post by: BlueBlaster on Saturday, February 11, 2012, 16:27:27 PM
VendorX is a beast.

BTW go cats, the code that you somehow managed to extract is not exactly functional. There's some extra stuff (hex offesets, flags, etc) going on that will not allow it to compile (you can just remove it it's not a big deal), but then the word BITFIELD is wrong and should be BOOL. I'd like to know what program you used to get that code lol. Because the code looks debugged to the max with all those comments.
Title: Re: OpenWeaponSlots
Post by: Spanky on Sunday, February 12, 2012, 20:26:34 PM
For those interested, VendorX decompiled the AGP_Gameplay.u provided in the link in the original post. I added it to the original post. He also had this to say:

Quote
WeaponSlots - First code was good, but for Tournament Mode...:) My bad... Now i have second that should work in 99%, but can't compile with UE2RT. Problem is that even if i recompile engine.u, UCC will call engine.dll (same problem with TakeDamage in KActor mod), where this bool don't exist. That's mean, for now i can't do it - until i find way out to bypass that call (generally it's impossible..). The best way is find UE2RT SDK (source code) and adp to AA 2.5 - that will open full support. I have send message for Tim Sweeney, but i don't think he will replay - i'm not first who ask... Second possibility is to buy engine...:D
Title: Re: OpenWeaponSlots
Post by: Alex on Sunday, February 12, 2012, 21:09:56 PM
I lol'd when he said the second possibility was to buy the engine.  ;D
Title: Re: OpenWeaponSlots
Post by: BlueBlaster on Sunday, February 12, 2012, 21:12:59 PM
I managed to recompile the engine.u for 2.4.1 (except it didn't play nice with the editor because all the fonts in the texture browser was invisible lmfao), but I don't know if thats what VendorX is looking for since he's compiling with UE2RT.
Title: Re: OpenWeaponSlots
Post by: Go_Cat75 on Monday, February 13, 2012, 03:00:25 AM
For those interested, VendorX decompiled the AGP_Gameplay.u provided in the link in the original post. I added it to the original post. He also had this to say:

Sent you a PM re-sdk.