Easy API [ALPHA]


In short, all common systems in one mod and they are based on events to make everything simpler. One API for all solutions. New events, easy integration and maximum compatibility + safe switchable commands and customizability (Mod devs, please, check GitHub repository first) I have more libraries etc. in https://github.com/ZwerOxotnik/zk-lib Anyone can translate the mod on Crowdin. https://crowdin.com/project/factorio-mods-localization

Utilities
a month ago
1.1 - 2.0
3.81K

Changelog


Version: 0.13.1
Date: 2024-11-10
  Bugfixes:
    - Fixed EasyAPI_rcon and BridgeAPI remote interfaces
    - Fixed /play-sound command
Version: 0.13.0
Date: 2024-10-21
  Changes:
    - Updated for Factorio 2.0 (maybe, the mod causes bugs)
Version: 0.12.7
Date: 2024-10-04
  Scripting:
    - Added "set_tick_player_joining_team" into the remote interface
Version: 0.12.6
Date: 2024-10-04
  Features:
    - Added new setting "Minimum time between changing teams"
  Bugfixes:
    - Fixed /play-sound command
Version: 0.12.5
Date: 2024-10-02
  Changes:
    - Improved /unstuck command
  Bugfixes:
    - Improved data stability for _mod_data.not_deletable_teams
  Scripting:
    - on_round_end event should have source
Version: 0.12.4
Date: 2024-10-01
  Changes:
    - It won't delete forces created by other mods/scripts/scenarios
  Scripting:
    - Added "is_team_deletable" into the remote interface
    - 2nd parameter of "add_team" in the remote interface is "is_not_deletable" now
Version: 0.12.3
Date: 2024-09-30
  Scripting:
    - Added "change_setting" to the remote interface
Version: 0.12.2
Date: 2024-09-28
  Scripting:
    - Renamed on_pre_entity_force_changed to on_pre_entity_changed_force
    - Renamed on_entity_force_changed to on_entity_changed_force
    - Added external_mod_configs_util.lua
Version: 0.12.1
Date: 2024-09-28
  Scripting:
    - Added on_pre_entity_force_changed, on_entity_force_changed events + new concept
    -  More info in external_mod_configs.lua
Version: 0.11.11
Date: 2023-09-07
  Scripting:
    - Added new interfaces
Version: 0.11.10
Date: 2023-09-06
  Changes:
    - Updated dependencies
Version: 0.11.8
Date: 2023-09-04
  Bugfixes:
    - Improved commands (should be safer to use them by its concept with other mods and scenarios)
Version: 0.11.7
Date: 2023-09-03
  Bugfixes:
    - Improved removing of teams
Version: 0.11.6
Date: 2023-09-02
  Bugfixes:
    - Fixed detection of removed bases
Version: 0.11.5
Date: 2023-08-31
  Bugfixes:
    - Fixed deletion of team bases
Version: 0.11.4
Date: 2023-08-31
  Scripting:
    - Improved "on_pre_deleted_team_base" event
Version: 0.11.3
Date: 2023-08-07
  Features:
    - Added new command: /sync
  Changes:
    - Improved /fix-bugs
Version: 0.11.2
Date: 2023-06-12
  Features:
    - Added new command: /sync
  Changes:
    - Improved /fix-bugs
Version: 0.11.1
Date: 2023-06-10
  Features:
    - Added new 2 commands: /killme /fix-bugs
  Scripting:
    - Added persistent player data to track player data if the player was deleted (see the remote interface)
  Locale:
    - Updated Spanish translation (thanks to @rubesaca on crowdin.com)
    - Updated German translation (thanks to @teite on crowdin.com)
    - Updated Brazilian Portuguese translation (thanks to @BM123499 (Bruno Melo) on crowdin)
    - Updated Hungarian translation (thanks to @Kipurcantix on crowdin)
    - Updated Ukrainian translation (thanks to @de_jure (Yuriy) on crowdin)
    - Updated German translation (thanks to @Xman1109 on crowdin)
    - Updated French translation (thanks to @sollevix (David TAORMINA) on crowdin)
    - Updated Norwegian translation (thanks to @Eerrikki (Robin Braathen) on crowdin)
    - Translations: https://crowdin.com/project/factorio-mods-localization (thank you for contributions, I really appreciate it)
Version: 0.11.0
Date: 2023-05-04
  Scripting:
    - Added assign_default_permission_group(player) to the remote interface
    - Added new settings to set permissions for players in other ways
    - WARNING: permissions by itself isn't fully ready and perhaps can be unstable
  Changes:
    - Refactored some stuff
  Bugfixes:
    - Permissions should be more reliable
    - Improved data stability for general_forces_data and general_players_data
Version: 0.10.6
Date: 2023-04-27
  Scripting:
    - Added EasyAPI.create_coin_conversion_recipe in data.lua
    - Changed EasyAPI.add_new_coin in data.lua
  Changes:
    - Supports coin conversion as recipes
