[WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
-
- Posts: 24
- Joined: Fri May 05, 2017 5:02 pm
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
One thing that sort of troubles me is that it requires freelook to be enabled to work properly. I tried looking into a way to bind my wheel key to turn freelook on but i cant seem to find a way to make it turn off freelook when releasing that key. Wish there was an easier method for this as I generally prefer turning off freelook for doom
-
- Posts: 26
- Joined: Sat Jun 20, 2020 7:41 pm
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
This is a great mod. Love the fact that it also (optionally) freezes everything while you have it up, so you can switch weapons during fast paced encounters. However, as others have stated, it has a serious bug with Doom RL Arsenal (DRLA). After some time, the key to drop weapons will cease to function, preventing the player from dropping any weapons (or picking up any new ones). At first I thought this was due to hitting the weapon-drop key (in my case, backspace) while the weapon wheel was up. But, as was previously mentioned by another user, it can happen even without hitting the drop-weapon key. Otherwise, it is a wonderful mod, and I hope you are able to fix this issue so I can continue using it in DRLA!
-
- Posts: 379
- Joined: Tue Dec 20, 2016 4:53 pm
- Location: MURICAA BROTHER! Just kidding, Brazil.
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
Hello! I have a suggestion that would work very well with mods that have A TON of weapons. Currently, if you try to play with a mod that has alot of weapons, the wheel looks like this: https://imgur.com/a/jHgAq18
Now, This is a complete clusterfuck and i'm sure not many people play with such randomspawners that add THIS many weapons, but even then, i've seen alot of mods where this happens. My fix is really simple, you know in GTA V when you select a weapon from the wheel but you have various types of it? Like shotguns or sub-machineguns? You scroll that weapon type until you find the one you want to change to, correct? This is the "fix". A Cvar or menu option where you would be able to "scroll" (using mousewheel by default) trhough a weapon slot, the order could be (default) weapon selection order. It is really simple and would look neat.
Now, This is a complete clusterfuck and i'm sure not many people play with such randomspawners that add THIS many weapons, but even then, i've seen alot of mods where this happens. My fix is really simple, you know in GTA V when you select a weapon from the wheel but you have various types of it? Like shotguns or sub-machineguns? You scroll that weapon type until you find the one you want to change to, correct? This is the "fix". A Cvar or menu option where you would be able to "scroll" (using mousewheel by default) trhough a weapon slot, the order could be (default) weapon selection order. It is really simple and would look neat.
-
-
- Posts: 26540
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
Quite a few people have obviously looked at this mod and made their own versions of it. So I'm wondering if anyone has managed to address the various floating point truncation warnings that appear at the console during loading when developer mode is active?
If not, is anyone able to take a look. I tried but I got lost very quickly and wasn't able to resolve anything.
Code: Select all
LoadActors: Load actor definitions.
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 60:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 597:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 697:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 697:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 699:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 699:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 704:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 704:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 706:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 706:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 710:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 710:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 715:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 823:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 823:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 830:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_core.zsc" line 831:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_drawer.zsc" line 31:
Truncation of floating point value
Script warning, "PyWeaponWheel_v0.3.pk3:zscript/pyw/ev_drawer.zsc" line 32:
Truncation of floating point value
script parsing took 197.57 ms
-
-
- Posts: 1806
- Joined: Sun Jul 21, 2019 8:54 am
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
Here you go Enjay.Enjay wrote:Quite a few people have obviously looked at this mod and made their own versions of it. So I'm wondering if anyone has managed to address the various floating point truncation warnings that appear at the console during loading when developer mode is active?
If not, is anyone able to take a look. I tried but I got lost very quickly and wasn't able to resolve anything.
I guess I'm not the only one getting annoyed whenever any warning pop up during loading and never disable developer mode.
You do not have the required permissions to view the files attached to this post.
-
-
- Posts: 26540
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
Beautiful! Works like a charm. Thank you very much.
[edit]and now that I've played around with it a bit, I can see that it's going to be something that I use quite a lot with some mods. The warnings had bothered me to the point of not wanting to use the wheel (even though functionally it was still good). This adds the final bit of polish to it as far as I'm concerned.
I had a look at the fixes and I can follow what was done, but there is no way I could have arrived at them myself. Once again, thank you.[/edit]
[edit]and now that I've played around with it a bit, I can see that it's going to be something that I use quite a lot with some mods. The warnings had bothered me to the point of not wanting to use the wheel (even though functionally it was still good). This adds the final bit of polish to it as far as I'm concerned.
I had a look at the fixes and I can follow what was done, but there is no way I could have arrived at them myself. Once again, thank you.[/edit]
-
-
- Posts: 26540
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
Hmmm...
I thought I'd have a look to see what happens if I tell GZDoom that the weapon wheel is versioned to the current zscript and there are a lot of deprecation warnings.
I replaced all instances of CharCodeAt with ByteAt() and that seems to be working.
I replaced all instances of CharAt with Mid(). Honestly, I wasn't sure whether to use Left or Mid, but Mid seems to be working.
I replaced all instances of frozen with Level.isFrozen() and that also seems to be working - with one exception (noted below).
I replaced all instances of S_Sound with S_StartSound and that too seems to be working.
So, question number 1, are those replacements all suitable? The wiki seems to be a bit thin on exactly how some of these are meant to work. They seem to be working but there could easily be some functionality that I have missed or don't recognise as not working correctly.
For example, is it OK to replace:
with:
(the extra brackets make me wonder if it's OK, but if they are missing, I get an error: "Function 'isFrozen' used without ().")
Question number 2 relates to line 635 in ev_core.zsc. Specifically, this error.
The line is:
if I change that to:
I get
If I miss off the () after Level.isFrozen I get told that the () is needed: "Function 'isFrozen' used without ()."
So, I'm not sure what to do there and it is now the only warning on start up so I'd like to get it sorted. Any ideas?
I thought I'd have a look to see what happens if I tell GZDoom that the weapon wheel is versioned to the current zscript and there are a lot of deprecation warnings.
Spoiler:I *think* I have addressed most of them using the deprecation warnings.
I replaced all instances of CharCodeAt with ByteAt() and that seems to be working.
I replaced all instances of CharAt with Mid(). Honestly, I wasn't sure whether to use Left or Mid, but Mid seems to be working.
I replaced all instances of frozen with Level.isFrozen() and that also seems to be working - with one exception (noted below).
I replaced all instances of S_Sound with S_StartSound and that too seems to be working.
So, question number 1, are those replacements all suitable? The wiki seems to be a bit thin on exactly how some of these are meant to work. They seem to be working but there could easily be some functionality that I have missed or don't recognise as not working correctly.
For example, is it OK to replace:
Code: Select all
if(level.frozen)
Code: Select all
if(Level.isFrozen())
Question number 2 relates to line 635 in ev_core.zsc. Specifically, this error.
Code: Select all
Script warning, "PyWeaponWheel_TrancFix.pk3:zscript/pyw/ev_core.zsc" line 635:
Accessing deprecated member variable frozen - deprecated since 3.8.0, Use Level.isFrozen() instead
Code: Select all
Level.frozen = wheelIsOpen;//&&level.maptime%3!=0;
Code: Select all
Level.isFrozen() = wheelIsOpen;//&&level.maptime%3!=0;
Code: Select all
Script error, "PyWeaponWheel_TrancFix.pk3:zscript/pyw/ev_core.zsc" line 635:
Expression must be a modifiable value
So, I'm not sure what to do there and it is now the only warning on start up so I'd like to get it sorted. Any ideas?
-
- Posts: 2114
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
Those are mostly right. However, what you replace CharCodeAt and CharAt depends on the contents of the string.Enjay wrote: I *think* I have addressed most of them using the deprecation warnings.
I replaced all instances of CharCodeAt with ByteAt() and that seems to be working.
I replaced all instances of CharAt with Mid(). Honestly, I wasn't sure whether to use Left or Mid, but Mid seems to be working.
I replaced all instances of frozen with Level.isFrozen() and that also seems to be working - with one exception (noted below).
I replaced all instances of S_Sound with S_StartSound and that too seems to be working.
So, question number 1, are those replacements all suitable? The wiki seems to be a bit thin on exactly how some of these are meant to work. They seem to be working but there could easily be some functionality that I have missed or don't recognise as not working correctly.
If it's pretty much guaranteed to be ASCII-only (e.g., class names), it's safe to use "ByteAt (index)" and "Mid (index, 1)", respectively. If the text can contain Unicode characters (e.g., tags, cluster texts), however, then you need to iterate over the string manually with CodePointCount and GetNextCodePoint for the text to be handled correctly.
Thata's correct. "frozen" is a variable while "isFrozen" is a function, so the parentheses do need to be added there for it to work.For example, is it OK to replace:with:Code: Select all
if(level.frozen)
(the extra brackets make me wonder if it's OK, but if they are missing, I get an error: "Function 'isFrozen' used without ().")Code: Select all
if(Level.isFrozen())
In this specific case, it needs to be replaced with level.setFrozen instead. Like so:Question number 2 relates to line 635 in ev_core.zsc. Specifically, this error.The line is:Code: Select all
Script warning, "PyWeaponWheel_TrancFix.pk3:zscript/pyw/ev_core.zsc" line 635: Accessing deprecated member variable frozen - deprecated since 3.8.0, Use Level.isFrozen() instead
if I change that to:Code: Select all
Level.frozen = wheelIsOpen;//&&level.maptime%3!=0;
I getCode: Select all
Level.isFrozen() = wheelIsOpen;//&&level.maptime%3!=0;
If I miss off the () after Level.isFrozen I get told that the () is needed: "Function 'isFrozen' used without ()."Code: Select all
Script error, "PyWeaponWheel_TrancFix.pk3:zscript/pyw/ev_core.zsc" line 635: Expression must be a modifiable value
So, I'm not sure what to do there and it is now the only warning on start up so I'd like to get it sorted. Any ideas?
Code: Select all
Level.setFrozen (wheelIsOpen);
-
-
- Posts: 26540
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
Thank you kindly. The "Level.setFrozen" did the job. All warnings are now gone.
I'll look through all my other changes as well to try and check against the information that you provided.
Thanks again.
I'll look through all my other changes as well to try and check against the information that you provided.
Thanks again.
-
- Posts: 97
- Joined: Sun Jul 27, 2014 10:25 am
-
- Spotlight Team
- Posts: 1374
- Joined: Fri May 02, 2008 12:29 pm
- Location: Germany
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
I was wondering if this might possibly be used as a base to replicate the weapon wheel from the Unity release on Steam.
-
- Posts: 50
- Joined: Fri Mar 01, 2019 2:30 am
-
- Posts: 112
- Joined: Mon Aug 01, 2016 9:06 am
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
Can i_timescale be used with this mod to simulate the slowdown effect from NuDoom instead of freezing?
-
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
i_timescale can't be changed by mods right now; there's a lot of stuff that is tied to it that would not behave correctly, such as input handling.SiMpLeToNiUm wrote:Can i_timescale be used with this mod to simulate the slowdown effect from NuDoom instead of freezing?
-
- Posts: 112
- Joined: Mon Aug 01, 2016 9:06 am
Re: [WIP] PyWeaponWheel v0.3 - Universal weapon wheel!
Darn. And I imagine there's not much else that would do something similar?