Results 1 to 16 of 16
  1. #1
    MSgt. Shooter Person
    Join Date
    Mar 2009
    Posts
    61

    Question Weapon Replacement: Invisible Pickup Problem

    I have a problem where the weapon and weapon bases/pickups of my modified weapons become invisible. They only become invisible after a map change. However they appear correctly on an initial server boot and if seamless map change is disabled.

    I'm using a weapon replacement code from this thread:
    http://utforums.epicgames.com/showthread.php?t=601932

    Am I supposed to add something else to my weapon subclass properties, like pickup mesh or something?

    This is an example of my Link Gun.
    Code:
    class MYWeap_LinkGun Extends UTWeap_LinkGun;
    
    DefaultProperties
    {
        Name="MYLinkGun"
        WeaponLinkDistance = 495            
    }
    Code:
     DefaultProperties
    {
       WeaponsToReplace(3)=(OldClassName="UTWeap_LinkGun",NewClassPath="MyMutator.MYWeap_LinkGun")      
        AmmoToReplace(3)=(OldClassName="UTAmmo_LinkGun",NewClassPath="UTGame.UTAmmo_LinkGun")
    }

  2. #2
    MSgt. Shooter Person
    Join Date
    Mar 2009
    Posts
    61

    Default

    bump

    It works properly offline, i just cant find the problem, or is it a bug?

  3. #3
    Iron Guard
    Join Date
    Jan 2008
    Posts
    623

    Default

    I just ran into this exact problem when testing DazJW's new bowgun. I went through my mutators one at a time to see if one might be causing a conflict but none were. What finally fixed the issue was to have the weapons replacement mutator load first. Have no idea why that makes a difference but it did for me.
    .~Assault Rifle Chaos~.
    www.arcclan.com

    |ZARK|[ARC] LowG-Matrix-Relics
    UT3 server IP: 8.12.23.87:7777
    180+ custom maps & many votable gametypes
    DM, TDM, BR, Duel, CTF, VCTF, ONS2.0, WAR, IG-InstaFreeze

  4. #4
    MSgt. Shooter Person
    Join Date
    Mar 2009
    Posts
    61

    Default

    Quote Originally Posted by JD8 View Post
    I just ran into this exact problem when testing DazJW's new bowgun. I went through my mutators one at a time to see if one might be causing a conflict but none were. What finally fixed the issue was to have the weapons replacement mutator load first. Have no idea why that makes a difference but it did for me.
    How do you tell which mutator to load first? From the server command line?

    I feel that there's something that's not loading with seamless map change enabled, because if I were to reconnect to the server, the weapon bases would show up again. It's only invisible to those who were present during the seamless map change (they can still pick them up).
    Last edited by fru; 04-27-2009 at 01:18 PM.

  5. #5
    Iron Guard
    Join Date
    Jan 2008
    Posts
    623

    Default

    Quote Originally Posted by fru View Post
    How do you tell which mutator to load first? From the server command line?

    I feel that there's something that's not loading with seamless map change enabled, because if I were to reconnect to the server, the weapon bases would show up again. It's only invisible to those who were present during the seamless map change (they can still pick them up).
    Yes that is the exact same effect I saw yesterday while testing the bowgun. It was driving me nuts and the author of the bowgun was peplexed as well. Yes making the weapons replacement the first mutator on the command line seemed to do the trick though why I have no idea. I'm not a coder so I couldn't even begin to guess but I know it solved the problem for my server.
    .~Assault Rifle Chaos~.
    www.arcclan.com

    |ZARK|[ARC] LowG-Matrix-Relics
    UT3 server IP: 8.12.23.87:7777
    180+ custom maps & many votable gametypes
    DM, TDM, BR, Duel, CTF, VCTF, ONS2.0, WAR, IG-InstaFreeze

  6. #6
    MSgt. Shooter Person
    Join Date
    Mar 2009
    Posts
    61

    Default

    I'd really like a coder's perspective on this.

  7. #7
    Iron Guard
    Join Date
    Oct 2007
    Posts
    537

    Default

    Quote Originally Posted by fru View Post
    Am I supposed to add something else to my weapon subclass properties, like pickup mesh or something?

    This is an example of my Link Gun.
    Code:
    class MYWeap_LinkGun Extends UTWeap_LinkGun;
    
    DefaultProperties
    {
        Name="MYLinkGun"
        WeaponLinkDistance = 495            
    }
    If you are using a custom model, then you'll need to add a first person mesh as well as a pickup mesh.
    Something like: (straight from the linkgun, obviously)
    Code:
    // Weapon SkeletalMesh
    	Begin Object Name=FirstPersonMesh
    		SkeletalMesh=SkeletalMesh'WP_LinkGun.Mesh.SK_WP_Linkgun_1P'
    		AnimSets(0)=AnimSet'WP_LinkGun.Anims.K_WP_LinkGun_1P_Base'
    		Animations=MeshSequenceA
    		Scale=0.9
    		FOV=60.0
    	End Object
    
    	// Pickup staticmesh
    	Begin Object Name=PickupMesh
    		SkeletalMesh=SkeletalMesh'WP_LinkGun.Mesh.SK_WP_LinkGun_3P'
    	End Object
    Where "WP_LinkGun" is your mesh's package name, "Mesh" is the group(to keep the mesh separate from the animations, makes it easier to keep track of), and "SK_WP_Linkgun_1P" is the name of the mesh itself(first person mesh in this case).
    And "SK_WP_LinkGun_3P" is the lower detail/poly third person mesh.
    You may be able to use the same mesh for both 1st and 3rd, but if you had a few weapons and their pickup factories(and lockers), then it would increase the load on the computer.

  8. #8
    MSgt. Shooter Person
    Join Date
    Mar 2009
    Posts
    61

    Default

    Quote Originally Posted by Malachor View Post
    If you are using a custom model, then you'll need to add a first person mesh as well as a pickup mesh.
    I don't use a custom model but I tried that code for my linkgun anyway, and it didn't fix the invis issue.


    Is this weapon replacement code that I borrowed from that thread 100% correct?

    What about the .ini file for this mutator - it doesnt contain any weapon info, just the mutator package info, is that right?
    Code:
    [UTMut_MyMutator UTUIDataProvider_Mutator]
    ClassName=MyMutator.UTMut_MyMutator
    FriendlyName=MyMutator v1
    Description=
    GroupNames=WEAPONMOD
    UIConfigScene=
    bStandaloneOnly=False
    BitValue=0
    bRemoveOn360=False
    bRemoveOnPC=False
    bRemoveOnPS3=False
    This is an example of the main mutator class:
    Code:
    class UTMut_MyMutator extends UTMutator
        config(UTMut_MyMutator);
    
    (weapon replacement code)
    
    DefaultProperties
    {
    //    WeaponsToReplace(0)=(OldClassName="UTWeap_Enforcer",NewClassPath="")        
    //    AmmoToReplace(0)=(OldClassName="UTAmmo_Enforcer",NewClassPath="")
    
        WeaponsToReplace(1)=(OldClassName="UTWeap_BioRifle_Content",NewClassPath="MyMutator.MYWeap_BioRifle")        
    //    AmmoToReplace(1)=(OldClassName="UTAmmo_BioRifle_Content",NewClassPath="UTGameContent.UTAmmo_BioRifle_Content")
    
        WeaponsToReplace(2)=(OldClassName="UTWeap_FlakCannon",NewClassPath="MyMutator.MYWeap_FlakCannon")        
    //    AmmoToReplace(2)=(OldClassName="UTAmmo_FlakCannon",NewClassPath="UTGame.UTAmmo_FlakCannon")
    
        WeaponsToReplace(3)=(OldClassName="UTWeap_LinkGun",NewClassPath="MyMutator.MYWeap_LinkGun")      
    //    AmmoToReplace(3)=(OldClassName="UTAmmo_LinkGun",NewClassPath="UTGame.UTAmmo_LinkGun")
    
        WeaponsToReplace(4)=(OldClassName="UTWeap_Redeemer_Content",NewClassPath="UTGame.UTWeap_RocketLauncher")
    
    //   WeaponsToReplace(5)=(OldClassName="UTWeap_RocketLauncher",NewClassPath="")     
    //   AmmoToReplace(5)=(OldClassName="UTAmmo_RocketLauncher",NewClassPath="")
    
    //   WeaponsToReplace(6)=(OldClassName="UTWeap_ShockRifle",NewClassPath="")     
    //   AmmoToReplace(6)=(OldClassName="UTAmmo_ShockRifle",NewClassPath="")
    
        WeaponsToReplace(7)=(OldClassName="UTWeap_SniperRifle",NewClassPath="MyMutator.MYWeap_SniperRifle")       
    //    AmmoToReplace(7)=(OldClassName="UTAmmo_SniperRifle",NewClassPath="UTGame.UTAmmo_SniperRifle")
    
    //   WeaponsToReplace(8)=(OldClassName="UTWeap_Stinger",NewClassPath="")        
    //   AmmoToReplace(8)=(OldClassName="UTAmmo_Stinger",NewClassPath="")
    
        GroupNames(0)="WEAPONMOD"
        Name="MyMutator"
    }
    The replaced Redeemer by Rocket Launcher is the only one that seems to show fine after a 'seamless travel' map change, the others are still invisible.

    Disabling the seamless travel feature fixes it, but it seems buggy and often kicks all players off the server during a map change, which is not what I want seeing it's bad enough getting players on a public server in the first place :/

    Server logs don't show any related error's nor does my own logs, which is strange.

  9. #9
    MSgt. Shooter Person
    Join Date
    Jan 2009
    Posts
    153

    Default

    Here is the code I used
    Code:
    Class UTWeap_Musket extends UTWeap_LinkGun;
          
    defaultproperties
    {
     FireInterval(0)=+8.00
     WeaponRange=4800
    
    Begin Object Name=FirstPersonMesh ObjName=FirstPersonMesh
          FOV=70.000000
          SkeletalMesh=SkeletalMesh'WP_CivilWar_Musket.Mesh.WP_Musket'
    
          AnimSets(0)=AnimSet'WP_LinkGun.Anims.K_WP_LinkGun_1P_Base'
    End Object
    
    Begin Object Name=PickupMesh
    		SkeletalMesh=SkeletalMesh'WP_CivilWar_Musket.Mesh.WP_Musket'
    	End Object
    
    	PlayerViewOffset=(X=0.0,Y=0.0,Z=0.0)
    	SmallWeaponsOffset=(X=0.0,Y=0.0,Z=0.0)
    	FireOffset=(X=0,Y=0,Z=0)
    
    	AmmoCount=8
    	LockerAmmoCount=8
    	MaxAmmoCount=8
    
    WeaponFireTypes(0)=EWFT_Projectile
    WeaponProjectiles(0)=class'UTProj_MusketBall'
    
    Name="Default__UTWeap_Musket"
    }
    Code:
    Class UTProj_MusketBall extends UTProj_FlakShard;
    
    defaultproperties
    {
    	MyDamageType=class'UTDmgType_MusketBall'
    	Begin Object Class=StaticMeshComponent Name=ProjectileMesh
    		StaticMesh=StaticMesh'WP_Redeemer.Mesh.S_WP_Redeemer_Missile_Open'
    		CullDistance=12000
    		CollideActors=false
    		CastShadow=false
    		bAcceptsLights=false
    		BlockRigidBody=false
    		BlockActors=false
    		bUseAsOccluder=FALSE
    	End Object
    	Components.Add(ProjectileMesh)
    	
    	Speed=2000
    	MaxSpeed=5000
    	AccelRate=3000.0
    
    	Damage=50
    	DamageRadius=0
    	MomentumTransfer=30
    	CheckRadius=24.0
    }
    and

    Code:
    class UTDmgType_MusketBall extends UTDamageType;
    	
    
    defaultproperties
    {
    	RewardCount=10
    	RewardEvent=REWARD_Musketeer!!
    	RewardAnnouncementSwitch=1
    	KillStatsName=KILLS_Musket
    	DeathStatsName=DEATHS_Musket
    	SuicideStatsName=SUICIDES_Musket
    	DamageWeaponClass=class'UTWeap_Musket'
    	DamageWeaponFireMode=0
    	KDamageImpulse=600
    	VehicleMomentumScaling=0.65
    	VehicleDamageScaling=0.8
    	bBulletHit=True
    	GibThreshold=-15
    	MinAccumulateDamageThreshold=55
    	AlwaysGibDamageThreshold=80
    	CustomTauntIndex=6
    }
    I put them all in the mygames/unreal tournament 3/UTGame/Src/FirstMutator/Classes... folder and I named them UTWeap_Musket, UTProj_MusketBall, and UTDmgType_MusketBall then I made a .upk and put that in my unpublished folder. This is what has worked for me

  10. #10
    Iron Guard
    Join Date
    Oct 2007
    Posts
    537

    Default

    fru are you not replacing all of epic's weapons?
    If you aren't then try changing the numbers of the weapons you've got in defaultproperties like this:
    Code:
    class UTMut_MyMutator extends UTMutator
        config(UTMut_MyMutator);
    
    (weapon replacement code)
    
    DefaultProperties
    {
        WeaponsToReplace(0)=(OldClassName="UTWeap_BioRifle_Content",NewClassPath="MyMutator.MYWeap_BioRifle")        
    
        WeaponsToReplace(1)=(OldClassName="UTWeap_FlakCannon",NewClassPath="MyMutator.MYWeap_FlakCannon")        
    
        WeaponsToReplace(2)=(OldClassName="UTWeap_LinkGun",NewClassPath="MyMutator.MYWeap_LinkGun")      
    
        WeaponsToReplace(3)=(OldClassName="UTWeap_Redeemer_Content",NewClassPath="UTGame.UTWeap_RocketLauncher")
    
        WeaponsToReplace(4)=(OldClassName="UTWeap_SniperRifle",NewClassPath="MyMutator.MYWeap_SniperRifle")       
    
        GroupNames(0)="WEAPONMOD"
        Name="MyMutator"
    }
    Hang on, you said that the rocket launcher is being replaced properly, just not the ones you've modded?
    Have you tried them in a botmatch?

    Are you getting any log errors?

  11. #11
    MSgt. Shooter Person
    Join Date
    Mar 2009
    Posts
    61

    Default

    Quote Originally Posted by Malachor View Post
    fru are you not replacing all of epic's weapons?
    If you aren't then try changing the numbers of the weapons you've got in defaultproperties like this:
    <Code>
    I assumed those numbers referred to a specific weapon, but I tried your idea and it didn't fix the problem.

    Hang on, you said that the rocket launcher is being replaced properly, just not the ones you've modded?
    Have you tried them in a botmatch?
    Yeah, the rocket launcher replaces the redeemer properly in all circumstances. The modified weapons show properly offline yes.

    Are you getting any log errors?
    That's the problem, I can't see any errors or any sign of any issues on both the server logs or my own, online and offline.


    Basically it's like this:
    (Running ONLY my mutator)
    If I load the mutator on a server - (initially) all modified weapons will show properly.
    If seamless travel is enabled (default), and I vote to change map - all modified weapons will not appear but still able to pickup.
    If I reconnect to the server - all modified weapons will appear correctly.
    If seamless travel is disabled - all modified weapons will appear correctly after a map change - but disabling seamless travel often kicks people off the server.


    My server is Windows based, build 3797 with WebAdmin enabled. The same problem was reported to me by another user on his own server.

  12. #12
    Iron Guard
    Join Date
    Oct 2007
    Posts
    537

    Default

    Have you tried with Epic's own weapon replacement mutator?

  13. #13
    MSgt. Shooter Person
    Join Date
    Mar 2009
    Posts
    61

    Default

    Quote Originally Posted by Malachor View Post
    Have you tried with Epic's own weapon replacement mutator?
    OK, well I've blocked out all of the weapon replacement code and added this to UTGame.ini (server) for the weapon replacement mutator:
    Code:
    [UTGame.UTMutator_WeaponReplacement]
    WeaponsToReplace=(OldClassName="UTWeap_Redeemer_Content",NewClassPath="UTGame.UTWeap_RocketLauncher")
    WeaponsToReplace=(OldClassName="UTWeap_BioRifle_Content",NewClassPath="MyMutator.MYWeap_BioRifle")
    WeaponsToReplace=(OldClassName="UTWeap_FlakCannon",NewClassPath="MyMutator.MYWeap_FlakCannon")
    WeaponsToReplace=(OldClassName="UTWeap_LinkGun",NewClassPath="MyMutator.MYWeap_LinkGun")
    WeaponsToReplace=(OldClassName="UTWeap_SniperRifle",NewClassPath="MyMutator.MYWeap_SniperRifle")
    Had a go on my server (with my mutator and Weapon Replacement Mutator) and exactly the same thing happens as I've stated at the end of my previous post.

  14. #14
    MSgt. Shooter Person
    Join Date
    Mar 2009
    Posts
    61

    Default

    OK, well I've tried renaming the modified weapons like this: UTWeap_MyLinkGun, which didn't help. Although it did add the weapon info into the config ini where I've also included mesh classes etc, which also didn't fix the issue.

    I had a go with Patch v2.1, but I still have the same invis issue, but it has fixed the kicking of players when seamless-travel is disabled. I'm still left with a mutator that will have problems for the public users who keep seamless-travel enabled..

    Are the weapon classes info stored somewhere? How does it deal with new versions of the same mutator with the same naming scheme for modified weapons?

  15. #15
    MSgt. Shooter Person
    Join Date
    Sep 2006
    Posts
    415

    Default

    Interesting enough,
    I made that original post about the weapon replacement.
    As it states It should be identical to EPIC's own.
    I've only added in defaults you can add.

    The only respect with "[1]" numbers is the amount of weapons being replaced

    I've haven't been up to speed for awhile, All I can suggest is 2 things.

    - double check the weapons replacement code in the new patch code as
    this code was from a previous patch.

    or

    to try a different type of replacement and see if the problem still persists.

    Also, to note new versions of the same mutator
    and naming scheme has an slight chance to give an weird effect.
    oddly enough a new ini version of ... (what was it again?) weapons.ini or input.ini could cure.
    it depends actually on what your adding to the weapon.
    I have actually seen strange anomalies in a sniper scope
    through many updates that gave an moving zoom scope.
    After renewing All the .ini files and getting new ones this was removed without changing the code.
    So slight but possible chance.

  16. #16
    MSgt. Shooter Person
    Join Date
    Mar 2009
    Posts
    61

    Default

    I'll have a go with some fresh ini's...
    Last edited by fru; 05-14-2009 at 09:37 PM.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.