Integrated Features

Index

InterfaceEndpointDescription
OpenTipsClientOpen a tip popup
CloseTipsClientClose the tip window
RegisterDebugToolClientRegister a custom debugging tool
RegisterPackButtonClientRegister a button for the PC inventory proxy interface
CreateFormByJsonIdClientCreate a custom form based on the configuration file
CreateTipsTitleClientCreate and display a tip title
CreateEntityChatUIClientCreate an entity self-talk UI
OpenDebugToolMenuClientOpen the menu for the specified debugging tool
CloseDebugToolMenuClientClose the menu of an open debugging tool
SetNewbieTipsWindowClientSet interface description tips
OpenMissionPanelClientOpen the mission interface
GetMissionDictListByParentNameClientGet the mission data list by the parent mission name
GetMissionIsAutoRewardByMissionIdClientGet whether the mission automatically rewards based on the mission ID
GetMissionDictByIdClientGet mission data by mission ID
RegisterMissionClientDynamically register missions
UnlockMissionServerForce unlock a mission
CompleteMissionServerComplete a mission
PlayCGToScreenClientPlay CG in full screen
PlayCGToUIControlClientPlay CG to a UI control
OreUIFormClientOpen the new multi-functional form
ItemSelectorClientItem selector

OpenTips

Client

  • Description:
    Open a tip popup

  • Parameters:

Parameter NameData TypeDescription
ObjectobjectThe instance returned by the event trigger function, example: clientApi.GetSystem(config.ModName, config.ClientSystemName)
TitlestrTitle
ContentstrContent
LeftButtonTextstrText for the left button
LeftButtonstrName of the function triggered by the left button, default is None (no button displayed)
RightButtonTextstrText for the right button
RightButtonstrName of the function triggered by the right button, default is None (no button displayed)
CloseButtonstrDefault close button, default is Left; options: Right, None (indicating the left button is close)
UIDatadictData for this UI, used to control button style, default is {}
IsOriginalstrWhether to open the UI in its native way, default is False (automatically determines the scene)
  • Return Value:
    None

  • Example:

self.LA = self.GetLASys('key')
self.LA.OpenTips(self, 'Unable to Set', 'This mod has no content set', LeftButtonText='Got it', LeftButton='CloseTips')

CloseTips

Client

  • Description:
    Close the tip window

  • Parameters:
    None

  • Return Value:
    None

  • Example:
    None


RegisterDebugTool

Client

  • Description:
    Register a custom debugging tool

  • Parameters:

Parameter NameData TypeDescription
NamestrTool name
IconPathstrTool icon path
InfostrTool introduction information, supports rich text
PlatstrApplicable platform
VersionstrVersion number
ToolMenudictlistTool menu list
  • Return Value:
    None

  • Example:

def ClientInit(self):
    self.LA.RegisterDebugTool('New Tool', 'textures/ui/research_2', 'Simple Introduction', 'Not supported on IOS', '1.0.0', [
        {
            'ModName': 'Demo',
            'ClientSystemName': 'DemoClientSystem',
            'ButtonName': 'Send Message Button',
            'FunctionName': 'Msg'
        },
        {
            'ModName': 'Demo',
            'ClientSystemName': 'DemoClientSystem',
            'ButtonName': 'Pop Up Tip Button',
            'FunctionName': 'OpenTips'
        }
    ])

RegisterPackButton

Client

  • Description:
    Register a button for the PC inventory proxy interface

  • Parameters:

Parameter NameData TypeDescription
ButtonNameobjectButton name
IconPathstrIcon path, e.g., textures/ui/aaa
FunctionInstancefunctionFunction instance (no parameter input), corresponding to the function shown when the button is triggered
  • Return Value:
    None

  • Example:
    None


CreateFormByJsonId

Client

  • Description:
    Create a custom form based on the configuration file

  • Parameters:

Parameter NameData TypeDescription
JsonIdstrConfiguration component JsonId
ExtraDatadictAdditional parameters used to inherit and modify the configuration form, default is None
  • Return Value:
    None

  • Example:

self.CreateFormByJsonId('form/output_building_form', {
  'Title': 'New Form',
  'Content': [
    {
      'key': 'name',
      'type': 'input_text',
      'infomation': 'Entity Name'
    }
  ]
})

