jasonrohrer / AnotherPlanetData

6 stars 3 forks source link

AHAP&OHOL: A necessary update. (Form) #1

Closed is52hertz closed 4 months ago

is52hertz commented 5 months ago

Before You Begin

[!NOTE]\ This form https://github.com/jasonrohrer/OneLife/issues/1049#issue-2216768110 NOTE: This document is still under development.

I am a big fan of the game OneHourOneLife (OHOL), and I really want to make it even better. However, I am not familiar with the Cpp programming language, so I cannot write these features myself. Therefore, I want to describe my ideas in as much detail as possible, so that you can help me implement them in OHOL.

All of these are my own ideas, and I did not use any AI other than for accurate translation of English.

I know that it is a bit late to post this issue at this point (due to my personal studies), but I still hope to push this update to both OneHourOneLife and AHAP (I need these for a private fork of OHOL).

ENGLISH (GeminiAI translation and manual inspection) --- # Static STRAN Conversion > A new conversion that occurs between `Obj` and `Obj` without any **`Player`/`Animal`** intervention. ## Why is it needed? - In the previous `OneHourOneLife`, if you wanted to do a pipe transfer, you would need an animal to connect, which is obviously difficult to understand and also a waste of resources to create an extra object. - And if you want to create a tree, automatically detect dead trees within `x=10 y=10` of the surrounding area, and convert them to dead trees if there are any, this is not achievable. ## Features --- ## `-- ALL --` --- ## `-- NORMAL --` - **`Obj1`** - The core object, the object before the conversion occurs, the relative coordinate 0 point. - **`ObjE`** - The object that is converted after the condition is met. - Condition box:   1. type - Type, used to control the detection area.    - XY relative coordinate mode    Input: `X` `Y`    Function: Detect if there is an `Obj` at this relative coordinate position    - Round mode     Input: `R` `Num`     Function: Detect if there are `Num` `Obj` within a radius of R    - Square mode     Input: `W` `H` `Num` Function: Detect if there are `Num` `Obj` within a width of `2W+1` and a height of `2H+1`    - Free drawing mode     Input: `LUx` `LUy` `RUx` `RUy` `LDx` `LDy` `RDx` `RDy` `Num` Function: Detect if there are `Num` `Obj` within the area enclosed by the four points relative to the coordinates    - Biome biome mode Input: `Num` Detection: Detect if there are `Num` `Obj` in the block connected to the biome at the foot of `Obj1` - **`if Tran`** If all the current conditions are met, `Obj1` is converted to `ObjE`, and the `Obj` in this condition is also converted. - **`Or`** - Or page - **`Page`** - Page  Each Page has a Main and multiple Or.    In Main, you can define ObjE & Check & Time ...    While Or is the same as Main, these settings will be locked in sync with Main.    And each Page is independent.   - **`Or`** What is it for? It has very little effect in --NORMAL--.   When `ObjE` and `Check` are the same, and only the conditions are different, you can use `Or` to save resources.   **OR&PAGE** PAGE contains multiple ORs. One PAGE satisfies one of the ORs, and the conversion can occur. - **`%`** - Probability, when the condition is met, there is a probability of conversion (default is 1). - **`TIME`** - Delay, delay of reverse conversion (see below for details) - **`Check`** - Check method. ### `Check` - DIE : Check when `Obj1` is converted to another `Obj`.   Options: None.   Disable `ObjE` (because it has been converted to another `Obj`)   - CRAFT :  Check once after other `Obj` are converted to `Obj1`.   ### `Check` - CRAFT :  Check once after other `Obj` are converted to `Obj1`.    Options: None.   - MOVE : Check once when the `Obj1` position is moved.    Options:     - Pick up, if selected, check once when `Obj1` is picked up.   - Put down, if selected, check once when `Obj1` is put down.   - Natural, selected by default, when `Obj1` is an animal, if it is not moved by human, check once after moving. - TIME : Check once every T/check seconds for active loading, and once every T2/check seconds for general loading. (What is loading? See below.)    Options:    T - Time in seconds, minimum 0.5   - LINK : Click at this time, and an id will be assigned to this `PAGE`.   In TRAN, fill in this id in a conversion, When this conversion occurs, at the same time activate this `PAGE` for checking.  --- ## `-- ExNihilo --` > `ExNihilo` comes from `Minecraft-Mod`: [https://www.curseforge.com/minecraft/mc-mods/ex-nihilo](https://www.curseforge.com/minecraft/mc-mods/ex-nihilo) When mentioning the `ExNihilo` function, there will definitely be many people who think, let us explain one by one. ### `WHAT` That is, `Obj1` is empty land. But we need to have a resource-saving mechanism so that it doesn't keep checking which grids meet the conditions. ### `WHY` The resources in `OHOL` are not renewable, but with it, we can make the places where players often move around to slowly recover resources, or some other fun features. ### `HOW` **Resource saving**   (`-- ExNihilo --` only)   - `Chunk`   _`12x12`_, fixed, cannot be changed. ![Chunk](https://github.com/jasonrohrer/OneLife/assets/144510573/b1366ab0-115a-4bbe-9e81-94ace213d04d) - `Center Chunk`  The _`12x12`_ of any position in the `Chunk` where the player is standing, this `Chunk` is the `Center Chunk`. - `Entity Processing Chunk`  The `Center Chunk` extends _`3`_ `Chunk` to the left, right, up and down. - `Lazy Processing Chunk`  The `Entity Processing Chunk` is surrounded by _`6`_ `Chunk` to the left, right, up and down. - `Loading Border Chunk`  In `Lazy Processing Chunk`, it usually extends _`1~2`_ `Chunk` **inward**. As shown in the figure, a standard inspection range is:   ![Chunk-1](https://github.com/jasonrohrer/OneLife/assets/144510573/81b49229-3c37-4e76-96e9-d29a9ef77bf8) > Where, `CC` represents `Center Chunk`, `EPC` represents `Entity Processing Chunk`, `LPC` and `LBC` represent `Lazy Processing Chunk`, and `LBC` represents `Loading Border Chunk` When two players meet:   - `Loading Border Chunk` touches. ![Chunk-2](https://github.com/jasonrohrer/OneLife/assets/144510573/d8f2ca41-052e-4b7b-822f-3d1c2330809d) It can be seen that its `Loading Border Chunk` becomes `Lazy Processing Chunk` (referring to `Loading Border Chunk` is always `EDGE` when two loads meet, it will always become the boundary.) - `Lazy Processing Chunk` touches. ![Chunk-3](https://github.com/jasonrohrer/OneLife/assets/144510573/7274809c-5831-4db8-8201-b45b2ada2678) The same is true. And the red areas overlap and do not change. - `Entity Processing Chunk` touches. ![Chunk-4](https://github.com/jasonrohrer/OneLife/assets/144510573/47b98a7c-24c3-4dd2-9b83-38b878950b26) ![Chunk-5](https://github.com/jasonrohrer/OneLife/assets/144510573/d0d3d3e0-14d9-4cc8-ab02-16cb6ca15d6c) So it can be summarized as follows: - `Loading Border Chunk` is always the boundary of the loaded area. - `Loading Border Chunk` < RED `Lazy Processing Chunk` < `Entity Processing Chunk` < `Center Chunk` (Coverage level.) - `Lazy Processing Chunk` = RED `Lazy Processing Chunk` + `Loading Border Chunk` **Age change**   (`-- ExNihilo --` only)   > Since players have different speeds and gameplay goals at different ages, there are different loading areas. | **Age\ChunkNum** | `Center Chunk` | `Entity Processing Chunk` | `Lazy Processing Chunk` | RED `Lazy Processing Chunk` | `Loading Border Chunk` | |:----------------:|:--------------:|:-------------------------:|:-----------------------:|:---------------------------:|:----------------------:| | **<=5** | 1 | 1 | 2 | 1 | 1 | | **6~17** | 1 | 2 | 5 | 4 | 1 | | **18~45** | 1 | 3 | 6 | 4 | 2 | | **46~54** | 1 | 3 | 5 | 3 | 2 | | **>=55** | 1 | 2 | 4 | 2 | 2 | | **death: <=1h** | 1 | 2 | 3 | 1 | 2 | | **death: 1h~2h** | 1 | 2 | 2 | 1 | 1 | | **death: 2h~3h** | 1 | 1 | 1 | 0 | 1 | | **death: >3h** | 0 | 0 | 0 | 0 | 0 | Why is it still needed after death?   If this player does not belong to any family, and there are not many people in this place, then it may cause these conversions to not be able to proceed offline (especially those with large time/delay).   How to judge the death location?   It is generally the location of death, even if the Bone is moved afterwards.   If it is buried as a tombstone, the death location will be switched to the tombstone location.   But for better compatibility, its age should be % (different from the probability % above)   ex. 5/60 = 8.333% **Number of checks**   (`-- ExNihilo --` only) | **Chunk\Times**         | Sec/Times | |:-------------------------------:|:---------:| | **`Center Chunk`**       | 1s    | | **`Entity Processing Chunk`**  | 10s    | | **RED `Lazy Processing Chunk`** | 30s    | | **`Loading Border Chunk`**   | 60s    | **TIMES** (`-- ExNihilo --` only) Each check, so how do you check?   Find an empty space in the current block, if not, end the current check and reset the cooldown.   If yes, find out if there is any condition in SETran(i.e. `ExNihilo`) that is met,   Search in all PAGEs, If not, the next cooldown time * 2.   If yes, create a `soon-to-convert`(will not be judged as empty) here, judge if there is TIME, if yes, wait, if not, convert directly, reset and next cooldown time * 3.   **TIME** Delay.   In `-- ExNihilo --` After confirming `soon-to-convert`, if there is TIME, then the reset of this block and next cooldown time * 2 + 1s (different from not meeting the conditions),   (If `FREE` is not checked) and disable this condition PAGE(contains multiple ORs)(i.e. until this TIME is over, a new such conversion will not be created)   In `-- NORMAL --` Only used for delay. **probability-%** When multiple PAGEs are satisfied, one is randomly selected with probability. # References [`Minecraft-Mod`](https://www.curseforge.com/minecraft/mc-mods/ex-nihilo) [`Minecraft-Chunk-wiki`](https://minecraft.fandom.com/wiki/Chunk) # Use-Tools [`Excel`](https://www.microsoft.com/en-us/microsoft-365/excel) [`tableconvert`](https://tableconvert.com/markdown-generator) ------ # TAGS > The second mention of TAGS, but now it has functionality that `categories` cannot. `categories` is ordered, whereas `TAGS` is unordered. `TAGS` is used for large numbers of OBJs `TAGS` is an original OBJ property. `TAGS` runs OBJs with multiple TAGS at the same time. which acts on the `OBJ`. For example, if I want to put a naturally occurring class of items into `STRAN` / `TRAN` for detection, I can enter this TAG / multiple TAGS to make a judgment.
CHINESE (Original text) # 写在所有之前 > [!NOTE]\ > 此文章仍在编写。 我是 `OHOL` 这款游戏的忠实爱好者,我非常想使这个游戏变得很好,但是苦于自身并不熟悉 `Cpp` 这门语言,无法自己写出这些功能,所以我想把我的想法尽可能得详细表述出来,让您来帮助 `OHOL` 实现。 所有的这些均是我个人想出来的,除了用于准确翻译 `English` ,其它都没有使用 `AI`。 我知道在这个时间点发这个 issues 是显得有些慢了(这是因为我个人学业原因),但我仍然希望吧这个更新同时推送到 `OneHourOneLife` 和 `AHAP`(我有一个对于 `OHOL` 的 `fork` 私服需要这些) —————— # 静态转换 STRAN > 即 `Obj` 对 `Obj` 产生交互, 而没有 **`Player`/`Animal`** 干预的全新转换。 ## 为什么需要 - 在之前的 `OneHourOneLife` 中,如果要进行管道传输,则需要一个动物接入,这无疑是难以理解的,而且额外创建一个物体,会导致资源浪费。 - 而如果说要创建一棵树,自动检测周围 `x=10 y=10` 内的枯树,并且如果有,转换为枯树,这是不可实现的。 # 功能 ___ ## `-- ALL --` ___ ## `-- NORMAL --` - **`Obj1`** - 核心物体,发生转换之前的物体,相对坐标的 0 点。 - **`ObjE`** - 条件成立后发生转换的物体。 - 条件框 : 1. type - 类型,用于控制检测区域。 - XY 相对坐标模式 输入: `X` `Y` 功能: 检测此相对坐标位置是否有 `Obj` - Round 圆模式 输入: `R` `Num` 功能: 检测在半径R的正圆内是否有 `Num` 个 `Obj` - Square 方形模式 输入: `W` `H` `Num` 功能: 检测在宽度 `2W+1` 高度 `2H+1` 内是否有 `Num` 个 `Obj` - Free 自由绘制模式 输入: `LUx` `LUy` `RUx` `RUy` `LDx` `LDy` `RDx` `RDy` `Num` 功能: 四个点相对坐标之间围成的面积内检测是否有 `Num` 个 `Obj` - Biome 生物群落模式 输入: `Num` 检测: 在 `Obj1` 脚下的生物群落联结的块中检测是否有 `Num` 个 `Obj` - **`if Tran`** 若当前全部条件成立,`Obj1` 转换为 `ObjE` ,该条件中的 `Obj` 也转换。 - **`Or`** - 或页面 - **`Page`** - 页面 每个 Page 中有一个 Main 和多个 Or . 在 Main 中可以定义 ObjE & Check & Time ... 而 Or 与 Main 相同,这些设置将锁定同步于 Main . 而每个 Page 是独立的。 - **`Or`** 有什么用? 在 --NORMAL-- 中作用极小。 在 `ObjE` 和 `Check` 等相同时,仅条件不同,可以使用 `Or` 节省资源。 **OR&PAGE** PAGE 中包含多个 OR。 一个 PAGE 满足 OR 中的一个,即可发生转换。 - **`%`** - 概率,当满足条件后,有概率发生转换(默认为 1)。 - **`TIME`** - 延迟,反生转换的延迟(详细介绍见下) - **`Check`** - 检查方式。 ### `Check` - DIE : `Obj1` 转换为其他 `Obj` 时检查。 选项: 无。 禁用 `ObjE` (因为已经转换为其他 `Obj`) - CRAFT : 其他 `Obj` 转换为 `Obj1` 后检查一次。 选项: 无。 - MOVE : `Obj1` 位置移动是检查一次。 选项: - 拿起,如果选中,当 `Obj1` 被拿起,检查一次。 - 放下,如果选中,当 `Obj1` 被放下,检查一次。 - 自然,默认选中,当 `Obj1` 为动物时,不是被人工移动位置的话,在移动后检查一次。 - TIME : 时间 (活跃加载)T/check 检查一次,(一般加载)T2/check 检查一次。(什么是加载?见下。) 选项: T - 时间秒,最小为 0.5 - LINK : 点击此时,将会给这个 `PAGE` 分配一个 id 。 在 TRAN 中,在某个转换中填入这个 id, 在发生此转换时,同时激活这个 `PAGE` 进行检查。 ___ ## `-- ExNihilo --` > `ExNihilo` 来自于 [`Minecraft-Mod`](https://www.curseforge.com/minecraft/mc-mods/ex-nihilo) 在提到 `ExNihilo` 功能时候,肯定会有很多以为,让我们一一解释。 ### `WHAT` 即 `Obj1` 为空地。但是我们有不能让它一直在检查哪个格子符合条件,所以需要有一个资源节省机制。 ### `WHY` `OHOL` 的资源是不可恢复的,但有了它,我们可以让玩家经常活动的地方在资源缓慢恢复,或者一些其它好玩的功能。 ### `HOW` **资源节省** (`-- ExNihilo --` 独有) - `Chunk` _`12x12`_ ,固定的,无法改变。 - `Center Chunk` 玩家所站这个 `Chunk` 的 _`12x12`_ 任意位置,这个 `Chunk` 为 `Center Chunk`。 - `Entity Processing Chunk` `Center Chunk` 向外左右上下衍生 _`3`_ 个 `Chunk` 。 - `Lazy Processing Chunk` `Entity Processing Chunk` 向外左右上下包围 _`6`_ 个 `Chunk` 。 - `Loading Border Chunk` 在 `Lazy Processing Chunk` 中,通常时向**内**延申 _`1~2`_ 个 `Chunk` 。 一个标准的检查范围如图所示: > 其中,`CC` 代表 `Center Chunk` , `EPC` 代表 `Entity Processing Chunk` , `LPC` 和 `LBC` 代表 `Lazy Processing Chunk`,`LBC` 代表 `Loading Border Chunk` 当两个玩家相遇时: - `Loading Border Chunk` 相接触。 可见其 `Loading Border Chunk` 变为 `Lazy Processing Chunk` (指的是 `Loading Border Chunk` 永远是 `EDGE` 在两个加载相遇时,总会成为边界。) - `Lazy Processing Chunk` 相接触。 同上。而红色区域相互覆盖,没有变化。 - `Entity Processing Chunk` 相接触。 所以可以总结如下: - `Loading Border Chunk` 总是为加载区块的边界。 - `Loading Border Chunk` < RED `Lazy Processing Chunk` < `Entity Processing Chunk` < `Center Chunk` (覆盖等级。) - `Lazy Processing Chunk` = RED `Lazy Processing Chunk` + `Loading Border Chunk` **年龄变化** (`-- ExNihilo --` 独有) > 由于在不同年龄阶段,玩家的速度和游玩目标时不同的,因此有不同的加载区块。 | **Age\ChunkNum** | `Center Chunk` | `Entity Processing Chunk` | `Lazy Processing Chunk` | RED `Lazy Processing Chunk` | `Loading Border Chunk` | |:----------------:|:--------------:|:-------------------------:|:-----------------------:|:---------------------------:|:----------------------:| | **<=5** | 1 | 1 | 2 | 1 | 1 | | **6~17** | 1 | 2 | 5 | 4 | 1 | | **18~45** | 1 | 3 | 6 | 4 | 2 | | **46~54** | 1 | 3 | 5 | 3 | 2 | | **>=55** | 1 | 2 | 4 | 2 | 2 | | **death: <=1h** | 1 | 2 | 3 | 1 | 2 | | **death: 1h~2h** | 1 | 2 | 2 | 1 | 1 | | **death: 2h~3h** | 1 | 1 | 1 | 0 | 1 | | **death: >3h** | 0 | 0 | 0 | 0 | 0 | 为什么死后仍需要? 如果这个玩家并不属于任何家族,没有太多人在这个地方,那么可能会造成这些转换在离线后无法进行(尤其是时间/延迟大的) 如何判断 death 地点? 一般是死亡的地点,即时而后 Bone 被移动。 如果被埋为墓碑,则将死亡地点切换为墓碑地点。 但为了更好的兼容性,其年龄应该是 % (与上文 概率% 区分) ex. 5/60 = 8.333% **检查次数** (`-- ExNihilo --` 独有) | **Chunk\Times** | Sec/Times | |:-------------------------------:|:---------:| | **`Center Chunk`** | 1s | | **`Entity Processing Chunk`** | 10s | | **RED `Lazy Processing Chunk`** | 30s | | **`Loading Border Chunk`** | 60s | **TIMES** (`-- ExNihilo --` 独有) 每次检查,那怎么检查? 在当前区块查找一处空地,如果没有,结束当前检查,冷却时间重置。 如果有,在 SETran(即 `ExNihilo`) 中查找是否有满足条件的, 在所有 PAGE 中查找, 如果没有,下次冷却时间 * 2 。 如果有,在此创建一个 `soon-to-convert`(不会判断为空地) ,判断是否有 TIME ,如果有等待,如果没有,直接转换,重置并下次冷却时间 * 3。 **TIME** 延迟。 在 `-- ExNihilo --` 中 在确认 `soon-to-convert` 中,如果有 TIME,则此区块的重置并下次冷却时间 * 2 + 1s (与没有满足条件区分), (如果没有勾选 `FREE`)并且禁用此条件PAGE(内涵多个OR)(即直到这个 TIME 结束,都不会在创建一个新的此转换) 在 `-- NORMAL --` 中 仅做延迟使用。 **%** 当有多个 PAGE 满足的时候,随机概率抽取一个。 # 参考资料 [`Minecraft-Mod`](https://www.curseforge.com/minecraft/mc-mods/ex-nihilo) [`Minecraft-Chunk-wiki`](https://minecraft.fandom.com/wiki/Chunk) # 使用工具 [`Excel`](https://www.microsoft.com/en-us/microsoft-365/excel) [`tableconvert`](https://tableconvert.com/markdown-generator) —————— # TAGS > 第二次提到 TAGS 了,但现在它有 `categories` 无法实现的功能。 `categories` 是有序的,而 `TAGS` 是无序的。 `TAGS` 用于数量大的 OBJs `TAGS` 是 OBJ 本来的属性。 `TAGS` 运行 OBJ 同时有多个 TAGS 它作用于 `OBJ` 上, 比如我想将自然生成的一类物品,放到 `STRAN` / `TRAN` 中进行检测,可以输入此 TAG / 多个 TAGS 进行判断。
CODE-CHINESE ``` # 写在所有之前 > [!NOTE\] > 此文章仍在编写。 我是 `OHOL` 这款游戏的忠实爱好者,我非常想使这个游戏变得很好,但是苦于自身并不熟悉 `Cpp` 这门语言,无法自己写出这些功能,所以我想把我的想法尽可能得详细表述出来,让您来帮助 `OHOL` 实现。 所有的这些均是我个人想出来的,除了用于准确翻译 `English` ,其它都没有使用 `AI`。 我知道在这个时间点发这个 issues 是显得有些慢了(这是因为我个人学业原因),但我仍然希望吧这个更新同时推送到 `OneHourOneLife` 和 `AHAP`(我有一个对于 `OHOL` 的 `fork` 私服需要这些) —————— # 静态转换 STRAN > 即 `Obj` 对 `Obj` 产生交互, 而没有 **`Player`/`Animal`** 干预的全新转换。 ## 为什么需要 - 在之前的 `OneHourOneLife` 中,如果要进行管道传输,则需要一个动物接入,这无疑是难以理解的,而且额外创建一个物体,会导致资源浪费。 - 而如果说要创建一棵树,自动检测周围 `x=10 y=10` 内的枯树,并且如果有,转换为枯树,这是不可实现的。 # 功能 ___ ## `-- ALL --` ___ ## `-- NORMAL --` - **`Obj1`** - 核心物体,发生转换之前的物体,相对坐标的 0 点。 - **`ObjE`** - 条件成立后发生转换的物体。 - 条件框 : 1. type - 类型,用于控制检测区域。 - XY 相对坐标模式 输入: `X` `Y` 功能: 检测此相对坐标位置是否有 `Obj` - Round 圆模式 输入: `R` `Num` 功能: 检测在半径R的正圆内是否有 `Num` 个 `Obj` - Square 方形模式 输入: `W` `H` `Num` 功能: 检测在宽度 `2W+1` 高度 `2H+1` 内是否有 `Num` 个 `Obj` - Free 自由绘制模式 输入: `LUx` `LUy` `RUx` `RUy` `LDx` `LDy` `RDx` `RDy` `Num` 功能: 四个点相对坐标之间围成的面积内检测是否有 `Num` 个 `Obj` - Biome 生物群落模式 输入: `Num` 检测: 在 `Obj1` 脚下的生物群落联结的块中检测是否有 `Num` 个 `Obj` - **`if Tran`** 若当前全部条件成立,`Obj1` 转换为 `ObjE` ,该条件中的 `Obj` 也转换。 - **`Or`** - 或页面 - **`Page`** - 页面 每个 Page 中有一个 Main 和多个 Or . 在 Main 中可以定义 ObjE & Check & Time ... 而 Or 与 Main 相同,这些设置将锁定同步于 Main . 而每个 Page 是独立的。 - **`Or`** 有什么用? 在 --NORMAL-- 中作用极小。 在 `ObjE` 和 `Check` 等相同时,仅条件不同,可以使用 `Or` 节省资源。 **OR&PAGE** PAGE 中包含多个 OR。 一个 PAGE 满足 OR 中的一个,即可发生转换。 - **`%`** - 概率,当满足条件后,有概率发生转换(默认为 1)。 - **`TIME`** - 延迟,反生转换的延迟(详细介绍见下) - **`Check`** - 检查方式。 ### `Check` - DIE : `Obj1` 转换为其他 `Obj` 时检查。 选项: 无。 禁用 `ObjE` (因为已经转换为其他 `Obj`) - CRAFT : 其他 `Obj` 转换为 `Obj1` 后检查一次。 选项: 无。 - MOVE : `Obj1` 位置移动是检查一次。 选项: - 拿起,如果选中,当 `Obj1` 被拿起,检查一次。 - 放下,如果选中,当 `Obj1` 被放下,检查一次。 - 自然,默认选中,当 `Obj1` 为动物时,不是被人工移动位置的话,在移动后检查一次。 - TIME : 时间 (活跃加载)T/check 检查一次,(一般加载)T2/check 检查一次。(什么是加载?见下。) 选项: T - 时间秒,最小为 0.5 - LINK : 点击此时,将会给这个 `PAGE` 分配一个 id 。 在 TRAN 中,在某个转换中填入这个 id, 在发生此转换时,同时激活这个 `PAGE` 进行检查。 ___ ## `-- ExNihilo --` > `ExNihilo` 来自于 [`Minecraft-Mod`](https://www.curseforge.com/minecraft/mc-mods/ex-nihilo) 在提到 `ExNihilo` 功能时候,肯定会有很多以为,让我们一一解释。 ### `WHAT` 即 `Obj1` 为空地。但是我们有不能让它一直在检查哪个格子符合条件,所以需要有一个资源节省机制。 ### `WHY` `OHOL` 的资源是不可恢复的,但有了它,我们可以让玩家经常活动的地方在资源缓慢恢复,或者一些其它好玩的功能。 ### `HOW` **资源节省** (`-- ExNihilo --` 独有) - `Chunk` _`12x12`_ ,固定的,无法改变。 - `Center Chunk` 玩家所站这个 `Chunk` 的 _`12x12`_ 任意位置,这个 `Chunk` 为 `Center Chunk`。 - `Entity Processing Chunk` `Center Chunk` 向外左右上下衍生 _`3`_ 个 `Chunk` 。 - `Lazy Processing Chunk` `Entity Processing Chunk` 向外左右上下包围 _`6`_ 个 `Chunk` 。 - `Loading Border Chunk` 在 `Lazy Processing Chunk` 中,通常时向**内**延申 _`1~2`_ 个 `Chunk` 。 一个标准的检查范围如图所示: > 其中,`CC` 代表 `Center Chunk` , `EPC` 代表 `Entity Processing Chunk` , `LPC` 和 `LBC` 代表 `Lazy Processing Chunk`,`LBC` 代表 `Loading Border Chunk` 当两个玩家相遇时: - `Loading Border Chunk` 相接触。 可见其 `Loading Border Chunk` 变为 `Lazy Processing Chunk` (指的是 `Loading Border Chunk` 永远是 `EDGE` 在两个加载相遇时,总会成为边界。) - `Lazy Processing Chunk` 相接触。 同上。而红色区域相互覆盖,没有变化。 - `Entity Processing Chunk` 相接触。 所以可以总结如下: - `Loading Border Chunk` 总是为加载区块的边界。 - `Loading Border Chunk` < RED `Lazy Processing Chunk` < `Entity Processing Chunk` < `Center Chunk` (覆盖等级。) - `Lazy Processing Chunk` = RED `Lazy Processing Chunk` + `Loading Border Chunk` **年龄变化** (`-- ExNihilo --` 独有) > 由于在不同年龄阶段,玩家的速度和游玩目标时不同的,因此有不同的加载区块。 | **Age\ChunkNum** | `Center Chunk` | `Entity Processing Chunk` | `Lazy Processing Chunk` | RED `Lazy Processing Chunk` | `Loading Border Chunk` | |:----------------:|:--------------:|:-------------------------:|:-----------------------:|:---------------------------:|:----------------------:| | **<=5** | 1 | 1 | 2 | 1 | 1 | | **6~17** | 1 | 2 | 5 | 4 | 1 | | **18~45** | 1 | 3 | 6 | 4 | 2 | | **46~54** | 1 | 3 | 5 | 3 | 2 | | **>=55** | 1 | 2 | 4 | 2 | 2 | | **death: <=1h** | 1 | 2 | 3 | 1 | 2 | | **death: 1h~2h** | 1 | 2 | 2 | 1 | 1 | | **death: 2h~3h** | 1 | 1 | 1 | 0 | 1 | | **death: >3h** | 0 | 0 | 0 | 0 | 0 | 为什么死后仍需要? 如果这个玩家并不属于任何家族,没有太多人在这个地方,那么可能会造成这些转换在离线后无法进行(尤其是时间/延迟大的) 如何判断 death 地点? 一般是死亡的地点,即时而后 Bone 被移动。 如果被埋为墓碑,则将死亡地点切换为墓碑地点。 但为了更好的兼容性,其年龄应该是 % (与上文 概率% 区分) ex. 5/60 = 8.333% **检查次数** (`-- ExNihilo --` 独有) | **Chunk\Times** | Sec/Times | |:-------------------------------:|:---------:| | **`Center Chunk`** | 1s | | **`Entity Processing Chunk`** | 10s | | **RED `Lazy Processing Chunk`** | 30s | | **`Loading Border Chunk`** | 60s | **TIMES** (`-- ExNihilo --` 独有) 每次检查,那怎么检查? 在当前区块查找一处空地,如果没有,结束当前检查,冷却时间重置。 如果有,在 SETran(即 `ExNihilo`) 中查找是否有满足条件的, 在所有 PAGE 中查找, 如果没有,下次冷却时间 * 2 。 如果有,在此创建一个 `soon-to-convert`(不会判断为空地) ,判断是否有 TIME ,如果有等待,如果没有,直接转换,重置并下次冷却时间 * 3。 **TIME** 延迟。 在 `-- ExNihilo --` 中 在确认 `soon-to-convert` 中,如果有 TIME,则此区块的重置并下次冷却时间 * 2 + 1s (与没有满足条件区分), (如果没有勾选 `FREE`)并且禁用此条件PAGE(内涵多个OR)(即直到这个 TIME 结束,都不会在创建一个新的此转换) 在 `-- NORMAL --` 中 仅做延迟使用。 **%** 当有多个 PAGE 满足的时候,随机概率抽取一个。 # 参考资料 [`Minecraft-Mod`](https://www.curseforge.com/minecraft/mc-mods/ex-nihilo) [`Minecraft-Chunk-wiki`](https://minecraft.fandom.com/wiki/Chunk) # 使用工具 [`Excel`](https://www.microsoft.com/en-us/microsoft-365/excel) [`tableconvert`](https://tableconvert.com/markdown-generator) —————— # TAGS > 第二次提到 TAGS 了,但现在它有 `categories` 无法实现的功能。 `categories` 是有序的,而 `TAGS` 是无序的。 `TAGS` 用于数量大的 OBJs `TAGS` 是 OBJ 本来的属性。 `TAGS` 运行 OBJ 同时有多个 TAGS 它作用于 `OBJ` 上, 比如我想将自然生成的一类物品,放到 `STRAN` / `TRAN` 中进行检测,可以输入此 TAG / 多个 TAGS 进行判断。 ```
jasonrohrer commented 4 months ago

Wow, you really thought this through in a deep way.

But these parts of OHOL are very old at this point, and I'm not going to dig in to change those things now.

is52hertz commented 1 week ago

Wow, you really thought this through in a deep way.

But these parts of OHOL are very old at this point, and I'm not going to dig in to change those things now.

Oh, yes. I konw OHOL is time to end... I will try to implement these functions in a new game. Yes. It named OFW