Jump to content
Jether

Real Radios

Recommended Posts

With the release of radios in iwbums 33 we got radios! Sadly radios arent as awesome as i hoped. I am no expert modder but have dabbled in some codedry and it seems possible to cause music to trigger music scripts when a radio is activated. Again im no expert and if anyone could enlighten me a bit more on this i'd love to know but im hoping someone can help me bring music into the game such as old classical songs maybe the fallout 3/4 soundtrack and other past copyrighted songs that are available. Also through modding im led to believe we could probally put current songs into the mod as a mod is non profit but the legal implications are sketchy at best.

 

I only speak Python so i never dabbled with the Java coding so im a bit of a novice here! Looking for help.

Share this post


Link to post
Share on other sites

Seems to be possible with Lua modding.

Event catcher + music playing would only require like one three lines long function, tops.

 

I could also add custom music input (player can put music into folders and the mod will play them) and lyric support.

 

Shouldn't require too much work, I'll see what I can do once I finish the Fast Travel mod.

Share this post


Link to post
Share on other sites

Seems to be possible with Lua modding.

Event catcher + music playing would only require like one three lines long function, tops.

 

I could also add custom music input (player can put music into folders and the mod will play them) and lyric support.

 

Shouldn't require too much work, I'll see what I can do once I finish the Fast Travel mod.

That sounds great! I was planning on having this on a server so will the server owner be able to drop the music into the folder? Or will it be client side? Been hoping to have a server radiostation with a dj.

 

Edit: Are you talking about fast travel like in fallout or many other games? Could use the same commands that the cheat menu mod uses and add a fade to black screen with a timer. Maybe make it require food or resources to use it.

Share this post


Link to post
Share on other sites

 

Seems to be possible with Lua modding.

Event catcher + music playing would only require like one three lines long function, tops.

 

I could also add custom music input (player can put music into folders and the mod will play them) and lyric support.

 

Shouldn't require too much work, I'll see what I can do once I finish the Fast Travel mod.

That sounds great! I was planning on having this on a server so will the server owner be able to drop the music into the folder? Or will it be client side? Been hoping to have a server radiostation with a dj.

 

Edit: Are you talking about fast travel like in fallout or many other games? Could use the same commands that the cheat menu mod uses and add a fade to black screen with a timer. Maybe make it require food or resources to use it.

 

With the inclusion of FMOD I could definitely make it server sided. Assuming I can create sounds at any location, it shouldn't be too hard.

 

 

I'm the creator of Cheat Menu, so porting some of the code over to a Fast Travel mod and adding some stat debuffs shouldn't be too hard. I'm just trying to find time to get it done :P

It'll let you enter custom locations and either mark their coordinates down on a window that acts like a GPS or teleport there in exchange for stat debuffs.

I might even add some fancy new things, such as named custom locations and presets for Workshop maps.

Share this post


Link to post
Share on other sites

 

 

Seems to be possible with Lua modding.

Event catcher + music playing would only require like one three lines long function, tops.

 

I could also add custom music input (player can put music into folders and the mod will play them) and lyric support.

 

Shouldn't require too much work, I'll see what I can do once I finish the Fast Travel mod.

That sounds great! I was planning on having this on a server so will the server owner be able to drop the music into the folder? Or will it be client side? Been hoping to have a server radiostation with a dj.

 

Edit: Are you talking about fast travel like in fallout or many other games? Could use the same commands that the cheat menu mod uses and add a fade to black screen with a timer. Maybe make it require food or resources to use it.

 

With the inclusion of FMOD I could definitely make it server sided. Assuming I can create sounds at any location, it shouldn't be too hard.

 

 

I'm the creator of Cheat Menu, so porting some of the code over to a Fast Travel mod and adding some stat debuffs shouldn't be too hard. I'm just trying to find time to get it done :P

It'll let you enter custom locations and either mark their coordinates down on a window that acts like a GPS or teleport there in exchange for stat debuffs.

