モジュール:NoitaUtils/doc

提供:Noita Wiki
ナビゲーションに移動 検索に移動

このページは、モジュール:NoitaUtilsの説明文を記述するページです。

このモジュールは、Wikiで使用されるさまざまなテンプレートの機能をサポートするために存在します。

使い方

このモジュールから次のように関数を呼び出します

{{#invoke:NoitaUtils|functionName|argument}}

関数

getEnemyGoldValue

ゲーム内のHP値に基づいて、敵がドロップするゴールドの量を計算します。

パラメータ

  • hp - ゲーム内の敵のHPの数値

見本

Enemy HP: 100; Gold: {{#invoke:NoitaUtils|getEnemyGoldValue|hp = 100}}

Enemy HP: 100; Gold: 40



getUIDamageValue

XML / luaの内部ダメージ数からダメージのUI値を計算します。

パラメータ

  • damage - lua / xmlファイルからの内部数値損傷値

見本

Internal Damage: 1.0; UI Damage: {{#invoke:NoitaUtils|getUIDamageValue|damage = 1.0}}

Internal Damage: 1.0; UI Damage: 25



getUIHealthValue

XML / luaの内部HP値からHPのUI値を計算します。

パラメータ

  • hp - lua / xmlファイルからの内部数値hp値

見本

Internal HP: 1.7; UI HP: {{#invoke:NoitaUtils|getUIHealthValue|hp = 1.7}}

Internal HP: 1.7; UI HP: 42.5



getTimeValue

フレームの入力値から秒単位の時間値を計算します。

パラメータ

  • frames - the internal numeric frames value from the lua/xml file.

見本

Time in frames: 1600; Time in seconds: {{#invoke:NoitaUtils|getTimeValue|frames = 1600}}

Time in frames: 1600; Time in seconds: 26.667

getFramesInDuration

Calculates the number of frames in a period of time given an input value in seconds.

Parameters

  • duration - a period of time in seconds.

Example

There are {{#invoke:NoitaUtils|getFramesInDuration|duration = 1.32}} frames in a period of 1.32s.

There are 79.2 frames in a period of 1.32s.

getRealExplosionDamage

Calculates the 'true' in game UI damage from a given explosion damage UI number value.

Parameters

  • damage - the explosion damage shown in the spell tooltip.

Example

Stated spell explosion damage: 400; Real spell explosion damage: {{#invoke:NoitaUtils|getRealExplosionDamage|damage = 400}}

Stated spell explosion damage: 400; Real spell explosion damage: 100

Example

Stated spell explosion damage: 40 (x3); Real spell explosion damage: {{#invoke:NoitaUtils|getRealExplosionDamage|damage = 40 (x3)}}

Stated spell explosion damage: 40 (x3); Real spell explosion damage: 10 (x3)