Weapon Setup mutator

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Crowze

Bird Brain
Feb 6, 2002
3,556
1
38
40
Cambridgeshire, UK
www.dan-roberts.co.uk
Here it is.

This mutator can (currently) do 2 things: replace each team's loadouts with ones specified, either in general or by map, and it can swap any kind of item with another, again either in general or by map.

Please note this is a first release, I've not tested it online at all, so please tell me if something doesn't work.
 

Vega-don

arreté pour detention de tomate prohibée
Mar 17, 2003
1,904
0
0
Paris suburbs
Visit site
That simply Rocks! havent tried it already.

now we can make themed maps/fights.

one question : is it possible to have the mutator on the server but to make this mutator working only for a few maps?
 

{GD}Odie3

You Give Odie a Boner
Nov 19, 2001
1,248
3
38
55
Austin Texas
ghostdogs.net
Did I get this correct:

[WeaponSetup.LoadoutMut]
Loadout[0]="Pistols//M92F-1,FSVEN-1,DE50-1,*M92F-4,*FSVEN-4,*DE50-4,"
Loadout[1]="Pistols//M92F-1,FSVEN-1,DE50-1,*M92F-4,*FSVEN-4,*DE50-4,"
MapSetting[0]=(Map="Default",AttackerLoadout=0,DefenderLoadout=1)

[WeaponSetup.WeaponReplaceMut]
;;DefaultReplacement[0]=(OldItem="INF_Core.INFc_RC50",NewItem="INF_Core.INFc_M16")
;;DefaultReplacement[0]=(OldItem="INF_Core.INFc_PSG",NewItem="INF_Core.INFc_M16")
;;Replacement[0]=(Map="",OldItem="",NewItem="")

For a Map


[WeaponSetup.LoadoutMut]
Loadout[0]="Pistols//M92F-1,FSVEN-1,DE50-1,*M92F-4,*FSVEN-4,*DE50-4,"
Loadout[1]="Pistols//M92F-1,FSVEN-1,DE50-1,*M92F-4,*FSVEN-4,*DE50-4,"
MapSetting[0]=(Map="EAS-INF-Island",AttackerLoadout=0,DefenderLoadout=1)

[WeaponSetup.WeaponReplaceMut]
DefaultReplacement[0]=(OldItem="INF_Core.INFc_RC50",NewItem="INF_Core.INFc_M16")
DefaultReplacement[0]=(OldItem="INF_Core.INFc_PSG",NewItem="INF_Core.INFc_M16")
Replacement[0]=(Map="",OldItem="",NewItem="")


EDIT
Okay tried offline. It works but when I use a map like in my example above I do get the pistols like I should. But when I switched missions I only got a knife and nothing else. did I do something wrong?
 
Last edited:

Beppo

Infiltration Lead-Programmer
Jul 29, 1999
2,290
5
38
53
Aachen, Germany
infiltration.sentrystudios.net
Crowze, your following code will produce a bunch of log entries I guess:
Code:
if (MapName ~= Replacement[i].Map 
&& ClassIsChildOf(class<Actor>(DynamicLoadObject(Replacement[i].OldItem, class'Class')), A) 
&& Replacement[i].OldItem != "")
the order of the single checks here is important... you dynamically load an object and then you check if an object is specified at all. You have to turn it around to work without giving you accessed Nones and alikes. So:
Code:
if (Replacement[i].OldItem != "") 
&& MapName ~= Replacement[i].Map 
&& ClassIsChildOf(class<Actor>(DynamicLoadObject(Replacement[i].OldItem, class'Class')), A)

Oh and maybe stop at the first OldItem="" entry... a bit of 'disciplin' in setting up the ini should be ok :)
 

Crowze

Bird Brain
Feb 6, 2002
3,556
1
38
40
Cambridgeshire, UK
www.dan-roberts.co.uk
Odie, you only need one loadout setup for that, and set the map setting to use the same loadout for each team. That's probably not the problem though - I'll look into it.

