1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

Weapon Setup mutator

Discussion in 'Infiltration Development' started by Crowze, Jan 10, 2004.

  1. Crowze

    Crowze Bird Brain

    Joined:
    Feb 6, 2002
    Messages:
    3,556
    Likes Received:
    1
    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.
     
  2. Vega-don

    Vega-don arreté pour detention de tomate prohibée

    Joined:
    Mar 17, 2003
    Messages:
    1,904
    Likes Received:
    0
    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?
     
  3. Crowze

    Crowze Bird Brain

    Joined:
    Feb 6, 2002
    Messages:
    3,556
    Likes Received:
    1
    Yep. Just use the map-specific settings, and get rid of all the default settings.
     
  4. {GD}Odie3

    {GD}Odie3 You Give Odie a Boner

    Joined:
    Nov 19, 2001
    Messages:
    1,208
    Likes Received:
    0
    Okay, how do I get it to allow only pistols generally? I am sorry but I do not understand the ini flie.

    Sorry but I will need schooling on this (ie hand holding)
     
  5. {GD}Odie3

    {GD}Odie3 You Give Odie a Boner

    Joined:
    Nov 19, 2001
    Messages:
    1,208
    Likes Received:
    0
    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: Jan 10, 2004
  6. Beppo

    Beppo Infiltration Lead-Programmer

    Joined:
    Jul 29, 1999
    Messages:
    2,284
    Likes Received:
    1
    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 :)
     
  7. Crowze

    Crowze Bird Brain

    Joined:
    Feb 6, 2002
    Messages:
    3,556
    Likes Received:
    1
    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: Jan 10, 2004
  8. {GD}Odie3

    {GD}Odie3 You Give Odie a Boner

    Joined:
    Nov 19, 2001
    Messages:
    1,208
    Likes Received:
    0

    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)
     
  9. ecale3

    ecale3 Sniper - May be harmful to your health.

    Joined:
    Jul 13, 2001
    Messages:
    1,725
    Likes Received:
    0
    Maybe GD should use this instead of the no scopes muttie *hint hint*
     
  10. Vega-don

    Vega-don arreté pour detention de tomate prohibée

    Joined:
    Mar 17, 2003
    Messages:
    1,904
    Likes Received:
    0
    M16 vs FAMAS only for kandahar, let the people free for the other maps
     
  11. ecale3

    ecale3 Sniper - May be harmful to your health.

    Joined:
    Jul 13, 2001
    Messages:
    1,725
    Likes Received:
    0
    For Kandahar i would say one SR per side and one Acog per side.
     
  12. Crowze

    Crowze Bird Brain

    Joined:
    Feb 6, 2002
    Messages:
    3,556
    Likes Received:
    1
    Can't do that... yet.
     
  13. Beppo

    Beppo Infiltration Lead-Programmer

    Joined:
    Jul 29, 1999
    Messages:
    2,284
    Likes Received:
    1
    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.
     
  14. keihaswarrior

    keihaswarrior New Member

    Joined:
    Jan 7, 2003
    Messages:
    1,376
    Likes Received:
    0
    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.
     
  15. Crowze

    Crowze Bird Brain

    Joined:
    Feb 6, 2002
    Messages:
    3,556
    Likes Received:
    1
    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).
     
  16. MightyTuX[JgKdo]

    MightyTuX[JgKdo] New Member

    Joined:
    Jan 21, 2003
    Messages:
    30
    Likes Received:
    0
    *diggin in old threads*

    would be cool in Clanwars to limit the total Bulk of each team ;)
     
  17. Crowze

    Crowze Bird Brain

    Joined:
    Feb 6, 2002
    Messages:
    3,556
    Likes Received:
    1
    Not quite sure how that would work... would it just remove all items over that bulk? That could leave some people without any equipment at all.
     
  18. MightyTuX[JgKdo]

    MightyTuX[JgKdo] New Member

    Joined:
    Jan 21, 2003
    Messages:
    30
    Likes Received:
    0
    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.
     
  19. Harper [Jgkdo]

    Harper [Jgkdo] New Member

    Joined:
    Feb 8, 2004
    Messages:
    154
    Likes Received:
    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: Nov 25, 2004
  20. Turin_Turambar

    Turin_Turambar Pls don´t shoot to the Asha´man

    Joined:
    Oct 9, 2002
    Messages:
    339
    Likes Received:
    0
    TigerhuntII should be excellent with only 1 SR per team.... :O
     

Share This Page