Iron Sight Tutorial (FAQ)
Moderator: Moderators
- DarthXeon
- Banned
- Posts: 84
- Joined: Mon Sep 19, 2011 5:41 pm
- Projects :: I move fast... Lightning fast...
- Location: In A Nearby Solar System
Re: Iron Sight Tutorial (FAQ)
looks a ton like "COD" now
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Iron Sight Tutorial (FAQ)
Yeah, it can be done, I didn't test it rigorously, since I didn't want to end up modifying my HUD that way so idk if there is anything major missing.Fiodis wrote:I thought we couldn't replace the global ingame.lvl, since not all the files included in it are also present in the data_***/Common folder?
-
THEWULFMAN
- Space Ranger
- Posts: 5557
- Joined: Tue Aug 17, 2010 3:30 pm
- Projects :: Evolved 2
- Location: Columbus, Ohio
- Contact:
Re: Iron Sight Tutorial (FAQ)
Fiodis wrote:I thought we couldn't replace the global ingame.lvl, since not all the files included in it are also present in the data_***/Common folder?
It can be done. Zerted did it for the patch, and Rournes did it for his TFU mod. I intend to do it for my BF3 mod as well(unless I can figure out a workaround). All the files are there, or at least the important ones.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Iron Sight Tutorial (FAQ)
for anybody who wonders: if you take the unmodified ingame.req from your data_XXX\Common and munge it you can use it a global ingame.lvl - no extra magic required. the problem however is that you will loose this:
because its built into the 1.3 patch ingame.lvl of which the sourcefiles are lost.
i tried (and managed) to load a second "ingame.lvl" through a custom script and when it didnt crash the map it was even loaded (the log complained about stuff being loaded twice) but had no visual effect.
so, if you dont want to loose all the above 1.3patch features you would have to hexedit the content of your ingame.lvl into the 1.3patches global one...
edit:youll also loose the hud-coordinates for the 1.2patch weapons...
Hidden/Spoiler:
i tried (and managed) to load a second "ingame.lvl" through a custom script and when it didnt crash the map it was even loaded (the log complained about stuff being loaded twice) but had no visual effect.
so, if you dont want to loose all the above 1.3patch features you would have to hexedit the content of your ingame.lvl into the 1.3patches global one...
edit:youll also loose the hud-coordinates for the 1.2patch weapons...
- Cerfon Rournes
- Master Bounty Hunter

- Posts: 1558
- Joined: Thu Jul 08, 2010 5:53 pm
- Projects :: WIP. I will reveal what it is later on..
- xbox live or psn: No gamertag set
- Location: New York, USA
- Contact:
Re: Iron Sight Tutorial (FAQ)
Bump:
Just a fair warning for all the people working with Iron Sights..
The size of the weapon's Iron Sight will increase/decrease if you pick bigger/smaller screen sizes.
For example, I made my sight using the 1152x720 screen size in BF2. The result:
However, look at it when I change to a different BF2 size, namely 1600x800:
What does this all mean? Well, if the player gets your mod and doesn't use the screen size you used,(they might not even have the size because of different monitors) the Sights will be slightly out of place and size.
Just a fair warning for all the people working with Iron Sights..
The size of the weapon's Iron Sight will increase/decrease if you pick bigger/smaller screen sizes.
For example, I made my sight using the 1152x720 screen size in BF2. The result:
Hidden/Spoiler:
Hidden/Spoiler:
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Iron Sight Tutorial (FAQ)
@Cerfon: Can you post your hud, or at least the relevant parts? Not sure how to fix that. Are those screen sizes the same aspect ratio? If they only look different in different ratios, perhaps a different hud could be used for each ratio.
---------------------------------------------------------
I finally got it to fix floating icons at the same time as adding ironsights, which was the biggest issue I personally have had with it, so here's my current 1playerhud.
I should point out that in one place "mesh" is changed to "change" in the Group("player1weapon1groupforironsights") section, and this was the last change I made that got it working. So don't miss it. Or just copy this and insert the values from yours.
This was using the Floating Weapon Icon tutorial made by Mike Z, Majin Revan, and Fragme! I think.
Edit: looks like icons that didn't need the icon fix before now place an extra icon in the top left corner. probably can fix by... OK, I'm not sure. I'll work on that one another time...
Edit2: got it. added an example to the code above. this will probably have to be done to every stock weapon, or weapons used in the 1.3 patch.
---------------------------------------------------------
I finally got it to fix floating icons at the same time as adding ironsights, which was the biggest issue I personally have had with it, so here's my current 1playerhud.
Hidden/Spoiler:
This was using the Floating Weapon Icon tutorial made by Mike Z, Majin Revan, and Fragme! I think.
Edit: looks like icons that didn't need the icon fix before now place an extra icon in the top left corner. probably can fix by... OK, I'm not sure. I'll work on that one another time...
Edit2: got it. added an example to the code above. this will probably have to be done to every stock weapon, or weapons used in the 1.3 patch.
Last edited by kinetosimpetus on Wed Feb 08, 2012 9:56 pm, edited 2 times in total.
- Cerfon Rournes
- Master Bounty Hunter

