Announcement

Collapse
No announcement yet.

Anti ForceDefault Character Mutator {need Help }

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Anti ForceDefault Character Mutator {need Help }

    Hello, I have been working on this special mutator, but I hit the wall

    Here is the code:

    Code:
    class MutDSMOD extends Mutator;	
    
    var globalconfig bool bForceDefaultCharacter;
    
    function float GetHeadScaleFor(Pawn P)
    {
    	return FClamp(7.0, 0.5, 4.0);	
    }
    
    simulated function bool ForceDefaultCharacter()
    {
    	if (class'DeathMatch'.default.bForceDefaultCharacter)
    		return true;
    }
    
    function ModifyPlayer(Pawn Other)
    {
        if (other.Controller.IsA('PlayerController'))
        {
    	  if ( ForceDefaultCharacter() )
              {
                     Other.SetHeadScale(GetHeadScaleFor(Other));
                     class'DeathMatch'.default.bForceDefaultCharacter = False;
              }
    
        }
    
        if ( NextMutator != None )
    	  NextMutator.ModifyPlayer(Other);
    }
    
    defaultproperties
    {
        GroupName="DSMOD"
        FriendlyName="DSMOD"
        Description="Disable Default Skins."
        bAddToServerPackages=True
    }
    And this is what I want the mutator to do:

    1) Disable bForceDefaultCharacter client side .

    It works only when I ust the mutator on client,
    but It wont work on dedicated server [ replication
    Issues.

    2) Make the player using bForceDefaultCharacter Head Big

    Also not working on dedicated server( only client ), and it reset when player dies
    (after class'DeathMatch'.default.bForceDefaultCharacter = False; )

    I want to Make bForceDefaultCharacter= false, but this reset
    ForceDefaultCharacter() after player dies, I need to find the
    way to keep player head big after ForceDefaultCharacter() is set
    to false by the mutator.

    With Help I will be able to release this mutator for others to use, thanks.

    #2
    I got the mutator working 100% client side, but I cant get it to work on dedicated server.

    Here is the code:

    Code:
    class MutDSMOD extends Mutator;	
    
    var byte DS;
    
    replication
    {
    	reliable if (Role == Role_Authority)
                    DS,bForceDefaultCharacter;
    }
    
    event PreBeginPlay()
    {
    	if (class'DeathMatch'.default.bForceDefaultCharacter)
            {
                    DS = 1;
            }
            Super.PreBeginPlay();
    }
    
    function bool bForceDefaultCharacter()
    {
    	if (class'DeathMatch'.default.bForceDefaultCharacter)
                    return true;
    }
    
    function float GetHeadScaleFor(Pawn P)
    {
    	return FClamp(7.0, 0.5, 4.0);	
    }
    
    function ModifyPlayer(Pawn Other)
    {
        if (other.Controller.IsA('PlayerController'))
        {
    	  if ( bForceDefaultCharacter())
              {
                     class'DeathMatch'.default.bForceDefaultCharacter = False;
              }
              If ( DS > 0)
              {
                         Other.SetHeadScale(GetHeadScaleFor(Other));
              }
        }
        Super.ModifyPlayer(Other);
    
        if ( NextMutator != None )
    	  NextMutator.ModifyPlayer(Other);
    }
    
    defaultproperties
    {
         bAddToServerPackages=True
         GroupName="DSMOD"
         FriendlyName="DSMOD"
         Description="Disable Default Skins."
    }
    Does anyone know what I need to do to fix my replication issues?


    Code Edited

    Comment


      #3
      Do some logging, are all the functions called both sides?

      Comment


        #4
        Try making the functions or just the functions that change settings simulated and maybe use a 'Role' check to only change it for only clientside

        Comment


          #5
          Can you guys give me an example?

          Comment


            #6
            OK so if I understand correctly....


            If yuou choose to force model, the game makes your head bigger For everyone esle?

            Comment


              #7
              And if you sticka log statement in each fo the three funciotns, you can figure out which ones are being called both side and then we can see where the replication issues arise...

              My guess is that the entire mutator is only running server side, in whichh case you need to change it's replication.

              Comment


                #8
                If you choose to force model, the game makes your head bigger For everyone esle?
                no, only for the player with bForceDefaultCharacter=True, I know I
                still have a long way to go, I need to extend to the actor class And
                make the nesesary modifications.




                And if you sticka log statement in each fo the three funciotns,
                you can figure out which ones are being called both side and then we
                can see where the replication issues arise...

                Never done that, I still learning :noob:

                Comment


                  #9
                  log("Blahblahblah");



                  Just insert whatever text and then check the server log and game log afterwords to see if it was logged (it will be logged as ScriptLog:blahblahblah)


                  And yeah that's what I meant...

                  if you are penalizing those that force model, are you going to penalize those that purposely choose models that are hard to see/hit?

                  Comment


                    #10
                    if you are penalizing those that force model, are you
                    going to penalize those that purposely choose models that are
                    hard to see/hit?
                    Well, I know this mutator can become a bit controversial. Some
                    people like R&G, some people like Sniper Servers, Some people
                    like Default Skins and Some people like Custom Skins.

                    On my Forums I offer Downloads for all the skins we use on the
                    server, everyone has the chance to download them and use them.

                    Players who "Tweak" the 2004.ini files to force Default Character
                    have an advantage over those players who don't.


                    The Problem is: we dont have the way to know if the
                    player "tweak" his game or not to use Force Default Characters.

                    With this mutator we Will know who use force Default Skins or
                    not, Is the player desition to use or not, If he does we will know.

                    are you going to penalize those that purposely choose
                    models that are hard to see/hit?
                    No, I just want to penalize the ones who purposely choose to
                    Tweak their setings to gain an advantage over other players.

                    With this mutator I can tell them "please set bForceDefaultCharacter
                    to False because is making your head too big

                    Comment


                      #11
                      Originally posted by [PSI]PsySniper

                      No, I just want to penalize the ones who purposely choose to
                      Tweak their setings to gain an advantage over other players.
                      Then that would be players who purposely choose skins/model combinations that are hard to see.

                      ForceModel is a very effective way to prevent players from doing this, and everyoen has access to it. By deactivating it you are forcing people to take the other side of the coin, by making their only chance to be take the smallest/hardest to see skin/model


                      ForceModel is not an ini tweak that makes i so one player has a better chance, it's an ini tweak that prevents other players form doing everything possible to make their own character hard to see, besides those that force model are forced to play with that model, meaning everyone has the same ease of hitting him, as he does of hitting them...

                      Comment


                        #12
                        Hsoolien, the war between R&G and campers continue.....:up:

                        I have a Sniper server, where I encourage players to "hide", Is the way we like to play, other people like R&G and I respect that.

                        I uploaded skins to the server that are more situable for the kind of game we play.

                        Then that would be players who purposely choose
                        skins/model combinations that are hard to see.
                        I choose those skins, thats what people on my server like to
                        have and use, and not only my server, many other camping
                        servers out there.

                        If I wanted to prevent players from using custom skins, that will
                        be a easy task, just delete all the skins from the server will do
                        the trick.

                        But lets not argue about the way people play, that has been
                        done on this forums many many times, and it doesnt belong
                        to the Programming & UnrealScript section.

                        Comment


                          #13
                          As I said int he PM, it's ot about how people play, it's penalizing a legitimite game option. Disable it fine, just don't peanalize it, if you do then you must penalize those that do waht it was made to prevent.

                          Comment


                            #14
                            Ok, A message " Force Default Character Disable " will do.

                            It will be more easy to do a mutator like this :up:

                            Comment

                            Working...
                            X