Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - llamazing

Pages: [1] 2 3 ... 15
1
Your projects / Re: Quest Log Menu
« on: May 02, 2021, 04:26:33 PM »
The names of the tabs come from strings.dat and thus are configurable.

The number of tabs is flexible too, but I believe at the moment the data format only supports two types (main and side). The biggest problem with having more than two tabs is screen real-estate, which consumes the precious space available for the rest of the interface (would be a different story if the game were 1920x1080 resolution).

There's also a set of events for side/main quests, and adding new tab types would mean more events are needed as well.

If you need more tabs types for your game then create an issue in the gitlab project and include mock-up screenshots and describe the use-cases for the additional tabs.

2
Development / Re: Changing Basic Traits
« on: April 01, 2021, 02:15:35 PM »
Here's a script you can use to read the data file:
Code: (lua) [Select]
--usage:
--local data_loader = require("scripts/data_loader")
--data_loader.load_data("scripts/data.lua")

local data_loader = {}

function data_loader.load_data(path)
  local weapon_classes = {}
  local weapons = {}
 
  assert(sol.file.exists(path), "Error: data file not found: "..path)
 
  --create environment for loading data
  local env = setmetatable({}, {__index = function(self, data_type_name) --default function to handle unknown data entries
    print("WARNING: Unknown data entry: "..tostring(data_type_name))
    return function(properties) end --return dummy function to prevent error because return value will be called
  end})
 
  function env.weapon_class(properties)
    local id = properties.id
    assert(type(id)=="string", "Bad weapon_class property 'id' (string expected)")
    assert(not weapon_classes[id], "Bad weapon_class property 'id', must be unique value: "..id)
   
    local weapon_class_entry = {} --create new weapon entry
    for k,v in pairs(properties) do weapon_class_entry[k] = v end --copy properties to new weapon entry
    weapon_classes[id] = weapon_class_entry
  end
 
  function env.weapon(properties)
    local id = properties.id
    assert(type(id)=="string", "Bad weapon property 'id' (string expected)")
    assert(not weapons[id], "Bad weapon property 'id', must be unique value: "..id)
   
    local weapon_entry = {} --create new weapon entry
    for k,v in pairs(properties) do weapon_entry[k] = v end --copy properties to new weapon entry
    weapons[id] = weapon_entry
  end
 
  --load the data file
  local chunk = sol.main.load_file(path)
  assert(chunk, "Error: unable to read file: "..path)
  setfenv(chunk, env)
  chunk()
 
  --put loaded data into a new table and return it
  return {
    weapon_classes = weapon_classes,
    weapons = weapons,
  }
end

return data_loader

3
Development / Re: Changing Basic Traits
« on: April 01, 2021, 04:12:46 AM »
I would use the following for the data file:
Code: (lua) [Select]
weapon_class{
  id = "sword",
  attack_sprite = "sword_attack",
  charged_attack_sprite = "sword_charged_attack", --i.e. spin attack
  damage_modifier = -1,
}

weapon_class{
  id = "spear",
  attack_sprite = "spear_attack",
  charged_attack_sprite = "spear_charged_attack",
  damage_modifier = 0,
}

weapon{
  id = "simple_sword",
  class = "sword",
  damage = {6, 7, 8, 10, 12, 15}, --rank 1 is 6 damage, rank 6 is 15 damage
}

weapon{
  id = "legendary_spear",
  class = "spear",
  damage = {8, 10, 13, 16}, --rank 1 is 8 damage, rank 4 is 16 damage
}

