Página 1 de 3
[SA] GTAFmod (Som motor realista)
Enviado: 18 Jan 2022, 10:22
por Farias
Salve rapazeada, trago pra vocês hoje meu primeiro mod ASI, trata-se de uma integração com uma das maiores bibliotecas de áudio dos jogos AAA, o FMOD! Com ele conseguimos fazer sons realistas através de interpolação de várias faixas de áudio.. Pra simplificar, peguei o banco de sons do Assetto Corsa e estou utilizando no GTA SA. E com ele você pode, inclusive, trocar de marcha!
Download
O código-fonte e o
download do mod (na versão Alpha 0.2) estão disponível no GitHub, através deste link:
GitHub releases
Procurando Kits de Bancos Compatíveis? Considere
comprar o jogo Assetto Corsa, ele contém vários carros e com eles o SFX.
Como teste, segue a seguir um pequeno pack com alguns bancos
(Ferrari 812, Ford GT40, Ford Mustang, Maxda RX7, Nissan GTR, Porsche 718, Toyota AE86, Toyota Supra), lembrando que é inteiramente de autoria de
Kunos Simulazioni:
Download do pack.
Mod em desenvolvimento
Pode conter alguns bugs, caso veja algum, por favor
reporte.
Como usar
Simples, só extrair o .7z e copiar a pasta GTAFmod para seu modloader.
Para inserir novos Banks, consulte a página do wiki
Bank INI File.
Shift: Passa de marcha
Ctrl: Reduz a marcha
F6: Embreagem (não necessário para a troca de marcha, mas você pode cortar giro)
Develop
Você pode desenvolver seus próprios banks de áudio utilizando o FMOD Studio, olhe esta página wiki no GitHub:
Create FMOD Bank
Além disso contém funções exportadas para você usar no seu próprio plugin, veja mais aqui:
ASI API
Aqui um preview do mod
Re: [SA] GTAFmod (Som motor realista)
Enviado: 18 Jan 2022, 16:31
por HzanRsxa2959
1.
Farias escreveu: ↑18 Jan 2022, 10:22
important to be in the modloader root:
modloader/GTAFmod
Do relative paths not work? If not, did you try using
PLUGIN_PATH (absolute path to the ASI folder) instead of
GAME_PATH (absolute path to the game folder)?
For
example, try changing
Código: Selecionar tudo
FMODAudio::CheckError(fmodSystem->loadBankFile(GAME_PATH((char*)"modloader\\GTAFmod\\banks\\common.bank"), FMOD_STUDIO_LOAD_BANK_NORMAL, &masterBank), "Failed on load bank Master");
to
Código: Selecionar tudo
FMODAudio::CheckError(fmodSystem->loadBankFile(PLUGIN_PATH((char*)"modloader\\GTAFmod\\banks\\common.bank"), FMOD_STUDIO_LOAD_BANK_NORMAL, &masterBank), "Failed on load bank Master");
2. Some API suggestions:
- An API function to set bank based on vehicle engine ID.
- An API function to set bank based on vehicle model ID.
- And it would be great if absolute paths to banks could be provided in the API functions so that it is possible to load banks from vehicles' own mods. For example, I have created a vehicle mod and installed it using Mod Loader. In the vehicle's mod's folder, I use an ASI file to call "void SetVehicleFMODBank(CVehicle* vehicle, string bank);" with an absolute path (using PLUGIN_PATH) so that I can distribute the bank along with the vehicle and the user only needs to have this mod for the bank to work, i.e., no need to put the bank of my vehicle in the GTAFmod banks folder. I will explain more if you want further elaboration.
Re: [SA] GTAFmod (Som motor realista)
Enviado: 18 Jan 2022, 17:31
por Farias
HzanRsxa2959 escreveu: ↑18 Jan 2022, 16:31
1.
Farias escreveu: ↑18 Jan 2022, 10:22
important to be in the modloader root:
modloader/GTAFmod
Do relative paths not work? If not, did you try using
PLUGIN_PATH (absolute path to the ASI folder) instead of
GAME_PATH (absolute path to the game folder)?
For
example, try changing
Código: Selecionar tudo
FMODAudio::CheckError(fmodSystem->loadBankFile(GAME_PATH((char*)"modloader\\GTAFmod\\banks\\common.bank"), FMOD_STUDIO_LOAD_BANK_NORMAL, &masterBank), "Failed on load bank Master");
to
Código: Selecionar tudo
FMODAudio::CheckError(fmodSystem->loadBankFile(PLUGIN_PATH((char*)"modloader\\GTAFmod\\banks\\common.bank"), FMOD_STUDIO_LOAD_BANK_NORMAL, &masterBank), "Failed on load bank Master");
2. Some API suggestions:
- An API function to set bank based on vehicle engine ID.
- An API function to set bank based on vehicle model ID.
- And it would be great if absolute paths to banks could be provided in the API functions so that it is possible to load banks from vehicles' own mods. For example, I have created a vehicle mod and installed it using Mod Loader. In the vehicle's mod's folder, I use an ASI file to call "void SetVehicleFMODBank(CVehicle* vehicle, string bank);" with an absolute path (using PLUGIN_PATH) so that I can distribute the bank along with the vehicle and the user only needs to have this mod for the bank to work, i.e., no need to put the bank of my vehicle in the GTAFmod banks folder. I will explain more if you want further elaboration.
1. Thanks for the plugin-relative path suggestion. I already fixed it in the new release.
2. These are great ideas, all of them have been implemented, you can find them on WIKI:
ASI API
Código: Selecionar tudo
void SetModelIdFMODBank(int id, char* bank, char* absolutePath);
void SetEngineSoundIdFMODBank(int id, char* bank, char* absolutePath);
Re: [SA] GTAFmod (Som motor realista)
Enviado: 18 Jan 2022, 18:49
por HzanRsxa2959
Farias escreveu: ↑18 Jan 2022, 17:31
1. Thanks for the plugin-relative path suggestion. I already fixed it in the new release.
2. These are great ideas, all of them have been implemented, you can find them on WIKI:
ASI API
Thanks so much! Well, I don't have more suggestions for now. I'll test the mod and keep you updated if I come up with anything else.
Re: [SA] GTAFmod (Som motor realista)
Enviado: 19 Jan 2022, 10:02
por HzanRsxa2959
Report:
1.
Farias escreveu: ↑18 Jan 2022, 17:31
HzanRsxa2959 escreveu: ↑18 Jan 2022, 16:31
1.
Farias escreveu: ↑18 Jan 2022, 10:22
important to be in the modloader root:
modloader/GTAFmod
Do relative paths not work? If not, did you try using
PLUGIN_PATH (absolute path to the ASI folder) instead of
GAME_PATH (absolute path to the game folder)?
For
example, try changing
Código: Selecionar tudo
FMODAudio::CheckError(fmodSystem->loadBankFile(GAME_PATH((char*)"modloader\\GTAFmod\\banks\\common.bank"), FMOD_STUDIO_LOAD_BANK_NORMAL, &masterBank), "Failed on load bank Master");
to
Código: Selecionar tudo
FMODAudio::CheckError(fmodSystem->loadBankFile(PLUGIN_PATH((char*)"modloader\\GTAFmod\\banks\\common.bank"), FMOD_STUDIO_LOAD_BANK_NORMAL, &masterBank), "Failed on load bank Master");
2. Some API suggestions:
- An API function to set bank based on vehicle engine ID.
- An API function to set bank based on vehicle model ID.
- And it would be great if absolute paths to banks could be provided in the API functions so that it is possible to load banks from vehicles' own mods. For example, I have created a vehicle mod and installed it using Mod Loader. In the vehicle's mod's folder, I use an ASI file to call "void SetVehicleFMODBank(CVehicle* vehicle, string bank);" with an absolute path (using PLUGIN_PATH) so that I can distribute the bank along with the vehicle and the user only needs to have this mod for the bank to work, i.e., no need to put the bank of my vehicle in the GTAFmod banks folder. I will explain more if you want further elaboration.
1. Thanks for the plugin-relative path suggestion. I already fixed it in the new release.
2. These are great ideas, all of them have been implemented, you can find them on WIKI:
ASI API
Código: Selecionar tudo
void SetModelIdFMODBank(int id, char* bank, char* absolutePath);
void SetEngineSoundIdFMODBank(int id, char* bank, char* absolutePath);
My mistake:
The code
being changed to
is wrong; it should be
Good on you for improvising that, though! But you should check again- just to make sure; I've seen some places in the code where you missed it, linked below:
2. Something is slightly off with the handling of vehicles:
- Most instances of bikes won't accelerate at all; NRG-500 frequently does, and HPV-1000 never.
- No vehicles ever reach full speed (fixed by changing AutomaticGearbox to Automatic in the INI).
Tested on a clean game with only
Essentials Pack and
CLEO Cheat Menu v3.
Here are my current INI settings:
Código: Selecionar tudo
[Audio]
MinRPM = 800
MidRPM = 4500
FinalRPM = 8000
MinRPMTorque = 0.8
MidRPMTorque = 1.2
FinalRPMTorque = 0.1
RPMVolume = 0.4
RPMAcceleration = 50
RPMDeceleration = 60
AutomaticGearbox = 1 ;1 = Automatic, 0 = Manual
PitchMultiply = 1
[Damage]
DamageWhenShiftingWrong = 0 ;1 = Damage, 0 = No damage
MaxRPMDamage = 800 ;8000+800 = 8800 RPM
DamageMultiply = 80
[GearRatio]
RelationR = -1
RelationN = 0
Relation1 = 3
Relation2 = 2
Relation3 = 1.6
Relation4 = 1.2
Relation5 = 0.9
Relation6 = 0.7
[Keys]
UpGearKey = 0 ;Shift
DownGearKey = 0 ;Ctrl
ClutchKey = 0 ;F7
I would propose the addition of a new INI setting, enabling which would disable everything but the sounds, and I would prefer this key to be enabled by default. I mean, don't get me wrong: the gear system is great! But it was
very confusing and time-consuming to figure out that this mod was the one affecting vehicles' handling, especially when I don't even use global handling mods!
Re: [SA] GTAFmod (Som motor realista)
Enviado: 19 Jan 2022, 10:38
por Farias
HzanRsxa2959 escreveu: ↑19 Jan 2022, 10:02
Report:
My mistake:
The code
being changed to
is wrong; it should be
Good on you for improvising that, though! But you should check again- just to make sure; I've seen some places in the code where you missed it, linked below:
Is already working via absolute path! In the case of the
GTAFmodDashboard.cpp script (which is a test) it puts the absolute path of the bank, I could put any path that the plugin will read. I could put
"F:\Games\Grand Theft Auto. San Andreas\GTA San Andreas\modloader\GTAFmod\banks\ks_mazda_rx7_spirit_r.bank" but obviously the test script wouldn't work for everyone.
HzanRsxa2959 escreveu: ↑19 Jan 2022, 10:02
2. Something is slightly off with the handling of vehicles:
- Most instances of bikes won't accelerate at all; NRG-500 frequently does, and HPV-1000 never.
hmm this is a bug, could you open an
issue please?
HzanRsxa2959 escreveu: ↑19 Jan 2022, 10:02
2. Something is slightly off with the handling of vehicles:
- No vehicles ever reach full speed (fixed by changing AutomaticGearbox to Automatic in the INI).
if in manual mode (Automatic = 0) you must use Shift to shift gears and Ctrl to downshift.
HzanRsxa2959 escreveu: ↑19 Jan 2022, 10:02
I would propose the addition of a new INI setting, enabling which would disable everything but the sounds, and I would prefer this key to be enabled by default. I mean, don't get me wrong: the gear system is great! But it was
very confusing and time-consuming to figure out that this mod was the one affecting vehicles' handling, especially when I don't even use global handling mods!
my initial idea was to use the game's gear logic to control the audio, but it turned out awful! So I started developing the transmission system, it's not perfect now but I guarantee that with some adjustments we'll get to a result that doesn't impact gameplay.
Again, thanks for the reports! 
Re: [SA] GTAFmod (Som motor realista)
Enviado: 19 Jan 2022, 12:09
por HzanRsxa2959
Farias escreveu: ↑19 Jan 2022, 10:38
but obviously the test script wouldn't work for everyone.
That makes sense. It is a test script, after all. Sorry to bother you with such a non-issue.
Farias escreveu: ↑19 Jan 2022, 10:38
hmm this is a bug, could you open an
issue please?
Done.
Farias escreveu: ↑19 Jan 2022, 10:38
my initial idea was to use the game's gear logic to control the audio, but it turned out awful! So I started developing the transmission system, it's not perfect now but I guarantee that with some adjustments we'll get to a result that doesn't impact gameplay.
So the audio depends on the transmission system? Well, it's nice that you're working on improving it. Looking forward to the final result!
Farias escreveu: ↑19 Jan 2022, 10:38
Again, thanks for the reports! 
You're welcome! Good luck!
Re: [SA] GTAFmod (Som motor realista)
Enviado: 19 Jan 2022, 23:13
por Farias
ATUALIZAÇÃO IMPORTANTE
Todo o sistema de troca de marchas manual foi deletado, agora as marchas são calculadas pelo próprio jogo são usadas, ficando mais arcade, causando menos estranheza.
O sistema de engrenagem manual será deixado para outro plugin.
Teste agora a versão v.0.10-alpha
clicando aqui.
Ainda não está perfeito:
O RPM final ainda não é calculado dependendo do carro e sim via INI.
Re: [SA] GTAFmod (Som motor realista)
Enviado: 23 Jan 2022, 00:44
por Mystertv
Sonhei com essa integração do FMod do Asseto por algum tempo, finalmente foi feito.
Infelizmente não funcionou aqui(ficou sem som os carros) segui os passos de instalação e também instalei os banks de exemplo, não sei se faltou algum complemento.
Mas de qualquer forma obrigado por fazer esse trabalho foda!
Re: [SA] GTAFmod (Som motor realista)
Enviado: 23 Jan 2022, 11:23
por Crowdigger
Mystertv escreveu: ↑23 Jan 2022, 00:44
Infelizmente não funcionou aqui(ficou sem som os carros) segui os passos de instalação e também instalei os banks de exemplo, não sei se faltou algum complemento.
Sim, mesma coisa aconteceu comigo, estou tentando ajudar a descobrir o motivo. Mas até agora nada.
Fazia muito tempo que esperava um mod desse
Re: [SA] GTAFmod (Som motor realista)
Enviado: 24 Jan 2022, 09:21
por Farias
Olá pessoal, me perdoem a demora.
Estou investigando o porquê de não estar funcionando no GTA de vocês, acredito que falta alguma dependência não instalada que o FMOD necessita, assim que eu tiver notícias eu trago para vocês.
Re: [SA] GTAFmod (Som motor realista)
Enviado: 24 Jan 2022, 19:13
por Farias
Open Beta (v.0.20) release!
- No audio fixed (plugin bug);
- Volume settings fixed;
- Vehicle wheel spin implemented;
- Required FMOD Logo implemented;
- Debug Build (for crash info);
- LOG System fixed;
Download in
release page on GitHub.
Re: [SA] GTAFmod (Som motor realista)
Enviado: 26 Jan 2022, 15:41
por KRITSKIY88
downloaded, threw in modloader, installed examples of your settings in the FMOD folder, no changes in the game
Re: [SA] GTAFmod (Som motor realista)
Enviado: 28 Jan 2022, 18:43
por Davve95
Perhaps you're intersted with messing with the other sound systems in the game?
I mean such as weapon sounds and sound effects etc.
Like dynamic audio or improve the default one someway.
Anyway, this mod is awesome. I have wanted something like this.
Re: [SA] GTAFmod (Som motor realista)
Enviado: 01 Fev 2022, 10:37
por XG417
Hi, just wanna say that this
SDK is corrupted and cannot be accessed when I download it