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] 9 MAR 2018 a las 3:40
'Custom' Particle Effects - Tutorial
To create a somewhat 'custom' particle effect you can now use an xml file. Most of the stuff on the Custom Sound page applies to this as well, so read that too. Currently the system is limited to changing properties of a MovementParticleEffect, so no custom sprites or custom ParticleSystem settings.

The config
A file containing sound effects should be called ParticleEffects.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 ParticleEffects.xml file, showing the Diesel Smoke effect.
<?xml version="1.0" encoding="utf-8" ?> <ParticleEffectsDefinition> <Effects> <ParticleEffect name="Diesel Smoke" base="Factory Smoke Small" velocitymultiplier="0" spawnarearadius="0.25" minmagnitude="0.1" magspeedmultiplier="0" magaccmultiplier="1" usebezier="false" usemeshdata="false" usepositions="true" minspawnangle="0" minstartspeed="5.5" minlifetime="1" maxlifetime="3" maxspawnangle="20" maxstartspeed="8.5" /> </Effects> </ParticleEffectsDefinition>

The important thing here is the Particle Effect tag, which has a few required attributes: name and base. The rest of the attributes are optional and can be used to change the particle settings.

The attributes
Here's a list of all attribute names, they map to properties of ParticleEffect, MovementParticleEffect and CustomMovementParticleEffect (Part of this mod).

name base usebezier usemeshdata usepositions extraradius maxlifetime maxspawnangle maxstartspeed maxvisdistance minlifetime minspawnangle minstartspeed renderduration usesimtime magaccmultiplier magspeedmultiplier minmagnitude velocitymultiplier spawnarearadius

Color overrides
You might want to change the blend color of the particle. To do this add a Color tag as a child of the ParticleEffect tag like so:
<?xml version="1.0" encoding="utf-8" ?> <ParticleEffectsDefinition> <Effects> <ParticleEffect name="Diesel Smoke" base="Factory Smoke Small" velocitymultiplier="0" spawnarearadius="0.25" minmagnitude="0.1" magspeedmultiplier="0" magaccmultiplier="1" usebezier="false" usemeshdata="false" usepositions="true" minspawnangle="0" minstartspeed="5.5" minlifetime="1" maxlifetime="3" maxspawnangle="20" maxstartspeed="8.5" > <Color r="1" g="1" b="1" a="1"/> </ParticleEffect> </Effects> </ParticleEffectsDefinition>
It uses values from 0 to 1.0 for r,g,b and alpha.

Something about load order
There are some things to keep in mind about the loading process that Vehicle Effects uses for custom particle 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; 23 OCT 2018 a las 2:56
< >
Mostrando 1-8 de 8 comentarios
Crofzed 9 OCT 2021 a las 9:31 
Hi, I get this error message when I try to load an XML document. Does anyone know where it comes from?

____

Text node cannot appear in this state. Line 1, position 39.
at Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace) [0x00000] in <filename unknown>:0
at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0
at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
at System.Xml.XmlReader.MoveToContent () [0x00000] in <filename unknown>:0
at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot () [0x00000] in <filename unknown>:0
at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader) [0x00000] in <filename unknown>:0

____
Acc3ss Violation  [desarrollador] 10 OCT 2021 a las 3:05 
Probably an XML format error at the first line
c95samuel 6 OCT 2022 a las 13:09 
hi all the changes i do in the Particles Effects xml arent making effect ingame, also it shows the error: The name of the asset - 'maxstartspeed' is expected Line 22, 8
i go to that line and it has this </Effects> what i have to do?
Acc3ss Violation  [desarrollador] 7 OCT 2022 a las 12:33 
Fix the file so it doesn't produce error, I can't help unless you post the whole thing here
c95samuel 30 OCT 2022 a las 18:07 
how to change the color of the steam? i tried changing the values of the rgb a but i dont see a change, and i only used from 0 to 1.0
Acc3ss Violation  [desarrollador] 31 OCT 2022 a las 11:29 
That should work, unless it broke at some point. Or maybe it doesn't work nicely with some particles.
GATOR17 13 MAY 2024 a las 14:04 
Which folder is the XML FIle suppose to be in?
Acc3ss Violation  [desarrollador] 18 MAY 2024 a las 11:03 
The mod scans any folder that has a .crp asset file in it, but in general you want to keep it together with the asset you're using it for.
< >
Mostrando 1-8 de 8 comentarios
Por página: 1530 50