Mappers' Corner Mappers and Modders

Go Back   Omnip)o(tentS Forums > SERVERS > Mappers' Corner
Reply
 
Thread Tools Display Modes
Old 07-09-2016, 05:37 PM   #1
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,243
Default Modifying the Assault Rifle
Reply With Quote


Anyone know where in the code is located what makes a player spawn with the Assault Rifle? Can that be changed in just one map without changing it on the entire server?

The reason I ask is because I've been playing with creating a map that has no stock weapons. It just has that stuff that Turbo and Lag like to put in maps like the NoSkilz stuff, StrafeRaker, and SSR. I want to start off with only a modified Assault Rifle. I've been working on it to make it a better weapon but I'm running into several snags. First is that I would like it to always be duel-wield. Second is that I don't want the players to spawn with the normal Assault Rifle.

Any advice would be great. Thanks.
Binger is offline  
Old 07-10-2016, 12:51 PM   #2
Miauz55555
I'm a cute Cat.
 
Miauz55555's Avatar
 
Join Date: Apr 2016
Posts: 138
Default
Reply With Quote


Interesting. I like this Translocator-Shock thing from Grit-Night inside the pyramide.

Well I can't help you with a good answere at this time. But I try to help you so that you may find the way, or someone who can help you more.

  1. The Balistic weapon-mutator from RuneStone makes nearly the same.
  2. Maybe in some of the xGame-files from the default gametype. But I would not modify that.
  3. Can you put a serveractor like thing inside a map which is just active for the map?
  4. I somewere read a nearly similar thing what Crusha was intend to do... at least I think that.. But I can't find the post and worse comes last I don't know were I read it.. the chances are very high that it was on a german site. When your german is not so good it makes no sense to search for it. Sorry the last point is really not helpfull.
Miauz55555 is offline  
Old 07-10-2016, 02:25 PM   #3
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,243
Default
Reply With Quote


Quote:
Originally Posted by Miauz55555 View Post
Interesting. I like this Translocator-Shock thing from Grit-Night inside the pyramide.
I actually find those weapons very disruptive and annoying when mixed in with regular Onslaught stuff. My goal is to find a way to use them so that I don't find them disruptive and annoying.

Quote:
Originally Posted by Miauz55555 View Post
Well I can't help you with a good answere at this time. But I try to help you so that you may find the way, or someone who can help you more.
Wormbo, Kamek, and Crusha are the only ones that I can think of that might know the answers. I'm pretty sure Kamek and Crusha don't come around anymore.

Quote:
Originally Posted by Miauz55555 View Post
  1. The Balistic weapon-mutator from RuneStone makes nearly the same.
  2. Maybe in some of the xGame-files from the default gametype. But I would not modify that.
  3. Can you put a serveractor like thing inside a map which is just active for the map?
  4. I somewere read a nearly similar thing what Crusha was intend to do... at least I think that.. But I can't find the post and worse comes last I don't know were I read it.. the chances are very high that it was on a german site. When your german is not so good it makes no sense to search for it. Sorry the last point is really not helpfull.
1. I haven't ever tried that. I'll look into it.
2. Yeah, I'm thinking it's pretty far up the hierarchy and is something I won't be able to change.
3. That's what I would have to do, I'm guessing. Probably not going to happen although I think it's possible.
4. Thanks for looking. I don't know German at all so it wouldn't help anyway.

I'm pretty sure I'm not going to be able to make it work. I wanted the modified duel-wield assault rifle to be the main weapon in the map. All other weapons would be pickups found away from nodes. If I can't prevent players from spawning with the normal assault rifle it won't work. They would have to use the scroll wheel to change weapons to know it's there since no one ever presses the key bound to the assault rifle (hmm, I could put it in another group . I didn't even consider that until just now).

I've barely started working on it. I guess I need to think about it some more. Right now I'm having trouble with the accuracy. It gets really (and I mean REALLY) bad when you hold down the trigger. The time on that is way too short. The spread doesn't change that. It's something else and I can't find it.
Binger is offline  
Old 07-10-2016, 03:23 PM   #4
Miauz55555
I'm a cute Cat.
 
Miauz55555's Avatar
 
Join Date: Apr 2016
Posts: 138
Default
Reply With Quote


I like that gun only on that map because you have to do this litle jumpthing.. and mostly I was the only one who has it. .. And this "I will end the map in 10s" OMFG-gun.

ONS-MasterShower, graple-gun.
Miauz55555 is offline  
Old 07-11-2016, 12:43 AM   #5
Lagzilla
Getting there...
 
Join Date: Jan 2011
Location: Chicago
Posts: 760
Default
Reply With Quote


Does this help?

