Urban Terror Forums: [4.3] weapon selection - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

[4.3] weapon selection

suggestion for a yet another new weapon selection

#1 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 08 February 2016 - 04:07 AM

There has been more than one topic about the 4.3 RC weapon selection menus. and i do agree, 4.1 ones were better.
then again, i have to admit, 4.3 ones are way better scripted/programmed, and way easier to maintain.
e.g. they make use of dynamic lists and uiScripts to display the menus, instead of having two items per weapon. and a 2k line code just for the primary selection menu.

Anyways. i got bored:
i wrote a MATLAB script , which generates a 4.1ish styled gear selection menu.
why a script?
well. easier to maintain. if a script creates all those selection menus for you, does all the position calculation and stuff, you can do it the "4.1 way", without a shitton of work
why matlab?
hm. faster for simple tasks, easier to maintain, has dynamic allocations, concatenate,...
in the end C would probably have ended up with the same cluttered code.... :S

This is what it looks like:
screenshot:
Spoiler


main features:
a) hotkeys
b) no scrolling list
c) icons
d) bigger buttons
e) doesnt create any sort of flood protection problem
d) a "comparison" view between the currently equipped and selected/focused weapon to the right of the window

the "tmp" items are placeholders for the 4 weapons to be added with 4.3


NOTES/KNOWN BUGS:
1)the "current" weapon doesnt detail show atm.
2)the "current" item always displays Item one, this is to make the code easier for now, and will obviously be changed in the future ;)



download:
current version - mediafire, 18kB
NOTE: that this breaks your URT main menu. you need to delete the .pk3 after testing
NOTE: its working in 4.2 only atm, due to uiScripts i used, which dont seem to exist in 4.3 anymore.

//edit Iye:
v5 now up

This post has been edited by Iye: 14 February 2016 - 01:24 AM

Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg

#2 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 11 February 2016 - 01:53 AM

Version 3 is now up.

replaces all weapon selection menus (as well as doing the main menu mod)
it allows testing ingame, which is actually recommended, as i couldnt be bothered to set it in a way it doesnt spam your screen with 3 menus if you use the main menu variant.

Currently im unable to display the info for the current weapon, but there is a way to do this in 4.3.
Sadly 4.3 appears to lack the name to directly display the weapon icons via ownerdraw.
either that would need to be readded to the qvm, or i had to do it via shader/directly linking the icons.

Ive also noticed, that with the way rc3's menu works,it basically always gets into conflict with the flood protection(this might be relatedto #251 though). Nevertheless, this obviously isnt the case for my version :)


real questions are though:
any opinions?
would you consider this instead of the current rc menu for 4.3?
aka, is it worth to continue working on this? :)

This post has been edited by Iye: 11 February 2016 - 02:01 AM

Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg

#3 User is offline   Lochverstaerker Icon

  •   QA member   

Posted 11 February 2016 - 04:51 PM

View PostIye, on 11 February 2016 - 01:53 AM, said:

would you consider this instead of the current rc menu for 4.3?

Yes. I want pictures to click on and a preview image.

View PostIye, on 11 February 2016 - 01:53 AM, said:

any opinions?

A few things:
  • Personally I don't care about weapon information (other than the weapon's name) and having it on top of the preview image is kind of irritating.
  • It's nice that I'm able to select weapons with number keys but there are obviously more than 10 primary weapons so you have to use other keys as well. Maybe using "a-f" isn't the best idea, something like "q, w, e, r, t, y" might be more intuitive; although I understand that most people probably don't use qwerty layouts, so that's kinda meh as well. (Is there maybe a way to read someone's keyboard layout and set binds accordingly?)
  • The images of the weapons are somewhat warped, especially when choosing a secondary weapon (they're stretched horizontally). It wouldn't bother me too much, but it doesn't look all that good.


#4 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 11 February 2016 - 07:32 PM

View PostLochverstaerker, on 11 February 2016 - 04:51 PM, said:

[*]Personally I don't care about weapon information (other than the weapon's name) and having it on top of the preview image is kind of irritating.

i doubt anyone who has played this game for a while does. actually something like a damage comparison would be more helpful than e.g. ammo type. :)
having the text on top of the image was basically due to the fact that the space in the menu is somewhat limited.

View PostLochverstaerker, on 11 February 2016 - 04:51 PM, said:

[*]It's nice that I'm able to select weapons with number keys but there are obviously more than 10 primary weapons so you have to use other keys as well. Maybe using "a-f" isn't the best idea, something like "q, w, e, r, t, y" might be more intuitive; although I understand that most people probably don't use qwerty layouts, so that's kinda meh as well. (Is there maybe a way to read someone's keyboard layout and set binds accordingly?)

well yeah. i simply used a decimal to hexadecimal converter to create those (luckily it only has 16 items...), and actually i think its the same in 4.2.
I actually considered using qwerty, like numbers for the 1st column, letters for the 2nd,...
But as you noticed, that might cause problems. And no, you can not read ones layout. Though: i think that at least for bindings all keyboards are considered qwerty, so it might even work out in the end...

View PostLochverstaerker, on 11 February 2016 - 04:51 PM, said:

[*]The images of the weapons are somewhat warped, especially when choosing a secondary weapon (they're stretched horizontally). It wouldn't bother me too much, but it doesn't look all that good.

Yeah. i noticed that as well, but it should be now problem to fix that.
Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg

#5 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 14 February 2016 - 01:38 AM

another night, another update:

=>Top Post

changes:
now supports all the item and grenade menus.
hotkeys were changed to assign a keyboard row to a column ingame
image aspect ratio is now maintained.


things i need in the qvm to fully get it to work:
ownerdrawparam ITEM_CURRENTITEM set by uiScript gearSetActive
ownerDraw UI_GEAR_INFO (from the 4.3 qvm), so i can display the info for the currently equipped weapon

This post has been edited by Iye: 14 February 2016 - 01:41 AM

Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg

bullet_loaderAdvertisement

#7 User is offline   Biddle Icon

  • Account: biddle
  • Main tag: fr.
  • Country:
  • Joined: 01-August 12
  • Posts: 1,080

Posted 22 February 2016 - 01:04 AM

Good job, starting to look nice :)

#8 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 22 February 2016 - 08:50 AM

if you would send me those lines you changed, i could implement it, so it could be done for all menus without needing to mod each item manually :)
I can tell that you changed the hover items to only change color, increased the l/r spacing of the window border and the t/b spacing of the items, as well as moved the "selected" and "current" boxes slightly upwards.

also, i see you prefer the "classic" hotkeys :)
Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg


#10 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 22 February 2016 - 07:51 PM

fun fact: i have parameters for all the stuff you changed, so i only need to set those and it would basically look the same :)
Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Sponsored link
https://www.urbanterror.info/members/donate/


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942