Worlak

  • 20 Jan
  • Joined Aug 10, 2024
  • Worlak Arts. // We design. // Just make games.

  • This is a playtest video of a collection of scripts we are working on, its main focus is to allow the RPG in a box users to easy build adventure RPG's!

    The demo is months old so it looks really different now, but can you give me some feedback on the generals?! any comment is very apreciated!

  • One way to achieve this is having the death script of the mob run a check on the weapon the player has equipped, doing a check directly on the widget can prove useful, add a string value to each weapon holding the animation that would play on death, fr exoample "death_animation" with a value of "decapitate".
    The rough script would be something like this (this is just the framework) having in mind that the death script for characters have this built in variables

    self - Character who died
    initiator - Character who killed the 'self' entity

    if widget["equipment_widget_id"].element["weapon_slot_element_id"].item.property["death_animation"] != null then
    play_animation(self, widget["equipment_widget_id"].element["weapon_slot_element_id"].item.property["death_animation"]);
    else
    play_animation(self, "death");
    end;

    This code references directly the custom property added to the item weapon
    and we add a simple check to make sure the value isn't empty, if it is, the normal death animation would play.
    Just replace "EQUIPMENT" and "WEAPON" for the corresponding id's, the default would be
    widget["equipment"].element["0006"].item.property["death_animation"]

    Remember this is just rough code but I'd love to help you out to make that system work!

    • Don't know if this is useful but a quick fix we implement is having this global function that runs at the end of every usable item script, just tie in the max id of your item quick slots, like widget elements 0001 to 0009 (9 is the max for this function)

      function quickslot_clean($id, $widget_name) begin
      for $i in range(1, $id + 1) do
      $element = "000" + str($i);
      if widget[$widget_name].element[$element].item.count == 0 then
      widget[$widget_name].element[$element].item = null;
      end;
      end;
      end;

      For the default quick slot widget this is the following code at the end.

      quickslot_clean(5, "quick_slot_bar");

    • This looks amazing, kudos on the wonderful job!

    • We are big fans of this project, the detail in the over all look and feel is great!
      would love to test it if you need any kind of feedback!

      • skumleren Hey! we are interested in collaborating for games in this engine! how can we contact you to bring some awesome ideas to life!

      • Slayer I've found that the only animation that causes this bug is the "death" one, adding one will solve this issue, when having shake/flash on.

      • You can tie in something to check first if the entity exists, something like

        if entity["Key Slime"] != null then
        remove_entity("Key Slime");
        end;

        If you add this snippet it at the beginning of the spawn code, you check and if delete any entity with that id exists previously and create a brand new one each time.

      • One way to get this done would be having a "while" loop that runs if the enemy is next to the player, this script would have to check all cardinal directions and select a target in the vicinity, you have the likes of "player.front_tile" to reference those tiles, and you can use something like this.

        $mob_to_attack = $player.right_tile.characters.pop_front();

        This will give you the first character on the right tile.

        Anyhow there is several ways to approach this and I'd like to ask what is your main combat loop? does it happen in the overworld? is it real time? rouge like? tick based?

        For the collision script is necessary for both to be on the same tile.

        Best regards from the Worlak team.

      • Can you please provide the global variable and the code snippet where you reference it? so we can check what's going on. . .

      • Your "tree" object is missing and the loading map "Spawn Market" cant find the object, probably you renamed it.
        the best way to solve this is opening the map and check all the resources used in that map, if somethings missing the engine will allow you to replace missing objects with new ones.