ZSDX hud needed

Started by brlmnd, August 12, 2015, 10:24:18 PM

Previous topic - Next topic
Is someone in here ready to give me some help?

I want the hud from ZSDX if anyone has the time to add it to my quest. Here is the quest https://www.dropbox.com/s/v3teimhvswc59oi/Quest.rar?dl=0

I would love to have the item menu, save game, life, energy bar, item selected - everything like in the ZSDX :)

You could just download the ZSDX... and then cut and paste the code...
But this type of project would be a bit like putting a square block through a round hole...
Lots and lots of research and reading the code for understanding then applying it...

I recommend to copy the HUD scripts and sprites from Zelda Mercuris' Chest (the code is easier to use than ZSDX whose scripts are old) to the same folders in your game:
- scripts/hud/*
- sprites/hud/*
- languages/en/images/*_icon.png
- languages/en/images/floors.png

Then, see how the game_manager of Zelda Mercuris' Chest calls the hud: https://github.com/christopho/zelda_mercuris_chest/blob/master/data/scripts/game_manager.lua
This is well commented so it should not be too hard.
Do the same from your game_manager script and it should just work.

Thank you Chrostopho.
I am having trouble with the DX HUD.
I'll grab the mercurious chest HUD now.

I'll have this HUD up and running soon.   :)
Where should I post this if anyone else wants the zsdx HUD?
I will be using the Mercurious chest code clean-up update.
Just the HUD code not anything else.
There are quite a few pipes* to hookup before it will be serviceable. :o

*Pipes: (What I like to call the calls and functions and required elements.)

I have moved all my maps to Zelda Mercuris Chest and is working. Thanks!:)

Now I'll have to make it for English :)

Quote from: polyglot762 on September 16, 2015, 09:16:22 PM
I'll have this HUD up and running soon.   :)
Where should I post this if anyone else wants the zsdx HUD?
I will be using the Mercurious chest code clean-up update.
Just the HUD code not anything else.
There are quite a few pipes* to hookup before it will be serviceable. :o

*Pipes: (What I like to call the calls and functions and required elements.)

If your offer is still valid, perhaps an updated version, I'd be very interested.
I am not much of a coder myself so it's very hard to even extract the codes when they're right in front of me. On the other hand, I am a visual kind of person so the game I am working on already looks quite nice but just misses the hud (hearts, magic meter, rupees, items).

Thanks. :)

October 31, 2016, 08:31:39 PM #7 Last Edit: October 31, 2016, 09:24:03 PM by CharlieK
Or better yet. If anyone can help me get the game_manager.lua sorted out. No matter what I do I get errors in either main.lua or no error but also no game. I am quite unsure on what to do here.

Since I am rather blind to many words (not literally) I can't see it anymore after a few minutes.

I did copy the files as described above, I did get my starting location right (it works when not working with this code) and I'm just unsure right now.



-- Script that creates a game ready to be played.

-- Usage:
-- local game_manager = require("scripts/game_manager")
-- local game = game_manager:create("savegame_file_name")
-- game:start()

local dialog_box_manager = require("scripts/menus/alttp_dialog_box")
local hud_manager = require("scripts/hud/hud")

local game_manager = {}

-- Sets initial values for a new savegame of this quest.
local function initialize_new_savegame(game)

  -- TODO
   game:set_starting_location("maps/Houses/link", "start")

  -- Initially give 3 hearts
  game:set_max_life(12)
  game:set_life(game:get_max_life())
end

-- Creates a game ready to be played.
function game_manager:create(file)

  -- Create the game (but do not start it).
  local exists = sol.game.exists(file)
  local game = sol.game.load(file)
  if not exists then
    -- This is a new savegame file.
    initialize_new_savegame(game)
  end

  local hud

  -- Function called when the player runs this game.
function game:on_started()
    hud = hud_manager:create(game)
  end

  -- Returns whether the HUD is currently shown.
  function game:is_hud_enabled()
    return hud:is_enabled()
  end

  -- Enables or disables the HUD.
  function game:set_hud_enabled(enable)
    return hud:set_enabled(enable)
  end

  -- Return the HUD.
  function game:get_hud()
    return hud
  end

  -- Returns whether the current map is in the inside world.
  function game:is_in_inside_world()
    return self:get_map():get_world() == "inside_world"
  end

  -- Returns whether the current map is in the outside world.
  function game:is_in_outside_world()
    return self:get_map():get_world() == "outside_world"
  end
return game
end
return game_manager