Cheers for that Beppo, I'll get that sorted out.

EDIT: Note to self: Fix the 1-too-many-frags and SpeechPad/UTCompass-not-working-properly bugs.
 
Last edited:

{GD}Odie3

You Give Odie a Boner
Nov 19, 2001
1,248
3
38
55
Austin Texas
ghostdogs.net
Crowze said:
Odie, you only need one loadout setup for that, and set the map setting to use the same loadout for each team. That's probably not the problem though - I'll look into it.

Cheers for that Beppo, I'll get that sorted out.


Oh, not what I did is really wrong but it would have been easier for me to do:
Loadout[0]="Pistols//M92F-1,FSVEN-1,DE50-1,*M92F-4,*FSVEN-4,*DE50-4,"
MapSetting[0]=(Map="deafult",AttackerLoadout=0,DefenderLoadout=0)
 

Beppo

Infiltration Lead-Programmer
Jul 29, 1999
2,290
5
38
53
Aachen, Germany
infiltration.sentrystudios.net
again, restricting the amount of 'allowed' scopes will end up in a fight for the right if you get what I mean... if it is randomly selected who gets the scope or who is allowed to use it then it will only make live very hard on publics due to the bitching and flaming that 'can' result out of this.

For clan matches you don't need such a mutator... the clans (and leagues) can setup rules for this and do not need a mutator then.
 

keihaswarrior

New Member
Jan 7, 2003
1,376
0
0
41
Seattle
keihaswarrior.home.icq
I agree with Beppo. There is going to be lots of fighting over the scopes.

I only see one way to make it work:
First you need small screen that pops up when the round starts. Everyone who put a scope in their loadout gets put into a wait list in the order they joined. To relinquish the scope, all you do is change your loadout to one without a scope, then the next player in the list gets it.
If someone is doing really bad, or goes AFK with a scope, then there also needs to be a vote system to kick people to the bottom of the list and give the scope to the next person in line.

There can also be a vote for someone. If they get enough votes, they automatically move to the top of the list and get the scope.

If all the possible loadouts are predefined, then you need a menu where you pick your desired loadout. If one is already taken, then you get put into the list instead and must pick another (backup loadout).

Overall, this seems fairly difficult to code. But it would be nice if you find the time.
 

Crowze

Bird Brain
Feb 6, 2002
3,556
1
38
40
Cambridgeshire, UK
www.dan-roberts.co.uk
Okay, version 2 is here.

Changes:
Added a weapon add section, mainly to work around the problem of SpeechPad/UTCompass/similar mutators not working corectly.
Fixed the knife-only loadout bug with the loadout settings.
Fixed the number of grenades (used to give one too many).
 

MightyTuX[JgKdo]

New Member
Jan 21, 2003
30
0
0
Visit site
Didnt code anything in INF myself, but each weapontype is one (Actor?)Class in INF, right? Maybe it is possible to remove all pistols first, than all nades and so on until maximum Bulk is reached.
 

Harper [Jgkdo]

New Member
Feb 8, 2004
154
0
0
Beside that I don't like the idea of a team based bulk limit if such a limit would be coded I would suggest the following way:
1. Check whether bulk limit is exceeded for both teams
if yes:
2. Iteration over the pawnlist to find players in each team with biggest bulk
3. Remove an item from that player (my suggestion for ranking: second primary weapon+ammo (if any), claymore, nades (if number exceeds 5), pistol if primary is not scoped, magazines for primary (if number exceeds 5) ...)
goto 1.
if no: fine :)

But I really don't see the point why limiting the teams total bulk would do any good.

[EDIT]
Almost forgot, there would still be some problems especially with late joiners.
Imagine the teams bulk is already at the limit and suddenly another player enters. You can't remove any inventory from the people already playing (at least you shouldn't try to remove their guns while they are in the middle of a firefight :rolleyes: )
So what do you do with the new player?
[/EDIT]
 
Last edited: