用户登录
|忘记密码

新用户注册

登录

其他登陆



通用商品展示资源

通用商品展示资源
通用商品展示资源 通用商品展示资源 通用商品展示资源 通用商品展示资源 通用商品展示资源 通用商品展示资源 通用商品展示资源
作者:AshenShugarII
发布:run0213
发布日期:2020-06-17 16:23:14
更新时间:2020-06-17 16:23:14
这个人很懒,什么也没留下
3768 人点赞
1770 人收藏
5796
16600
1.0
标签
上古卷轴5:重置版
本地下载 高速下载 需要优先下载下载器,50%提速

通用商品展示资源


最初由AmethystDeceiver提供,作为旧BethSoft论坛上的modder资源。为了后代,我将粘贴该职位的大部分内容。

这些显示器的主要优点以及我决定将其转变为资源和指南的原因是,您可以使它们看起来像您想要的任何东西,并且它们可以适应于在您喜欢的任何位置显示任何项目。单个显示器甚至可以支持不同物品类型的不同位置。


资源:


该Mod附带了您入门所需的一切。您可以将其合并到插件中,从中复制/粘贴,或将其用作参考资料。完全取决于您。此mod中的所有记录均以“ AD_”为前缀。还提供了带有一些模板显示的示例单元格(“ AD_Template”)。

应该与LE完全兼容。我将尽快回溯移植,但是在不久的将来,如果您希望在LE中使用此资源,则必须自己移植。



导游:

进行这些显示是出于以下目的:


提供一种简单的方法来将脚本改编为几乎所有内容都可以用作常规显示系统。

性能和资源使用情况。如果一个单元内有太多武器,香草武器架就会开始消耗不必要的资源,如果拥挤或与其他物体太近,它们往往变得难以使用或无法使用。相比之下,这些显示器在性能和资源消耗方面提供了重大改进。

设计自由。您的显示器可以看起来像您想像的任何东西。

用户界面具有更好的一致性,因为该系统使用熟悉的库存屏幕放置物品,而不需要在将武器安装到显示器上之前先装备好武器。


首先,我将介绍该系统的基本结构:


1.“触发器”-这是一个简单的触发框,用于计算当前显示的项目数。如果计数为零,则将允许放置新项目。如果数字是一个或多个,则将不允许放置更多物品。


2.“容器”-容器同时替代了对“虚拟标记”(使放置的物品准确知道要去的对象)的需求,并提供了用于放置物品的可视界面(内置的展示广告资源)屏幕)。


3.“激活器”-播放器用来与显示系统进行交互的对象。它运行一个脚本来打开容器,从而触发其余的放置脚本。激活器可以是任何东西,从简单的玩家激活的触发框或物理网格即可。


怎么运行的:


参考图片:

剧透:表演



播放器激活显示(上面提到的“激活器”),该显示将打开“库存”菜单,从那里,播放器可以将任何脚本定义的有效物品放入“容器”中。将项目放入容器后,脚本将运行并自动将对象“拖放”到容器外部,以使其与容器或指定标记相同的位置和旋转。播放器现在可以直接从显示器中检索项目,而无需打开任何容器或“清单”菜单。


部件:


1.创建一个容器:在“对象”窗口中,创建一个新的容器并为其指定编辑器ID。您可能还想给它一个可见的名称,例如“武器显示器”。该名称是玩家在“清单”菜单中看到的名称。


2.为您的容器选择一个模型:提供的参考图像中使用了DummyGreatSword01.nif。贝塞斯达制作了许多虚拟标记,这些虚拟标记在游戏中将是看不见且无法选择的。这是理想的,您不想为容器使用物理3d网格,因为如果玩家可以在游戏中访问或看到容器本身,那就不好了。使用Nifskope,您可以将几乎任何网格转换为虚拟标记。


3.创建一个激活器:在对象窗口中创建一个新的激活器,并为其指定一个编辑器ID。需要一个可见的名称,否则您将无法在游戏中选择它。为了保持一致性,通常最好给它与将与之配对的容器相同的名称。


4.为您的激活器选择一个模型:可以是任何您想要的模型,最好是3d网格,以帮助避免任何定位问题。


5.放置显示器:将激活器和容器拖动到“渲染”窗口中,然后根据需要放置它们。容器的枢轴点/原点(在“渲染”窗口中选择的对象的十字线)的位置和旋转将决定其显示的任何项目的位置和旋转。请记住,不同的武器/装甲/物体可以具有不同的枢轴点/原点,例如,法杖和匕首之间的差异非常大。如果需要,可以在其他标记对象和一些关键字的帮助下(包括更多内容)告诉不同的项目类型占据不同的位置。稍后将演示此技术的模板

插件中提供)。


6.创建触发器:放置好容器和激活器后,通过在“渲染”窗口中选择容器并单击CK工具栏上的“创建触发器”按钮(其中带有T的多维数据集),在容器周围绘制一个触发器体积。选择“ DefaultBlankTrigger”作为触发量的基础对象。完成后,使用箭头缩放触发器的尺寸。理想情况下,您希望它的放置和形状尽可能小,同时还要确保它与显示器放置的任何物品相交。与触发器相交的其他对象可能会导致假阳性,因此请小心。最后,在其“参考编辑器”窗口的“原始”选项卡中将碰撞层更改为L_TRIGGER(在“渲染”窗口中双击参考)。


7.关键字:在添加脚本之前,我们需要制作一些关键字以供链接引用使用(或者,您可以使用ObjectReference属性的关键字,但是持久性更差)。与激活器一起使用需要两个关键字,一个用于触发器,另一个用于容器,在模板显示中分别为AD_ItemTriggerKeyword和AD_ItemContainerKeyword。根据您配置显示器的方式,它们的容器可能还需要一些关键字,因此我建议现在也创建与以下内容类似的关键字:AD_MarkerBattleAxe,AD_MarkerGreatsword,AD_MarkerStaff,AD_MarkerWarhammer。支持更多种类项目的显示可能需要附加关键字。


8.链接引用:在“渲染”窗口中双击您的激活器,然后导航到“链接引用”选项卡,然后将“触发器”和“容器”添加为链接引用。您可以在“渲染窗口”中选择它们,也可以使用下拉菜单找到它们。完成后,您应该在“引用”下有两个条目,并且关键字与它们各自的对象匹配。这个非常重要!如果关键字不匹配,那么这些都不起作用。

对于您的容器,如果您希望使用多个标记对象,以便可以支持多个不同的位置,请按照上述相同的步骤进行操作,并将关键字与相应的标记匹配(如果显示器仅支持单个位置和/或项目类型,因为您可以只使用容器位置)。

例:

剧透:表演


9.消息:如果您想为无效对象显示一些警告,或者当播放器试图放置多个物品时,您需要创建一些新的消息来处理。转到“对象”窗口中的“消息”,创建一个新的消息对象,并为其指定编辑器ID。确保选中“消息框”复选框,并用您想说的内容(无效的项目,太多的项目等)填充您的消息。


10.脚本:人机界面使用两个单独的脚本-一个用于激活程序(与玩家进行交互),另一个用于容器,该容器除了过滤有效对象外,还处理要显示的对象的放置。


将AD_UniversalItemDisplayScriptACT脚本添加到您的激活器,然后自动填充所有属性。


将AD_UniversalItemDisplayScriptCONT脚本添加到您的容器中,然后自动填充所有属性。


如果需要,请手动填写与编辑器ID不匹配的任何属性,然后保存并关闭。将鼠标悬停在“ DisplayType”属性上将提供此资源提供的不同类型的Display的工具提示列表。选择最适合预期目的的值,或添加您自己的值!


注意-激活脚本有一行代码,其确切名称引用了容器脚本。如果脚本的名称不同,则必须用您使用的名称替换该部分代码,然后重新编译Activator脚本。


