会员登录

自动登录   |    忘记密码 新会员注册

及时重拍

作者:TechAngel85
发布:LUOHUISHU98
发布日期:2019-11-05 12:27:02
更新时间:2019-11-05 12:27:02
头像
1371
652 人收藏
2590 次下载
7584 次浏览
1.0
上古卷轴5:重置版
本地下载 高速下载 需要优先下载下载器,50%提速

准时制,为了简单和易用而进行了重新制作。

适用于Skyrim LE和Skyrim SE。



准时重制(JITR)是使用触发器和轻量级脚本来切换灯光的自定义解决方案。该解决方案允许mod作者根据玩家在某个空间中的位置/路径来打开/关闭灯光。之所以有用,是因为切换玩家视野之外的灯光是解决游戏灯光限制的一种方法。超过这些限制会导致在区域中移动时出现网格和灯光闪烁问题。 JITR是解决此问题的方法。仍然是准时制,但是一切工作方式都已完全重制。



有什么不同?


术语

JIT:“ LightingBall”和“ LightingBallController”

JITR:“灯光控制器”(简称控制器)和“灯光控制器触发器”(简称触发器)

要使用JIT-Remastered,用户应了解术语。当我第一次开始使用它时,JIT的原始名称让我有些困惑。因此,JITR会更新名称以表示其正在执行的操作。控制器控制光源参考。触发控制何时发生切换动作;被玩家“触发”。为了保持一致,从文档到脚本,到处都使用该术语。



控制器灯参考限制

准时:4

JITR:128(技术上)

由于脚本的编写方式,JIT将每个Controller可以使用的灯光数量限制为4个。 JIT-Remastered已被重写为使用数组代替单独的光源参考属性。因此,JITR在技术上限制为每个控制器128个引用。我决定不限制数组的可扩展性,但是,建议用户为每个Controller使用实际数量的引用。



计时器控制器

计时器控制器的工作方式与JIT中的相同,但是它们也已被重写以使用数组,并且最多可支持128个引用。



触发控制器参考极限

准时:4

JITR:128(技术上)

触发器和控制器也是如此。触发器使用数组,因此技术限制为128个Controller引用,但是再次使用时,请在实现时使用实际数字。另外,由于脚本的编写方式,JIT在触发器上至少需要两个Controller引用。 JIT中已消除了此要求-重新制作;因此,如果需要,触发器现在可以使用单个Controller引用。



门扳机

当前,JIT的门触发器功能尚未实现。那里的代码,但未经测试,因此从脚本中隐藏。它可能会在将来的更新中添加。



实作

JIT具有您必须实现它的必需方法。例如,引用必须按顺序填充。由于JIT-Remastered使用数组,因此消除了此必需的实现。该数组将自动按顺序填充,并且所有脚本的全部内容都已重新制作以使用这些数组。



剧本

经过以上所有更改,与JIT相比,脚本已得到了大大简化和优化。对所有引用使用数组,以及将Timer功能分离到其自己的脚本中,可以进行很多简化。现在,脚本比以前要小得多,并且编写时所受的限制也尽可能少。例如,JIT LightingBall脚本(现在称为LightController)减少了200多行代码,而Trigger脚本减少了近100行代码!


大部分调试代码与一些功能一起被剥离,因为重写后根本不需要它们。剩下的大部分工作是重写代码以使用数组。




控制器/触发器设置

如何使用JIT-重新制作


即时播放-重制版的主要功能是能够根据玩家与放置的扳机的互动来切换灯光。触发器始终伴随一个或多个控制器。用户将不得不在CK中创建新的触发器。创建这些新触发器时,建议使用唯一名称(即Prefix_JITRController),并将其相应的脚本附加到新的基本触发器上。这将防止用户每次放置一个基本触发器时都必须附加脚本。让我们首先使用下面的参考图像看一下触发器。



参考图片

光扳机

触发器是在CK中创建的标准触发器。建议触发器的基本类型为Box类型。触发器应放置在触发动作发生的位置。它们应该足够高和足够宽,以使玩家不会意外地绕过它们。请记住,切换事件将在玩家离开扳机时发生,因此,请使其厚度不超过角色站立时的厚度。在参考图像中,放置了两个扳机,用于切换灯光参考1和3。扳机稍微向墙壁扩展。这是完全可以的,并且是确保玩家不会在他们周围走动的好习惯。


