3rd Party Models/Media Chat / [WIP] Binoculars for the Weapons Hud - Help Needed..

Author
Message
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 3rd Jun 2015 20:48 Edited at: 4th Jun 2015 02:17
I have been learning about weapons this week.
So yesterday I decided to make a set of binoculars as I have not seen any yet for GG, as a learning experience for weapons.
But I have a few questions I need help with.

With respect to the gunspec.

Q. How is the ID assigned to a weapon for the "g_PlayerGunID" , and does each different weapon have a unique id #. ?
I assumed it was the "statuspanelcode", just because of the way I numbered it, but
the ID# changes from time to time, which is no good for the script.
Q. Is there an official format/standard for different weapon types to follow, within the weapons hud?
Q. How do I get the panel at the bottom left of the screen to show.
I have made binoculars icons in the ammohealth folder, but I cannot work out how this or the panel is shown within my hud.

I have the below in the gunspec for the Binoculars.
;GUN HUD (0-colt,1-magnum,2-uzi,3-shotgun,4-rifle,5-rpg,6-grenade,7-bow,8-mace,9-stone,10-sword,11-utilities)
statuspanelcode = 11
;WEAPON Style (1-pistol,2-rocket,3-shotgun,4-uzi,5-assault,10-binoculars)
weapontype = 10

Gunspec is also attached.

I am marking the AI with a key press at the moment, but ideally the left mouse click is what I would like.
The right mouse click is for the fixed zoom, like any other rifle.

Its only early days yet with the graphics for the hud.
Its functionality I am after first, then I can dress it up later.



Thanks
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)

Attachments

Login to view attachments
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 4th Jun 2015 23:36
Quote: "Q. How do I get the panel at the bottom left of the screen to show. "


Set statuspanelcode = 100 - this tells the engine to look for a custom weapon status HUD. These need to be called AMMO.png and ICON.png (this one will presumably be the binoculars) in the same folder as the gunspec.txt file. You'll have to be careful with the size of the images for the hud. I copied one of the existing ones and made the new gun and ammo images fit inside.
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 5th Jun 2015 00:57
Thanks cybernescence,

I give this a go tonight..

cheers
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 29th Aug 2015 16:19 Edited at: 30th Aug 2015 15:33
I have one problem with zoom mode for one pistol "Silencer Colt".
Can't make zoom to work like the zoom for "Colt1911"
The right arm to aim the gun at correct fire spot. Any idea about settings in to "gunspec.txt" attached file ?
We really need one gunspec documentation, because for example: I can't find HUD GUN order slot,
just this unexplained part from the gunspec.txt file:
"; GUN HUD (0-colt,1-magnum,2-uzi,3-shotgun,4-rifle,5-rpg,6-grenade,7-bow,8-mace,9-stone,10-sword,11-staff,12-assault)
statuspanelcode = 4" - - and this is not one clearly explanation of each gun hud number order.
cybernescence wrote: "Set statuspanelcode = 100"
- If I used this got the error about "image" (the HUD GUN image).

Watch this short clip below to see my request, please.
Thanks in advance

Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."

Attachments

Login to view attachments
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 30th Aug 2015 15:34
Any news here ?
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 31st Aug 2015 05:10
Hi, Old Larry

Id try changing the below settings.
That should center the gun in zoom mode, its the same settings that the colt uses.

from:
simplezoomx = -5
simplezoomy = 2

to:
simplezoomx = 0
simplezoomy = 0

notes:
A negative value will reverse the direction along the x and y planes.

You could try changing the weapon FOV to 100 in Tab-Tab settings so you get to see a full view the weapon, it just might be visible on the edges.

Cheers
I may be old, but at least my memory still ....hmmm

DT:Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528, AutoCAD, 3DsMax, Paint.Net, Solidworks.
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 1st Sep 2015 09:39 Edited at: 1st Sep 2015 09:42
The zoom it's in the middle, but the weapon disappear back. The HUD muzzleflash have correct position in zoom mode.
Maybe is some wrong settings in the weapon animation (in the Air mode specs of gunspec) ?
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fps/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
Errant AI
Forum Support
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location: [REDACTED]
Posted: 6th Sep 2015 07:52 Edited at: 6th Sep 2015 08:03
If a weapon is disappearing when aiming, try increasing the simplezoommod=x value. For GG it usually needs to be =2 or higher. Classic weapons usually will show up OK at =4 or =5. Depending on how it was animated.

For old weapons which do not include aiming animations (like that MP6 gun), it may not be supported correctly unless you spoof animation entries for all the zoom related stuff.

Larry, in your attached gunspec I see:
zoomto = 157,161
zoomfrom = 165,169
zoom idle = 210,270
zoom move = 280,340
zoom start fire = 187,187
zoom end fire = 189,193

But that weapon rig I think does not actually contain those animations unless you re-rigged the stock 1911. It appears you just copy-pasted them. You should insert valid frame ranges for animations which do exist (copy the values for the non-zoom animations).

Quote: "- If I used this got the error about "image" (the HUD GUN image)."


If you use status panel=100 you must include icon.png in the weapon's folder. Size 196x46 pixels. All this setting does is determine what icon is shown in the lower left.

-------

edit for OP

Quote: "Q. How is the ID assigned to a weapon for the "g_PlayerGunID" , and does each different weapon have a unique id #. ?
I assumed it was the "statuspanelcode", just because of the way I numbered it, but
the ID# changes from time to time, which is no good for the script.
Q. Is there an official format/standard for different weapon types to follow, within the weapons hud?
Q. How do I get the panel at the bottom left of the screen to show.
I have made binoculars icons in the ammohealth folder, but I cannot work out how this or the panel is shown within my hud.

I have the below in the gunspec for the Binoculars.
;GUN HUD (0-colt,1-magnum,2-uzi,3-shotgun,4-rifle,5-rpg,6-grenade,7-bow,8-mace,9-stone,10-sword,11-utilities)
statuspanelcode = 11
;WEAPON Style (1-pistol,2-rocket,3-shotgun,4-uzi,5-assault,10-binoculars)
weapontype = 10"


You can't yet script weapons. Those are hard-coded ID values. Only status panel=100 will let you use your own icon and that icon must be in the weapon folder as stated above. The icon will not be displayed if the weapon has unlimited ammo. This is because there is no infinity symbol in the font set and the weapons used to read like 9999999999 ammo if reloadqty=0.

Due to scripting limitations, I would advise against using the weapon system for binos. Instead use the HUD overlay system which is used for the jetpack. I am not intimately familiar with how the overlay system works but I believe it grants better scripting accessibility at the cost of being able to shoot. Disregard this if you are already using the overlay system and I have simply misunderstood the situation.
Gigabyte P67A-UD4-B3, Intel Core i7 2600K (passmark 8555), 16GB Corsair DDR3, EVGA GTX 970 SC (passmark 8637), Win7 Pro 64-bit SP1, Primary monitor @ 1920x1080, secondary monitor @ 1024x1280

Login to post a reply

Server time is: 2024-11-25 05:17:00
Your offset time is: 2024-11-25 05:17:00