Util
Functions
remove_kv
Clear the key value of the instance.
Parameters
up.remove_kv(_ins, _value)
remove_unit_kv
Clear unit type key value.
Parameters
up.remove_unit_kv(_id, _value)
remove_item_kv
Clear item type key value.
Parameters
up.remove_item_kv(_id, _value)
remove_ability_kv
Clear skill type key.
Parameters
up.remove_ability_kv(_id, _value)
remove_prefab_kv
Clear destructible objects/technology/projections/magic effects/type key.
Parameters
up.remove_prefab_kv(_id, _value)
cleartag
Clear tags.
Parameter
create_random_pool
Create random pools.
set_weight_of_specified_number
Set random pool to specify integer weights.
Parameters
up.set_weight_of_specified_number(pool, number, weight)
remove_specified_number
Random pool to remove specified integers.
Parameters
up.remove_specified_number(pool, number)
pick_random_pool
Iterating over a random pool.
display_info_to_player
Tips to players.
Parameters
up.display_info_to_player(player, msg, is_language)
increase_weight_of_specified_number
Add specified integer weights to the random pool.
Parameters
up.create_weight_of_specified_number(pool, number, weight)
separate_string
Splitting an array of strings.
Parameters
up.separate_string(str_list, str1, str2)
get_camp_by_camp_id
Get a camp.
Parameter
up.get_camp_by_camp_id(id)
stringtobool
Convert string type to bool.
Parameter
set_cascaded_shadow_distance
Set shadow distance.
Parameter
up.set_cascaded_shadow_distance(_dis)
remove_timer
Delete timer.
Parameter
pause_timer
Pause timer.
Parameter
resume_timer
Resume timer.
Parameter
set_terrain_texture_at_a_specified_point
Set the terrain texture of a point.
Parameters
up.set_terrain_texture_at_a_specified_point(point, terrain_type_name, range, area_type_name)
replace_specified_terrain_texture_in_region
Replace the specified terrain texture in the area.
Parameters
up.replace_specified_terrain_texture_in_region(area, terrain_type_name, target_terrain_type_name)
set_region_weather
Set regional weather.
Parameters
up.set_region_weather(area, weather_name)
set_global_weather
Set global weather.
Parameter
up.set_global_weather(weather_name)
set_player_filter_effect
Set the player's filter effect.
Parameters
up.set_player_filter_effect(player, filter_name)
display_player_terrain_texture
Show/hide player ground textures.
Parameters
up.display_player_terrain_texture(player, is_visible)
enable_vignetting
Set dark corner switch.
Parameters
up.enable_vignetting(player, is_enable)
set_vignetting_size
Set dark corner size.
Parameters
up.set_vignetting_size(player, size)
set_vignetting_breathing_period
Set dark corner breathing cycle.
Parameters
up.set_vignetting_breathing_period(player, circle_time)
set_vignetting_changing_amplitude
Set the dark angle change range.
Parameters
up.set_vignetting_changing_amplitude(player, range)
set_vignetting_color
Set dark corner color.
Parameters
up.set_vignetting_color(player, red, green, blue, alpha)
set_fog_attribute
Set the fog effect properties.
Parameters
up.set_fog_attribute(fog, direction, pos_x, pos_y, pos_z, scale_x, scale_y, scale_z, red, green, blue, concentration, speed)
set_cascaded_shadow_distanc
Set shadow distance.
Parameter
up.set_cascaded_shadow_distanc(distance)
set_cascaded_shadow_enable
Switch cascade shading.
Parameter
up.set_cascaded_shadow_enable(is_enable)
set_post_effect
Switching the painting style for players.
Parameters
up.set_post_effect(player, processing_name)
set_table_value
Set the value of a one-dimensional table.
Parameters
up.set_table_value(table, value, key)
set_table_value_multi
Set the value of a multi-dimensional table.
Parameters
up.set_table_value_multi(table, value, key, field)
insert_table_value
Insert values into a table.
Parameters
up.insert_table_value(table, value, index)
remove_nth_table_value
Delete the N-th value of a one-dimensional table
Parameters
up.remove_nth_table_value(table, index)
pick_table
Traverse the table.
Parameter
pick_table_ordered
Traverse the table (order preserving).
Parameter
up.pick_table_ordered(table)
dump_table
Print the form.
Parameter
new_empty_table
Create an empty table.
Parameter
Return
copy_table
Copy the table.
Parameter
Return
pause_game
Pause the game.
start_new_round_of_game
Start a new round of game.
Parameter
up.start_new_round_of_game(is_quick_reset)
enable_soft_pause
Turn on soft pause.
resume_soft_pause
Resume soft pause.
set_damage_factor
Set damage factor.
Parameters
up.set_damage_factor(attack_type_name, armor_type_name, ratio)
set_compound_attributes
Set composite properties.
Parameters
up.set_compound_attributes(primary_attribute_name, secondary_attr_name, value)
set_game_time_elapsing_rate
Set the speed of the game time passing.
Parameter
up.set_game_time_elapsing_rate(speed)
set_game_time
Set game time.
Parameter
create_artificial_time
Create artificial time.
Parameters
up.create_artificial_time(time, dur)
set_random_seed
Set random number seed.
Parameter
toggle_time_elapsing_is_on
Switch time passing.
Parameter
up.toggle_time_elapsing_is_on(is_on)
toggle_target_point_grassland_is_on
Switch target point of grass.
Parameters
up.toggle_target_point_grassland_is_on(is_on, point)
clear
Empty.
Parameter
up.clear(player_or_unit_group)
play_screen_particle_for_a_set_duration
Create screen effects.
Parameters
up.play_screen_particle_for_a_set_duration(sfx_id, duration, player, is_on_fog)
set_variable
Set variables.
Parameters
up.set_variable(key, value, type)
play_sound_for_player
Playback sound.
Parameters
up.play_sound_for_player(player, sound, is_loop, fade_in_time, fade_out_time)
stop_sound_for_player
Stop playing sound.
Parameters
up.stop_sound_for_player(player, sound, is_immediately)
play_3d_sound_for_player
Play 3D sound.
Parameters
up.play_3d_sound_for_player(player, sound, point, height, fade_in_time, fade_out_time, is_make_sure_play, is_loop)
follow_object_play_3d_sound_for_player
Follow the unit to play the sound.
Parameters
up.follow_object_play_3d_sound_for_player(player, sound, unit, fade_in_time, fade_out_time, is_make_sure_play, is_loop)
set_sound_volume
Setting the sound volume.
Parameters
up.set_sound_volume(player, sound, value)
print_to_dialog
Print log.
Parameters
up.print_to_dialog(type, information)
test_show_message_tip
Display interface test information.
Parameters
up.test_show_message_tip(information, time)
test_log_message
Record API test logs (optional display).
Parameters
up.test_log_message(information, time, is_center)
get_icon_id
Get an image of the icon of the skill/buff/item/unit.
Parameter
get_obj_from_data
Get the contents of a data table.
Parameters
Return
cli.get_obj_from_data(data, string)
all_conditions_succeed
All conditions are valid.
Parameter
Return
up.all_conditions_succeed(conditions)
any_conditions_succeed
Either condition holds.
Parameter
Return
up.any_conditions_succeed(conditions)
all_conditions_failed
All conditions are not valid.
Parameter
Return
up.all_conditions_failed(conditions)
get_str_length
Get the length of the string.
Parameter
Return
pos_in_str
Index of the target character in the string.
Parameters
Return
up.pos_in_str(_str1, _str2)
get_tech_max_level
Get the maximum level of technology.
Parameter
Return
up.get_tech_max_level(_techid)
get_player_ui_pos_x
Get the player's mouse screen coordinates X.
Parameter
Return
up.get_player_ui_pos_x(_player)
get_player_ui_pos_y
Get the player's mouse screen coordinates Y.
Parameter
Return
up.get_player_ui_pos_y(_player)
get_player_pointing_pos
Get the player's mouse coordinates.
Parameter
Return
up.get_player_pointing_pos(_player)
get_instance_location_point.
Get the point where the projectile/item/unit/damageable object is located.
Parameter
Return
up.get_instance_location_point(_ins)
get_team
Get the team the player/unit is in.
Parameter
Return
str_to_unit_command_type
String to unit command type.
Parameter
Return
up.str_to_unit_command_type(_str)
str_to_point
String to dot.
Parameter
Return
str_to_ability_cast_type
String to skill release type.
Parameter
Return
up.str_to_ability_cast_type(_str)
str_to_link_sfx_key
String to link effects.
Parameter
Return
up.str_to_link_sfx_key(_str)
str_to_role_relation
String-to-player relationships.
Parameter
Return
up.str_to_role_relation(_str)
str_to_unit_type
String to unit classification.
Parameter
Return
up.str_to_unit_type(_str)
str_to_unit_key
String to unit type.
Parameter
Return
str_to_unit_name
String to unit property.
Parameter
Return
up.str_to_unit_name(_str)
str_to_item_key
String to item type.
Parameter
Return
str_to_role_res
String to player attributes.
Parameter
Return
str_to_role_status
String to player status.
Parameter
Return
up.str_to_role_status(_str)
str_to_role_type
String to player control status.
Parameter
Return
up.str_to_role_type(_str)
str_to_ability_key
String to skill type.
Parameter
Return
up.str_to_ability_key(_str)
str_to_ability_type
String to skill slot type.
Parameter
Return
up.str_to_ability_type(_str)
str_to_dest_key
String to destructible type.
Parameter
Return
str_to_project_key
String to projector type.
Parameter
Return
up.str_to_project_key(_str)
str_to_particle_sfx_key
String to effects.
Parameter
Return
up.str_to_particle_sfx_key(_str)
str_to_tech_key
String to technology type.
Parameter
Return
str_to_model_key
String to model type.
Parameter
Return
up.str_to_model_key(_str)
str_to_modifier_key
String to magic effect type.
Parameter
Return
up.str_to_modifier_key(_str)
str_to_modifier_effect_type
String to magic effect effect type.
Parameter
Return
up.str_to_modifier_effect_type(_str)
str_to_modifier_type
String to magic effect category.
Parameter
Return
up.str_to_modifier_type(_str)
str_to_camp
String to camp.
Parameter
Return
str_to_keyboard_key
String to keyboard keys.
Parameter
Return
up.str_to_keyboard_key(_str)
str_to_mouse_key
String to mouse button conversion.
Parameter
Return
up.str_to_mouse_key(_str)
str_to_mouse_wheel
String to mouse wheel.
Parameter
Return
up.str_to_mouse_wheel(_str)
str_to_store_key
String to platform prop type.
Parameter
Return
up.str_to_store_key(_str)
str_to_damage_type
String to harm type.
Parameter
Return
up.str_to_damage_type(_str)
str_to_unit_attr_type
String to unit attribute type.
Parameter
Return
up.str_to_unit_attr_type(_str)
str_to_audio_key
String to sound type.
Parameter
Return
up.str_to_audio_key(_str)
get_icon_id
Get an image based on its ID.
Parameter
Return
move_to_pos
Move to a position.
Parameters
Return
up.move_to_pos(point, range)
stop
Stop.
Return
garrison
Stationed at a target point.
Parameter
Return
attack_move
Attack movement.
Parameters
Return
up.attack_move(point, range)
attack_target
Target of attack.
Parameters
Return
up.attack_target(unit, range)
move_along_path
Move along the path.
Parameters
Return
up.move_along_path(path, patrol_mode_name, is_attack, nearby_start_point, is_deviate_return)
cast_ability
Release skills.
Parameters
Return
up.cast_ability(ability, point1, point2, point3, unit, item, dest)
pick_up_item
Pick up items.
Parameter
Return
discard_item
Discarded items.
Parameters
Return
up.discard_item(item, point)
give_item
Give items.
Parameters
Return
use_item
Use of items
Parameters
Return
up.use_item(item, point1, point2, point3, unit, target_item, dest)
follow
Follow a unit.
Parameter
Return
empty
Empty command.
Return
table_length
Length of table.
Parameter
Return
get_max_tech_level
Get the maximum level of technology.
Parameter
Return
up.get_max_tech_level(tech_id)
get_tech_icon
Get the icon of the technology.
Parameters
Return
up.get_tech_icon(tech_id, index)
get_tech_type_from_event
Get the type of technology in the event.
Return
up.get_tech_type_from_event()
get_tech_type_description
Get the description of the type of technology.
Parameter
Return
up.get_tech_type_description(tech_id)
get_tech_type_name
Get the name of the technology type.
Parameter
Return
up.get_tech_type_name(tech_id)
get_current_game_mode
Get the current game mode.
Return
up.get_current_game_mode()
get_local_language_environment
Get local language environment.
Return
up.get_local_language_environment()
current_game_run_time
Time the game has been running.
Return
up.current_game_run_time()
get_current_game_time
Get the current time of the game.
Return
up.get_current_game_time()
get_damage_factor
Get damage factor.
Parameters
Return
up.get_damage_factor(attack_type_name, area_type_name)
get_coefficient
Get the slave coefficients of the 3D attributes.
Parameters
Return
up.get_coefficient(primary_attribute_name, secondary_attr_name)
get_game_environment_of_current_round
Acquire the game environment of the council.
Return
up.get_game_environment_of_current_round()
get_global_archive
Get global archive.
Parameter
Return
up.get_global_archive(name)
get_archive_rank_player_archive_value
Get integer archive leaderboard player archive values.
Parameters
Return
up.get_archive_rank_player_archive_value(file, index)
if_pri_attr_state_open
Whether to open the three-dimensional properties or not.
Return
up.if_pri_attr_state_open()
get_mover_bound_projectiles.
Obtain the motile binding projection.
Return
up.get_mover_bound_projectiles()
get_tech_changed_level
Get the level of technological change.
Parameter
Return
up.get_tech_changed_level(data)
trigger_modifier
Trigger magic effect.
Parameter
Return
up.trigger_modifier(data)
tech_researched
Technology being studied.
Return
get_unit_in_event
Get the units in the event.
Parameter
Return
up.get_unit_in_event(data)
modifier_receiver
Magic effect carriers.
Parameter
Return
up.modifier_receiver(data)
get_ability_owner
Acquisition of skill owners.
Parameter
Return
up.get_ability_owner(ability)
modifier_provider
Magic effect applicator.
Parameter
Return
up.modifier_provider(modifier)
ability_selected_target_item
Target item selected by the skill.
Parameters
Return
up.ability_selected_target_item(ability, data)
picked_modifier
Traversing to the magic effect.
Return
player_that_triggered_current_event
The player who triggered the current event.
Parameter
Return
up.player_that_triggered_current_event(data)
projectile_that_triggered_current_event
The projection that triggered the current event.
Parameter
Return
up.projectile_that_triggered_current_event(data)
ability_selected_target_unit
Get the unit selected by the skill.
Parameters
Return
up.ability_selected_target_unit(ability, data)
get_modifier_stack_changed_value
Get the value of the change in the number of layers of magic effects.
Parameter
Return
up.get_modifier_stack_changed_value(data)
tech_upgraded_or_downgraded
Technology for level up and down.
Return
up.tech_upgraded_or_downgraded()
item_selected_in_picking_item_group
Selected items when traversing the item group.
Return
up.item_selected_in_picking_item_group()
level_changed_tech
Grade change technology.
Return
get_damage_or_healing_target_unit
Get units that take damage (healing).
Parameter
Return
up.get_damage_or_healing_target_unit(data)
picked_unit_in_unit_group
Get the units traversed in the unit group.
Return
up.picked_unit_in_unit_group()
get_killer_unit
Get the killer unit.
Parameter
Return
get_picked_projectile
Get the traversed projection.
Return
up.get_picked_projectile()
get_dead_unit
Obtain death units.
Parameter
Return
Get_Damage_or_Healing_Source_Unit
Get units that apply damage (healing).
Parameter
Return
up.Get_Damage_or_Healing_Source_Unit(data)
unit_to_gain_item
Obtain item units.
Return
unit_to_lose_item
Loss of item unit.
Return
unit_to_use_item
Use of item units.
Return
unit_to_change_stacks
Holders of stacked layer change items.
Return
up.unit_to_change_stacks()
get_unit_about_to_gain_modifier
Obtain a unit that is about to acquire a magic effect.
Parameter
Return