放置的触发器应附加有LightControllerTrigger脚本。可以使用以下脚本属性:

高级调试

调试模式

JITR_Controllers


调试功能将在下面讨论。但是,JITR_Controllers属性是包含触发器将激活的控制器的数组。这是唯一必需的属性,但是只有在添加控制器后才能填充。让我们现在去那里...



控制器

控制器也是在CK中创建的标准触发器。建议控制器使用的原始类型是Sphere类型。这是可选的,仅有助于将控制器与触发器区分开。控制器可以放置在任何地方,只要它们与触发器在同一单元格内即可,但是,建议将它们放置在引用它们的触发器附近。这有助于跟踪哪些触发器激活了哪些控制器。在参考图像中,触发器附近有两个控制器。


放置的Controller应该附加有LightController脚本,并填充脚本的属性。可以使用以下属性:

高级调试

调试模式

JITR_Lights

PreventDisable

防止启用


调试功能将在下面讨论。但是,JITR_Lights属性是一个数组,其中包含控制器将切换的光源引用,现在应将其填充。这是唯一必需的属性。在参考图像中,控制器1的参考光3已填充,控制器2的参考光1已填充。


现在已放置控制器,用户可以返回到触发器并填充其数组。在参考图像中,触发器1已填充控制器1,触发器2已填充控制器2。现在安装完成。


这个怎么运作...

使用参考图像,当玩家朝绿色箭头方向移动时,他们将首先穿过触发器1。由于已将控制器1连接到控制器1,所以控制器1阵列中填充的指示灯将切换。在该示例中,参考光3填充到控制器1中,并设置为“初始禁用”,表示已关闭。一旦播放器离开触发器1,在播放器转弯之前就可以打开参考光3,并且可以看到灯光。


随着玩家的继续,他们接下来将运行触发器2,该触发器2的阵列中已填充控制器2。由于参照光1已填充在控制器2的阵列中,因此当玩家离开扳机时它将关闭。由于不再参考灯光参考1,因此将其切换为关闭将允许在玩家视野内放置更多的灯光,从而从引擎的光限制计数中消除了灯光参考1。


如果玩家转身并以相反的方向奔跑,则触发器将反向工作。这是“及时复制”的实现和工作方式的非常简单的示例。


PreventDisable和PreventEnable

LightController脚本的其余两个属性用于特殊情况。对其进行检查将防止该控制器上的填充光参考切换开或关。这些属性可用于需要照明的情况下,尽管玩家与分配给控制器的触发器进行了交互,但仍希望打开并保持打开,或关闭并保持关闭。当使用PreventDisable时,灯光参考应该被初始禁用。它们将由触发器打开,但再也不会关闭。相反,PreventEnable正确。使用时,应启用光源参考。它们将被触发器关闭,但再也不会打开。


这些属性将影响控制器阵列中填充的所有光源。因此,当使用这些属性之一时,应仅使用单独的Controller,并且仅填充受该属性影响的光照参考。在任何给定的控制器上,仅应检查这些属性之一。两者都经过检查将破坏切换。

其他用途

应该注意的是,尽管JIT-Remastered是专门为解决引擎的照明限制而设计的解决方案,但它可用于任何对象参考。它并不一定只是填充Controller数组的轻引用。


例如,如果希望在一天的特定时间用不燃烧和不点燃壁炉熄灭燃烧的壁炉和灯,则可以使用计时器控制器来完成此任务。计时器控制器可以引用资产的点亮版本,并将未点亮的资产设置为子代,并设置为“启用父级相反”的点亮版本。当计时器控制器达到开始/结束时间时,资产将被关闭。




计时器控制器

你有时间吗?


计时器控制器是一种特殊的控制器,可根据一天中的时间来控制灯光的切换。这些控制器具有自己的单独脚本,因为它们总是在没有触发器的情况下使用。该脚本负责切换,因此不需要玩家激活的触发器。 JIT最初将此功能合并到“ LightingBall”脚本中,该脚本现在为“ LightController”脚本。


计时器控制器的实现方式与常规控制器相同,但是没有附带的触发器,并且通过附加了LightControllerTimer脚本来实现。建议将定时器控制器放置在它们控制的灯光附近。放置计时器控制器后,应填充其属性。以下属性可用于计时器控制器:

