これは、スクリプトの書式や開発環境に影響すると思われる変更のリストです。私たちはこれら以外のすべての変更は既存のスクリプトに影響を及ぼさないようにしています。
config.script_version
を設定すれば、これらの変更の多くを以前の状態に戻せますが、逆に新しい機能は利用できなくなります。
GUIに対する非互換の変更はそのGUIが再生成された時のみ影響するので 非互換の GUI の変更 に記述されています。
focus_mask
スタイルプロパティーは drag displayable に対してデフォルトで None になりました。これによりパフォーマンスが改善しますが、 Displayable はピクセルの透明部分でもドラッグ出来るようになりました。元に戻すには focus_mask プロパティーを各drag displayableごとに True にするか次のように全体に対して記述するかです。
style drag:
focus_mask True
ともにパフォーマンスを低下させます。
Ren'Py はデフォルトでスクリーンが表示または非表示されるときのようにフォーカスが変更されていてもボタンの unhovered プロパティーを実行するようになりました。
define config.always_unfocus = False
Ren'Py は、 transform の :tpref:'xsize' または :tpref:'ysize' プロパティーに与えられた浮動小数点数を、その transform で利用可能な領域に対するサイズとして解釈するようになりました。この変更を元に戻すには次のようにしてください。
define config.relative_transform_size = False
Ren'Pyのセルフボイシングが画面内のレイヤー、スクリーン、および Displayable を読み上げる順序が変更され、プレイヤーに近いスクリーンと Displayable から先に読み上げられます。以前の順序に戻すには次のようにしてください。
define config.tts_front_to_back = False
xminimum
と xmaximum
が両方とも浮動小数でなら minimum は利用可能な領域の割合として解釈されます。つまり xsize
に浮動小数を指定すると期待した結果となるようになったということです。これによりいつくかの Displayable はサイズを変えるかもしれません。この変更を戻すにはつぎのようにします。
define config.adjust_minimums = False
スクリーンの ATL Displayable はそのスクリーン自体の表示ではなくその Displayable の最初の表示時に開始するようになりました。これは次のようにして戻します。
define config.atl_start_on_show = False
入力キャレットはデフォルトで点滅するようになり、変更には次のようにします。
define config.input_caret_blink = False
7.4.5 のレイヤー at リストに関する変更をもどしました。 show layer
はそのまま残り、新しい camera
ステートメントが置き換えとなります。
このバージョンで制作されたゲームはデフォルトでモデルベースのレンダラーを使用します。モデルベースのレンダラーを無効化するには以下をしようします。
define config.gl2 = False
**7.4.6で廃止 ** scene
ステートメントはもうレイヤーの at リストをクリアしません。レイヤーの at リストをクリアするには以下を使用してください
show layer master
ここで、 "master" はレイヤー名です。以前の振る舞いに戻すには以下を使用してください。
define config.scene_clears_layer_at_list = True
renpy.transition()
や、 say や call screen
ステートメントの with
節のようにそれを使用する場所で始まるトランジションがクリックでスキップできるようになりました。 以下を使用して防げます。
define config.dismiss_blocking_transitions = False
遅延時間指定の pause は with Pause(...)
ではなく renpy.pause()
を使用するようになりますた。つまりある行にある複数のポーズをバイバスするには複数回のクリックが必要になります。以前の動作に戻すには次のコードを使用します。:
define config.pause_with_transition = True
モバイルプラットフォームではビデオ再生にソフトウェアよりハードウェアを使用するようになりました。次のようにすれば以前の振舞に戻ります。
define config.hw_video = True
Ren'Pyは画像タグに少なくとも1つ属性が追加されないとサイドイメージを表示しなくなりました。次のようにしてこれを無効化します
define config.side_image_requires_attributes = False
初期化時外での config.mouse
のような config 変数の設定は未サポートです。 v7.4 では動作しないため、代わりに default_mouse
変数の使用を考えてください。
config.start_callbacks
に登録されたコールバックが常に default
ステートメント後に実行されるようになりました。(通常のゲーム開始では default
ステートメント前に実行され、リプレイでは違う)以前の振舞に戻すには次のようにします。
define config.early_start_store = True
When given to a viewport or vpgrid with scrollbars, the minimum, xminimum, and yminimum side properties now apply to the side containing the scrollbars and viewport, and not solely the viewport.
To work around this, either use viewport_minimum
, viewport_xminimum
,
and viewport_yminimum
, or include:
define config.compat_viewport_minimum = True
次のようなスクリーンがあるとスクリーン言語で "a non-constant keyword argument ... is not allowed after a python block." というエラーがでるようになりました。
screen test():
default a = 0
button:
$ a = 1
action Return(a)
text "Test"
これは action プロパティーが python の代入より前に実行されるため、クリック時に1ではなく0が返るためです。このチェックを無効化するにはゲームディレクトリの01compat.rpy に次のコードを追加します。
define config.keyword_after_python = True
しかしゲームの振舞は以前のままです。
side
レイアウトでの子の描画順が制御文字列からとられるようになりました。以前の固定順に戻すには次を使います。
define config.keep_side_render_order = False
config.say_attribute_transition_callback
のインターフェースに破壊的変更があり、新旧のタグのセットを取るようになりました。以前のインターフェースに戻すには次のようにします。
define config.say_attribute_transition_callback_attrs = False
mode 引数にも僅かな変化があり permanent
と temporary
属性の両方に対するトランジションがあるとき both
をとるようになりました。
config.say_attribute_transition_callback
は新しく表示されている画像の引数を受け取るようになりました。
Ren'Py の widow auto 機能は menu ステートメントと台詞やキャプションを関連付けるかを決定するようになり、適切に台詞ウィンドウの表示非表示を試みるようになりました。この機能を有効化する情報を含むには "Force Recompile" が必要です。以前のゲームでも動作するはずですが、これは次のようにして無効化できます。
define config.menu_showed_window = True
define config.window_auto_show = [ "say" ]
define config.window_auto_hide = [ "scene", "call screen" ]
技術的には非互換の変更ですが、history スクリーンに対して推奨する変更があります。ゲームの更新方法は the changelog entry を参照してください。
画像が表示されていないときも属性を伴う say は属性を追加するだけでなくサイドイメージを変更します。これを無効化するためには次のコードを追加します。
define config.say_attributes_use_side_image = False
Ren'Py は かなり後ろの初期化段階である優先度 0 で自動画像を定義します。優先度の振舞を戻すには次を追加します。
init -1:
define config.late_images_scan = True
Dissolve()
と ImageDissolve()
, AlphaDissolve()
トランジションは alpha=True
を指定したかのように、デフォルトで元の Displayable のアルファチャンネルを使用するようになりました。この変更を戻すには次のコードを追加してください
define config.dissolve_force_alpha = False
既に表示されている動画を表示すると動画を再再生します。以前の動作に戻すには次のようにします。
define config.replay_movie_sprites = False
ハイパーリンクのサイズは囲んでいるテキストを引き継ぐようになりました。これを無効化するためには次のコードを追加します
define config.hyperlink_inherit_size = False
{nw} テキストタグはボイスやセルフボイシングの完了を待つようになります。これを無効化するためには次のコードを追加します
define config.nw_voice = False
ATL Transform でポーズや補間がおきれば常に最低 1 フレームは表示されるようになります。ゲームがこの動作を期待しないとき、急激な 1 連の 1 フレームの表示となるかもしれません。これを無効化するためには次のコードを追加します
define config.atl_one_frame = False
ステートメントによるレイヤーの表示は他のどの ATL Transform の状態も保存します。これにより挙動が変更し、例えば複数のステートメントによるレイヤー表示間でオフセットが維持されるようになりました。これを無効化するためには次のコードを追加します
define config.keep_show_layer_state = False
非互換の変更ではないですが、 renpy.list_files()
が変更して標準的な方法でソートされるようになりました。以前の挙動はあいまいで、例えば同名の複数のファイルがimageディレクトリーにあると Ren'Py はランダムに1つを選択します(選択されるものはシステムごとに変わります)。現在はどこでも同じファイルが選ばれるようになりました。
Ren'Py は開発者モードではシステム組み込みのフォントを検索しなくなりました。もしシステム組み込みのフォントを使用しているなら、そのフォントファイルをゲームディレクトリーにコピーするべきです(しかしそのフォントファイルのライセンスに従っているか確認してください)。
the changelog に記載されたとおり、 style
と translate
ステートメントの実行順が変更されました。この変更を戻すには次のこれを無効化するためには次のコードを追加します
define config.new_translate_order = False
これにより新しいGUIが動作しなくなることに注意してください。
config.quit_action
変数のデフォルト値がゲーム内のコンテキストで終了のプロンプトを表示するものに変わりました。この変更を戻すには次のコードを追加してください。
define config.quit_action = ui.gamemenus("_quit_prompt")
ボタンとウィンドウに対して与えられた最大サイズを使用するようになりました。この振舞を無効にするには次のコードを追加してください。
define config.enforce_window_max_size = False
現在 Ren'Pyは同時に複数の再生をサポートする "audio" チャンネルでインターフェースサウンドを再生します。このチャンネルはカスタマイズされた sound チャンネルとは設定が違うかもしれません。audio チャンネルの設定は config.auto_channels
, の調整または、以下のコードの追加で sound チャンネルが使用されます。
define config.play_channel = "sound"
Ren'Py は画像ディレクトリー ( ゲームディレクトリー下の images ディレクトリー )から画像を探し、そのファイル名から画像を定義するようになりました。これを無効化するには、以下のコードを使用してください。
init python:
config.image_directory = None
show screen
と call screen
ステートメントで、スクリーン予測処理の一部としてそれらの引数を評価するようになりました。スクリーン引数の評価が副作用を起す場合は、 show screen
や call screen
ステートメントには予測を禁止する新しい nopredict
節を与えてください。
スクリーンがスクリーンの以前の状態から新しい状態へのトランジションに参加するようになりました。これを無効化するためには、 config.transition_screens
を False に設定してください。
スクリーンが同じタグのスクリーンを置き換えるとき、 Ren'Py はもう構造の等価性を使用して状態を移行 ( 例えば transform の状態 ) しません。代りに use statement が id
プロパティーをサポートするようになり、これを使って明示的に状態を移行出来るようになりました。
MusicRoom()
の loop 引数の意味が変わりました。以前と同じ挙動にするには、 loop と single_track の両方を True にしてください。
Ren'Py now expects auto-forward mode to be controlled by the "auto-forward" Preference()
.
To have it controlled by the auto-forward mode slider, set config.default_afm_enable
to
None.
Previously, Ren'Py moved archived files into the archived/ directory. It would search this directory automatically when running a game or building archives. One-click builds make this unnecessary, and files in archived/ should be moved back into the game directory.
MoveTransition()
has changed its interface. The old version of
MoveTransition can be accessed as OldMoveTransition, if you don't want
to rewrite your code. (The changes only matter if you use factories with
MoveTransition.)
Transform()
has changed its behavior with regards to
asymmetrically scaled and rotated images. It's unlikely the old
behavior was ever used.
Old-style string interpolation has been re-enabled by default. If you wrote code (between 6.13 and 6.13.7) that uses % in say or menu statements, you should either write %% instead, or include the code:
init python:
config.old_substitutions = False
The changes to text behavior can affect games in development in many ways. The biggest change is the introduction of new-style (square-bracket) text substitutions, and the elimination of old-style (percent-based) substitutions. These changes can be reverted with the code:
init python:
config.old_substitutions = True
config.new_substitutions = False
New- and old-style substitutions can coexist in the same game, by setting both variables to True.
Ren'Py has also changed the default line-wrapping behavior. While the new behavior should never increase the number of lines in a paragraph, it may change which words fall on each line. To restore the old behavior, add the code:
init python:
style.default.layout = "greedy"
style.default.language = "western"
A bug with negative line_spacing was fixed. This fix can cause blocks of text to shrink in height. To revert to the old behavior, use:
init python:
config.broken_line_spacing = True
Finally, the new text code may lead to artifacts when displaying slow
text, especially in conjunction with a negative line spacing. Consider
adjusting line_overlap_split
to fix this.
Image names have changed from being static names to being
attribute-based. This can lead to image names that were previously
distinct becoming ambiguous. To disable attribute-based image names,
set config.image_attributes
to False.
Showing an image without providing a transform or ATL block will now
continue the previous transform that the image was using. This means
that a moving image may continue moving once it has changed. To revert
to the old behavior, set config.keep_running_transform
to False.
The image argument to Character()
has changed meaning. While
the old meaning was unsupported in the screens-based environment, it
can be restored for compatibility purposes by setting
config.new_character_image_argument
to False.
The definition of the items parameter of the Choice and
nvl_choice
screens has changed. The nvl_choice
screen is
deprecated in favor of the NVL screen.
Screens may be invoked at any time, in order to allow for image prediction, unless they have a predict property of False. When the predict property is not False, screens should not cause side effects to occur upon their initial display.
For performance reason, Ren'Py now ignores the position properties of
ImageReferences. This means that the position properties of
style.image_placement are now ignored. To revert to the old behavior,
set config.imagereference_respects_position
to True.
MoveTransition has been modified to respect the xoffset and yoffset parameters of the displayables it is moving. The factory functions that are used for movement now take xoffset and yoffset parameters. While the built-in movement factories take these parameters without problem, user-defined factories may need to be upgraded to use or ignore these additional parameters.
The transform specified by the config.default_transform
variable is used to initialize the transform properties of images
shown using the show and hide statements. The default value of this
transform sets xpos
and xanchor
to 0.5, and
ypos
and yanchor
to 1.0.
This represents a change in the default value of these style properties, which were previously uninitialized and hence defaulted to 0.
By including the reset
transform in ATL transforms, these
properties can be reset back to 0. Alternatively, one can stop using
the default transform, and revert to the old behavior, using the
code:
init python:
style.image_placement.xpos = 0.5
style.image_placement.ypos = 1.0
style.image_placement.xanchor = 0.5
style.image_placement.yanchor = 1.0
config.default_transform = None
If a transform does not define one of the position properties
xpos
, ypos
, xanchor
, or
yanchor
, that property will be taken from the transform's
child, if the defines that property.
This makes it possible to have one transform control a displayable's
vertical motion, and the other control the horizontal. But this is
incompatible with previous behavior, and so can be disabled with the
config.transform_uses_child_position
variable.
init python:
config.transform_uses_child_position = False
The default positions (left, right, center, truecenter, offscreenleft, and offscreenright) are now defined as ATL transforms. This means that showing an image at such a position will cause the position to be remembered. If you do not want this behavior, you need to redefine these positions, by adding the code:
define left = Position(xalign=0.0)
define center = Position(xalign=0.5)
define truecenter = Position(xalign=0.5, yalign=0.5)
define right = Position(xalign=1.0)
define offscreenleft = Position(xpos=0.0, xanchor=1.0)
define offscreenright = Position(xpos=1.0, xanchor=0.0)