Mappers' Corner Mappers and Modders

Go Back   Omnip)o(tentS Forums > SERVERS > Mappers' Corner
Reply
 
Thread Tools Display Modes
Old 08-11-2016, 06:29 PM   #21
Binger
.

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


Quote:
Originally Posted by Anonymous[Lolz] View Post
They're separate models that use the same code.
Okay so maybe I've been smoking too much weed lately but I should have made the connection between the "OldMesh" and "OldPickup" bits in the code and the option to use the alternative model for some guns. Oops. I've seen those lines many times and even wondered what they were for but that was before Miauz and Colbye answered my question and educated me about the option to use the alternative model.

Quote:
Originally Posted by Anonymous[Lolz] View Post
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.
I think I follow you here but can't I just remove the "Old" lines from the code then add in a line for "skin" in the default properties of the pickup class? I'm not using any stock files. I copied and renamed all the files that I think were part of the AR package and created a new package. It's not an extension of the AR. It should be extending the class above that. "Weapon" maybe?

Quote:
Originally Posted by Anonymous[Lolz] View Post
That looks great.

Quote:
Originally Posted by Anonymous[Lolz] View Post
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.
Awesome, thanks. I downloaded the UEExplorer but I haven't tried it yet.
Binger is offline  
Old 08-12-2016, 12:14 PM   #22
Anonymous[Lolz]
Getting there...
 
Anonymous[Lolz]'s Avatar
 
Join Date: Feb 2009
Location: New York State
Posts: 859
Default
Reply With Quote


Quote:
Originally Posted by Binger View Post
I think I follow you here but can't I just remove the "Old" lines from the code then add in a line for "skin" in the default properties of the pickup class? I'm not using any stock files. I copied and renamed all the files that I think were part of the AR package and created a new package. It's not an extension of the AR. It should be extending the class above that. "Weapon" maybe?
Likely yes. I looked at the code in the Mayhem assault rifle as an example and it is achieved using
Code:
Skins(0)=Texture'newar'
in MayhemAssaultAttachment, MayhemAssaultRifle, MayhemAssaultRiflePickup. I'm not sure if they had to change the material in the meshes or animations.

Quote:
Originally Posted by Binger View Post
That looks great.
Thanks, here's a link with the texture and the HUD icon as well.
In AssaultRifle:
Code:
IconMaterial=Texture'HUDContent.Generic.HUD'
is used for the HUD icon.

Ah oops, I was thinking of WOTGreal when I mentioned exporting textures etc. However, UEExplorer is excellent for code.
Anonymous[Lolz] is offline  
Old 08-12-2016, 01:33 PM   #23
Lagzilla
Getting there...
 
Join Date: Jan 2011
Location: Chicago
Posts: 730
Default
Reply With Quote


Nice work guys!

Andrew
Lagzilla is offline  
Old 08-12-2016, 05:57 PM   #24
Binger
.

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


Quote:
Originally Posted by Anonymous[Lolz] View Post
Likely yes. I looked at the code in the Mayhem assault rifle as an example and it is achieved using
Code:
Skins(0)=Texture'newar'
in MayhemAssaultAttachment, MayhemAssaultRifle, MayhemAssaultRiflePickup. I'm not sure if they had to change the material in the meshes or animations.


Thanks, here's a link with the texture and the HUD icon as well.
In AssaultRifle:
Code:
IconMaterial=Texture'HUDContent.Generic.HUD'
is used for the HUD icon.

Ah oops, I was thinking of WOTGreal when I mentioned exporting textures etc. However, UEExplorer is excellent for code.
Hopefully just the mesh and hopefully just in the pickup file. I thought I had already successfully changed the skin on another weapon when playing around with stuff but I can't find what that would have been so maybe not. The Goliath was just one line in one file but maybe it won't be that easy with weapons.

Thanks for the skin. That's awesome. I'm gonna use it. I didn't think about the HUD Icon. Thanks for that also.

What is the Mayhem AR? I was looking for already modified ARs that would work for what I want, although the changes I'm making aren't that difficult really.

I've been having problems importing my skin into the editor. Actually, it seems to import fine but if I close the editor and then open it back up, when I try to open the new texture package that I created it is broken and the editor will open something else without my texture being there. I had the same problem with the Goliath skin and I don't know how I solved it. I'm sure I'll get it eventually and maybe I'll have better luck with the skin you made. Which leads me to a question I uploaded some pics for. Maybe some of you guys that have done skins before can answer this for me.

When doing the Goliath skin I just guessed at all the options when importing/exporting things. Apparently I got it right at some point but that was just luck. Mainly what I'm confused about is mipmaps. There are so many times when I'm asked if I want to generate/load them. Also the export file type from Gimp. There are several DXT5 options.









Binger is offline  
Old 08-12-2016, 08:48 PM   #25
Anonymous[Lolz]
Getting there...
 
Anonymous[Lolz]'s Avatar
 
Join Date: Feb 2009
Location: New York State
Posts: 859
Default
Reply With Quote


I use NVIDIA's DDS plugin for Photoshop. Everything works well. In your case, I believe it's because you are generating MIP maps twice. I would recommend using UEd's generator simply because it is native. I just did a test on the MIP maps in the static mesh browser:

Plugin: The quality worsened as distance increased; as intended and expected
Native: The quality did not change; it remained sharp at all distances (not sure why, but there are lots of possible reasons)

I tried changing the LOD settings in the texture properties, but it had no effect. From a performance standpoint you'd want the quality to worsen, but in a game of this age it doesn't matter. Also, when opening exported textures, I never saw any MIP maps when I checked the option to load them, so I never load them.

Mayhem weapons

As for DXT1/3/5, etc., they're all the same except how they save alpha information. For the HUD icon, I saved it as DXT1 with explicit alpha, meaning yes or no. Visible color or "empty" pixels. In many cases, that's all you'll need. DXT3 supports partial alpha, but it's not very smooth. For smoother transitions DXT5 is needed. Read more here if you'd like: http://www.fsdeveloper.com/wiki/inde...sion_explained

Last edited by Anonymous[Lolz]; 08-12-2016 at 09:09 PM..
Anonymous[Lolz] is offline  
Old 08-15-2016, 05:34 PM   #26
Binger
.

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


Quote:
Originally Posted by Anonymous[Lolz] View Post
I use NVIDIA's DDS plugin for Photoshop. Everything works well. In your case, I believe it's because you are generating MIP maps twice. I would recommend using UEd's generator simply because it is native. I just did a test on the MIP maps in the static mesh browser:

Plugin: The quality worsened as distance increased; as intended and expected
Native: The quality did not change; it remained sharp at all distances (not sure why, but there are lots of possible reasons)

I tried changing the LOD settings in the texture properties, but it had no effect. From a performance standpoint you'd want the quality to worsen, but in a game of this age it doesn't matter. Also, when opening exported textures, I never saw any MIP maps when I checked the option to load them, so I never load them.

Mayhem weapons

As for DXT1/3/5, etc., they're all the same except how they save alpha information. For the HUD icon, I saved it as DXT1 with explicit alpha, meaning yes or no. Visible color or "empty" pixels. In many cases, that's all you'll need. DXT3 supports partial alpha, but it's not very smooth. For smoother transitions DXT5 is needed. Read more here if you'd like: http://www.fsdeveloper.com/wiki/inde...sion_explained
Okay so only generate mipmaps when loading the image back into UnrealEd. Got it.

I want to comment on some of this but I know nothing about mipmaps and LOD other than they are supposed to lower quality at distances. Thanks for the help.

I got the Mayhem weapons. Thanks for the link.

Any idea exactly what DXT5 format is best for UT2004? There are 6 of them with DXT5 in the name.



Do I need to check any of these other options when importing in UnrealEd?

Binger is offline  
Old 08-15-2016, 06:42 PM   #27
Anonymous[Lolz]
Getting there...
 
Anonymous[Lolz]'s Avatar
 
Join Date: Feb 2009
Location: New York State
Posts: 859
Default
Reply With Quote


Please refer to this about the different formats. It explains each one until the last three: http://vandaengine.org/an-overview-t...xture-formats/

Quote:
Originally Posted by The_Deacon
Detail hack should *really* only be used when importing textures you intend to use as 'detail textures' (as in the DetailTexture property within textures themselves)

What detail hack actually does, is to make the progressively less detailed mip-maps fade to grey (See this UDN page)

What 'Masked' does, is to make the engine treat the first colour in the palette of an 8-bit (256 colour) paletted texture as transparent (See this UDN page)
If I understand correctly, detail hack basically makes the really small MIP maps fade to gray and "Masked" simply makes black (0,0,0) transparent. Alpha is for textures with transparency, like the HUD icon.
Anonymous[Lolz] is offline  
Old 08-15-2016, 07:26 PM   #28
Binger
.

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


Okay so I'm guessing BC3/DXT5 is probably the best for UT2004. I'm curious if it requires or prefers a certain format. Something like this would be helpful, "Doom engine uses the so called RXGB format.".

So, no detail hack, no masked, and alpha only on things with transparency. Cool thanks. I'll probably get back on this AR thing soon.
Binger is offline  
Old 08-15-2016, 08:29 PM   #29
Anonymous[Lolz]
Getting there...
 
Anonymous[Lolz]'s Avatar
 
Join Date: Feb 2009
Location: New York State
Posts: 859
Default
Reply With Quote


Well, the only differences between DXT* are how they handle transparency. GIMP's stock DDS exporter doesn't support DXT1 with explicit alpha, so you'd use DXT3 for images with very simple alpha information.
Anonymous[Lolz] is offline  
Old 08-16-2016, 06:17 PM   #30
Binger
.

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


I got your textures successfully loaded into a package. I changed the name of the rifle so I'm going through all the code changing that then I should have a working rifle that I can start testing with bots. Then it's on to getting it to be the only weapon a player spawns with.
Binger is offline  
Old 08-20-2016, 05:41 PM   #31
Binger
.

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


Are dashes allowed in .uc names? I can't figure out what I'm doing wrong here. I'm trying to name the .u file AR-IIa.

I know the file locations are different but they are the same file. I edit in one place then copy to my UT folder before running ucc make.

Binger is offline  
Old 08-20-2016, 06:00 PM   #32
Anonymous[Lolz]
Getting there...
 
Anonymous[Lolz]'s Avatar
 
Join Date: Feb 2009
Location: New York State
Posts: 859
Default
Reply With Quote


You have a naming error somewhere. Can you send me the code?
Anonymous[Lolz] is offline  
Old 08-20-2016, 06:42 PM   #33
Binger
.

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


Quote:
Originally Posted by Anonymous[Lolz] View Post
You have a naming error somewhere. Can you send me the code?
It's probably something obvious but I can't figure it out.

This is not complete. I was just trying to do a test compile after changing the name. I still need to do the textures and check everything. In fact, if you try to compile you will probably get an error from the change in the skin. I think you can just remove that line. I didn't do that before zipping it. I want to change that anyway because that is the wrong name for the texture you did. I also might want to put the spread back in but with a higher value, like 2 seconds I'm thinking.

I want all display names to just say AR-II but I'm naming the file AR-IIa so that I can just update the letter on the end for future edits.

Last edited by Binger; 08-22-2016 at 01:16 AM.. Reason: Removed link.
Binger is offline  
Old 08-20-2016, 09:05 PM   #34
Anonymous[Lolz]
Getting there...
 
Anonymous[Lolz]'s Avatar
 
Join Date: Feb 2009
Location: New York State
Posts: 859
Default
Reply With Quote


I believe the issue has to do with the dashes in the class names. I renamed AR-II-Attachment to ARIIAttachment (and renamed any instances) and it parsed just fine, until I got an error from another file with dashes in the filename.

Also, in ARII.uc, you have it named as ARIIa in the first line.
Code:
class AR-IIa extends Weapon
Anonymous[Lolz] is offline  
Old 08-21-2016, 12:03 AM   #35
Binger
.

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


Quote:
Originally Posted by Anonymous[Lolz] View Post
I believe the issue has to do with the dashes in the class names. I renamed AR-II-Attachment to ARIIAttachment (and renamed any instances) and it parsed just fine, until I got an error from another file with dashes in the filename.

Also, in ARII.uc, you have it named as ARIIa in the first line.
Code:
class AR-IIa extends Weapon
Okay, that's what I was thinking. I was hoping someone would have an answer about dashes in the names before I did the work to change them and test it. Thanks for doing that.

I missed the "a" in the one file, doh.
Binger is offline  
Old 08-21-2016, 01:03 AM   #36
Binger
.

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


Getting closer but now getting an "unresolved cast" error in my Fire and Grenade classes. All my experimenting has failed so far. It's getting to the point where not knowing code is going to hurt me, I think. I found one thing on the internet but it didn't help.

Maybe I should try extending the Assault Rifle instead of creating a new weapon.
Binger is offline  
Old 08-21-2016, 01:14 AM   #37
Anonymous[Lolz]
Getting there...
 
Anonymous[Lolz]'s Avatar
 
Join Date: Feb 2009
Location: New York State
Posts: 859
Default
Reply With Quote


Take a look at this: https://wiki.beyondunreal.com/Legacy...rs#Typecasting
Anonymous[Lolz] is offline  
Old 08-21-2016, 02:11 AM   #38
Binger
.

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


Yeah, I was reading that. That's where my lack of understanding of code comes into play. I also found this page...

http://www.3dbuzz.com/forum/threads/...d-Cast-problem

What's weird is I had this working until earlier today when I decided to change the name. I had it so that I could place it in a weapon locker and it worked fine. Then when I changed the name the errors started happening. I still have those files that worked so I'll probably just copy them and change the names. That's next.

This is the error I'm getting...

Binger is offline  
Old 08-21-2016, 04:18 PM   #39
Binger
.

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


I scraped the renaming thing (after much frustration) and just went with what I had that worked. The filename won't match the name anywhere it's displayed in the game but no biggy. Now I need to figure out what's going on here...

Binger is offline  
Old 08-21-2016, 05:32 PM   #40
Binger
.

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


I got it. I had skin(1) instead of skin(0). Still not sure about the HUD icon though.

It's too shiny when the light hits it just right. I'm guessing that is the alpha channel thing.



Binger 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 02:18 PM.