JITR_TimerLights-这是保存光源引用的数组。

OnTimerBeginTime-这是打开的引用将被打开的时间。*

OnTimerEndTime-这是关闭参考的时间。*

OnTimerUpdateTime-这是脚本将检查更新的时间(以秒为单位)。为使该功能正常工作,应将其设置为大于0的值(5大约等于1个游戏分钟)。


* OnTimerBeginTime和OnTimerEndTime使用“ 24小时制时钟时间”或“军事时间”(上午8点= 08 /晚上10点= 20)。将这些时间设置为相同的值将导致填充的引用保持启用状态。




错误检查

虫子!虫子!虫子!


调试模式

调试模式默认为禁用。用户可以检查它的脚本以完成一些错误检查。该模式旨在一次使用一个控制器/触发器。一旦单个设置完成并可以正常工作,则应在发布mod之前禁用“调试模式”以提高脚本效率。在调试模式下,将检查以下内容:

没有填充JITR_Lights数组的控制器。*

连接到同一触发器的两个或多个控制器具有匹配的光源参考。 (不起作用,所以不要这样做)

没有填充JITR_Controllers数组的触发器。*

未填充JITR_TimerLights数组的计时器控制器。*

未将OnTimerUpdateTime设置或设置为0的计时器控制器。(将不起作用,因此请删除或设置值> 0)


*如果脚本中未附加引用,则控制器和触发器无用。因此,此Debug检查对于用户了解单元中是否还有孤立或错误的资产很有用。应该删除孤立资产以清理mod。如果在已填充阵列的控制器或触发器上接收到此消息,则需要解决一个问题。我们无法知道问题所在,但用户需要进行调查。


高级调试

默认情况下,“高级调试”选项是禁用的。启用它会在屏幕上提供在游戏中运行脚本的通知。它提供诸如变量值之类的信息,以及脚本的某些部分是否通过检查。此选项仅对想要深入研究脚本的人或熟悉纸莎草纸并且需要调试失败之处的人有用。因此,它实际上仅用于调试脚本本身。




重新利用

使用JIT-重新制作的地方...


以下mod包含了及时更新-重新制作:


如果您使用的是JIT-Remastered,请与我联系以在上方链接您的Mod。

————————————————————————————————————————————


Just In Time, remastered for simplicity and usability.
Works for Skyrim LE and Skyrim SE.



Just In Time - Remastered (JITR)  is a custom solution for the toggling of lights using triggers and lightweight scripts. This solution allows mod authors to toggle lights on/off based upon the players location/path through a space. The reason this is useful is because toggling lights off that are outside of the player's view is a way to work around the game's light limitations. Surpassing these limitations causes mesh and light flicker issues while moving around an area. JITR is a solution to this problem. It's still JIT, however, the way everything works has been completely remastered.


What's the difference?

Terminology

JIT: "LightingBall" & "LightingBallController"

JITR: "Light Controller" (Controller for short) & "Light Controller Trigger" (Trigger for short)

To use JIT - Remastered, users should understand the terminology. The original names from JIT were a bit confusing to me when I first started using it. Therefore, JITR updates the names to signify what they're doing. Controllers control the light references. Triggers control when the toggling actions happen; "triggered" by the player. To stay consistent, this terminology is used everywhere from the documentation to the scripts.


Controller Light Reference Limits

JIT: 4

JITR: 128 (technically)

JIT limited the number of lights that could be used per Controller to 4 because of the way the scripts were written. JIT - Remastered has been rewritten to use an array in place of individual light reference properties. Therefore, JITR is technically limited to 128 references per Controller. I decided to not limit the array for expandability, however, users are recommend to use a realistic number of references per Controller.


Timer Controllers
Timer Controllers work the same as they do in JIT, however, they too have been rewritten to use an array and can support up to 128 references.


Trigger Controller Reference Limits

JIT: 4

JITR: 128 (technically)

The same is true for the Triggers as for the Controllers. Triggers use an array so the technical limit is 128 Controller references, however again, use a realistic number when implementing. In addition, JIT required at least two Controller references on Triggers due to how the scripts were written. This requirement has been eliminated in JIT - Remastered; thus, Triggers can now use a single Controller reference, if desired.