Version: 0.10.5
Date: 2023-04-26
  Scripting:
    - Added support of conversions for new coins
    - Changed data.lua to improve mod compatibility
Version: 0.10.4
Date: 2023-04-26
  Scripting:
    - Added new coins
Version: 0.10.3
Date: 2023-04-26
  Scripting:
    - Added deposit_virtual_base_resource(force_index, name, amount) in the remote interface
    - Added stuff for general_forces_data and general_players_datain the remote interface
Version: 0.10.2
Date: 2023-04-24
  Bugfixes:
    - Fixed crashes with on_configuration_changed event
Version: 0.10.1
Date: 2023-04-24
  Scripting:
    - Changed remote interface for virtual_base_resources*
Version: 0.10.0
Date: 2023-04-23
  Scripting:
    - Added stuff for virtual_base_resources (It'll be used for RTS like features)
Version: 0.9.13
Date: 2023-02-13
  Bugfixes:
    - Fixed money interaction with void force in some cases
Version: 0.9.12
Date: 2022-11-13
  Features:
    - Added new command: /get-money - converts digital money from your team or you into your inventory.
  Changes:
    - Renamed: /withdraw-team-money -> /destroy-team-money to avoid confusion and accidents
Version: 0.9.11
Date: 2022-03-08
  Scripting:
    - Added new functions to the mod remote interface: set_offline_players_money(data), set_online_players_money(data), set_forces_money(data)
Version: 0.9.10
Date: 2022-05-25
  Features:
    - Supports https://mods.factorio.com/mod/gvv
Version: 0.9.9
Date: 2022-02-22
  Changes:
    - Added notifications when a player switches a team.
Version: 0.9.8
Date: 2022-02-20
  Changes:
    - Added new teams (enemy and neutral)
Version: 0.9.7
Date: 2022-02-20
  Features:
    - Fixed /bring
Version: 0.9.6
Date: 2022-02-20
  Features:
    - Added commands: /unstuck
  Changes:
    - Improved on_player_joined_team event
Version: 0.9.5
Date: 2022-02-18
  Features:
    - Improved /goto
    - Added commands: /uncloak /cloak /hp /play-sound
Version: 0.9.4
Date: 2022-02-18
  Features:
    - Added /goto <player name> - teleports you to a player
Version: 0.9.3
Date: 2022-02-17
  Features:
    - Added /bring <player name> - teleports a player to you
Version: 0.9.2
Date: 2022-02-15
  Changes:
    - Added special scenario to show how to make and use server scripts safely (look into the code)
Version: 0.9.1
Date: 2022-02-09
  Changes:
    - Commands are active by default
Version: 0.9.0
Date: 2022-02-09
  Scripting:
    - Changed some events
    - Added some events and extended remote interface for https://github.com/ZwerOxotnik/factorio-BTeams
Version: 0.8.2
Date: 2022-01-16
  Bugfixes:
    - Fixed convert of money if a player don't have force balance
Version: 0.8.1
Date: 2022-01-14
  Scripting:
    - Added "deposit_force_money_by_index" in remote interface
Version: 0.8.0
Date: 2022-01-05
  Features:
    - Added command: /ring <player name> - sends a sound to a player
  Changes:
    - Slightly refactored
Version: 0.7.7
Date: 2021-12-22
  Changes:
    - Changed event handler (slightly better performance)
Version: 0.7.6
Date: 2021-12-06
  Features:
    - RCON can store mods in "BridgeAPI" now
  Changes:
    - Slightly refactored "BridgeAPI"
Version: 0.7.5
Date: 2021-12-05
  Changes:
    - Updated remote interface: "BridgeAPI"
Version: 0.7.4
Date: 2021-12-05
  Features:
    - Added remote interface: "BridgeAPI" for rcon and mods
Version: 0.7.3
Date: 2021-12-04
  Features:
    - Added remote interface: "EasyAPI_rcon" for rcon
Version: 0.7.2
Date: 2021-11-15
  Changes:
    - Moved MoneyPrinter to https://mods.factorio.com/mod/MoneyPrinter to avoid some bizzare desynces
Version: 0.7.1
Date: 2021-10-22
  Bugfixes:
    - Fixed player money
Version: 0.7.0
Date: 2021-10-22
  Changes:
    - Refactored slightly
    - Changed player money fully
    - Changed remote interface
Version: 0.6.2
Date: 2021-10-17
  Locale:
    - Added French translation (thanks to @Drilzxx_ (Kévin) on crowdin)
    - Translations: https://crowdin.com/project/factorio-mods-localization (thank you for contributions, I really appreciate it)
Version: 0.6.1
Date: 2021-09-25
  Changes:
    - Improved localization sligthly
  Bugfixes:
    - Allows use all money in commands
Version: 0.6.0
Date: 2021-09-17
  Features:
    - Added new settings
    - Added "get_teams_count" in the mod remote interface
  Changes:
    - Changed names of commands settings
  Bugfixes:
    - Fixed some data and events
    - Fixed reaction of settings
Version: 0.5.9
Date: 2021-09-16
  Changes:
    - Small changes
    - Fixed some bugs in the mod remote interface
Version: 0.5.8
Date: 2021-09-15
  Changes:
    - Changed mod remote interface
    - Small changes
Version: 0.5.7
Date: 2021-09-14
  Changes:
    - Players will switch team if it's a void team when they joined to a game
Version: 0.5.6
Date: 2021-09-14
  Features:
    - Added "void" team and surface
  Changes:
    - Changed remote interface
Version: 0.5.5
Date: 2021-09-11
  Features:
    - Added "deposit_player_money" in remote interface
  Changes:
    - Changed localization
Version: 0.5.4
Date: 2021-09-10
  Changes:
    - Removed on_updated_player_balance, on_updated_force_balance events
Version: 0.5.3
Date: 2021-09-10
  Bugfixes:
    - Fixed localization
Version: 0.5.2
Date: 2021-09-07
  Changes:
    - Changed data (each force has money)
Version: 0.4.0
Date: 2021-09-05
  Changes:
    - Gives money to new forces
Version: 0.3.9
Date: 2021-09-05
  Changes:
    - Changed default settings
Version: 0.3.8
Date: 2021-09-03
  Changes:
    - Changed locales
Version: 0.3.7
Date: 2021-08-31
  Changes:
    - Improved stability
    - Added "deposit_force_money", "set_force_money_by_index" into remote interface
Version: 0.3.4
Date: 2021-08-31
  Changes:
    - Added "get_players_money" into remote interface
Version: 0.3.3
Date: 2021-08-30
  Changes:
    - Changed recipes of coins
Version: 0.3.2
Date: 2021-08-29
  Locale:
    - Added Brazilian Portuguese translation (thanks to @BM123499 (Bruno Melo) on crowdin)
    - Translations: https://crowdin.com/project/factorio-mods-localization (thank you for contributions, I really appreciate it)
Version: 0.3.1
Date: 2021-08-28
  Features:
    - Added get_forces_money in the remote interface
Version: 0.3.0
Date: 2021-08-28
  Features:
    - Added money printer
Version: 0.2.9
Date: 2021-08-28
  Features:
    - Added /convert-money
  Bugfixes:
    - Fixed locale of "Default permission group"
Version: 0.2.8
Date: 2021-08-28
  Bugfixes:
    - Fixed switching commands during errors
Version: 0.2.7
Date: 2021-08-25
  Changes:
    - Small improvements
Version: 0.2.6
Date: 2021-08-25
  Changes:
    - Improved /create-team
    - Improved check of team name
    - Renamed teams_util.lua to team_util.lua
  Bugfixes:
    - Fixed some minor bugs
Version: 0.2.5
Date: 2021-08-23
  Features:
    - Renamed "admins" to "Admin" in /permissions
Version: 0.2.4
Date: 2021-07-31
  Features:
    - Added new map setting: Default force
Version: 0.2.3
Date: 2021-07-31
  Changes:
    - Changed money_util.lua
    - Changed localization of economy commands
    - Changed remote interface for money API
    - Balances resets on round start
    - Adds player in team on_player_accepted_invite
  Notes:
    - Need default force
Version: 0.2.2
Date: 2021-07-31
  Changes:
    - Changed general_util.lua
    - Changed teams_util.lua
    - Changed remote interface
  Bugfixes:
    - Fixed interactions with players/forces who don't have balance
    - Added missed event when new team added via remote interface
    - Fixed description for commands
    - Fixed /pay with invalid data
    - Fixed /withdraw-money
Version: 0.2.1
Date: 2021-07-30
  Changes:
    - Extended remote interface for money API
    - Filled money_util.lua
    - Changed on_updated_force_balance event
  Bugfixes:
    - Fixed /set-money
Version: 0.2.0
Date: 2021-07-30
  Features:
    - Added parts of economy (not fully ready)
    - New commands for economy (not fully ready)
  Changes:
    - Teams are more stable
    - Changed API
  Bugfixes:
    - Some bugfixes for permissions, commands
  Notes:
    - Many things aren't translated yet
    - Many stuff aren't completed still
    - Events of economy not fully works
    - Remote interface for economy isn't ready at all, therefore affects on some dev parts
Version: 0.1.1
Date: 2021-07-29
  Changes:
    - Changed and improved API of teams
    - Changed permissions slightly (it may broke some scenarios though...)
Version: 0.1.0
Date: 2021-07-28
  Notes:
    - First release for 1.1
    - Please, don't use it for other mods. Most parts etc aren't ready.
    - Some code was added from other mods like https://github.com/ZwerOxotnik/teams-zo diplomacy etc
    - Some parts was translated by other people