https://forums.epicgames.com/archive.../t-583460.html
Lagzilla is offline  
Old 07-11-2016, 09:36 AM   #6
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,243
Default
Reply With Quote


Quote:
Originally Posted by Lagzilla View Post
Thanks Lag. I've just scanned it so far but it looks promising.
Binger is offline  
Old 08-05-2016, 10:44 PM   #7
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,243
Default
Reply With Quote


So when trying to import the texture for the Assault Rifle into Gimp I get this...



Any ideas? I had no problems with the Goliath texture but it was DXT1 and this is DXT5. That's the only difference I can see in the two.
Binger is offline  
Old 08-06-2016, 01:14 AM   #8
$m39m4
Just Registered
 
Join Date: Aug 2016
Posts: 56
Default
Reply With Quote


http://www.fsdeveloper.com/wiki/inde...sion_explained

From my understanding is that DXT5 contains alpha information, which makes the texture look that way. That's about as much as I can contribute.
$m39m4 is offline  
Old 08-06-2016, 01:27 AM   #9
Wormbo
Wormlike
 
Wormbo's Avatar
 
Join Date: Dec 2009
Posts: 907
Default
Reply With Quote


The alpha information on many weapon textures is used as specularity mask. You will need an editor that can ignore the alpha channel (which is explicitly not transparency here) to properly modify it.
Wormbo is offline  
Old 08-06-2016, 02:35 AM   #10
Lagzilla
Getting there...
 
Join Date: Jan 2011
Location: Chicago
Posts: 760
Default
Reply With Quote


I get the same. The first time it opens it looks like this. If you remove the alpha layer it is a whited out mess.

When I open it the second time in the same session, DDS image throws an error:
"Unknown pixel format! Taking a guess, expect trouble!"

