Greetings!
BasilMod::Pack is a core modification intented to use on servers, and on clients.
It automates syncronization of content files between server and client, BasilMod addons used on the server.
Proper versions of mods being loaded and used for specific server.
Basically, players need to have only this one to start playing on advanced(heavily modified) server.
Make your server unique among the others, make it
Your Own.
Spoiler
Change recepies! Your players would not need to redownload "modpack.zip" each time you tweak balance on your server.
Add new content to the game server*! No more log ladders, viva la Siege towers!
Got an advert or trade offer? Share it on BulletinBoard**!
*) Content is not included into this mod.
**) Requires BasilMod::BulletinBoard mod.
This mod is part of
BasilMods bundle.
Backup of all updated files stored on client side, at BasilMod/_cache/server-id/ folder:
- "backup/new" subfolder contains marks about added files, which was not present in original LiF:Yo game.
- "backup/upd" subfolder contains original files prior to update.
- "update/" subfolder contain cached downloaded files from server.
You can always restore updated files from Pack settings window.
If you joining server, which is not BasilMod::Pack enabled, original files will be restored from backup, and a game client restart will be required.
If you switch between several BasilMod::Pack enabled servers, needed files will be synced, and other files will be restored to original state.
You can load/unload/reload compatible addons with one click. If you are GM, you can update/configure server side without server restart.
BasilMod::Pack is required for some other mods, as it extends communication capabilities between client and game server.
Server administrator specify content which should be syncronized, for example cm_objects.xml, skill_types.xml new dts models, and so on.
Also, Pack will automatically find all installed BasilMod or compatible addons on the server, and will upload them to client, so client will have all list of functions enabled on the server.
If server is using BasilMod::Pack, administrator can disallow client connection without client side installed. Player will get corresponding notification.
Security consideration
Spoiler
Major consideraion about this mod, is that LiF does not have streaming objects embedded into game server and client, so reading of binary files is not possible. Both, client and server side will require external binary executables: base64 decoder and encoder for processing files.
Server needs base64 encoder to convert binary data to text, and client needs base64 decoder to convert them back.
BasilMod::Pack provides compiled executables, as well as source code for them, so you can compile them yourself, to make sure that there is no security issues. This executables are used to encode and decode update-data between server and client.
Files are placed to "BasilMod/pack" folder.
Server requries base64encoder, and client requires base64decoder.
You can compile provided source code to ensure encoder/decoder functionality.
https://github.com/custodian/lif-base64utilsAlternatively you can create own, following this rules:
- base64encoder
- Name should be "base64encoder.exe"
- Application should accept 2 arguments: arg1 path to source file, arg2 target file for encoded data.
- Encoding should be done with binary_to_base64(gzip(data)).
- example: base64encoder.exe path/to/source/file.txt path/to/source/file.txt.base64
- base64decoder
- Name should be "base64decoder.exe"
- Application should accept 2 arguments: arg1 path to source encoded file, arg2 target file for decoded data.
- Decoding should be done with ungzip(base64_to_binary(data)).
- example: base64decoder.exe path/to/source/file.txt.base64 path/to/source/file.txt
Client demonstration.
Spoiler
When your client loads BasilMod::Pack, version will be shown at bottom-right corner
BasilMod::Pack take place after you select character. It will not allow you enter world, if any syncronization is required.
Client does not have BasilMod::Pack, but connects to server which requires it.
New loading phase added
If server admin/GM just added new content, or server just loaded it will preprare new content for client syncronization (one time task after each reboot). Client will get a notification.
Versions are verified, client starts content updates
Once all content is updated, client will get a notification, that reboot is needed. If you select 'Yes', LiF:Yo will automatically restart, and re-connects to same server. You will get straight to character selection window.
BasilMod::Pack seamlessly integrates into main menu.
Settings window is not yet functional in current release.
List of downloaded content is listed in Pack settings window.
List of found compatible addons is listed in Pack settings window
Client-side instructions.
Spoiler
It is very simple, no file editing requried! (For now, you still have to edit main.cs file)
Installation.
- Download basilmodloader.zip archive.
- Place basilmodloader.zip into the game folder, i.e. to "Life is Feudal Your Own\basilmodloader.zip"
You must not unpack archive! - Add following line to the end of your main.cs, i.e. i.e. to "Life is Feudal Your Own\main.cs"
- Code: Select all
exec("basilmodloader/loader.cs");
- Play LiF:YO.
Uninstall.
- Delete basilmodloader.zip archive from game directory.
- Delete BasilMod/ folder from game directory.
When your client loads BasilMod::Pack, version will be shown at bottom-right corner
If Server supports BasilMod::Pack, client will automatically communicate with it.
Server can supply "Fast join" button for the client.
Server-side instructions.
Spoiler
Find latest version here:
https://www.dropbox.com/sh/b6ih3z8dhopm ... ImHZa?dl=0Installation.
- Download and place mod files into "BasilMod/pack/" folder of server root.
- Alter configuration: confugure content updates, favorite server if needed.
- Add this line to the end of your "main.cs" server script, located at root folder, or execute it in server console to load mod without server restart
exec("BasilMod/pack/pack.cs"); - Play LiF.
Configuration.
General configuration is loaded from config.cs file.
- $BasilMod::cmVersionCompatible = "0.7.0.6";
Optional parameter. Specify compatible server version. This is done to disable autoload of module on new patch arrived to server. Your content changes should be manually validated. Generaly, mod should be compatible with future versions, but if it not, you have to wait for the new release. - $BasilMod::pack::noModDisconnect = false;
Disconnect players without client-side mod installed.
If set to "true", player will be unable to join. Correspoding message with text will be shown.
If set to "false", player will be able to join, but will see a message box (and system channel message) with text you supply. - $BasilMod::pack::noModMessage = "Visit basilmod-pack-t14651/ for more details!";
Message to be shows for players without mod. It is limited to ~200 chars.
Content configuration is loaded from content.cs files.
- BasilMod::pack_favoriteServer("Awesome Server", "127.0.0.1:28000", "basil");
Function for adding favoriteServer button for the client.
Parameters are: button caption, server address, server password - BasilMod::pack_updateRecipe();
Auto-generate and sync with client recipes information based on database data. No xml editing involved. - BasilMod::pack_updateRecipeRequirement();
Auto-generate and sync with client recipe requirements information based on database data. No xml editing involved. - BasilMod::pack_updateObjectsTypes();
Auto-generate and sync with client object types information based on database data. No xml editing involved. - BasilMod::pack_content("targetfile", "sourcefile");
Function for registering content update for the client.
"targetfile" where file should be placed.
"sourcefile" which server file should be used as source. Parameter is optional, if it is not supplied, same targetfile is used as source. - BasilMod::pack_contentdir("sourcedir");
Pack entire directory with its structure as content updates. Directory structure should follow default client layout, considering sourcedir as client root.
I.e. "sourcedir/art/Modesl/3D/MyServer/MyModel.dts" will be placed to "art/Modesl/3D/MyServer/MyModel.dts" on the client.
Function is usefull to deliver model and textures content updates to the client.
Example and configuration.
Spoiler
General configuration config.cs
- Code: Select all
$BasilMod::cmVersionCompatible = "0.7.0.6";
$BasilMod::pack::noModDisconnect = false;
$BasilMod::pack::noModMessage = "Visit http://lifeisfeudal.com/forum/basilmod-pack-t14651/ for more details!";
Content configuration content.cs
- Code: Select all
//Syncronize object settings, skills and equipment
BasilMod::pack_content("data/skill_types.xml");
BasilMod::pack_content("data/cm_objects.xml");
BasilMod::pack_content("data/cm_equipTypes.xml");
//Auto-update recipes and object types.
BasilMod::pack_updateRecipe();
BasilMod::pack_updateRecipeRequirement();
BasilMod::pack_updateObjectsTypes();
//Add fast connect button for client for clients
BasilMod::pack_favoriteServer("Awesome Server", "127.0.0.1:28000", "basil");