Project Zomboid

Project Zomboid

UAL - Unequip And Listen
22 条留言
ribs  [作者] 9 月 18 日 上午 3:07 
@DOG1804

I double-checked and found the issue. I’ve uploaded an update to the mod, please resubscribe and reapply the class file overrides.
ribs  [作者] 9 月 17 日 上午 10:32 
@skakk
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3569873370

I tested with both mods. In week one I was getting some errors but the radio was still playing even when unequipped.

I checked the code of both mods and there are some instances where the radio gets turned off, but they are tied to item creation and task handling, not directly to unequipping or sound control. Maybe it was just a bug. The tricky part is that we cannot reproduce the exact steps that caused it.

@DOG1804
The behavior you mentioned is definitely strange. I have never run into that myself. Try starting a new game with no mods enabled except UAL and test again. At least now we know it is a mod incompatibility and the next step is figuring out which mod is responsible.
DOG1804 9 月 16 日 下午 4:59 
Well, I rearranged the loading order and the radios stay on so it works fine, now the problem is that it doesn't show me the texts and the radio sound doesn't follow me, it stays fixed on the world
Skakk 9 月 16 日 下午 3:54 
Its possible that I didn't have the Broadcast Voicer mod activated, although I am subscribed to it and believe it was enabled.
Sorry I can't help you confirm my issue, as I now have a different load order so can't check what it was.
Yes that mod you linked and this one;
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3403180543

Again I don't know if these mods were the issue, I just suspected it may have compatibility issues due to the Week One mod having its own voiced broadcast on the tv on day 1.
ribs  [作者] 9 月 16 日 下午 12:20 
@Skak

All KTRO mods do is bypass the Lua-side function ISRadioWindow:update , which turns off the radio in vanilla. They do not keep radio stations on, since that part is handled on the Java side. That is why the Radio TV - Core mod and UAL mod exist, to remove the Java code that disables sound and chat when unequipped.

The Survivor Radio mod uses Broadcast Voicer as a base. When Broadcast Voicer is enabled, a function called RadioWavs.adjustSounds runs every tick and turns the radio off. This is not part of the vanilla ISRadioWindow:update method, which is why it needs patching.

I asked for the links because there are several Week One and Bandits mods. If you share the exact ones, I can test them directly. Having the links would save me the time of searching through every Bandits mod. I guess you might be referring to this one: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3268487204 but I am not sure.
Skakk 9 月 16 日 下午 12:02 
@ribs - I potentially had issues with your previous mods(KTRO) not allowing Survivor Radio audio to work, although you never confirmed if they would allow it or that they were just to prevent walkies from turning off when unequipped.
I think my load order and/or 'Week One' mod were interfering with Survivor radio not having audio.

I am relatively new to B42 version of the game, and i didn't do much troubleshooting, so can't say if your mod was actually the issue.

Since deactivating only Bandits2 and Week One mods and using your new mods in the order you posted, I now have audio for Survivor Radio.
ribs  [作者] 9 月 16 日 上午 10:47 
@Skakk could you please send me the links to the mods you suspect disable the radio? I can test them here.
ribs  [作者] 9 月 16 日 上午 10:37 
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3569345562

It works for the Alice webbing slot when you unequip it. Do you suspect any other special slot or mod might be causing it?

Please try equipping the radio again. Does it turn off every time you unequip it, or does it stay on?

If it stays on, the Lua part is working and you need to properly install the core mod:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3568442599

If it turns off, then the Lua part is shutting down. Try loading a new game without any other mods and check if it works. I also uploaded a mod load order for you to see how the mods should be loaded for it to work. Try the vanilla radios first.
DOG1804 9 月 16 日 上午 7:21 
You can add support for special slots, they don't work as they should https://imgur.com/a/jsKJuwp
Skakk 9 月 15 日 下午 9:21 
Cheers ribs,
Survivor Radio has audio for me again.

Not sure on the load order I had, but either the load order was off or 'Week One' mod was incompatible. I removed Bandits & Week One due to lag issues, and tweaked load order to your sequence and now it works.
Thanks for everything.
ribs  [作者] 9 月 15 日 下午 7:58 
No problem. Glad you understand.

Here’s a working sequence:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3568467372

Use this if you want survivor radio and voiced radio.
Skakk 9 月 15 日 下午 5:59 
UAL - Broadcast Voicer?
Skakk 9 月 15 日 下午 5:58 
Thanks for a detailed account.
Its well over my ken, and you seem to have spent alot of time testing different approaches.