11.复制:设置完所有显示并正确工作后,可以通过在“渲染”窗口中选择所有组件(激活器,触发器,容器+任何其他标记)并按Ctrl + D进行复制,轻松地进行批量生产选择。以这种方式传播显示内容将保留它们各自的链接引用关系,这意味着您无需重做任何操作即可使新创建的显示内容按预期工作。


12.全部完成。祝你好运和幸福的心情:)


如果您认为这有帮助,请在此处共享您的自定义显示的屏幕截图。我希望看到您的创造力!

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

Universal Item Display Resource


Originally provided by AmethystDeceiver as a modder's resource on the old BethSoft forums. For posterity I'll be pasting large portions of that post.
The primary benefit of these displays, and the reason I decided to turn this into a resource & guide is that you can make them look like anything you want, and they can be adapted to display any item in any position you like. A single display can even support different positions for different item types.

The Resource:


The mod comes with everything you need to get started. You can merge this into your plugin, copy/paste from it, or use it as reference material. Completely up to you. All records in this mod are prefixed with "AD_". A sample cell ("AD_Template") has also been provided with some template displays.
Should be completely compatible with LE. I'll get around to backporting it soon, but for the immediate future you'll have to port it yourself should you wish to use this resource in LE.


The Guide:

These displays have been made for the following purpose:

Provides an easy way to adapt the scripts to be used as general display systems for just about anything.

Performance & Resource Usage. Vanilla weapon racks start to consume more resources than necessary if too many are within a single cell, and often become hard to use or inaccessible if crowded or too close to other objects. By comparison these displays offer major improvements with respect to performance and resource consumption.

Freedom of design. Your displays can look like anything you care to imagine.

Better consistency in user-interface as this system uses the familiar inventory screen to place your items, rather than having to equip the weapon in hand before mounting it to the display.


To begin, I will cover the basic structure of how this system is set up:

1. The "Trigger" - This is a plain trigger box that is used to count the number of items that are currently being displayed. If the count is zero, it will allow a new item to be placed. If the number is one or more, it will not allow any more items to be placed.

2. The "Container" - The container simultaneously replaces the need for a "dummy marker" (the object that lets the placed item know exactly where to go) as well as provide the visual interface for placing the item (the built in show inventory screen).

3. The "Activator" - This object is what the player uses to interact with the Display system. It runs a script to open the Container, which in turn triggers the rest of the placement script. The Activator can be anything, from a simple player-activated trigger box, or a physical mesh.

How it works:

Reference Image:

Spoiler:  

Show



The player activates the Display (the "Activator" mentioned above) which will open the Inventory Menu, from there the player can place any script-defined valid item into the Container. Once the item is placed into the Container, the script runs and automatically "drops" the object outside the Container aligning it to the same position and rotation as the Container or specified Marker. The player can now retrieve the item directly from the Display without having to open any containers or Inventory Menu's.

Assembly:

1. Create a Container: In the Object Window create a new Container and give it an Editor ID. You may also want to give it a visible name such as "Weapon Display". This name is what the player will see during the Inventory Menu.

2. Select a Model for your Container: DummyGreatSword01.nif was used in the reference image provided. Bethesda made many of these dummy markers which will appear invisible and unselectable in-game. This is ideal, you do not want to use a physical 3d mesh for the container, as it would not be good if the player can access or see the container itself in game. With Nifskope it's possible to convert practically any mesh into a dummy marker should you wish.

3. Create an Activator: In the Object Window create a new Activator and give it an Editor ID. A visible name will be required otherwise you won't be able to select it in-game. For consistency's sake it's usually best to give it the same name as the Container it will be paired with.

4. Select a Model for your Activator: This can be anything you want, preferrably a 3d mesh to help avoid any targeting issues.

5. Placing the Display: Drag your Activator and Container into the Render Window and position them as desired. The position and rotation of the Container's Pivot Point/Origin (an object's crosshair whilst selected in the Render Window) will dictate the position and rotation of any item displayed by it. Keep in mind different weapons/armors/objects can have different Pivot Points/Origins, the differences between that of a Staff and that of a Dagger are significant, for example. If needed, different item types can be told to occupy different positions with the help of additional marker objects and some Keywords (more on that later. A template demonstrating this technique has been provided in the plugin).

