Beispiel #1
0
def refresh_screen():
    global g
    global notifications
    global current_menu
    global level_2_turns_left
    g.clear_screen()
    g.display_player_stats()
    g.display_board()
    if g.current_level == 2:
        print( Utils.cyan_bright(f"Inventory ({g.player.inventory.size()}/{g.player.inventory.max_size})  ") + Utils.green_bright(f"Turns left: {level_2_turns_left} ") )
    else:
        print( Utils.cyan_bright(f"Inventory ({g.player.inventory.size()}/{g.player.inventory.max_size})  ") )
    if g.player.inventory.size() > 0:
        # If inventory is not empty print it
        items_by_type = {}
        for item_name in g.player.inventory.items_name():
            item = g.player.inventory.get_item(item_name)
            if item.type in items_by_type.keys():
                items_by_type[item.type]['cumulated_size'] += item.size()
            else:
                items_by_type[item.type] = {'cumulated_size':item.size(),'model':item.model,'name':item.name}
        count = 1
        for k in items_by_type.keys():
            print(f" {items_by_type[k]['model']} : {items_by_type[k]['cumulated_size']} ",end='')
            count += 1
            if count == 5:
                count = 0
                print("\n",end='')
        print("\n",end='')
    # Then we display the menu
    g.display_menu(current_menu,Constants.ORIENTATION_VERTICAL,15)
    # And finally the notifications
    for n in notifications:
        print(n)
Beispiel #2
0
def refresh_screen(mygame, player, menu):
    mygame.clear_screen()
    # print(Utils.magenta_bright(f"\t\t~+~ Welcome to {mygame.name} ~+~"))
    mygame.display_player_stats()
    mygame.display_board()
    if player.inventory.size() > 0:
        # If inventory is not empty print it
        items_by_type = {}
        for item_name in player.inventory.items_name():
            item = player.inventory.get_item(item_name)
            if item.type in items_by_type.keys():
                items_by_type[item.type]['cumulated_size'] += item.size()
            else:
                items_by_type[item.type] = {
                    'cumulated_size': item.size(),
                    'model': item.model,
                    'name': item.name,
                }
        count = 1
        for k in items_by_type.keys():
            print(f" {items_by_type[k]['model']} : \
                {items_by_type[k]['cumulated_size']} ",
                  end='')
            count += 1
            if count == 5:
                count = 0
                print("\n", end='')
        print("\n", end='')
    print(
        Utils.yellow_dim('\nWhere should ') + Utils.cyan_bright(player.name) +
        Utils.yellow_dim(' go?'))
    mygame.display_menu(menu)
    Utils.debug(f"Player stored position is ({player.pos[0]},{player.pos[1]})")
Beispiel #3
0
def refresh_screen():
    global g
    global notifications
    g.clear_screen()
    g.display_player_stats()
    g.display_board()
    print(
        Utils.cyan_bright(
            f"Inventory ({g.player.inventory.size()}/{g.player.inventory.max_size})  "
        ))
    if g.player.inventory.size() > 0:
        # If inventory is not empty print it
        items_by_type = {}
        for item_name in g.player.inventory.items_name():
            item = g.player.inventory.get_item(item_name)
            if item.type in items_by_type.keys():
                items_by_type[item.type]['cumulated_size'] += item.size()
            else:
                items_by_type[item.type] = {
                    'cumulated_size': item.size(),
                    'model': item.model,
                    'name': item.name
                }
        count = 1
        for k in items_by_type.keys():
            print(
                f" {items_by_type[k]['model']} : {items_by_type[k]['cumulated_size']} ",
                end='')
            count += 1
            if count == 5:
                count = 0
                print("\n", end='')
        print("\n", end='')
    for n in notifications:
        print(n)
