Particle modding:修订间差异

本页面所适用的版本可能已经过时,最后更新于1.5
(merge from offical wiki)
 
(文本替换 - 替换“[[Category:”为“[[分类:”)
第70行: 第70行:


{{Modding navbox}}
{{Modding navbox}}
[[Category:Modding]]
[[ 分类:Modding]]

2022年12月5日 (一) 16:10的版本


Particles are special entities used by other entities to create visual effects such as lightning, snow, etc.

Particles are defined in .asset files which are found in /Hearts of Iron IV/gfx/particles/.

Adding a Particle


Adding a Light

Lights are special types of particles that are referred to in entities, for example the muzzle flash of the gun during the combat animation.

Here is a generic example:

light = {
    name = "name_of_light"
    
    color = {
        r = { <float> }
        g = { <float> }
        b = { <float> }
    }
    
    intensity = <float>, fade
    radius = <float>
    falloff = <float>
    
    position = {
        x = <float>
        y = <float>
        z = <float>
    }
    
    animation = {
        name = "name_of_animation"
        start = <float>
        duration = <float>
        repeat = yes
        op = <type>
        minValue = <float>
        maxValue = <float>
        curve = {
            <?>
        }
    }
}
  • name is the name of the light.
  • color is the color of the light. The values take decimal RGB.
  • intensity is the intensity of the light, and the second value is whether it fades.
  • radius is the radius of the light.
  • falloff is the falloff gradient of the light.
  • position is the position of the light relative to the entity using it.
  • animation is animation to play for the light.

Animation

  • name is the name of the animation.
  • start is the starting position of the curve.
  • duration is the duration of the animation.
  • repeat determines whether the animation is repeated.
  • op determines how multiple sources mix. Can be multiply (MUL), additive (ADD) or absolute (ABS).
  • minValue is the minimum value on the curve.
  • maxValue is the maximum value on the curve.
  • curve is the curve used for the light.