- Posts: 1558
- Joined: Thu Jul 08, 2010 5:53 pm
- Projects :: WIP. I will reveal what it is later on..
- xbox live or psn: No gamertag set
- Location: New York, USA
- Contact:
Re: Iron Sight Tutorial (FAQ)
Nice fix.
@My Sights: No, they were not the same aspect ratio.
I took those shots on 1152x720 and 1600x900.
Here is my HUD file.
@My Sights: No, they were not the same aspect ratio.
I took those shots on 1152x720 and 1600x900.
Here is my HUD file.
Hidden/Spoiler:
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Iron Sight Tutorial (FAQ)
Can you try it in a smaller screen size with a 16:9 ratio and compare it to the 1600 x 900 screen? And the same for whatever the other ratio works out to be?
Fixed the double weapon icon with stock weapons. Same way as I already mentioned to remove the iron-sights for scoped weapons. just set a mesh info block with a position that sets it off screen. but put it in the floating icon fix section instead of the ironsights group. but not in the transform mesh section, or the original correct icon will also disappear.
I'll add a section as an example to my post before this.
Fixed the double weapon icon with stock weapons. Same way as I already mentioned to remove the iron-sights for scoped weapons. just set a mesh info block with a position that sets it off screen. but put it in the floating icon fix section instead of the ironsights group. but not in the transform mesh section, or the original correct icon will also disappear.
I'll add a section as an example to my post before this.
- Havoc 526
- Rebel Warrant Officer

- Posts: 317
- Joined: Sat Apr 04, 2009 6:24 pm
- Projects :: Something
- Location: Howling at the Moon
Re: Iron Sight Tutorial (FAQ)
Um, not to sound n00bish, but where do we put the HUD file to munge it? Do we put it in a SIDE folder, or do we leave it where it is?
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Iron Sight Tutorial (FAQ)
Leave it where it is. I tried munging it as a side and couldn't get it to work.
- Havoc 526
- Rebel Warrant Officer