I was meaning to ask on your other mod for unequpping walkies, do you recommend we use this new mod sequence now?
UAL
Ribs Framework
Radio TV Core
KTRO - Mod Friendly

I use Survivor Radio also, so I will need the other mod also for it to work?
ribs  [作者] 9 月 15 日 下午 5:10 
It is unfortunate we need to go this deep to make a change that should be simple. Realistically, I should not need to hold a radio in my hand the entire time for it to work.

The old approach modified the GameCharacter class to block unequipping the radio. While functional, it required changes to a class that is large, unstable, and not directly related to radios.

The new approach (Radio TV - Core) modifies three classes that directly manage radios:
- DeviceData – Sends sounds to the player
- ZomboidRadio – Receives and processes radio chats
- IsoWaveSignal – Displays chat above the player’s head
ribs  [作者] 9 月 15 日 下午 5:10 
Besides the unequipped radio behavior, these classes also handle many unrelated tasks. This is another reason not to merge them.

To keep things organized, I split the work into four parts:
- Core mod – The modified classes
- UAL main mod – Sandbox options that enable core behaviors
- UAL patches – Adjustments for other mods that might disable radios
- Keep That Radio On! – Blocks disabling radios at the Lua level only in vanilla
ribs  [作者] 9 月 15 日 下午 5:10 
We first tried merging everything into one mod, but it created more problems than it solved. This modular structure is better because:

1. The main mod does not need changes if another mod disables radios. A targeted patch can handle it, and only players using that specific mod need the patch.
2. Players only download what they need. If you just want to keep the radio on, there is a mod for that. If you only want the vanilla radio on, there is a mod for that, etc.
3. It allows easier feature expansion. With the core separated, we can extend radio and TV features through modules. Generator example: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3565376571
4. The code is far more organized and modular, making it easier to maintain.

We also improved class detection. The mod now warns players if a class is uninstalled or outdated, so anyone installing it will know immediately if something is wrong.
Skakk 9 月 15 日 下午 4:51 
Ribs you fixed this issue that has also not made sense to me, but also as you have pointed out and Flexible Games is doing now, its not the ideal way we would like it to be done. Its important for those looking to use this system to know the 'dangers'. I assume a game delete and fresh install will set the game back to vanilla, should an game update require this.

@ribs ; would it be possible to use this system of allowing walkies to work when unequipped to be contained solely within a mod?
ribs  [作者] 9 月 15 日 上午 6:11 
Yeah, it’s annoying, but it can happen with regular mods too, especially on the unstable build. I made this mod because I had been waiting for someone else to do it for years, until I finally got the motivation to take it on myself. I just hope people will keep pushing things forward after I’m gone. The radio turning off when unequipped never made any sense to me.
Flexible Games 9 月 15 日 上午 12:39 
The issue is updates overwriting the custom .class file and any small edit on the dev side will require a recompile to ensure the code they add or change is properly reflected.
I maintain an edit to the itemcontainer class to allow my character more inventory space.
ribs  [作者] 9 月 14 日 下午 9:21 
I believe the changes made in this mod have a low chance of breaking in future game versions. The radio and TV systems are already mature features, so they should remain stable unless a new game feature is introduced in those areas. I do not expect that to be the case.
ribs  [作者] 9 月 14 日 下午 9:17 
@Flexible Games

Thanks, I hope this turns out to be a great mod for you. I spent over 80 hours on it. If you check the GitHub (and the mod directory) you will also find the Java file, so you can review the changes yourself. The class files changes are not that big, actually. Most of the effort went into locating the code, making the changes, updating the framework to support multiple classes, adding dependency checks, and testing it repeatedly with different configurations to ensure it works. I am confident that if I cannot continue with future updates, someone else will.
Flexible Games 9 月 14 日 下午 6:50 
I advise caution with any mod that requires a .class file overwrite.
First, these break with every or almost every new version of the game.
Second, if the author of the mod ever gets tired of having to redo all the work again and again and abandons the mod, it breaks. I learned this the hard way and have had to maintain a single mod to keep playing but not everyone can just recompile a rebuilt java file.

This isn't against the mod at all. I'm sure it's great. But for those who don't know what overwriting files in the zombie directory means, it means a new compiled file is being overwritten. This could have unforeseen consequences for your save or for other mods.