Home Editing Tools PES 2020 Common Library For Sider by zlac

PES 2020 Common Library For Sider by zlac

9252
1

eFootball PES 20 Common Library For Sider by zlac

Features: this is not a traditional module that adds new content or does any switching. It is a utility library, containing some common pieces of code that are (for the moment) useful for Scoreboard Server, Ball Server and Referee Kit Server scripts.

CommonLib.lua 2020

Currently, it only has the code which checks if two teams selected in exhibition mode belong to the same league, so that e.g. their league’s ball (or scoreboard or referee kit) can automatically be selected in exhibition match.

Current version: 1.0
Minimum version of Sider required: 6.1.0+

Link [v1.0] https://testpes.page.link/common_library_2020_v1

Important: Since this is a library, which is used by other scripts, it needs to be listed as the first lua.module entry, so that it gets initialized before other “normal” scripts do!

Quick Start section:
How to use:

  1. Unpack v1 archive and copy the contents of the unpacked modules folder into modules folder of your sider (overwrite if asked)
  2. Add lua.module = “lib\CommonLib.lua” as the first lua.module entry (above all others) in sider.ini file

# checking if two teams belong to the same league (useful in exhibition mode)

  • applies only to LEAGUES – cups and other competitions are ignored
  • library reads CompetitionEntry.bin file to determine whether two teams belong to the same league – checking may not be 100% accurate if teams have been moved to different leagues only in EDIT mode

Everything should be working in exhibition mode as intended with patches that use properly created CompetitionEntry.bin files to modify which teams belongs to which league – i.e. have Bayern, Bayer Leverkusen and Schalke 04 being moved to PEU league (Bundesliga) within CompetitionEntry.bin file, not only in-game using league editor in EDIT mode.

If you use only lightweight option files with Bundesliga, then most likely Bayern, Bayer and Schalke won’t be recognized as members of Bundesliga, because your game still uses default Konami’s version of CompetitionEntry.bin file, where those two teams belong to Others Europe.
The same limitation applies by analogy to PLA and PAS leagues.

Useful CommonLib functions

1. tid_same_league(home_id, away_id)
library version required: v1.0
input arguments:

  • home_id: home team id
  • away_id: away team id

return values:

  • integer: tournament_ID of the league, if both home and away teams belong to the same league
  • nil: if home and away team do not belong to the same league

Example

a) Add this somewhere near the top of your script, to gain access to exposed CommonLib functions and data

local _empty = {}
local function get_common_lib(ctx)
return ctx.common_lib or _empty
end

b) Somewhere in your code, where home_team_id and away_team_id are available in ctx, do something like this, to check if home and away teams belong to the same league:

local _tid

_tid = get_common_lib(ctx).tid_same_league(ctx.home_team, ctx.away_team)
if _tid ~= nil then
-- home and away teams belong to the same league, do something appropriate
else
-- home and away teams do not belong to the same league, do something appropriate
end

How to Use Common Library in eFootball PES 2020 PC :
– Install Sider 6 (latest version)
– Unpack the Common Library archive and copy the contents of the unpacked modules folder into modules folder of your sider (overwrite if asked).
– Open sider.ini and add lua.module = "lib\CommonLib.lua" as the first lua.module entry (above all others) in sider.ini file.
commonlibs
4. Save sider.ini file and play.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here