- Posts: 317
- Joined: Sat Apr 04, 2009 6:24 pm
- Projects :: Something
- Location: Howling at the Moon
Re: Iron Sight Tutorial (FAQ)
Okay, thanks. I wasn't sure.
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: Iron Sight Tutorial (FAQ)
thank you for this great tutorial. I just tried it, but everytime i zoom i got a white screen.
my ingame.req
my 1playerhud.hud
also i added this line:
to all the weapons i want the iron sight.
the trans_scope.tga (512x512 transparent) i put in the
C:\BF2_ModTools\data_XXX\Sides\rep\msh folder and the
C:\BF2_ModTools\data_XXX\Common\mshs folder because i thought i may have the scope texture in the wrong folder.
Than i added the line
ReadDataFile("dc:ingame.lvl") to the maps lua and munged.
But ingame i now have a complete white screen. What's wrong??
==EDIT==
i need to correct me. Photoshop elements made the trasnparent white. so i toke paint.net and now it's transpetent. but no weapon is shown.
Do i need to put the weapon.msh into the data_XXX\Common\mshs folder, too??
==Edit2==
I got the dc15 working with the extraweappn.hud for fixing floating icons. I simply added the hud thing from the tutorial to the floating icon hud file. But the dc17 isn't showm. And i don't know why. The only differences to the dc15 is, that the dc17 msh is also used for fixing floating icon. The dc15 not. But i cannot belive that's the reason.
Has someone an idea??
EDIT
Ok please forget this stupid post above. i simply haven't read the whole tread
This is a realy great tutorial. kinetosimpetus you are a god.
the problem from Cerfon Rournes i had, too. i first fixed all position using the mod tool BFII.exe. and this has a lower resolution than my Full HD monitor. so on this i had the same problem. i fixed that by using the 3rd position value. about -750.00000. this moves the waepon away from me into the screen. but i don't know what this will cause on lower resolutions.
@kinetosimpetus: you may can link the fixed icon + ironsight tutorial to the first page.
Double posting is against the RULES; please EDIT your post instead -Staff
my ingame.req
Code: Select all
ucft
{
REQN
{
"config"
"1playerhud"
}
}Hidden/Spoiler:
Code: Select all
ScopeTexture = "trans_scope"the trans_scope.tga (512x512 transparent) i put in the
C:\BF2_ModTools\data_XXX\Sides\rep\msh folder and the
C:\BF2_ModTools\data_XXX\Common\mshs folder because i thought i may have the scope texture in the wrong folder.
Than i added the line
ReadDataFile("dc:ingame.lvl") to the maps lua and munged.
But ingame i now have a complete white screen. What's wrong??
==EDIT==
i need to correct me. Photoshop elements made the trasnparent white. so i toke paint.net and now it's transpetent. but no weapon is shown.
Do i need to put the weapon.msh into the data_XXX\Common\mshs folder, too??
==Edit2==
I got the dc15 working with the extraweappn.hud for fixing floating icons. I simply added the hud thing from the tutorial to the floating icon hud file. But the dc17 isn't showm. And i don't know why. The only differences to the dc15 is, that the dc17 msh is also used for fixing floating icon. The dc15 not. But i cannot belive that's the reason.
Has someone an idea??
EDIT
Ok please forget this stupid post above. i simply haven't read the whole tread
This is a realy great tutorial. kinetosimpetus you are a god.
the problem from Cerfon Rournes i had, too. i first fixed all position using the mod tool BFII.exe. and this has a lower resolution than my Full HD monitor. so on this i had the same problem. i fixed that by using the 3rd position value. about -750.00000. this moves the waepon away from me into the screen. but i don't know what this will cause on lower resolutions.
@kinetosimpetus: you may can link the fixed icon + ironsight tutorial to the first page.
Double posting is against the RULES; please EDIT your post instead -Staff
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Iron Sight Tutorial (FAQ)
I think I already did, either that or I didn't and an admin just did, if that's the case, thanks, admin!
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: Iron Sight Tutorial (FAQ)
I found a small problem with the iron sight. I added it to 2 weapons. but all the others now have floating icons at the zoom.
someone an idea??
Hidden/Spoiler:
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: Iron Sight Tutorial (FAQ)
kinetosimpetus wrote:If you don't add a meshinfo block for a weapon, an icon will 'float' in the upper left corner of the screen, so add a meshinfo to move it offscreen. Moving the weapon to the left should work:
Code: Select all
Position(-0.500000, 0.000000, 0.000000, "Viewport")
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: Iron Sight Tutorial (FAQ)
Thank you
where do you get all these avaters?? Is there somewhere an website http://www.marth'sgtavaters.com??
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: Iron Sight Tutorial (FAQ)
Off-topic: I have a very large set of random avatars via randimg.net.Anakin wrote:where do you get all these avaters?? Is there somewhere an website http://www.marth'sgtavaters.com??
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: Iron Sight Tutorial (FAQ)
OK and i wonder why you always have a new image 
So i really hope i haven't overread it again. I searched with the search function, and used Ctr+F on this thread.
I think the problem is self-explanatory
every time i press m i got this screen. No matter if i used zoom before or not.
So i really hope i haven't overread it again. I searched with the search function, and used Ctr+F on this thread.
I think the problem is self-explanatory
Hidden/Spoiler:
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Iron Sight Tutorial (FAQ)
There's a chunk of code in there you may have missed that should take care of that, I'll see if I can find it.
EDIT: Ooops, there isn't.
Now attempting to fix.
EDIT: Ooops, there isn't.
Now attempting to fix.


