Menu

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.

Show posts Menu

Messages - froggy77

#76
Hello,

I would like to add an intermediate animation for chests. "closed" and "open" are the basic animations. I added, in the .dat files, an "opening" animation which it could be in 1 or 2 frames according the size of the chests.

How woud you proceed in lua scripts?


Sorry, I have lost a lot of skills in lua and even about Solarus in general, because I have not worked on it for several months.
Moreover, there are now in the last versions, scripts "features" and "multi_events" which is all the more new and difficult for me.
But instead, I improved my pixel art skills a bit  ;) . I will soon update my topic on the project.
#77
General discussion / Re: Merry Christmas!
January 01, 2017, 02:31:13 PM
There are many francophones on this forum who make the effort to write in english. Please, today, say your wishes in your language ;D
Bonne année et meilleurs voeux à tous et à toutes!
Et bon anniversaire Zefk.
#78
Development / Re: HUD: ZL Hearts
December 15, 2016, 07:25:51 PM
Quote
ffomega > Could you share the tileset version?
lol it was my question. Yes, it is what I
was asking for. Thanks. I'm going to test different versions of life meter styles. For the
moment, there is a problem with Dragonball style one, when the number of ♡ is odd.


#79
Development / Re: HUD: ZL Hearts
December 10, 2016, 06:33:44 PM

ffomega > Could you share the tileset version?
ffomega or Diarandor > Other request, could you draw a mock-up for these life meter styles?
#80
Zefk, I tested your project and when I started it, it did not look like your gif image.
QuoteYou should not create those surfaces in the on_draw event.
Diarandor +1
- Message at the beginning: "Warning: Cannot use quest size 320x240: this quest only supports 640x480 to 640x480. Using 640x480 instead."
- The entire menu, text, and buttons are offset.
- Clicking everywhere changes the music.
- And sometimes, "Fatal: Failed to create software surface" crashes Solarus.
- See attachment file.


#81
Development / Re: HUD: ZL Hearts
November 27, 2016, 04:13:35 PM
Nice project! Both ideas are interesting. Sorry, I cannot choose for you. :P
#82
Work still in progress with a few headache especially after a few months without making.
#83
Thank you Christopho. It works fine with your method (https://github.com/christopho/zelda_roth_se/blob/dev/data/scripts/lib/chest_loader.lua).
It seems you know well Lua and Solarus Engine.  ;D

Code (lua) Select

local function create_table_with_maps_id_from_project_db()

    local ids = {}
    -- Set up a special environment to load the project_db data file.
    local environment = {
        map = function(project_db_map)
            local id = project_db_map.id
            if id ~= nil then
                ids[#ids + 1] = id
            end
        end
    }
    -- Make this function a no-op (map()).
    setmetatable(environment, {
        __index = function()
        return function() end
    end
    })
    -- Load the project_db data file as Lua.
    local chunk = sol.main.load_file("project_db.dat")
    -- Apply our special environment.
    setfenv(chunk, environment)
    -- Run it.
    chunk()
    return ids
end

local t_maps_id = create_table_with_maps_id_from_project_db()
for _, map_id in ipairs(t_maps_id) do
    local file = "./data/maps/" .. map_id .. ".dat"
    print(file)
end
#84
Your projects / Re: The Legend of Zelda
November 02, 2016, 06:40:07 PM
Great job! Maybe just a problem of missing tiles for the trees.
#85
Your projects / Re: Char input sneak peek
October 09, 2016, 12:50:10 PM
This is the result I wanted expected. This allows a better and faster navigation.
Bravo!  8)
#86
Your projects / Re: Char input sneak peek
October 08, 2016, 07:44:42 PM
Interesting script for example to name the hero at the beginning of the game.
It seems in your .gif that it is possible to go from left to right. But, I don't understand why the cursor goes from "A" to "Enter" and not to "Cancel". Bug or lag or missing frame in the .gif?
Is it also possible to loop vertically (e.g. from "v" to "4" or from "4" to "v")?
#87
It opens a temporary external window whose display is very fast. The command (ls, dir, ...) can differ from the  OS.
This will be even more complicated than my solution.

I read the ./data/project_db.dat and create a table from this.

Code (LUA) Select

local function create_table_with_maps_id_from(file)

    local f = io.output (io.open (file, "r"))
    local tbl = {}
    local count = 1
    for line in io.lines(file) do
        if string.sub(line, 0, 3) == "map" then
            local pos = string.find(line, "\",") - 1
            local map_id = string.sub(line, 12, pos)
            tbl[count] = map_id
            count = count + 1
        end
    end
    f:close()
    return tbl
end

local project_db = "./data/project_db.dat"
local t_maps_id = create_table_with_maps_id_from(project_db)
for _, map_id in ipairs(t_maps_id) do
    local file = "./data/maps/" .. map_id .. ".dat"
    print(file)
end


If there is a solution with an internal Solarus command, it would be nice.
Thank you for io.popen that I did not know.
#88
Oh, Ok, so they are all here when the map is loaded?  :o
#89
I like the way the slimes spawn on the map. (o_o)
#90
Hello,

I would like to get a list of all .dat files in ./data/maps/

e.g.:
./data/maps/cave_1f.dat ./data/maps/cave_2f.dat
./data/maps/inside_store.dat
./data/maps/library.dat
./data/maps/lost_woods.dat
./data/maps/outside_store.dat
./data/maps/outside_west.dat
./data/maps/shop.dat
./data/maps/test_map.dat
./data/maps/water_temple_1f.dat
./data/maps/water_temple_2f.dat
./data/maps/water_temple_final_room.dat
I found out a solution but it's quite complicated.
How would you do?