I might even add some fancy new things, such as named custom locations and presets for Workshop maps.

 

Could nick the gps off the hydrocraft mod that gives you coordinates. The best part of this game is how easily you can cannibalize everything. I myself am checking into lua as ive never heard of it until now and am told its easy to learn. Would love to find a mentor haha.

Share this post


Link to post
Share on other sites

 

 

 

Seems to be possible with Lua modding.

Event catcher + music playing would only require like one three lines long function, tops.

 

I could also add custom music input (player can put music into folders and the mod will play them) and lyric support.

 

Shouldn't require too much work, I'll see what I can do once I finish the Fast Travel mod.

That sounds great! I was planning on having this on a server so will the server owner be able to drop the music into the folder? Or will it be client side? Been hoping to have a server radiostation with a dj.

 

Edit: Are you talking about fast travel like in fallout or many other games? Could use the same commands that the cheat menu mod uses and add a fade to black screen with a timer. Maybe make it require food or resources to use it.

 

With the inclusion of FMOD I could definitely make it server sided. Assuming I can create sounds at any location, it shouldn't be too hard.

 

 

I'm the creator of Cheat Menu, so porting some of the code over to a Fast Travel mod and adding some stat debuffs shouldn't be too hard. I'm just trying to find time to get it done :P

It'll let you enter custom locations and either mark their coordinates down on a window that acts like a GPS or teleport there in exchange for stat debuffs.

I might even add some fancy new things, such as named custom locations and presets for Workshop maps.

 

Could nick the gps off the hydrocraft mod that gives you coordinates. The best part of this game is how easily you can cannibalize everything. I myself am checking into lua as ive never heard of it until now and am told its easy to learn. Would love to find a mentor haha.

 

I made the GPS for the Hydrocraft too :P

Cheat Menu's core library is completely modular, and is pretty easy to repurpose and add to.

 

I'd recommend experimenting by creating your own mods, and dissecting other mods to learn how they work. Once you've gotten the hang of it, decompile the Java source so you can see what functions you can call.

The mod help section is the best place to ask for help with anything Lua related, as there are a bunch of gurus there who are a lot more experienced than I am.

Share this post


Link to post
Share on other sites

 

 

 

 

Seems to be possible with Lua modding.

Event catcher + music playing would only require like one three lines long function, tops.

 

I could also add custom music input (player can put music into folders and the mod will play them) and lyric support.

 

Shouldn't require too much work, I'll see what I can do once I finish the Fast Travel mod.

That sounds great! I was planning on having this on a server so will the server owner be able to drop the music into the folder? Or will it be client side? Been hoping to have a server radiostation with a dj.

 

Edit: Are you talking about fast travel like in fallout or many other games? Could use the same commands that the cheat menu mod uses and add a fade to black screen with a timer. Maybe make it require food or resources to use it.

 

With the inclusion of FMOD I could definitely make it server sided. Assuming I can create sounds at any location, it shouldn't be too hard.

 

 

I'm the creator of Cheat Menu, so porting some of the code over to a Fast Travel mod and adding some stat debuffs shouldn't be too hard. I'm just trying to find time to get it done :P

It'll let you enter custom locations and either mark their coordinates down on a window that acts like a GPS or teleport there in exchange for stat debuffs.

I might even add some fancy new things, such as named custom locations and presets for Workshop maps.

 

Could nick the gps off the hydrocraft mod that gives you coordinates. The best part of this game is how easily you can cannibalize everything. I myself am checking into lua as ive never heard of it until now and am told its easy to learn. Would love to find a mentor haha.

 

I made the GPS for the Hydrocraft too :P

Cheat Menu's core library is completely modular, and is pretty easy to repurpose and add to.

 

I'd recommend experimenting by creating your own mods, and dissecting other mods to learn how they work. Once you've gotten the hang of it, decompile the Java source so you can see what functions you can call.

