Iron Sight Help [Solved] [THANK YOU!]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Iron Sight Help [Solved] [THANK YOU!]

Post by yuke5 »

Subject: Iron Sight Tutorial (FAQ)
kinetosimpetus wrote:
Make a 512 x 512 .tga that is completely transparent. Set this as the ScopeTexture in every weapon you want to use ironsights with. I tried a smaller one, 8 x 8, but it didn't work. Simply loading a null ScopeTexture will result in a default one being used.
I've been following the tutorial, but I don't think I'm doing it right.

Where should I put the transparent tga? I managed to make a transparent tga, but I think I must have saved it in the wrong spot. I'm also afraid I might be loading it the wrong way. I've been editing the req's in the Common/req/fpm folder to load the texture as the scope, but that didn't seem to work. I also tried just replacing the scope with the blank texture, but that doesn't seem to work either.

Here is the link to my tga. I'm pretty sure it's okay, but I could be wrong.

http://www.mediafire.com/?c92j8q2xz6718g6

If you need any additional info, I'd be happy to provide it.

Thanks in advance, yuke5. <- No signatures please. -Staff
Last edited by yuke5 on Sun Feb 05, 2012 11:00 am, edited 2 times in total.
User avatar
Cerfon Rournes
Master Bounty Hunter
Master Bounty Hunter
Posts: 1558
Joined: Thu Jul 08, 2010 5:53 pm
Projects :: WIP. I will reveal what it is later on..
Games I'm Playing :: SWBF2-SWRC
xbox live or psn: No gamertag set
Location: New York, USA
Contact:

Re: Iron Sight Help

Post by Cerfon Rournes »

Where should I put the transparent tga?
C:\BF2_ModTools\data_***\Common\interface\PC
Your texture should be loaded in the ingame.req in this area:

Code: Select all

REQN
    {
        "texture"
        "justputthenameofyourscopehere"
        "anotheroneyoumadehere"
        "andsoon"
        "weapon_scope4"
}
EDIT
Just had a look at your texture, it's fine. :)
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Iron Sight Help

Post by yuke5 »

Okay. I'll try it out. I'll let you know if it works.
EDIT:
I think I'm still screwing it up. :oops: Here's my req
Hidden/Spoiler:
ucft
{
REQN
{
"config"
"1playerhud"
}
REQN
{
"texture"
"comcis"
"blank_scope"
}
}
User avatar
Cerfon Rournes
Master Bounty Hunter
Master Bounty Hunter
Posts: 1558
Joined: Thu Jul 08, 2010 5:53 pm
Projects :: WIP. I will reveal what it is later on..
Games I'm Playing :: SWBF2-SWRC
xbox live or psn: No gamertag set
Location: New York, USA
Contact:

Re: Iron Sight Help

Post by Cerfon Rournes »

yuke5 wrote:
Hidden/Spoiler:
ucft
{
REQN
{
"config"
"1playerhud"
}

REQN
{
"texture"
"comcis"
"blank_scope"
}
}
I think there should be a space between the bracket and the next REQN. (I fixed it for you.)
Also, please post your weapon .odf along with the changed HUD files.
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Iron Sight Help (I'm still screwing up)

Post by yuke5 »

HUD File:
Hidden/Spoiler:
FileInfo("1playerhud")
{
Viewports(1)

}

Group("player1weaponinformationforironsights")
{
PropagateAlpha(1)

Viewport(1)

ZOrder(255)

EventEnable("player1.spawn")
EventDisable("player1.die")

Group("player1weapon1groupforironsights")
{
Viewport(1)
EventEnable("initialize")

Model3D("player1weapon1mesh")
{
EventMesh("player1.weapon1.mesh")

Viewport(1)

ZOrder(5)

EventEnable("player1.weapon1.disable")
EventDisable("player1.weapon1.mesh")


MeshInfo("rep_weap_inf_rifle")
{
Position(0.500000, 1.200000, 0.000000, "Viewport")
Rotation(-5.000000, 180.000000, 0.000000)
Scale(20.000000, 20.00000, 20.000000)
}
}
}
}
As of right now, I'm using a test map with no stock sides. I thought the texture for the scope of loaded through the req's. Do I need to add a command to my weapon odf?
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Iron Sight Help (I'm still screwing up)

Post by kinetosimpetus »

Yes. The odf selects the scope texture.
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Iron Sight Help (I'm still screwing up)

Post by yuke5 »

What do I change/add in the odf? I can't seem to find a stock odf command for scope texture.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Iron Sight Help (I'm still screwing up)

Post by Marth8880 »

Code: Select all

ScopeTexture = "texturename"
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Iron Sight Help (I'm still screwing up)

Post by AQT »

yuke5 wrote:
kinetosimpetus wrote:
Make a 512 x 512 .tga that is completely transparent. Set this as the ScopeTexture in every weapon you want to use ironsights with. I tried a smaller one, 8 x 8, but it didn't work. Simply loading a null ScopeTexture will result in a default one being used.
ScopeTexture is the ODF parameter. If your weapon ODF doesn't have that line, then just simply add it in.
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Iron Sight Help (I'm still screwing up)

Post by yuke5 »

I managed to get the texture to load, but that is all that is displayed, no ironsights. I must not be loading the msh right. Hrm...
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Iron Sight Help

Post by AQT »

yuke5 wrote:
Hidden/Spoiler:
ucft
{
REQN
{
"config"
"1playerhud"
}
REQN
{
"texture"
"comcis"
"blank_scope"
}
}
There are two 1playerhud.hud files: one at data_***\Common\hud, and one at data_***\Common\hud\PC. VisualMunge considers the one in the PC folder. It also depends on the order you load the stock ingame.lvl and your custom one. You can try flipping this order to see if it makes a difference.
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Iron Sight Help (I'm still screwing up)

Post by yuke5 »

Okay, thank you I'll try it. Should I just try putting the same thing in both just to be safe?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Iron Sight Help (I'm still screwing up)

Post by AQT »

Yeah, that's what I tend to do.
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Iron Sight Help (I'm still screwing up)

Post by yuke5 »

Nope. :oops: Still doesn't work. I must be doing something else wrong. I think I did what's right in the HUD file though. I load the msh file right? I've tripled checked to make sure I got the name right! I'm going to make a new map and see if it's the munger.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: Iron Sight Help (I'm still screwing up)

Post by Tears2Roses »

Make sure you have dc:ingame.lvl in your LUA and you coppied the munged ingame.lvl to your map's addon folder.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Iron Sight Help (I'm still screwing up)

Post by AQT »

^He has already done that since he managed to get the transparent texture working.

@yuke5:
AQT wrote:It also depends on the order you load the stock ingame.lvl and your custom one. You can try flipping this order to see if it makes a difference.
Have you tried that yet? If not, then give it a try.
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Iron Sight Help (I'm still screwing up)

Post by yuke5 »

IT WORKS! Thank you so much AQT. :bowdown: I practically jumped out of my chair when I zoomed in and saw the Ironsights.

EDIT: Earlier I thought you were talking about the two HUD files instead of the LUA. I guess it just clicked this time, either way thanks.
Post Reply