Beispiel #4
0
def create_wizard():
    global game
    key = ''
    while True:
        game.clear_screen()
        print(Utils.green_bright("\t\tObject creation wizard"))
        print('What do you want to create: a NPC or a structure?')
        print('1 - NPC (Non Playable Character)')
        print('2 - Structure (Wall, Door, Treasure, Portal, Trees, etc.)')
        key = Utils.get_key()
        if key == '1' or key == '2':
            break
    if key == '1':
        game.clear_screen()
        print(
            Utils.green_bright("\t\tObject creation wizard: ") +
            Utils.cyan_bright("NPC"))
        new_object = NPC()
        print("First give a name to your NPC. Default value: " +
              new_object.name)
        r = str(input('(Enter name)> '))
        if len(r) > 0:
            new_object.name = r
        print(
            "Then give it a type. A type is important as it allows grouping.\nType is a string. Default value: "
            + new_object.type)
        r = str(input('(Enter type)> '))
        if len(r) > 0:
            new_object.type = r
        print("Now we need a model. Default value: " + new_object.model)
        input('Hit "Enter" when you are ready to choose a model.')
        new_object.model = model_picker()
        game.clear_screen()
        print(
            Utils.green_bright("\t\tObject creation wizard: ") +
            Utils.cyan_bright("NPC") + f' - {new_object.model}')
        print(
            'We now needs to go through some basic statistics. You can decide to go with default by simply hitting the "Enter" key.'
        )
        r = input_digit(
            f'Number of cell crossed in one turn. Default: {new_object.step}(type: int) > '
        )
        if len(r) > 0:
            new_object.step = int(r)
        else:
            # If it's 0 it means it's going to be a static NPC so to prevent python to pass some random pre-initialized default, we explicitly set the Actuator to a static one
            new_object.actuator = SimpleActuators.RandomActuator(moveset=[])
        r = input_digit(
            f'Max HP (Health Points). Default: {new_object.max_hp}(type: int) > '
        )
        if len(r) > 0:
            new_object.max_hp = int(r)
        new_object.hp = new_object.max_hp
        r = input_digit(
            f'Max MP (Mana Points). Default: {new_object.max_mp}(type: int) > '
        )
        if len(r) > 0:
            new_object.max_mp = int(r)
        new_object.mp = new_object.max_mp
        r = input_digit(
            f'Remaining lives (it is advised to set that to 1 for a standard NPC). Default: {new_object.remaining_lives}(type: int) > '
        )
        if len(r) > 0:
            new_object.remaining_lives = int(r)
        r = input_digit(
            f'AP (Attack Power). Default: {new_object.attack_power}(type: int) > '
        )
        if len(r) > 0:
            new_object.attack_power = int(r)
        r = input_digit(
            f'DP (Defense Power). Default: {new_object.defense_power}(type: int) > '
        )
        if len(r) > 0:
            new_object.defense_power = int(r)
        r = input_digit(
            f'Strength. Default: {new_object.strength}(type: int) > ')
        if len(r) > 0:
            new_object.strength = int(r)
        r = input_digit(
            f'Intelligence. Default: {new_object.intelligence}(type: int) > ')
        if len(r) > 0:
            new_object.intelligence = int(r)
        r = input_digit(
            f'Agility. Default: {new_object.agility}(type: int) > ')
        if len(r) > 0:
            new_object.agility = int(r)
        game.clear_screen()
        print(
            "We now need to give some life to that NPC. What kind of movement should it have:"
        )
        print("1 - Randomly chosen from a preset of directions")
        print("2 - Following a predetermined path")
        r = Utils.get_key()
        if r == '1':
            new_object.actuator = SimpleActuators.RandomActuator(moveset=[])
            print(
                'Random it is! Now choose from which preset of movements should we give it:'
            )
            print('1 - UP,DOWN,LEFT, RIGHT')
            print('2 - UP,DOWN')
            print('3 - LEFT, RIGHT')
            print('4 - UP,DOWN,LEFT, RIGHT + all DIAGONALES')
            print(
                '5 - DIAGONALES (DIAG UP LEFT, DIAG UP RIGHT, etc.) but NO straight UP, DOWN, LEFT and RIGHT'
            )
            print('6 - No movement')
            r = Utils.get_key()
            if r == '1':
                new_object.actuator.moveset = [
                    Constants.UP, Constants.DOWN, Constants.LEFT,
                    Constants.RIGHT
                ]
            elif r == '2':
                new_object.actuator.moveset = [Constants.UP, Constants.DOWN]
            elif r == '3':
                new_object.actuator.moveset = [Constants.RIGHT, Constants.LEFT]
            elif r == '4':
                new_object.actuator.moveset = [
                    Constants.UP, Constants.DOWN, Constants.LEFT,
                    Constants.RIGHT, Constants.DLDOWN, Constants.DLUP,
                    Constants.DRDOWN, Constants.DRUP
                ]
            elif r == '5':
                new_object.actuator.moveset = [
                    Constants.DLDOWN, Constants.DLUP, Constants.DRDOWN,
                    Constants.DRUP
                ]
            elif r == '6':
                new_object.actuator.moveset = []
            else:
                Utils.warn(
                    f'"{r}" is not a valid choice. Movement set is now empty.')
                new_object.actuator.moveset = []
        elif r == '2':
            new_object.actuator = SimpleActuators.PathActuator(path=[])
            print("Great, so what path this NPC should take:")
            print('1 - UP/DOWN patrol')
            print('2 - DOWN/UP patrol')
            print('3 - LEFT/RIGHT patrol')
            print('4 - RIGHT/LEFT patrol')
            print('5 - Circle patrol: LEFT, DOWN, RIGHT, UP')
            print('6 - Circle patrol: LEFT, UP, RIGHT, DOWN')
            print('7 - Circle patrol: RIGHT, DOWN, LEFT, UP')
            print('8 - Circle patrol: RIGHT, UP, LEFT, DOWN')
            print('9 - Write your own path')
            r = Utils.get_key()
            if r == '1':
                print(
                    "How many steps should the NPC go in one direction before turning back ?"
                )
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
            elif r == '2':
                print(
                    "How many steps should the NPC go in one direction before turning back ?"
                )
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
            elif r == '3':
                print(
                    "How many steps should the NPC go in one direction before turning back ?"
                )
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
            elif r == '3':
                print(
                    "How many steps should the NPC go in one direction before turning back ?"
                )
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
            elif r == '4':
                print(
                    "How many steps should the NPC go in one direction before turning back ?"
                )
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
            elif r == '5':
                print(
                    "How many steps should the NPC go in EACH direction before changing ?"
                )
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
            elif r == '6':
                print(
                    "How many steps should the NPC go in EACH direction before changing ?"
                )
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
            elif r == '7':
                print(
                    "How many steps should the NPC go in EACH direction before changing ?"
                )
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
            elif r == '8':
                print(
                    "How many steps should the NPC go in EACH direction before changing ?"
                )
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
            elif r == '9':
                print(
                    "Write your own path using only words from this list: UP, DOWN, LEFT, RIGHT, DLDOWN, DLUP, DRDOWN, DRUP."
                )
                print('Each direction has to be separated by a coma.')
                r = str(input('Write your path: ')).upper()
                new_object.actuator.path = r.split(',')
            else:
                Utils.warn(f'"{r}" is not a valid choice. Path is now empty.')
                new_object.actuator.path = []

        return new_object
    elif key == '2':
        while True:
            game.clear_screen()
            print(
                Utils.green_bright("\t\tObject creation wizard: ") +
                Utils.magenta_bright("Structure"))
            print("What kind of structure do you want to create:")
            print(
                '1 - A wall like structure (an object that cannot be picked-up and is not overlappable). Ex: walls, trees, non moving elephant (try to go through an elephant or to pick it up in your backpack...)'
            )
            print('2 - A door (player and/or NPC can go through)')
            print(
                '3 - A treasure (can be picked up, take space in the inventory, give points to the player)'
            )
            print(
                '4 - A generic object (you can set the properties to make it pickable or overlappable)'
            )
            print(
                '5 - A generic actionable object (to make portals, heart to replenish life, etc.)'
            )
            key = Utils.get_key()
            new_object = None
            if key == '1':
                new_object = Structures.Wall()
                new_object.name = str(uuid.uuid1())
                new_object.model = model_picker()
                break
            elif key == '2':
                new_object = Structures.Door()
                new_object.name = str(uuid.uuid1())
                new_object.model = model_picker()
                break
            elif key == '3':
                new_object = Structures.Treasure()
                print("First give a name to your Treasure. Default value: " +
                      new_object.name)
                r = str(input('(Enter name)> '))
                if len(r) > 0:
                    new_object.name = r
                print(
                    "Then give it a type. A type is important as it allows grouping (in this case probably in the inventory).\nType is a string. Default value: "
                    + new_object.type)
                r = str(input('(Enter type)> '))
                if len(r) > 0:
                    new_object.type = r
                print("Now we need a model. Default value: " +
                      new_object.model)
                input('Hit "Enter" when you are ready to choose a model.')
                new_object.model = model_picker()
                break
            elif key == '4' or key == '5':
                if key == '4':
                    new_object = Structures.GenericStructure()
                else:
                    new_object = Structures.GenericActionableStructure()
                new_object.set_overlappable(False)
                new_object.set_pickable(False)
                print("First give a name to your structure. Default value: " +
                      new_object.name)
                r = str(input('(Enter name)> '))
                if len(r) > 0:
                    new_object.name = r
                print(
                    "Then give it a type. \nType is a string. Default value: "
                    + new_object.type)
                r = str(input('(Enter type)> '))
                if len(r) > 0:
                    new_object.type = r
                print("Now we need a model. Default value: " +
                      new_object.model)
                input('Hit "Enter" when you are ready to choose a model.')
                new_object.model = model_picker()
                print(
                    'Is this object pickable? (can it be picked up by the player)?'
                )
                print('0 - No')
                print('1 - Yes')
                r = Utils.get_key()
                if r == '1':
                    new_object.set_pickable(True)
                print(
                    'Is this object overlappable? (can it be walked over by player?'
                )
                print('0 - No')
                print('1 - Yes')
                r = Utils.get_key()
                if r == '1':
                    new_object.set_overlappable(True)
                break

        return new_object

    #Placeholder
    return BoardItemVoid()