The mod help section is the best place to ask for help with anything Lua related, as there are a bunch of gurus there who are a lot more experienced than I am.

 

Ya if i can find ssome free time i will tear into those files. 

Share this post


Link to post
Share on other sites

 

*snip*

Almost forgot to mention this, but I highly recommend Notepad ++ (link)

It has several programming language context highlighting options, automatic completion, plugin compatibility, etc.

 

Ya i heard about was planning on checking it out thanks for the link.

Share this post


Link to post
Share on other sites

YESSSS

 

Seems to be possible with Lua modding.

Event catcher + music playing would only require like one three lines long function, tops.

 

I could also add custom music input (player can put music into folders and the mod will play them) and lyric support.

 

Shouldn't require too much work, I'll see what I can do once I finish the Fast Travel mod.

Share this post


Link to post
Share on other sites

I've finally recovered after burning out in interest for PZ mods, so I figured I'd finish up what was on my plate.

 

Cheat Menu V2.3 is almost done, so I'll need a new project. Kinda stumbled upon this thread by accident, so I might as well take up this one.

 

Anyways, now for the problem. Radios in Project Zomboid are text based. After decompiling and decrypting the radio XML files, I've seen that radio & TV channels are really just a collection of text lines that will show up if the radio is tuned to the assigned channel and the timing is right.

 

The function library for it is also fairly locked down, which I understand as the devs didn't want 6 months of writing to be leaked by somebody decompiling the code and just calling the functions that unscramble the radio & TV XML.

(i kinda sorta just made my own unscrambler and did it anyways)

It allows user-made XML files to be used, but that's about it as far as I've seen. It was supposed to handle text, not sound.

 

My development style goes like this for new subjects: reverse engineer and figure out how it works, mess around with the material it gives me, and then put that knowledge to use for my project.

 

I'm going to lurk around the source a bit more and see what I can do. I'm self taught and I've only known how to code for six months, as opposed to the TIS team and the lua gurus here.

 

tl;dr: The exposed functions for the radio don't offer very much wiggle room, and I'm going to need more experience with it.

Share this post


Link to post
Share on other sites
On 12/30/2015 at 2:31 PM, ethanwdp said:

I've finally recovered after burning out in interest for PZ mods, so I figured I'd finish up what was on my plate.

 

Cheat Menu V2.3 is almost done, so I'll need a new project. Kinda stumbled upon this thread by accident, so I might as well take up this one.

 

Anyways, now for the problem. Radios in Project Zomboid are text based. After decompiling and decrypting the radio XML files, I've seen that radio & TV channels are really just a collection of text lines that will show up if the radio is tuned to the assigned channel and the timing is right.

 

The function library for it is also fairly locked down, which I understand as the devs didn't want 6 months of writing to be leaked by somebody decompiling the code and just calling the functions that unscramble the radio & TV XML.

(i kinda sorta just made my own unscrambler and did it anyways)

It allows user-made XML files to be used, but that's about it as far as I've seen. It was supposed to handle text, not sound.

 

My development style goes like this for new subjects: reverse engineer and figure out how it works, mess around with the material it gives me, and then put that knowledge to use for my project.

 

I'm going to lurk around the source a bit more and see what I can do. I'm self taught and I've only known how to code for six months, as opposed to the TIS team and the lua gurus here.

 

tl;dr: The exposed functions for the radio don't offer very much wiggle room, and I'm going to need more experience with it.

Use a script that triggers the soundtrack when the script for the text is triggered on that channel. Pretty sure you can just add the mp3s to the list. An example being whenever a zombie sneaks up on you there is a sharo alert sound played which suggests a script that triggers it, so by infering that, you could potentially just use scripts to trigger the music. There is also plenty of classical and old rock music that no longer are bound by copyrights and i would have no issues helping.

Share this post


Link to post
Share on other sites

Ima take a look at the console and see what triggers when a radio station is picked. it is probaly a =true/=false value to trigger the text along with some other bits and bobs for time.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...