Tag Archives: minecraft

理想的科技树类型Modded Minecraft

由于最接近也是最近一次玩的mc周目omnifactory存档已删, 没有图了

科技树类型Modded Minecraft, 例如 GregTech New Horizon, 是以攀科技树为主要玩法的Modpack, 其中会出现大量需要各式各样机器处理的东西, 步骤多, 数量大, 耗时长, 需要自动化以方便操作.

所有存储及物流都由Applied Energistics (AE)控制. 因为AE实在是太强了, 它显然不是现实中能实现的物流系统, 但这就是游戏嘛. 也许用一个不那么强的, 比如Logistics Pipes也可以, 只要能任意接口自由IO即可.

所有与机器的交互都受Open Computer (OC)控制. OC应当能知道机器的工作状态(以便阻塞, 报错, etc.). OC应当控制IO, 例如将1个Copper Ingot和250mB Redstone投入机器, 或取出1个Red Alloy Ingot. 甚至能按Slot 定向IO. 当然也许有别的电脑Mod可以, 或者独立的Mod也可以.

所有合成表和计划合成都由OC控制而不是AE控制. 因为OC能知道机器状态, 进行队列控制, 防止往一个机器里一股脑加入太多东西导致出现有歧义的配方.

能量也可以加入监控及控制.

所有的合成控制状态等, 均可通过web/api查看或修改. 并可持续记录数据到数据库, 方便后续分析.

能量/库存消耗等, 可以简单线性回归预测还有多久耗尽/充满, 并根据现状/预测进行计划合成/开关机.

TODO

  1. OC需要能知道所有机器的工作状态. 偷懒的办法是只通过机器里还有没有东西判断.
  2. IO跨同一个机器的多个方块时, OC需要知道这是同一个机器
  3. 需要一个能由OC控制的定量IO的AE Interface
  4. OC需要知道合成表
  5. 需要保持chunk loading
  6. 就差一个写代码的了

Upgrade Weblate from git 2.18 version to latest docker

MAKE A BACKUP FIRST.
Ensure the website runs well before upgrading.

If encountering error ImproperlyConfigured: Requested setting DATA_DIR, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. when starting server, run export DJANGO_SETTINGS_MODULE=weblate.settings.

Read Generic upgrade instructions from official weblate doc first.

Special instruction for my build: Custom changes to weblate (weblate/trans/formats.py)and translate-toolkit (translate/storage/properties.py)to provide a special “Minecraft Lang File” format. The HTTP server is Gunicorn with Nginx. The operating system is Ubuntu 16.04 and weblate runs on Python 2.7. The database is PostgreSQL 9.5. These softwares will be upgraded or replaced during progress.

Universal step:

Run git fetch --all before git operation to ensure latest code exists.

  1. Read Version specific instructions and follow it.
  2. Stop gunicorn/wsgi and celery worker.
  3. git stash (before 3.0.x)
  4. git reset --hard (before 3.0.x)
  5. git checkout weblate-x.x Usex.x.1 or the latest minor version if it exists for a major version.
  6. git stash pop (before 3.0.x)
  7. pip install -r requirements.txt
  8. find weblate -name '*.pyc' -delete to remove cached compiled bytecode.
  9. Update settings.py to accommodate to settings_example.py.
  10. python manage.py migrate --noinput
  11. follow other manage commands in generic upgrade instructions.
  12. Start the server and check if everything works well.
Continue reading Upgrade Weblate from git 2.18 version to latest docker