Beispiel #5
0
              ui_board_void_cell=Utils.BLACK_SQUARE))
    is_modified = True


# Main program
game = Game()
current_file = ''
game.player = Player(model='[]')
key = 'None'
current_object = BoardItemVoid(model='None')
object_history = []
current_menu = 'main'
while True:
    game.clear_screen()
    print(
        Utils.cyan_bright("HAC-GAME-LIB - EDITOR v" +
                          Constants.HAC_GAME_LIB_VERSION))

    print('Looking for existing maps in selected directories...', end='')
    with open('directories.json') as paths:
        directories = json.load(paths)
        hmaps = []
        try:
            for directory in directories:
                files = [f'{directory}/{f}' for f in os.listdir(directory)]
                hmaps += files
            print(Utils.green('OK'))
        except FileNotFoundError as e:
            print(Utils.red('KO'))

    if len(hmaps) > 0:
        map_num = 0
Beispiel #6
0
            game.move_player(cst.RIGHT, 1)
        elif key == '9':
            p.model = sprite_player['right']
            game.move_player(cst.DRUP, 1)
        elif key == '7':
            p.model = sprite_player['left']
            game.move_player(cst.DLUP, 1)
        elif key == '1':
            p.model = sprite_player['left']
            game.move_player(cst.DLDOWN, 1)
        elif key == '3':
            p.model = sprite_player['right']
            game.move_player(cst.DRDOWN, 1)
        elif key == 'q':
            game.clear_screen()
            print(Utils.cyan_bright(f'Thanks for playing {game.name}'))
            print(Utils.yellow_bright('Good bye!'))
            break
        elif key == 'v':
            current_menu = 'speed_menu'
        elif key == 'k':
            game.player.hp -= 5

        # Once we've moved we check if we are in the neighborhood of Unipici
        if game.player in game.neighbors(1, nice_npc):
            current_menu = 'unipici_dialog'
    # Here we change the speed of the game and then go back to main menu.
    elif current_menu == 'speed_menu':
        if key == '1':
            game_speed = 0.5
            current_menu = 'main_menu'
