Laddar...

Tunable Home Radio 2.0

Cab501 tunablehomeradio

6119

Version 2.0
This modification, along with its associated files, has undergone a rewrite.

Background:
Static emitters are placed around the GTAV map. This script can enable and disable a custom selection of these emitters as well as change the radio station played.

Purpose:
Choose the preferred radio station for locations, including the homes of Michael, Franklin, and Trevor.
86 radio stations are provided, for example 18 ordinary ones and hidden options.

In the configuration file you can set the radio station you want to be played. The radio station set in-game is used by default by the script.

Choose the static emitters which you want to be effected by modifying THR_Enabled_Static_Emitters.txt and THR_Disabled_Static_Emitters.txt
See the static emitter reference text files for names to add.

746 static emitter names are provided in the text file "Reference - All static emitters.txt". By default 135 emitter names are enabled and 0 disabled.

Core features:
- The mod maintains lists of enabled and disabled static emitters by reading their names from text files.
- It sets the radio station for these emitters based on the configured value or the player's current radio station in the game.
- The script automatically updates the game when files are changed.

More features:
- Automatic calls of static emitter native functions.
- Option for manual call by bringing out the phone.
- Option for using the vehicle radio channel.
- Option for instead of vehicle radio using user-defined radio channel in .ini file.
- Option for writing log file for debugging.

Static Emitter Names:
135 out of 611 static emitter names are in use by the script by default.
746 names in total.
Names can be put in either THR_Enabled_Static_Emitters.txt or THR_Disabled_Static_Emitters.txt.

If more static emitter names are found, these can be added to a suitable text file.

String sources:
- Source to radio stations added:
https://github.com/DurtyFree/gta-v-data-dumps/blob/master/radioStations.json
Reference textfile is provided.

- Sources to static emitters added:
https://github.com/kibook/pmms/blob/master/staticEmitters.lua
https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json


How it works, natives used:
The core features of this script are very simple. The native functions used for this are:
AUDIO::GET_PLAYER_RADIO_STATION_NAME https://gta5.nativedb.dotindustries.dev/natives/0xF6D733C32076AD03
AUDIO::SET_EMITTER_RADIO_STATION https://gta5.nativedb.dotindustries.dev/natives/0xACF57305B12AF907
AUDIO::SET_STATIC_EMITTER_ENABLED https://gta5.nativedb.dotindustries.dev/natives/0x399D2D3B33F1B8EB

Use these with the strings/names specified above if you're making your own script/mod (static emitters' names and radio station names).


Installation:
You need the latest version of the tool Script Hook V by Alexander Blade.

Extract the content of the .zip file into your GTA5 folder where your GTA5.exe is located.
That means the TunableHomeRadio 2.0.asi file inside the root GTA-folder:
GTAV\TunableHomeRadio 2.0.asi

And the "Tunable Home Radio" folder:
GTAV\Tunable Home Radio

Contents of the "Tunable Home Radio" folder:

GTAV\Tunable Home Radio\THR_Disabled_Static_Emitters.txt
GTAV\Tunable Home Radio\THR_Enabled_Static_Emitters.txt
GTAV\Tunable Home Radio\TunableHomeRadio2.ini
GTAV\Tunable Home Radio\Reference - All static emitters.txt
TAV\Tunable Home Radio\Reference - All static radio stations.txt
GTAV\Tunable Home Radio\Reference - Static emitters not in use by default.txt

Removing the script (TunableHomeRadio 2.0.asi) disables the mod.

Optional installation instructions found from research after the release of 2.0:
Latest list of static emitters connected to homes: https://pastebin.com/wSiqQmg9
Hard to find static emitter names found for certain locations of special interest:

- The basement radio in Franklin's house in Vinewood:
Add a row to the text file ("THR_Enabled_Static_Emitters.txt") in the same format as before (no spaces) with this content:
hash_e2ed8e27_bsqqjnt_collision

More Research
There is a lack of extensive documentation done in this area. If you want to you can add names from "Reference - Static emitters not in use by default.txt" to "THR_Enabled_Static_Emitters.txt" and test it out around the map. The configuration file has settings which helps when testing. All help is appreciated, https://discord.gg/nBqxk4j

Note that https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json can help a lot when trying to find a name connected to a location. It has information like Name, Position, Interior, Room, RadioStation for every entry.

Research/documentation needed: Related features that might not exist in a mod yet:
- Creating new objects, register them as static emitters and make them respond to AUDIO::SET_STATIC_EMITTER_ENABLED and AUDIO::SET_EMITTER_RADIO_STATION
Here is the native function involved in this including some decompiled code:
https://gta5.nativedb.dotindustries.dev/natives/0x651D3228960D08AF?search=LINK_STATIC_EMITTER_TO_ENTITY

How to make changes in the configuration file:
Inside your installed "Tunable Home Radio" folder, there's a file called TunableHomeRadio2.ini.
This file can be opened and edited just like a text file but you might have to right-click on it and click open as. You can use any text editor, like notepad.

Make changes in the configuration file and save it. These changes will take effect when you tab back into the game. There is no need to restart anything. Just go Alt + Tab while playing and switch to the .ini file, make some changes, save, and Alt + Tab back into the game.

More info:
- Note that the mod is automatically disabled by the script hook when going online into multiplayer.

Glossary:
Static emitters: These are places in the game that generate sounds.
Native functions: These are built-in functions used by the game to create scripts that provide content and perform specific tasks. Thanks to script hook and research, we can
use these functions to create our scripts. Basically, all mods are made using native functions that people have found.

Discord:
https://discord.gg/nBqxk4j

Complementing mod
If you also want to only play certain radio stations of your choosing in vehicles you can use this mod to customize.

Changelog
1.1
Removed static emitters which could come in conflict with other mods. Can be turned back on in the config file.

1.2
Divided up emitters into more categories to choose from in the configuration file.
Changes in the ini
In this version, extract the .zip file and copy TunableHomeRadio 1.0.asi and TunableHomeRadio.ini into your GTA5 folder where your GTA5.exe is located.

In addition to the 18 ordinary radio stations you can play 13 "hidden" ones as well.

Issue: The radio downstairs in Franklin's Vinewood house is of another radio-emitter type and because of that it's not affected by the mod. Maybe it can be fixed later.

If you use F.F.F.R, it already uses a version of this.

2.0
Complete rewrite. See full description above.
Show Full Description

Först uppladdad: 3 november 2016
Senast uppdaterad: 2 mars 2024
Senast nedladdad: 1 timma sedan

All Versions

 2.0 (current)

856 nerladdade , 100 KB
2 mars 2024

 1.2

5263 nerladdade , 50 KB
3 november 2016

78 Kommentarer