4
Your scripts / Default Destination Checker
« on: January 27, 2021, 01:57:34 AM »
So apparently if a map has no default destination designated, then the first one listed in the map data file becomes the default. This caused a bug in Ocean's Heart where if someone saved the game on a particular map then they would spawn at a destination that was blocked by a locked door, and the hero would be stuck. The solution is to always designate one of the map's destinations as the default whenever there is more than one (choosing one that won't be blocked by an obstruction, of course).

I wrote a script to scan all the map data files, reporting any found that have more than one destination without a default destination specified.

Usage:
require"scripts/default_destination_checker"()

The list of maps found is printed to the console.

5
Your projects / Re: Quest Log Menu
« on: January 27, 2021, 12:27:37 AM »
If the section were only for actual games then it should be called "Games" and not "Projects".

I've been working on this project since 2018, so it is a major project (and have you seen how extensive the documentation is? That's the real project where I've spent the majority of my time). I'm not sure why you are trying to belittle it?

6
Your projects / Re: Quest Log Menu
« on: January 26, 2021, 03:08:10 AM »
This project includes a fully playable demo map, so it kinda is an actual game (just very short). So it's in this hybrid grey-zone of being both a collection of scripts and playable game.

7
Your projects / Quest Log Menu
« on: January 22, 2021, 07:52:25 PM »
The Quest Log Menu shows a list of main & side-quests, tracking their current progress and status. Also featured by Ocean's Heart.
https://gitlab.com/llamazing/quest_log



See the wiki page for documentation and examples.

Feel free to open an issue for feature requests, bug reports, or assistance in how to write/construct a particular quest log entry.

The repo files include a playable short demo that showcases various features that are possible (a mini-dungeon with different side-quests in each room).

8
Your projects / Re: Ocean's Heart
« on: November 23, 2020, 03:10:37 PM »
There are a lot of user comments in that article about how the game looks like a rip-off of oceanhorn. I've never heard of oceanhorn, lol

9
Game art & music / Re: Tileset for a world map
« on: October 02, 2020, 04:44:31 PM »
Oh yeah! If your goal is to have the player actually leave the current map and go to an overworld map where they can move around, then you can actually implement it as a functional map using a different tileset. The only tricky part would be swapping out the hero sprites for ones that fit with the overworld look (if applicable), but isn't even that hard. And maybe you'd want to use a custom state that prevents the hero from attacking or doing other similar actions.

If your goal is to display a pause menu overworld map that can be viewed while the player is still present on any map, then exporting an image is probably the best bet.

10
Game art & music / Re: Tileset for a world map
« on: October 02, 2020, 12:47:08 AM »
I think the question is about making a world map like this one using tiles in the map editor:


While doing such a thing is possible, it doesn't really work to render the map in-game because only one map can be active at a time (which is the map that the player is currently on). What you can do is create the map in the map editor then export it as an image and then use that image as the basis for the world map.

11
General discussion / Re: Quest Editor on older Mac not starting
« on: September 05, 2020, 04:18:38 PM »
You might have to compile it yourself. The build provided on the downloads page probably doesn't target such an old OS.

12
Development / Re: Audio buffer error
« on: July 28, 2020, 01:34:33 PM »
Are you on a Mac? I see this error when certain music files end if using my Mac but I don't ever see the error on my Linux machine.

13
If you set-up the quest editor to use ZeroBrane as an external editor for lua scripts, it includes auto-completion (in addition to some extra debugging features):
https://www.solarus-games.org/en/development/tutorials/solarus-official-guide/tools/zerobrane

14
Your scripts / Dialog_Box script to change font
« on: February 06, 2020, 01:59:55 PM »
It was asked on Discord how to change the font used in the dialog_box script for certain dialogs.

Here's an updated script where you can assign the font and font_size properties to a dialog entry to specify what to use, otherwise it will use default values.

Original author: Christopho, GPLv3

15
Development / Re: Strange problem with a "set_enabled()"
« on: January 17, 2020, 01:21:55 AM »
Your problem is line 210 of scripts/fsa_effect.lua

I'm guessing the line is something like:
Code: (lua) [Select]
light_entity:register_event("on_enabled", true)
or perhaps:
Code: (lua) [Select]
light_entity:register_event("on_enabled", light_entity:is_enabled())
where basically what you are passing as the second argument to register_event() is a boolean value, where it should be a function. Like so:
Code: (lua) [Select]
light_entity:register_event("on_enabled", function()
  --do the things that should happen when the light is enabled here
end)

If you still need help then paste the code of your setup_inside_lights() function in your fsa_effect.lua script and indicate which line is line 210.

Pages: [1] 2 3 ... 15