Older versions of DDA had somewhat different LUA-functions. Either use latest experimental DDA version or change function calls.
For example, you should use
map:square_ter(id,basex+x1,basey+y1,basex+x2,basey+y2)
instead of:
map:draw_square_ter(ter_str_id(id),basex+x1,basey+y1,basex+x2,basey+y2)
Also ids of terrain and furniture are changed between version, so it is likely you will also need to change ids of some terrains. For example t_wall
in latest experimental was separated to two instance t_wall_h
and t_wall_v
previously.
version 0.C
map = {
attributes = {
},
functions = {
ter = {
args = {"int", "int"},
rval = "int"
},
ter_set = {
args = {"int", "int", "string"},
rval = nil
},
ter_iset = {
cpp_name = "ter_set",
args = {"int", "int", "int"},
rval = nil
},
furn = {
args = {"int", "int"},
rval = "int"
},
furn_set = {
args = {"int", "int", "string"},
rval = nil
},
line_ter = {
cpp_name = "draw_line_ter",
args = {"string", "int", "int", "int", "int"},
rval = nil
},
line_furn = {
cpp_name = "draw_line_furn",
args = {"string", "int", "int", "int", "int"},
rval = nil
},
fill_background = {
cpp_name = "draw_fill_background",
args = {"string"},
rval = nil
},
square_ter = {
cpp_name = "draw_square_ter",
args = {"string", "int", "int", "int", "int"},
rval = nil
},
square_furn = {
cpp_name = "draw_square_furn",
args = {"string", "int", "int", "int", "int"},
rval = nil
},
rough_circle = {
cpp_name = "draw_rough_circle",
args = {"string", "int", "int", "int"},
rval = nil
},
place_items = {
args = {"string", "int", "int", "int", "int", "int", "bool", "int"},
rval = nil
}
}
latest experimental
map = {
attributes = {
},
functions = {
{ name = "accessible_furniture", rval = "bool", args = { "tripoint", "tripoint", "int" } },
{ name = "accessible_items", rval = "bool", args = { "tripoint", "tripoint", "int" } },
{ name = "add_camp", rval = nil, args = { "tripoint", "string" } },
{ name = "add_corpse", rval = nil, args = { "tripoint" } },
{ name = "add_field", rval = "bool", args = { "tripoint", "field_id", "int", "int" } },
{ name = "add_item", rval = "item&", args = { "tripoint", "item" } },
{ name = "add_item_or_charges", rval = "item&", args = { "tripoint", "item" } },
{ name = "add_item_or_charges", rval = "item&", args = { "tripoint", "item", "bool" } },
{ name = "add_spawn", rval = nil, args = { "mtype_id", "int", "int", "int" } },
{ name = "add_spawn", rval = nil, args = { "mtype_id", "int", "int", "int", "bool" } },
{ name = "add_spawn", rval = nil, args = { "mtype_id", "int", "int", "int", "bool", "int" } },
{ name = "add_spawn", rval = nil, args = { "mtype_id", "int", "int", "int", "bool", "int", "int" } },
{ name = "add_spawn", rval = nil, args = { "mtype_id", "int", "int", "int", "bool", "int", "int", "string" } },
{ name = "add_trap", rval = nil, args = { "tripoint", "trap_id" } },
{ name = "adjust_field_age", rval = "int", args = { "tripoint", "field_id", "int" } },
{ name = "adjust_field_strength", rval = "int", args = { "tripoint", "field_id", "int" } },
{ name = "adjust_radiation", rval = nil, args = { "tripoint", "int" } },
{ name = "allow_camp", rval = "bool", args = { "tripoint", "int" } },
{ name = "ambient_light_at", rval = "float", args = { "tripoint" } },
{ name = "bash_rating", rval = "int", args = { "int", "tripoint" } },
{ name = "bash_rating", rval = "int", args = { "int", "tripoint", "bool" } },
{ name = "bash_resistance", rval = "int", args = { "tripoint" } },
{ name = "bash_resistance", rval = "int", args = { "tripoint", "bool" } },
{ name = "bash_strength", rval = "int", args = { "tripoint" } },
{ name = "bash_strength", rval = "int", args = { "tripoint", "bool" } },
{ name = "board_vehicle", rval = nil, args = { "tripoint", "player" } },
{ name = "can_move_furniture", rval = "bool", args = { "tripoint" } },
{ name = "can_move_furniture", rval = "bool", args = { "tripoint", "player" } },
{ name = "can_put_items", rval = "bool", args = { "tripoint" } },
{ name = "clear_path", rval = "bool", args = { "tripoint", "tripoint", "int", "int", "int" } },
{ name = "clear_spawns", rval = nil, args = { } },
{ name = "clear_traps", rval = nil, args = { } },
{ name = "climb_difficulty", rval = "int", args = { "tripoint" } },
{ name = "close_door", rval = "bool", args = { "tripoint", "bool", "bool" } },
{ name = "collapse_at", rval = nil, args = { "tripoint", "bool" } },
{ name = "collapse_check", rval = "int", args = { "tripoint" } },
{ name = "combined_movecost", rval = "int", args = { "tripoint", "tripoint" } },
{ name = "coord_to_angle", rval = "int", args = { "int", "int", "int", "int" } },
{ name = "could_see_items", rval = "bool", args = { "tripoint", "Creature" } },
{ name = "creature_in_field", rval = nil, args = { "Creature" } },
{ name = "creature_on_trap", rval = nil, args = { "Creature" } },
{ name = "creature_on_trap", rval = nil, args = { "Creature", "bool" } },
{ name = "crush", rval = nil, args = { "tripoint" } },
{ name = "decay_fields_and_scent", rval = nil, args = { "int" } },
{ name = "delete_graffiti", rval = nil, args = { "tripoint" } },
{ name = "delete_signage", rval = nil, args = { "tripoint" } },
{ name = "destroy", rval = nil, args = { "tripoint" } },
{ name = "destroy", rval = nil, args = { "tripoint", "bool" } },
{ name = "destroy_furn", rval = nil, args = { "tripoint" } },
{ name = "destroy_furn", rval = nil, args = { "tripoint", "bool" } },
{ name = "disarm_trap", rval = nil, args = { "tripoint" } },
{ name = "disp_name", rval = "string", args = { "tripoint" } },
{ name = "displace_vehicle", rval = nil, args = { "tripoint", "tripoint" } },
{ name = "displace_water", rval = "bool", args = { "tripoint" } },
{ name = "draw_circle_furn", rval = nil, args = { "furn_id", "int", "int", "int" } },
{ name = "draw_circle_furn", rval = nil, args = { "furn_str_id", "int", "int", "int" } },
{ name = "draw_circle_ter", rval = nil, args = { "ter_str_id", "int", "int", "int" } },
{ name = "draw_circle_ter", rval = nil, args = { "ter_id", "float", "float", "float" } },
{ name = "draw_circle_ter", rval = nil, args = { "ter_id", "int", "int", "int" } },
{ name = "draw_fill_background", rval = nil, args = { "ter_id" } },
{ name = "draw_fill_background", rval = nil, args = { "ter_str_id" } },
{ name = "draw_line_furn", rval = nil, args = { "furn_id", "int", "int", "int", "int" } },
{ name = "draw_line_furn", rval = nil, args = { "furn_str_id", "int", "int", "int", "int" } },
{ name = "draw_line_ter", rval = nil, args = { "ter_id", "int", "int", "int", "int" } },
{ name = "draw_line_ter", rval = nil, args = { "ter_str_id", "int", "int", "int", "int" } },
{ name = "draw_rough_circle_ter", rval = nil, args = { "ter_id", "int", "int", "int" } },
{ name = "draw_rough_circle_ter", rval = nil, args = { "ter_str_id", "int", "int", "int" } },
{ name = "draw_rough_circle_furn", rval = nil, args = { "furn_id", "int", "int", "int" } },
{ name = "draw_rough_circle_furn", rval = nil, args = { "furn_str_id", "int", "int", "int" } },
{ name = "draw_square_furn", rval = nil, args = { "furn_id", "int", "int", "int", "int" } },
{ name = "draw_square_furn", rval = nil, args = { "furn_str_id", "int", "int", "int", "int" } },
{ name = "draw_square_ter", rval = nil, args = { "ter_id", "int", "int", "int", "int" } },
{ name = "draw_square_ter", rval = nil, args = { "ter_str_id", "int", "int", "int", "int" } },
{ name = "features", rval = "string", args = { "tripoint" } },
{ name = "field_at", rval = "field&", args = { "tripoint" } },
{ name = "flammable_items_at", rval = "bool", args = { "tripoint" } },
{ name = "free_volume", rval = "volume", args = { "tripoint" } },
{ name = "furn", rval = "furn_id", args = { "tripoint" } },
{ name = "furn_set", rval = nil, args = { "tripoint", "furn_id" } },
{ name = "furn_set", rval = nil, args = { "tripoint", "furn_str_id" } },
{ name = "furnname", rval = "string", args = { "tripoint" } },
{ name = "get_abs_sub", rval = "tripoint", args = { } },
{ name = "get_field", rval = "field_entry&", args = { "tripoint", "field_id" } },
{ name = "get_field_age", rval = "int", args = { "tripoint", "field_id" } },
{ name = "get_field_strength", rval = "int", args = { "tripoint", "field_id" } },
{ name = "get_radiation", rval = "int", args = { "tripoint" } },
{ name = "get_signage", rval = "string", args = { "tripoint" } },
{ name = "get_ter_transforms_into", rval = "ter_id", args = { "tripoint" } },
{ name = "getabs", rval = "tripoint", args = { "tripoint" } },
{ name = "getlocal", rval = "tripoint", args = { "tripoint" } },
{ name = "getmapsize", rval = "int", args = { } },
{ name = "graffiti_at", rval = "string", args = { "tripoint" } },
{ name = "has_adjacent_furniture", rval = "bool", args = { "tripoint" } },
{ name = "has_flag", rval = "bool", args = { "string", "tripoint" } },
{ name = "has_flag_furn", rval = "bool", args = { "string", "tripoint" } },
{ name = "has_flag_ter", rval = "bool", args = { "string", "tripoint" } },
{ name = "has_flag_ter_or_furn", rval = "bool", args = { "string", "tripoint" } },
{ name = "has_floor", rval = "bool", args = { "tripoint" } },
{ name = "has_floor_or_support", rval = "bool", args = { "tripoint" } },
{ name = "has_furn", rval = "bool", args = { "tripoint" } },
{ name = "has_graffiti_at", rval = "bool", args = { "tripoint" } },
{ name = "has_items", rval = "bool", args = { "tripoint" } },
{ name = "has_nearby_fire", rval = "bool", args = { "tripoint" } },
{ name = "has_nearby_fire", rval = "bool", args = { "tripoint", "int" } },
{ name = "has_zlevels", rval = "bool", args = { } },
{ name = "hit_with_acid", rval = "bool", args = { "tripoint" } },
{ name = "hit_with_fire", rval = "bool", args = { "tripoint" } },
{ name = "i_at", rval = "map_stack", args = { "tripoint" } },
{ name = "i_clear", rval = nil, args = { "tripoint" } },
{ name = "i_rem", rval = "int", args = { "tripoint", "int" } },
{ name = "i_rem", rval = "item_stack_iterator", args = { "tripoint", "item_stack_iterator" } },
{ name = "i_rem", rval = nil, args = { "tripoint", "item" } },
{ name = "impassable", rval = "bool", args = { "tripoint" } },
{ name = "impassable_ter_furn", rval = "bool", args = { "tripoint" } },
{ name = "inbounds", rval = "bool", args = { "int", "int", "int" } },
{ name = "inbounds", rval = "bool", args = { "tripoint" } },
{ name = "is_bashable", rval = "bool", args = { "tripoint" } },
{ name = "is_bashable", rval = "bool", args = { "tripoint", "bool" } },
{ name = "is_bashable_furn", rval = "bool", args = { "tripoint" } },
{ name = "is_bashable_ter", rval = "bool", args = { "tripoint" } },
{ name = "is_bashable_ter", rval = "bool", args = { "tripoint", "bool" } },
{ name = "is_bashable_ter_furn", rval = "bool", args = { "tripoint" } },
{ name = "is_bashable_ter_furn", rval = "bool", args = { "tripoint", "bool" } },
{ name = "is_divable", rval = "bool", args = { "tripoint" } },
{ name = "is_outside", rval = "bool", args = { "tripoint" } },
{ name = "item_from", rval = "item&", args = { "tripoint", "int" } },
{ name = "light_transparency", rval = "float", args = { "tripoint" } },
{ name = "load", rval = nil, args = { "int", "int", "int", "bool" } },
{ name = "make_rubble", rval = nil, args = { "tripoint" } },
{ name = "make_rubble", rval = nil, args = { "tripoint", "furn_id", "bool" } },
{ name = "make_rubble", rval = nil, args = { "tripoint", "furn_id", "bool", "ter_id" } },
{ name = "make_rubble", rval = nil, args = { "tripoint", "furn_id", "bool", "ter_id", "bool" } },
{ name = "max_volume", rval = "volume", args = { "tripoint" } },
{ name = "mop_spills", rval = nil, args = { "tripoint" } },
{ name = "move_cost", rval = "int", args = { "tripoint" } },
{ name = "move_cost_ter_furn", rval = "int", args = { "tripoint" } },
{ name = "name", rval = "string", args = { "tripoint" } },
{ name = "on_vehicle_moved", rval = nil, args = { "int" } },
{ name = "open_door", rval = "bool", args = { "tripoint", "bool" } },
{ name = "open_door", rval = "bool", args = { "tripoint", "bool", "bool" } },
{ name = "passable", rval = "bool", args = { "tripoint" } },
{ name = "passable_ter_furn", rval = "bool", args = { "tripoint" } },
{ name = "pl_sees", rval = "bool", args = { "tripoint", "int" } },
{ name = "place_gas_pump", rval = nil, args = { "int", "int", "int" } },
{ name = "place_gas_pump", rval = nil, args = { "int", "int", "int", "string" } },
{ name = "place_npc", rval = "int", args = { "int", "int", "npc_template_id" } },
{ name = "place_spawns", rval = nil, args = { "mongroup_id", "int", "int", "int", "int", "int", "float" } },
{ name = "place_toilet", rval = nil, args = { "int", "int" } },
{ name = "place_toilet", rval = nil, args = { "int", "int", "int" } },
{ name = "place_vending", rval = nil, args = { "int", "int", "string" } },
{ name = "put_items_from_loc", rval = nil, args = { "string", "tripoint" } },
{ name = "put_items_from_loc", rval = nil, args = { "string", "tripoint", "int" } },
{ name = "random_outdoor_tile", rval = "point", args = { } },
{ name = "remove_field", rval = nil, args = { "tripoint", "field_id" } },
{ name = "remove_trap", rval = nil, args = { "tripoint" } },
{ name = "save", rval = nil, args = { } },
{ name = "sees", rval = "bool", args = { "tripoint", "tripoint", "int" } },
{ name = "sees_some_items", rval = "bool", args = { "tripoint", "Creature" } },
{ name = "set_field_age", rval = "int", args = { "tripoint", "field_id", "int" } },
{ name = "set_field_age", rval = "int", args = { "tripoint", "field_id", "int", "bool" } },
{ name = "set_field_strength", rval = "int", args = { "tripoint", "field_id", "int" } },
{ name = "set_field_strength", rval = "int", args = { "tripoint", "field_id", "int", "bool" } },
{ name = "set_graffiti", rval = nil, args = { "tripoint", "string" } },
{ name = "set_radiation", rval = nil, args = { "tripoint", "int" } },
{ name = "set_signage", rval = nil, args = { "tripoint", "string" } },
{ name = "set_temperature", rval = nil, args = { "tripoint", "int" } },
{ name = "smash_items", rval = nil, args = { "tripoint", "int" } },
{ name = "spawn_an_item", rval = "item&", args = { "tripoint", "item", "int", "int" } },
{ name = "spawn_artifact", rval = nil, args = { "tripoint" } },
{ name = "spawn_item", rval = nil, args = { "tripoint", "string" } },
{ name = "spawn_item", rval = nil, args = { "tripoint", "string", "int" } },
{ name = "spawn_item", rval = nil, args = { "tripoint", "string", "int", "int" } },
{ name = "spawn_item", rval = nil, args = { "tripoint", "string", "int", "int", "int" } },
{ name = "spawn_item", rval = nil, args = { "tripoint", "string", "int", "int", "int", "int" } },
{ name = "spawn_monsters", rval = nil, args = { "bool" } },
{ name = "stored_volume", rval = "volume", args = { "tripoint" } },
{ name = "supports_above", rval = "bool", args = { "tripoint" } },
{ name = "ter", rval = "ter_id", args = { "tripoint" } },
{ name = "ter_set", rval = nil, args = { "tripoint", "ter_id" } },
{ name = "ter_set", rval = nil, args = { "tripoint", "ter_str_id" } },
{ name = "tername", rval = "string", args = { "tripoint" } },
{ name = "tr_at", rval = "trap&", args = { "tripoint" } },
{ name = "trans", rval = "bool", args = { "tripoint" } },
{ name = "translate", rval = nil, args = { "ter_id", "ter_id" } },
{ name = "trap_set", rval = nil, args = { "tripoint", "trap_id" } },
{ name = "translate_radius", rval = nil, args = { "ter_id", "ter_id", "float", "tripoint" } },
{ name = "trigger_rc_items", rval = nil, args = { "string" } },
{ name = "unboard_vehicle", rval = nil, args = { "tripoint" } },
{ name = "valid_move", rval = "bool", args = { "tripoint", "tripoint" } },
{ name = "valid_move", rval = "bool", args = { "tripoint", "tripoint", "bool" } },
{ name = "valid_move", rval = "bool", args = { "tripoint", "tripoint", "bool", "bool" } },
{ name = "veh_part_coordinates", rval = "point", args = { "tripoint" } },
{ name = "water_from", rval = "item", args = { "tripoint" } },
}
},