Door Triggers
Currently, the Door Trigger feature from JIT is not implemented. The code is there but it's untested, thus, is hidden from the scripts. It will likely be added in a future update.


Implementation
JIT has a required way you have to implement it. For example, the references have to be filled in sequential order. Since JIT - Remastered uses arrays, this required implementation has been eliminated. The array will automatically fill, in order, and the entirety of all the scripts have been reworked to use these arrays.


Scripts
With all the changes above, the scripts have been massively simplified and optimized vs JIT. The use of an array for all references and the separation of the Timer feature into its own script has allowed for a great deal of simplification. The scripts are now much smaller than they used to be and written with as little restrictions as possible. As an example, the JIT LightingBall script (now named LightController) was reduced by over 200 lines of code and the Trigger script by nearly 100 lines of code!

Most of the debugging code was stripped along with a few functions because they simply weren't needed after the rewrite. The majority of the remainder of the work was to rewrite the code to use the arrays.



Controller/Trigger Setup
How to use JIT -  Remastered


The main feature of Just In Time - Remastered is being able to toggle lights based on the player's interaction with placed Triggers. A Trigger is always accompanied by one or more Controllers. Users will have to create new triggers in the CK. When creating these new triggers, it is recommended to use a unique name (i.e. Prefix_JITRController) and to attach its corresponding script to the new base trigger. This will prevent users from having to attach the script every time a one of the base triggers are placed. Let's first look at the Triggers using the reference image below.


Reference Image



Light Triggers
Triggers are standard triggers created in the CK. The Primitive Type recommend for Triggers is the Box type. Triggers should be placed at the location where the toggling action should occur. They should be high and wide enough that the player can not accidentally get around the them. Keep in mind the toggle event will happen when the player leaves the Trigger, therefore, don't make them much thicker than what the character can stand in. In the reference image, two Triggers are placed for toggling light references 1 and 3. Notice that the Triggers expand into the walls slightly. This is perfectly okay and is a good practice to ensure the player can't walk around them.

A placed Trigger should have the LightControllerTrigger script attached to it. The following script properties are available:

AdvancedDebug

DebugMode

JITR_Controllers


The Debug features are discussed below. However, the JITR_Controllers property is the array that holds the Controller(s) the Trigger will activate. This is the only required property but it can't be filled until the Controllers are added. Lets go there now...


Controllers
Controllers are also standard triggers created in the CK. The Primitive Type recommend for Controllers is the Sphere type. This is optional and simply helps to distinguish the Controllers from the Triggers. Controllers can be placed anywhere, as long as they're within the same cell as the their Trigger, however,  it's recommended to place them near the Trigger that references them. This helps to keep track of which Triggers active which Controllers. In the reference image there are two Controllers placed near the Triggers.

A placed Controller should have the LightController script attached to it and the script's properties filled. The following properties are available:

AdvancedDebug

DebugMode

JITR_Lights

PreventDisable

PreventEnable


The Debug features are discussed below. However, the JITR_Lights property is the array that holds the light references the Controller will toggle and it should now be filled. This is the only required property. In the reference image Controller 1 has light reference 3 populated, and Controller 2 has light reference 1 populated.

Now that the Controllers are placed, users can return to the Triggers and populate their arrays. In the reference image Trigger 1 has Controller 1 populated, and Trigger 2 has Controller 2 populated. The setup is now complete.

How it works...
Using the reference image, as the player travels in the direction of the green arrows, they will first run through Trigger 1. Since Controller 1 is connected to it, the lights populated in Controller 1's array will toggle. In the example, light reference 3 is populated to Controller 1 and is set Initially Disabled, meaning it's off. Once the player is leaves Trigger 1, light reference 3 will toggle on before the player rounds the corner and the light's glow is in view.

As the player continues, they will next run through Trigger 2, which has Controller 2 populated in it's array. Since light reference 1 is populated in Controller 2's array, it will toggle off when the player leaves the Trigger. Since light reference 1 is no longer in view, toggling it off allows the placement of more lights that arewithin the players view, thus eliminating light reference 1 from the engine's light limitation count.

If the player turns around and runs in the opposite direction, the Triggers will work in reverse. This is a very simplistic example of how Just In Time - Remastered is implemented and works.

