Personal Book


Gives you a personal blueprint book which syncs across savegames and servers. Book can be easily accessed via hotkey and shortcut. [color=red]Important[/color]: automatic sync only works if you disable "Settings->Other->Use different mod settings per save".

Utilities
2 months ago
2.0
681
Blueprints
Owner:
SunBlade
Source:
N/A
Homepage:
https://SunBla.de/files/Factorio/
License:
The Unlicense (Public Domain)
Created:
3 months ago
Latest Version:
1.0.3 (2 months ago)
Factorio version:
2.0
Downloaded by:
681 users

Features

The Book

  • the hotkey and shortcut button allows access to your personal book no matter where it is.
  • the personal book and contained items keep their links to the hotbar and other mods.
  • your personal book waits in the void until your inventory has a free slot.
  • your personal book will be remade in the desired quality when opened via hotkey or shortcut.

Multiplayer

  • the mod is multiplayer safe.

Usage

Syncing

based on your setting of "Settings->Other->Use different mod settings per save" this mod behaves differently.
that setting is basically a NoSync option, which prevents automatic syncing between savegames/servers.

with NoSync on, your personal book behaves like the "game blueprint library" and is tied to your savegame/server.
this is preferable if you have saves/servers with vastly different mods, since the personal book immediately deletes data from unavailable mods.

with NoSync off, your personal book behaves like the "my blueprint library" and tries to automatically sync across savegames/servers.
this is preferable if you have saves/servers with the same mods or mods that do not introduce new stuff to be saved in blueprints.

Hotkey/Shortcut

the hotkey (by default: B) and shortcut button will open your personal book no matter where it is located.
additionally your personal book will be moved to your main inventory if you have enough space.

Mod Setting

your personal book and ID mapping are saved as export strings in your mod settings.
changing the export string of your personal book will trigger an update.
if you change the export string of your personal book you should also clear the ID mapping.

Backups

before changing your personal book, a backup is created in "{Factorio}/script-output/sbPersonalBook/backup###.txt".
the amount of backups can be configured in the settings.

Command

the /personalbook command defines the following functions:

  • copy {player}
    sets your personal book to a copy of the specified players book.
  • set
    sets your personal book to the book currently in your hand or the book you have currently opened, the book in your hand takes precedence.

Scripting

the sbPersonalBook remote interface defines the following functions:

  • has_book( player:uint ): LuaItem?
    returns the personal book of the specified player, if they have one
  • get_book( player:uint ): LuaItem
    returns the personal book of the specified player, creating it if it does not exist
  • set_book( player:uint, book:LuaItem|LuaItemStack ): boolean
    tries to set the personal book of the specified player to the specified item. returns true on success.
  • force_save( player:uint ): nil
    forcefully saves the personal book of the specified player. use this if you made any changes to the personal book.

Known limitations

  • you need to disable "Settings->Other->Use different mod settings per save" for the mod to sync across savegames/servers.
  • description of items does not update.
  • unavailable data from other mods is immediately deleted from the personal book.
  • putting the personal book into the blueprint library will break all links to it and contained items, forcing the recreation of the personal book.
  • putting items into the blueprint library will break all links to them, forcing new IDs upon retrieval of said items.
  • quality of items is not stored in export strings, thus the mod mostly ignores quality.