CreateTipsTitle

Client

  • Description:
    Create and display a tip title

  • Parameters:

Parameter NameData TypeDescription
ContentstrTip title content
SoundNamestrSound played when the tip title is displayed, default is random.levelup
  • Return Value:
    None

  • Example:
    None


CreateEntityChatUI

Client

  • Description:
    Create entity self-talk UI

  • Parameters:

Parameter NameData TypeDescription
EntityIdstrEntity ID
ContentstrText content to be spoken
StopTimerfloatClose delay, default is 3
SoundNamestrSound name, default is None
ScaleintSize type, options: 0, 1, default is 1
OffsettupleOffset coordinates, default is (0, 1, 0)
  • Return Value:
    Entity UI Object (object)

  • Example:
    None


OpenDebugToolMenu

Client

  • Description:
    Open the specified debugging tool menu

  • Parameters:

Parameter NameData TypeDescription
DebugDictdictData for the debugging tool
  • Return Value:
    None

  • Example:
    None


CloseDebugToolMenu

Client

  • Description:
    Close the open debugging tool menu

  • Parameters:
    None

  • Return Value:
    None

  • Example:
    None


SetNewbieTipsWindow

Client

  • Description:
    Set interface description tips

  • Parameters:

Parameter NameData TypeDescription
UIObjectobjectInterface Object
PanelPathstrInterface path
TipsContentstrTip content
TipsOffsetTypeintTip position type, options: 0: Center, 1: Top, 2: Bottom, 3: Left, 4: Right
CloseFunctionInstancefunctionFunction instance called after closing the tip
ExtraDatadictAdditional data passed to the close function
  • Return Value:
    None

  • Example:
    None


OpenMissionPanel

Client

  • Description:
    Open the mission interface

  • Parameters:
    None

  • Return Value:
    None

  • Example:
    None

GetMissionDictListByParentName

Client

  • Description:
    Get the mission data list by the parent mission name

  • Parameters:

Parameter NameData TypeDescription
ParentNamestrParent mission name
  • Return Value:
    Mission data list (list)

  • Example:
    None


GetMissionIsAutoRewardByMissionId

Client

  • Description:
    Get whether the mission automatically rewards based on the mission ID

  • Parameters:

Parameter NameData TypeDescription
MissionIdstrMission ID
  • Return Value:
    Whether the reward is automatic (bool)

  • Example:
    None


GetMissionDictById

Client

  • Description:
    Get mission data by mission ID

  • Parameters:

Parameter NameData TypeDescription
MissionIdstrMission ID
  • Return Value:
    Mission data (dict)

  • Example:
    None


RegisterMission

Client

  • Description:
    Dynamically register missions

  • Parameters:

Parameter NameData TypeDescription
MissionDatadict, list[dict]Mission data, if dict, add one, if list, add multiple
  • Return Value:
    None

  • Example:

LASystem.RegisterMission({
    'Id': 'DoomsZ2-1',
    'Parent': 'Chapter 2: The Disaster Stricken',
    'LevelType': 0,
    'Name': 'Entering the Camp: "Warmth" Bait',
    'SubName': 'Sarlika Outskirts · Swallow Camp',
    'Position': [23, 65, 16],
    'Dimension': 0,
    'Information': 'You’re not alive by miracle, but by the next exiled one.
A pile of burning bonfires in the center of the camp, surrounded by a dozen people sitting around it, some roasting wet shoes, others staring at the pot of rice porridge. The air is filled with the smell of cooked food mixed with oil.',
    'UnLockCondition': [
        {
            'ConditionType': 'ALL',
            'ConditionList': ['DoomsZ1-2']
        }
    ],
    'CompleteFunctionInstance': '',
    'IsAutoReward': False,
    'RewardList': [
        {
            'Type': 'MinecraftItem',
            'Id': 'minecraft:diamond',
            'AuxValue': 0,
            'Num': 1,
            'Level': 5,
        }
    ]
})

UnlockMission

Server

  • Description:
    Force unlock a mission

  • Parameters:

Parameter NameData TypeDescription
PlayerIdstrPlayer ID
MissionIdstrMission ID
  • Return Value:
    None

  • Example:
    None


CompleteMission