PreventDisable and PreventEnable
The two remaining properties for the LightController script are used for special cases. Checking them will prevent the populated light references on that Controller from toggling either off or on. These properties can be used where a light may be desired to be toggled on and remain on, or toggled off and remain off, despite the player's interaction with the Trigger the Controller is assigned to. When using PreventDisable, the light references should be Initially Disabled. They will be toggled on by the Trigger, but never turned off again. The reverse is true for PreventEnable. When used, the light references should be enabled. They will be toggled off by the Trigger, but never turned on again.

These properties will affect all lights populated within the Controller's array. Therefore when utilizing one of these properties, separate Controllers should be used with only the light references populated that should be affected by the property. Only one of these properties should be checked on any given controller. Having both checked will break the toggling.


Other Uses
It should be noted that, though JIT - Remastered has been written specifically as a solution for working around the engine's lighting limitations, it can be used for any object reference; it doesn't have to be solely light references populating the Controller array.

For example, if the desire to switch out a burning fireplace and light with a non-burning and non-lit fireplace during specific times of the day, then the Timer Controller could be utilized to accomplish this. The Timer Controller could reference the lit versions of the assets and set the unlit assets as children to the lit version with "Enabled Opposite of Parent". When the Timer Controller hits the Start/End times, the assets will be switch out.



Timer Controllers
Do you have the time?


Timer Controllers are a special Controllers to control the toggling of lights based on time-of-day. These Controllers have their own separate script because they are always used without a Trigger. The script takes care of the toggling, therefore, there is no need for a player-activated Trigger. JIT originally had this feature incorporated into the "LightingBall" script, which is now the "LightController" script.

The Timer Controllers are implemented in the same way are regular Controllers, but without the accompanying Trigger and by attaching the LightControllerTimer script. It is recommended to place Timer Controllers near the lights they control. Once a Timer Controller is placed, it's properties should be filled. The following properties are available for Timer Controllers:

JITR_TimerLights - this is the array that holds the light references.

OnTimerBeginTime - this is the time the populated references will be toggled on.*

OnTimerEndTime -  this is the time the references will be toggled off.*

OnTimerUpdateTime - this is the time in seconds the script will check for an update. This should be set to a value greater than 0 for the feature to work (5 will approximately equal 1 game minute).


* OnTimerBeginTime and OnTimerEndTime use "24-hour Clock Time", or "military time" (8am = 08 / 10pm = 20). Setting these times to the same value will result in the populated references remaining enabled.



Error Checking
Bugs ! Bugs! Bugs!


DebugMode
Debug Mode is disabled by default. Users can check it for the script to complete some error checking. This mode is meant to be used one controller(s)/trigger set at a time. Once the single set is complete and working, then Debug Mode should be disabled for script efficiency before the mod is released. The following will be checked while in Debug Mode:

Controllers without the JITR_Lights array populated.*

Two or more Controllers attached to the same Trigger who have matching light references. (doesn't work so don't do it)

Triggers without the JITR_Controllers array populated.*

Timer Controllers without the JITR_TimerLights array populated.*

Timer Controllers without the OnTimerUpdateTime set or set to 0. (won't work, so delete or set the value > 0)


* without a references attached in the scripts, Controllers and Triggers serve no purpose. Thus, this Debug check is useful for users to know if there are orphaned or bugged assets left in the cell. Orphaned assets should be removed to clean up the mod. If receiving this message on a Controller or Trigger that has the array populated, there is an issue that needs to be addressed. We have no way of knowing what the issue is, but users will need to investigate.

AdvancedDebug
The Advanced Debug option is disabled by default. Enabling it will provide on-screen notifications of the scripts working while in-game. It provides information like variable values and whether or not parts of the scripts are passing checks. This option will only be useful for someone wanting to dive into the script, or someone that is familiar with papyrus and needs to debug where something is failing. Therefore, it is really only for debugging the scripts, themselves.



Remastered Utilization
Where JIT - Remastered is used...


The following mods incorporate Just In Time - Remastered:



If you use JIT - Remastered, please contact me to have your mod linked above.


原贴地址
1.版本号: 1.0   更新时间: 2019-11-05 12:51:20

评论
暂未开放,敬请期待
ta的精品
logo

及时重拍


Mod大小:16.4 KB
上传时间:2019-11-05 12:27:02

Mod简介:

暂无更多介绍


closeAD