Posteffect modding:修订间差异

本页面所适用的版本可能已经过时,最后更新于1.5
(文本替换 - 替换“[[Category:”为“[[分类:”)
无编辑摘要
 
第1行: 第1行:
{{version|1.5}}
{{version|1.5}}
{{需要翻译|译者=霜泽图书馆}}


Posteffects are color correction effects that are applied to the lighting in certain areas (volumes) on the map map. They are used to tint the lighting for areas where the lighting would be noticable different, i.e. deserts.
Posteffects are color correction effects that are applied to the lighting in certain areas (volumes) on the map map. They are used to tint the lighting for areas where the lighting would be noticable different, i.e. deserts.


所有的后期效果都可以在 {{path|gfx/posteffect_volumes.txt}} 中找到。
All posteffects are found in {{path|gfx/posteffect_volumes.txt}}.


== Posteffect Values ==
== Posteffect Values ==
{{SVersion|1.5}}
{{SVersion|1.5}}


后期效果代码遵循以下格式:
A posteffect values entry follows this format:


<pre>
<pre>

2024年10月27日 (日) 15:34的最新版本

Posteffects are color correction effects that are applied to the lighting in certain areas (volumes) on the map map. They are used to tint the lighting for areas where the lighting would be noticable different, i.e. deserts.

All posteffects are found in /Hearts of Iron IV/gfx/posteffect_volumes.txt.

Posteffect Values

A posteffect values entry follows this format:

posteffect_values = {
    name = <name>
    inherit = <name>
    
    lut = <path>
    
    hdr_min_adjustment = <float>
    hdr_max_adjustment = <float>
    
    BLOOM_WIDTH = <float>
    BLOOM_SCALE = <float>
    BRIGHT_THRESHOLD = <float>
    
    tonemap_middlegrey = <float>
    
}

name is the name of the posteffect values entry.

inherit causes the values for the current posteffect to be inherited from the specified posteffect.

lut is the path for the tone map used for this entry.

hdr_min_adjustment defines the minimum adjustment used in the HDR effect.

hdr_max_adjustment defines the maximum adjustment used in the HDR effect.

BLOOM_WIDTH defines the width of the bloom effect.

BLOOM_SCALE defines the scale of the bloom effect.

BRIGHT_THRESHOLD defines the threshold of the bloom effect.

tonemap_middlegrey defines the middle grey used in the tone map.

Volumes

Position Volume

A volume entry specifies an area on the map in which posteffect values are applied. It follows this format:

posteffect_volumes = {
    posteffect_volume = {
        name = <name>
        posteffect_values_day = <name>
        posteffect_values_night = <name>
        posteffect_values_day_winter = <name>
        posteffect_values_night_winter = <name>
        
        position = {
            <x>
            <y>
            <z>
        }
        size = {
            <width>
            <height>
            <depth>
        }
        fade_distance = <float>
    }
}

name is the name of the volume entry.

posteffect_values_day is the posteffect values entry to use during the day.

posteffect_values_night is the posteffect values entry to use during the night.

posteffect_values_day_winter is the posteffect values entry to use during the day during winter months.

posteffect_values_night_winter is the posteffect values entry to use during the night during winter months.

position defines the location of the volume center.

size defines the size of the volume box.

fade_distance defines the fade distance for the posteffect values.

Height Volume

A height volume entry specifies a height at which to apply posteffect values. It follows this format:

posteffect_volumes = {
    posteffect_height_volume = {
        name = <name>
        posteffect_values_day = <name>
        posteffect_values_night = <name>
        
        height = <float>
        fade_distance = <float>
    }
}

name is the name of the volume entry.

posteffect_values_day is the posteffect values entry to use during the day.

posteffect_values_night is the posteffect values entry to use during the night.

height defines at which height the values are applied.

fade_distance defines the fade distance for the posteffect values.

Tips

Make use of the console commands: PostEffectVolumes.Enabled and PostEffectVolumes.Draw when working with posteffects. Currently developer-only.

You can reload posteffects by using reload posteffectvolumes in the console.