I did have some luck using The Compressonator (Yeah, that's really its name...) software to re-compress and save it. I was also able to get it back into UED when done. You can get it here.

Here is the file that you should be able to open in GIMP: AssaultTex0.dds

Good luck!!

Andrew
Lagzilla is offline  
Old 08-06-2016, 02:39 AM   #11
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,243
Default
Reply With Quote


Quote:
Originally Posted by $m39m4 View Post
http://www.fsdeveloper.com/wiki/inde...sion_explained

From my understanding is that DXT5 contains alpha information, which makes the texture look that way. That's about as much as I can contribute.
Yeah, I already read the wiki about DXT but thanks.

Quote:
Originally Posted by Wormbo View Post
The alpha information on many weapon textures is used as specularity mask. You will need an editor that can ignore the alpha channel (which is explicitly not transparency here) to properly modify it.
So is that not possible with Gimp? I've been searching the internet and I can't find any solid answers. Removing the alpha channel mucks it up "transparency is replaced with the background color of the Toolbox".

Funny thing. Now when I load those same files in Gimp the checkerboard is gone but the image is very dark. I've been playing with Gimp for like an hour and I can't get it to look right. I can get it better by playing with the transparency but it's still too dark. I'm getting it close using the Curves tool as explained here but it's still not quite right. Maybe good enough though. I don't know how I got the checkerboard to go away since I didn't actually save any changes to those files but I'm going with it.

http://graphicdesign.stackexchange.c...ing-it-in-gimp
Binger is offline  
Old 08-06-2016, 02:50 AM   #12
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,243
Default
Reply With Quote


Quote:
Originally Posted by Lagzilla View Post
I get the same. The first time it opens it looks like this. If you remove the alpha layer it is a whited out mess.

When I open it the second time in the same session, DDS image throws an error:
"Unknown pixel format! Taking a guess, expect trouble!"

I did have some luck using The Compressonator (Yeah, that's really its name...) software to re-compress and save it. I was also able to get it back into UED when done. You can get it here.

Here is the file that you should be able to open in GIMP: AssaultTex0.dds

Good luck!!

Andrew
I was writing my post and working in Gimp at the same time when you posted this. I got it to work right with the Curves tool but thanks, man. I'm gonna download your edit as a backup.

This is what I was going to try next but it's a very old post...

http://www.eqinterface.com/forums/sh...ad.php?t=18954

Weird how we are getting different things happening when opening the files. I still don't know how I got the checkerboard to go away.
Binger is offline  
Old 08-06-2016, 03:20 AM   #13
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,243
Default
Reply With Quote


Getting there. I just wanted to black it out some. This only took a couple of minutes with bucket fill, just as a test.

Old:


New:
Binger is offline  
Old 08-06-2016, 03:53 AM   #14
Lagzilla
Getting there...
 
Join Date: Jan 2011
Location: Chicago
Posts: 760
Default
Reply With Quote


Nice!!
Lagzilla is offline  
Old 08-06-2016, 04:43 PM   #15
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,243
Default
Reply With Quote


Quote:
Originally Posted by Lagzilla View Post
"Unknown pixel format! Taking a guess, expect trouble!"
I got that same message when I was editing the Goliath skin. Made me laugh. I forget what I was loading. Maybe the skin for the Ballista.

I remember now what I did to get rid of the checkerboard. Someone on the Gimp forums pointed out something that I had forgotten that I'd done. Setting the Check Style to Black under Edit->Preferences->Display->Transparency. I then edited the alpha channel using the Curve tool. I'm a little worried that may cause some issues when it's used back in the game so I checked out your edit and it still has the alpha channel (set to white) and some weird stuff going on with the mipmaps, which I don't understand. Oh well.
Binger is offline  
Old 08-07-2016, 01:27 AM   #16
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,243
Default
Reply With Quote


Quote:
Originally Posted by Lagzilla View Post
So now that I've got a working version of a modified assault rifle I've been playing with trying to get the players to only spawn with that gun and nothing else. I found the Actor to place in the map that lets you add a mutator. I like the idea of using the Required Weapons approach but I can't get it to work. I haven't given up yet and I haven't tried the other methods. If anyone has any advice here is all the bits of code from that page and some of the comments...

Code:
//https://forums.epicgames.com/threads/583460-Remove-Weapons-from-players?

=====================================================

class YourMutator extends Mutator;

function ModifyPlayer(Pawn Other)
{
    
    Pawn.Weapon.Destroy();
    
    if ( NextMutator != None )
        NextMutator.ModifyPlayer(Other);

}


=================================================

//if you wanted to change it.

class YourMutator extends Mutator;

function class<Weapon> MyDefaultWeapon()
{
    if ( (DefaultWeapon == None) && (DefaultWeaponName != "") )
        DefaultWeapon = class<Weapon>(DynamicLoadObject(DefaultWeaponName, class'Class'));

    return DefaultWeapon;
}

//...and change "return DefaultWeapon;" to "return;"
//that should start you with no weapon
//or you can change DefaultWeaponName to whatever weapon you want to start with

==================================================

//This will start you with no weapon. But if you scroll on the mouse to change weapons it WILL flip to your shield gun, as the player still spawns with that. If you also need that removed... let me know.

class NoWeaponMut extends Mutator;

function ModifyPlayer(Pawn Other)
{

    Other.Weapon.Destroy();

    if ( NextMutator != None )
        NextMutator.ModifyPlayer(Other);

}

=================================================

class NoWeaponMut extends Mutator;

function ModifyPlayer(Pawn Other)
{
    local Weapon W;

    foreach DynamicActors(class'Weapon', W)
    {
        If (W.Owner == Other)
        {
            W.Destroy();
        }
    }

    if ( NextMutator != None )
        NextMutator.ModifyPlayer(Other);

}

//This starts the player with nothing... no translocator, no shield gun, and no assault rifle.
//this will cause tons of errors in your log file because the bots also spawn with no weapons. They stop once all the bots find a weapon. something with Bot.WhatToDoNext()

====================================================

//So... any chance there's a way to make it so when you select the level, the mutator is turned on automatically?

//that would require an embedded mutator... which i think involves editing the actual map.

//the action is like. InfoGameRules or something like that, i can never remember the correct name

//You have to place a level properties actor for that, then you can add the embedded mutilators, make sure that you load up the .u file in unrealed before you try and add an embedded mutilators


====================================================

//You can prevent players from spawning with certain equipment in an even better way.
//In xPawn, this is in the default properties:

RequiredEquipment(0)="XWeapons.AssaultRifle"
RequiredEquipment(1)="XWeapons.ShieldGun"
   
//By simply setting both these default entries to "" in your Mutator's PostBeginPlay(), you'll prevent any player from spawning with any weapon.
//Since this code is only executed once (as opposed to running every time a pawn is spawned), it's much more efficient.
//However, you should not do that if you want a player to spawn with the default weapons at some point during your game anyway.

//that could also be used to spawn players with additional weapons as well since RequiredEquipment is a 16 element array. make it interesting and add "RequiredEquipment(2)="XWeapons.Redeemer"

======================================================

//You can also try this

class MutNoWeaponStuff extends Mutator;

function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
{
    
    bSuperRelevant = 0;
    if ( xPawn(Other) != None )
    {
        xPawn(Other).RequiredEquipment[0] = AssaultRifleB.AssaultRifleB;
            xPawn(Other).RequiredEquipment[1] = none;
    }
    return true;
}

//Dunno if this exact code will work, but I've done xPawn(Other).RequiredEquipment[0] = "DragonAssaultRifle.DragonAssaultRifle"; and it works just fine. Look up the phrase "RequiredEquipment" to see how it's used.
Binger is offline  
Old 08-07-2016, 05:13 PM   #17
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,243
Default
Reply With Quote


Lag, that texture you did is the wrong Assault Rifle. lol. I think it's from UT2003.

Binger is offline  
Old 08-09-2016, 02:02 AM   #18
Anonymous[Lolz]
Getting there...
 
Anonymous[Lolz]'s Avatar
 
Join Date: Feb 2009
Location: New York State
Posts: 868
Default
Reply With Quote


I can't code for shit, but I can help you with a mutator that can control what players spawn with.

Download LevelConfigManager, extract it, load it in the actor class browser, then find the actor in the list. It should be under Info. Once you've found it, place it in your map and open the properties window and set the desired weapon as the spawning weapon. The catch is that the gun has to be a mutator and LCA does not allow you to manually enter the object.class. However, you can copy the assaultrifle code from XWeapons and simply change the texture from there to your desired one and compile it, of course with a different package name.



fotoshop skeelz

https://www.mediafire.com/?gctl6rx3gakmhcw
Here's a link to the 2k4 assault rifle texture. It's a zip because I think MediaFire compresses images.

Again, another example.

Last edited by Anonymous[Lolz]; 08-09-2016 at 01:53 PM..
Anonymous[Lolz] is offline  
Old 08-09-2016, 03:55 PM   #19
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,243
Default
Reply With Quote


Cool, thanks Anon. I'll see if I can get that ConfigManger to work.

I was trying to keep some of the lighter bits like the barrel but I think I like your version better.

I already got the 2k4 skin to work (sort of, more on that later) but thanks for the d/l. I got it. I'll check it out.

I've got the code for a modified assault rifle pretty well changed to the way I want it. I need to test it though. Changing the skin is just an extra. The goal was to make the Rifle for effective. I found the bit that makes it less accurate when holding down the button. I just deleted it so now it's %100 accurate. I may add that code back in and just up the time and maybe lower the spread but I want to test what I got first.

This stuff with the 2k3 assault rifle has we wondering how that's going to affect my version. I wonder where that's at in the code.
Binger is offline  
Old 08-10-2016, 12:28 PM   #20
Anonymous[Lolz]
Getting there...
 
Anonymous[Lolz]'s Avatar
 
Join Date: Feb 2009
Location: New York State
Posts: 868
Default
Reply With Quote


They're separate models that use the same code.

If you want to force them to use the new (or old) model, just replace these parameters in AssaultRifle.uc with the ones you want: (Disclaimer: I'm not entirely too sure about this, but I believe it should be correct so long as you do not overwrite the stock files. In that case, search for the misplaced file on a redirect as people always seem to upload the stock files.)
Code:
Mesh=SkeletalMesh'NewWeapons2004.AssaultRifle'
PickupClass=class'AssaultRiflePickup'

OldMesh=SkeletalMesh'Weapons.AssaultRifle_1st'
OldPickup="WeaponStaticMesh.AssaultRiflePickup"
However, I'll assume you want to force the new AR, and NewWeapons2004 is the animation that the stock AR uses. Go to your animations folder and create a duplicate of NewWeapons2004 with your new name to prevent any mismatches. Go to the animations tab in unreal ed and select the skin dropdown. Find both of the AR animations and replace the old texture with your new one (which is also renamed).

Code:
StaticMesh=StaticMesh'NewWeaponPickups.AssaultPickupSM'
For this part here, put the AR mesh into a map, right click on it and create a new static mesh. Name it whatever you want, and save it. Find it in that static meshes tab and change the material to your new texture.

How's this? http://i.imgur.com/wdbvxvs.png

Further reading:
https://wiki.beyondunreal.com/Legacy...tator_Tutorial
https://wiki.beyondunreal.com/Legacy...New_Weapontype
A good tool for exploring UT2004 packages is UEExplorer. It shows code, textures, etc. and allows you to export the files.

Last edited by Anonymous[Lolz]; 08-10-2016 at 01:09 PM..
Anonymous[Lolz] is offline  
Reply


Go Back   Omnip)o(tentS Forums > SERVERS > Mappers' Corner

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying Vehicles Binger Mappers' Corner 92 07-22-2016 04:25 PM
BATFE banning popular rifle ammo Schadenfreude Off Topic 5 02-23-2015 01:43 AM
NTW 20 Anti-Material Rifle XI Off Topic 6 07-10-2008 05:20 PM
Super Shock Rifle Kain Lightfoot Mappers' Corner 4 04-28-2007 08:15 PM
Insta-gib shock rifle N1ghtmare Onslaught 37 02-21-2007 03:35 PM


All times are GMT -5. The time now is 12:38 AM.