Server

  • Description:
    Complete a mission

  • Parameters:

Parameter NameData TypeDescription
PlayerIdstrPlayer ID
MissionIdstrMission ID
  • Return Value:
    None

  • Example:
    None


RegisterModSettingConfig

Client

  • Description:
    Register mod setting configuration

  • Parameters:

Parameter NameData TypeDescription
LingmienAetherModNamestrMod name in InitLingmienAetherMod interface
SettingConfigDictdictSetting configuration data
  • Return Value:
    None

  • Example:

def ClientInit(self):
    LASystem.RegisterModSettingConfig('Test', {
        'Title': 'Mod Settings',
        'ModName': config.ModName,
        'ClientSystemName': config.ClientSystemName,
        'CloseFunctionName': 'SetModSettingConfig',
        'SettingList': [
            {
                'Name': 'Sub Settings...',
                'Key': 'MouseSetting',
                'ControlType': 'menu',
                'SettingConfigList': {
                    'Title': 'This is a sub setting',
                    'ModName': config.ModName,
                    'ClientSystemName': config.ClientSystemName,
                    'CloseFunctionName': 'SetModSettingConfig',
                    'SettingList': [
                        {
                            'Name': 'Float Slider',
                            'Key': 'DemoFloatSlider',
                            'ControlType': 'slider',
                            'ValueType': float,
                            'ValueLimit': [0, 5],
                            'DefaultValue': 0.35
                        },
                    ]
                }
            },
            {
                'Name': 'Graphics Level',
                'Key': 'Qul',
                'ControlType': 'button',
                'ValueType': list,
                'DefaultValue': ['Medium', 'High', 'Low']
            },
            {
                'Name': 'Enable Shadows',
                'Key': 'IsShader',
                'ControlType': 'button',
                'ValueType': bool,
                'DefaultValue': True
            },
            {
                'Name': 'Brightness Level',
                'Key': 'Light',
                'ControlType': 'slider',
                'ValueType': int,
                'ValueLimit': [0, 100],
                'DefaultValue': 0.45
            },
        ]
    })

def SetModSettingConfig(self, Data):
    print(Data)

PlayCGToScreen

Client

  • Description:
    Play CG in full screen

  • Parameters:

Parameter NameData TypeDescription
TexturePathstrFolder path of CG images
StartPngNamestrName of the starting image (no number), e.g., firstcg, so the sequence will start with firstcg1
AllNumintTotal number of sequence images
LastPngNumintNumber of frames for the last sequence image
SoundNamestrThe sound to be played with the CG
  • Return Value:
    None

  • Example:
    None


PlayCGToUIControl

Client

  • Description:
    Play CG to a UI control

  • Parameters:

Parameter NameData TypeDescription
UIObjectobjectUI object
UIPathstrUI control path
TexturePathstrFolder path of CG images
StartPngNamestrName of the starting image (no number), e.g., firstcg, so the sequence will start with firstcg1
AllNumintTotal number of sequence images
LastPngNumintNumber of frames for the last sequence image
SoundNamestrThe sound to be played with the CG
CallBackFunctionInstancefunctionCallback function instance after the CG finishes (no parameters), default is None
  • Return Value:
    None

  • Example:
    None


OreUIForm

Client

  • Description:
    Open the new multi-functional form

  • Parameters:

Parameter NameData TypeDescription
FormConfiglistForm configuration
FormDatadictPre-set data for the form, default is an empty dictionary
TitlestrTitle of the form, default is None
IsESCboolWhether to close the form when the ESC key is pressed, default is True
IsIconboolWhether to display item icons, default is False
IsChildboolWhether it’s a child form, default is False
CloseCallBackFunctionfunctionFunction called when the form is closed, default is None
  • Return Value:
    None

  • Example:
    None


ItemSelector

Client

  • Description:
    Item selector

  • Parameters:

Parameter NameData TypeDescription
CallBackFunctionIstancefunctionCallback function instance (needs to receive item data), default is None
ItemNameListlistForm configuration
IsESCboolWhether to close the item selector when the ESC key is pressed, default is False
  • Return Value:
    None

  • Example:
    None

恐龙吃草莓
更新于 2025-11-09
上一篇 General
下一篇 没有了
评论交流

文档目录

灵免以太