Cities: Skylines

Cities: Skylines

Vehicle Effects 1.9.5
 Este tema se ha marcado como fijo, por lo que probablemente sea importante
Acc3ss Violation  [desarrollador] 6 ENE 2018 a las 4:46
Custom Sounds - Tutorial + sharing
Sometimes you just want a custom sound instead of using one of the defaults. Making a plugin just to add one sound effect is a bit much. That's why you can now (version 1.7 and up) use Vehicle Effects' build-in sound effect loader to create a custom sound effect with a simple xml file. These xml files can be included in either a mod or asset directory and Vehicle Effects will load them automatically. All you need is a text editor and a sound file in a suitable format (.ogg always works, check the Unity documentation for a proper list).

The config
A file containing sound effects should be called SoundEffects.xml and must be placed in a mod's or asset's root folder, same as with VehicleEffectDefinition.xml. Below is the contents of VE's own SoundEffects.xml file, showing 6 of the sound effects included in the mod.
<?xml version="1.0" encoding="utf-8" ?> <SoundEffectsDefinition> <Effects> <SoundEffect name="Steam Train Movement" base="Train Movement" file="sounds/steam-engine-a3-moving.ogg" type="EngineSoundEffect" volume="0.7" /> <SoundEffect name="Diesel Train Movement" base="Train Movement" file="sounds/diesel-engine-sd45-moving.ogg" type="EngineSoundEffect" /> <SoundEffect name="Rolling Train Movement" base="Train Movement" file="sounds/rolling-stock-moving.ogg" type="EngineSoundEffect" volume="0.8" /> <SoundEffect name="Train Bell" base="Train Movement" file="sounds/train-bell.ogg" volume="0.8" pitch="1.0" loop="true" randomtime="false" /> <SoundEffect name="Train Horn" base="Train Movement" file="sounds/train-horn-loop.ogg" fadelength="0.18" volume="0.7" pitch="1.0" loop="true" randomtime="false" /> <SoundEffect name="Train Whistle" base="Train Movement" file="sounds/train-whistle.ogg" fadelength="0.4" volume="0.7" pitch="1.4" loop="true" randomtime="false" /> </Effects> </SoundEffectsDefinition>

The important thing here are the SoundEffect tags, which have a few required attributes: name, base and file. The rest of the attributes are optional and can be used to change the sound settings. An important attribute is type, this determines the type of sound effect that will be created. It defaults to SoundEffect, but for vehicle movement (engine) sounds it must be set to EngineSoundEffect to allow for speed and acceleration dependent pitch and audio range.

The attributes
Here's a list of all attributes and what they do. A * indicates that it can only be used with an EngineSoundEffect. All numbers are floats, so you can use decimal values.

type - The type of effect, can be SoundEffect or EngineSoundEffect name - Name of the effect base - Template effect name file - Audio file location range - Range the effect is audible at (in meters?) volume - Volume, should be between 0 and 1 pitch - Pitch fadelength - Fade in and fade out duration in seconds loop - Set to true to loop is3d - Just don't touch it randomtime - When true, starts the sound at a random time *minpitch - Minimum pitch *minrange - Minimum range *pitcham - Pitch acceleration multiplier *pitchsm - Pitch speed multiplier *rangeam - Range acceleration multiplier *rangesm - Range speed multiplier

Something about load order
There are some things to keep in mind about the loading process that Vehicle Effects uses for custom sound effects. To start, mod folders are always loaded first before it checks and loads from asset folders. When it detects that another custom effect already exists with the same name it won't load any other with that same name. Error messages for duplicate effects are only displayed when loading from mod folders. This means that you can include the same effect config and sound in multiple assets without having to worry about the mod complaining or loading duplicate effects.
Última edición por Acc3ss Violation; 22 FEB 2018 a las 6:27
< >
Mostrando 1-15 de 20 comentarios
brunna 22 FEB 2018 a las 3:08 
Hi!
I made two new basic sound effect by this description.

New Electric Engine Sound: (eg: Siemens Vectron)
https://youtu.be/tOFEZojIOxM
New EMU sound: (eg: Stadler Kiss)
https://youtu.be/4Djx9W2gcfc

Here are the files:
https://drive.google.com/open?id=16ZqciqmsuiSTnYe0jQGmLQXh0aKljlg1
NewMasterChoco 4 ABR 2018 a las 10:40 
So, I have to create an xml file and save that in the asset folder of the game? What is the file location for that?
Acc3ss Violation  [desarrollador] 5 ABR 2018 a las 0:45 
On windows it's %localappdata%\Colossal Order\Cities_Skylines\Addons\Assets
NewMasterChoco 5 ABR 2018 a las 3:56 
Publicado originalmente por Acc3ss Violation:
On windows it's %localappdata%\Colossal Order\Cities_Skylines\Addons\Assets

Thank you. Although, is there any that for the sound effect of bullet train?
Acc3ss Violation  [desarrollador] 5 ABR 2018 a las 9:16 
I don't have any, maybe someone else already has sound effects made for that.
KriZ 29 ABR 2018 a las 14:52 
does vehicle effect require it to be inside the specific asset folder to target the specific asset? or could the vehicle be targeted by a seperate asset folder with the xml file and etc inside?
Acc3ss Violation  [desarrollador] 30 ABR 2018 a las 1:33 
No, asset and configs don't need to be in the same folder. As long as a config is in any enabled asset or mod's root folder (so it gets loaded) it will work.
Distanced 26 OCT 2018 a las 19:24 
Any way we could get a "delay" attribute, that delays the sound since the flag for a set amount of seconds?
Acc3ss Violation  [desarrollador] 27 OCT 2018 a las 2:07 
Not really with the way the game handles those flags
Jotrain Gamer 20 FEB 2019 a las 2:32 
Do I just put the file in Assets folder cause i'm not entirely certain.
Acc3ss Violation  [desarrollador] 20 FEB 2019 a las 9:47 
Yeah that works.
Maxthefox 25 MAR 2019 a las 13:18 
Is it just me or does this mod not work anymore?
Evil Dave of Canada 3 JUN 2019 a las 16:52 
I hope this wonderful mod is still working as of the Campus DLC.
nardo 4 JUL 2020 a las 2:51 
Does anybody have an example folder i can copy off of? I mean i could do all this from scratch but if someone could help out, it'd make stuff easier!
THANKS!!
Acc3ss Violation  [desarrollador] 4 JUL 2020 a las 3:24 
The mod itself also uses this system for some sound effects, so you can use those as an example.

The xml: https://github.com/Acc3ssViolation/VehicleEffects/blob/master/VehicleEffects/SoundEffects.xml

The sound files: https://github.com/Acc3ssViolation/VehicleEffects/tree/master/VehicleEffects/Sounds
< >
Mostrando 1-15 de 20 comentarios
Por página: 1530 50