Beispiel #7
0
def create_wizard():
    global game
    key = ""
    while True:
        game.clear_screen()
        print(Utils.green_bright("\t\tObject creation wizard"))
        print("What do you want to create: a NPC or a structure?")
        print("1 - NPC (Non Playable Character)")
        print("2 - Structure (Wall, Door, Treasure, Portal, Trees, etc.)")
        key = Utils.get_key()
        if key == "1" or key == "2":
            break
    if key == "1":
        game.clear_screen()
        print(
            Utils.green_bright("\t\tObject creation wizard: ") +
            Utils.cyan_bright("NPC"))
        new_object = NPC()
        print("First give a name to your NPC. Default value: " +
              new_object.name)
        r = str(input("(Enter name)> "))
        if len(r) > 0:
            new_object.name = r
        print(
            "Then give it a type. A type is important as it allows grouping.\n"
            "Type is a string. Default value: " + new_object.type)
        r = str(input("(Enter type)> "))
        if len(r) > 0:
            new_object.type = r
        print("Now we need a model. Default value: " + new_object.model)
        input('Hit "Enter" when you are ready to choose a model.')
        new_object.model = model_picker()
        game.clear_screen()
        print(
            Utils.green_bright("\t\tObject creation wizard: ") +
            Utils.cyan_bright("NPC") + f" - {new_object.model}")
        print("We now needs to go through some basic statistics. "
              "You can decide to go with default by simply hitting "
              'the "Enter" key.')
        r = input_digit(f"Number of cell crossed in one turn. "
                        f"Default: {new_object.step}(type: int) > ")
        if len(r) > 0:
            new_object.step = int(r)
        else:
            # If it's 0 it means it's going to be a static NPC so to prevent
            # python to pass some random pre-initialized default, we explicitly
            # set the Actuator to a static one
            new_object.actuator = SimpleActuators.RandomActuator(moveset=[])

        r = input_digit(f"Max HP (Health Points). "
                        f"Default: {new_object.max_hp}(type: int) > ")
        if len(r) > 0:
            new_object.max_hp = int(r)
        new_object.hp = new_object.max_hp

        r = input_digit(f"Max MP (Mana Points). "
                        f"Default: {new_object.max_mp}(type: int) > ")
        if len(r) > 0:
            new_object.max_mp = int(r)
        new_object.mp = new_object.max_mp

        r = input_digit(
            f"Remaining lives (it is advised to set that to 1 for a "
            f"standard NPC). "
            f"Default: {new_object.remaining_lives}(type: int) > ")
        if len(r) > 0:
            new_object.remaining_lives = int(r)

        r = input_digit(f"AP (Attack Power). "
                        f"Default: {new_object.attack_power}(type: int) > ")
        if len(r) > 0:
            new_object.attack_power = int(r)

        r = input_digit(f"DP (Defense Power). "
                        f"Default: {new_object.defense_power}(type: int) > ")
        if len(r) > 0:
            new_object.defense_power = int(r)

        r = input_digit(
            f"Strength. Default: {new_object.strength}(type: int) > ")
        if len(r) > 0:
            new_object.strength = int(r)

        r = input_digit(
            f"Intelligence. Default: {new_object.intelligence}(type: int) > ")
        if len(r) > 0:
            new_object.intelligence = int(r)

        r = input_digit(
            f"Agility. Default: {new_object.agility}(type: int) > ")
        if len(r) > 0:
            new_object.agility = int(r)

        game.clear_screen()
        print("We now need to give some life to that NPC. "
              "What kind of movement should it have:")
        print("1 - Randomly chosen from a preset of directions")
        print("2 - Following a predetermined path")
        print("3 - Following a predetermined path back and forth")
        print(
            "4 - Automatically finding it's way from one point to another (no"
            " pre-determined path, you will set the points on the map).")
        r = Utils.get_key()
        if r == "1":
            new_object.actuator = SimpleActuators.RandomActuator(moveset=[])
            print("Random it is! Now choose from which preset "
                  "of movements should we give it:")
            print("1 - UP,DOWN,LEFT, RIGHT")
            print("2 - UP,DOWN")
            print("3 - LEFT, RIGHT")
            print("4 - UP,DOWN,LEFT, RIGHT + all DIAGONALES")
            print("5 - DIAGONALES (DIAG UP LEFT, DIAG UP RIGHT, etc.) "
                  "but NO straight UP, DOWN, LEFT and RIGHT")
            print("6 - No movement")
            r = Utils.get_key()
            if r == "1":
                new_object.actuator.moveset = [
                    Constants.UP,
                    Constants.DOWN,
                    Constants.LEFT,
                    Constants.RIGHT,
                ]
            elif r == "2":
                new_object.actuator.moveset = [Constants.UP, Constants.DOWN]
            elif r == "3":
                new_object.actuator.moveset = [Constants.RIGHT, Constants.LEFT]
            elif r == "4":
                new_object.actuator.moveset = [
                    Constants.UP,
                    Constants.DOWN,
                    Constants.LEFT,
                    Constants.RIGHT,
                    Constants.DLDOWN,
                    Constants.DLUP,
                    Constants.DRDOWN,
                    Constants.DRUP,
                ]
            elif r == "5":
                new_object.actuator.moveset = [
                    Constants.DLDOWN,
                    Constants.DLUP,
                    Constants.DRDOWN,
                    Constants.DRUP,
                ]
            elif r == "6":
                new_object.actuator.moveset = []
            else:
                Utils.warn(
                    f'"{r}" is not a valid choice. Movement set is now empty.')
                new_object.actuator.moveset = []
        elif r == "2" or r == "3":
            if r == "2":
                new_object.actuator = SimpleActuators.PathActuator(path=[])
            elif r == "3":
                new_object.actuator = SimpleActuators.PatrolActuator(path=[])
            print("Great, so what path this NPC should take:")
            print("1 - UP/DOWN patrol")
            print("2 - DOWN/UP patrol")
            print("3 - LEFT/RIGHT patrol")
            print("4 - RIGHT/LEFT patrol")
            print("5 - Circle patrol: LEFT, DOWN, RIGHT, UP")
            print("6 - Circle patrol: LEFT, UP, RIGHT, DOWN")
            print("7 - Circle patrol: RIGHT, DOWN, LEFT, UP")
            print("8 - Circle patrol: RIGHT, UP, LEFT, DOWN")
            print("9 - Write your own path")
            r = Utils.get_key()
            if r == "1":
                print("How many steps should the NPC go in one direction "
                      "before turning back ?")
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += ([
                    Constants.UP for i in range(0, r, 1)
                ], )
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
            elif r == "2":
                print("How many steps should the NPC go in one "
                      "direction before turning back ?")
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
            elif r == "3":
                print("How many steps should the NPC go in one "
                      "direction before turning back ?")
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
            elif r == "3":
                print("How many steps should the NPC go in one direction "
                      "before turning back ?")
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
            elif r == "4":
                print("How many steps should the NPC go in one "
                      "direction before turning back ?")
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
            elif r == "5":
                print("How many steps should the NPC go in EACH "
                      "direction before changing ?")
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
            elif r == "6":
                print("How many steps should the NPC go in EACH "
                      "direction before changing ?")
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
            elif r == "7":
                print("How many steps should the NPC go in EACH "
                      "direction before changing ?")
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
            elif r == "8":
                print("How many steps should the NPC go in EACH direction "
                      "before changing ?")
                r = int(input_digit("(please enter an integer)> "))
                new_object.actuator.path += [
                    Constants.RIGHT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.UP for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.LEFT for i in range(0, r, 1)
                ]
                new_object.actuator.path += [
                    Constants.DOWN for i in range(0, r, 1)
                ]
            elif r == "9":
                print("Write your own path using only words from this list: "
                      "UP, DOWN, LEFT, RIGHT, DLDOWN, DLUP, DRDOWN, DRUP.")
                print("Each direction has to be separated by a coma.")
                r = str(input("Write your path: ")).upper()
                new_object.actuator.path = r.split(",")
            else:
                Utils.warn(f'"{r}" is not a valid choice. Path is now empty.')
                new_object.actuator.path = []
        elif r == "4":
            new_object.actuator = AdvancedActuators.PathFinder(
                parent=new_object, circle_waypoints=True)
            print(
                "Do you want the NPC to go through your way points once and stop or"
                " to cycle through all of them infinitely ?")
            print("1 - Cycle once")
            print("2 - Cycle infinitely (default value)")
            r = Utils.get_key()
            if r == "1":
                new_object.actuator.circle_waypoints = False
        return new_object
    elif key == "2":
        while True:
            game.clear_screen()
            print(
                Utils.green_bright("\t\tObject creation wizard: ") +
                Utils.magenta_bright("Structure"))
            print("What kind of structure do you want to create:")
            print(
                "1 - A wall like structure (an object that cannot be picked-up "
                "and is not overlappable). Ex: walls, trees, non moving "
                "elephant (try to go through an elephant or to pick it up "
                "in your backpack...)")
            print("2 - A door (player and/or NPC can go through)")
            print("3 - A treasure (can be picked up, take space in the "
                  "inventory, give points to the player)")
            print("4 - A generic object (you can set the properties to "
                  "make it pickable or overlappable)")
            print("5 - A generic actionable object (to make portals, heart "
                  "to replenish life, etc.)")
            key = Utils.get_key()
            new_object = None
            if key == "1":
                new_object = Structures.Wall()
                new_object.name = str(uuid.uuid1())
                new_object.model = model_picker()
                break
            elif key == "2":
                new_object = Structures.Door()
                new_object.name = str(uuid.uuid1())
                new_object.model = model_picker()
                break
            elif key == "3":
                new_object = Structures.Treasure()
                print("First give a name to your Treasure. Default value: " +
                      new_object.name)
                r = str(input("(Enter name)> "))
                if len(r) > 0:
                    new_object.name = r
                print("Then give it a type. A type is important as it allows "
                      "grouping (in this case probably in the inventory).\n"
                      "Type is a string. Default value: " + new_object.type)
                r = str(input("(Enter type)> "))
                if len(r) > 0:
                    new_object.type = r
                print("Now we need a model. Default value: " +
                      new_object.model)
                input('Hit "Enter" when you are ready to choose a model.')
                new_object.model = model_picker()
                break
            elif key == "4" or key == "5":
                if key == "4":
                    new_object = Structures.GenericStructure()
                else:
                    new_object = Structures.GenericActionableStructure()
                new_object.set_overlappable(False)
                new_object.set_pickable(False)
                print("First give a name to your structure. Default value: " +
                      new_object.name)
                r = str(input("(Enter name)> "))
                if len(r) > 0:
                    new_object.name = r
                print(
                    "Then give it a type. \nType is a string. Default value: "
                    + new_object.type)
                r = str(input("(Enter type)> "))
                if len(r) > 0:
                    new_object.type = r
                print("Now we need a model. Default value: " +
                      new_object.model)
                input('Hit "Enter" when you are ready to choose a model.')
                new_object.model = model_picker()
                print("Is this object pickable? (can it be picked up "
                      "by the player)?")
                print("0 - No")
                print("1 - Yes")
                r = Utils.get_key()
                if r == "1":
                    new_object.set_pickable(True)
                print("Is this object overlappable? (can it be walked "
                      "over by player?")
                print("0 - No")
                print("1 - Yes")
                r = Utils.get_key()
                if r == "1":
                    new_object.set_overlappable(True)
                break

        return new_object

    # Placeholder
    return BoardItemVoid()