6. Create a Trigger: Once you've positioned your Container and Activator draw a trigger volume around your Container by selecting it in the Render Window and hitting the Create Trigger button on the CK's toolbar (Cube with a T inside it). Select "DefaultBlankTrigger" as the base object for your trigger volume. Once done, use the arrows to scale the dimensions of the Trigger. Ideally you want it placed and shaped to be as small as possible whilst still making sure it will intersect with any item placed by your display. Other objects intersecting your Trigger may result in false-positives, so be careful. Finally, change the collision layer to L_TRIGGER in the "Primitive" tab of its Reference Editor Window (double click the reference in the Render Window).

7. Keywords: Before we can add the scripts we need to make some Keywords for use with Linked Ref's (alternatively you can use ObjectReference Property's but those are worse for persistence). Two Keywords are required for use with the Activators, one for the Trigger and another for the Container, AD_ItemTriggerKeyword and AD_ItemContainerKeyword respectively in the template displays. Depending on how you configure your Displays their Containers may also need some Keywords so I recommend also creating similar Keywords to the following now: AD_MarkerBattleAxe, AD_MarkerGreatsword, AD_MarkerStaff, AD_MarkerWarhammer. Displays supporting a greater diversity of items will likely require additional Keywords.

8. Linked Ref's: Double-click your Activator in the Render Window and navigate to the Linked Ref tab then add the Trigger and the Container as Linked Ref's. You can select them in the Render Window or use the drop-down's to find them. When you're done you should have two entries under References with your Keyword's matching their respective objects. This is very important! If the Keywords don't match then none of this will work.
For your Container, if you wish to use multiple marker objects so you can support multiple different positions follow the same steps as above and match the Keyword to the appropriate Marker (this step may not be required if the Display only supports a single position and/or item type since you can just use the container location).
Example:

Spoiler:  

Show



9. Messages: If you'd like to display some warnings for invalid objects, or when the player attempts to place more than one item you'll need to create some new Messages to handle that. Go to Messages in the Object Window, create a new message object and give it an Editor ID. Make sure to check the Message Box check box and fill your Message with whatever you wish to say (invalid item, too many items, etc).

10. Scripts: The Displays use two separate scripts - one for the Activator which is what players interact with, and one for the Container which handles the placement of the object being displayed in addition to filtering valid objects.

Add the AD_UniversalItemDisplayScriptACT script to your Activator, and auto-fill all the property's.

Add the AD_UniversalItemDisplayScriptCONT script to your Container, and auto-fill all the property's.

If needed, manually fill any property's that didn't match an Editor ID then save and close. Mousing over the "DisplayType" Property will give a tooltip list of different types of Display provided by this resource. Select the value that best fits the intended purpose, or add your own!

NOTE - The Activator Script has a line of code which refers to the Container Script by its exact name. If your scripts are named differently you will have to replace that part of the code with the name you did use and then recompile the Activator Script.

11. Reproduction: Once you have a given Display all set up and working correctly you can easily mass-produce them by selecting all your components (Activator, Trigger, Container + any additional Markers) in the Render Window and pressing Ctrl+D to duplicate the selection. Propogating Displays this way will preserve their respective Linked Ref relationships meaning you won't have to redo anything for the newly created Display to work as intended.

12. All Finished. Good Luck and Happy Modding :)

If you found this helpful please share screenshot's of your custom displays here. I'd love to see your creativity!


原贴地址
1.版本号: 1.0   更新时间: 2020-06-17 16:36:10

选择快速回复类型:
  • 感谢
  • 支持
  • 疑问
  • 卖萌
  • 关心
  • 傲娇
评论


    作者精品
    logo

    通用商品展示资源


    Mod大小:774.28KB
    上传时间:2020-06-17 16:23:14

    Mod简介:

    暂无更多介绍

    本地下载
    选择快速回复类型:
    • 感谢
    • 支持
    • 疑问
    • 卖萌
    • 关心
    • 傲娇
    回复