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 - MetalZelda

Pages: [1] 2 3 ... 31
General discussion / Re: Design of graphs of dungeons
« on: April 18, 2017, 12:14:10 am »
What I kept from this is backtracking, main item and boss for 2d, main room, main item and boss for 3d, also exploration, fighting enemies and play around with the main item.
The funniest level design is Twilight Princess, which speaks for itself.

But again, it really depend on how you see and how you'll design a certain dungeon, i mean, in a Link Between worlds, the main item is deleted to focus on exploration, same in Breath of the Wild.

Development / Re: About color text dialogs
« on: April 17, 2017, 09:39:07 pm »
MetalZelda, I added the dialog_style options to my dialog box - I actually had forgotten this wasn't standard.
Code: Lua
  1. function game:set_dialog_style(style)
  2. = style
  3.   if style == "wood" then
  4.     dialog_box.box_img = sol.surface.create("hud/dialog_box_wood.png")
  5.     dialog_box.end_lines_sprite:set_animation("wood")
  6.   elseif style == "stone" then
  7.     dialog_box.box_img = sol.surface.create("hud/dialog_box_stone.png")
  8.     dialog_box.end_lines_sprite:set_animation("stone")
  9.   else
  10.     dialog_box.box_img = sol.surface.create("hud/dialog_box.png")
  11.     dialog_box.end_lines_sprite:set_animation("default")
  12.   end
  13. end

I also recently added the ability to pass, for example, an NPC name to the dialog box so it would display above it. This might be a useful feature. I also know someone (maybe it was Diarandor?) added NPC images to the dialog box, which could be a good standard feature.

You are right, yet, I explained that set_dialog_style only recreate a new surface with a different graphic  :P

Development / Re: About color text dialogs
« on: April 17, 2017, 07:14:30 pm »
I think both of our idea will be useful for other, dialog style and positionning is kinda easy to do

Code: Lua
  1. if dialog.position then
  2.           local pos = dialog.position  
  3.           if pos == "top" then
  4.             y = 24
  5.       elseif pos == "middle" then
  6.         y = 88
  7.       else
  8.         y = 144
  9.           end
  10.           self.box_dst_position.y = y
  11.         end

Of course, this example assume that you are constantly using a 240 height resolution

Code: Lua
  1.         if then
  2.           game:set_dialog_style(
  3.         end

game:set_dialog_style (if not defined) just change and reload a surface.

Development / Re: About color text dialogs
« on: April 17, 2017, 06:53:25 pm »
That could be cool, but it could also be tricky, if we use a lot of texts effects (using different colors in the same line for example), but I agree that text properties should be exploited.

I should also give these idea to exploit the text properties, it will make things better and easier, since I am, in parallel to y project, porting the Project Zelda Engine from RPG Maker to Solarus

  -> Dialog Box style (aka graphics), allow to define at the start of the text the dialog box graphics, automatically reset to "default" at the end of the dialog (
  -> Dialog Box positionning, sometimes, the dialogbox can clip automatically depending on the hero position or other stuffs, this parameter will set the position of this dialog, no matter the hero position or such
  -> Bank system (Idea from Zefk,,806.0.html), where the system will be triggered by a text property and integrated entirely in the Dialog box script.

Development / Re: About color text dialogs
« on: April 17, 2017, 02:08:28 pm »
Also, another cool feature you could add to your dialogbox script is savegame value parsing.
You will find example bellow and add it if you want. But a such basic feature is very useful for a lot of possibilities.

Example: displaying values (items, time, command, etc ...)

This could be useful for some texts, displaying the current value of multiple variable for example (since $v is only 1 value)
Here, using this method, I'm displaying all item commands for using an item, keyboard and Joypad.
Good news is, you can even use color

It's plug & play for the most part
Code: [Select]
Vous obtenez l'$[red]Arc du Héros$[white]!$0
Dans le menu $[yellow]pause$[white], écran $[blue]Inventaire$[white],
assignez l'arc grâce aux touches $[red]$(item_1)$[white]
ou $[red]$(item_2)$[white].

And also, it's cheap stuff, you don't need to recreate a surface
Code: Lua
  1.  elseif current_char == "(" then
  2.             -- Predefined text (an input for example).
  3.             local next_char = line:sub(self.char_index, self.char_index)
  4.             -- The syntax is "$(text)".
  5.             local right_position = line:find (")", self.char_index, true)
  6.             local text = line:sub(self.char_index, right_position - 1)
  7.             self.char_index = right_position + 1
  9.                 -- Is the text a valid savegame value ?
  10.                 if game:get_value(text) ~= nil then
  11.                   text = game:get_value(text)
  12.                 end
  14.         -- Using $(item_1) or such (warning, do not use a savagame value), as it is in the table bellow, will display a pre-defined text_properties
  15.         -- with as value keyboard / joypad binding             
  16.                 local actions = {"item_1", "item_2", "action", "attack", "pause", "up", "down", "left", "right"}
  17.             for i = 1, #actions do
  18.                   if text == actions[i] then
  19.                     text = game:get_command_keyboard_binding(text) .. " / " .. game:get_command_joypad_binding(text)
  20.                   end
  21.                 end
  22.                 self:set_text(text)

You just need
Code: Lua
  1. function dialog_box:set_text(text)
  2.     local current_line = self.current_line_surface[self.line_index]
  3.     current_line:set_text(current_line:get_text() .. text)
  4.   end

Another example of a clever usage

$v is already used by "Skulltula d'Or"(the object caption, so when translating, the item name will be already translated), so the item dialog is.
Code: [Select]
$[red]- $v -$[white]
On dit que ces $[yellow]$v$[white] ont
la possibilité de détruire des malédictions.
Vous en avez tué $[red]$(amount_of_skulltulas)$[white] sur 100 !

The value of killed skulltulas is parsed from the code above

The next cool stuff to add is icons in texts

Development / Re: About color text dialogs
« on: April 16, 2017, 01:54:20 am »
There is still the spacing problem if you use a special characters such as é, è, ç, à and Asian type characters, even with a mono-spaced font, hmmm, this is one tough issue.
There is no problem when texts are in english though, but it is problematic, because, I am translating Book of Mudora in French and some texts overlap depending on if there is a special character before the colored text. This will also happen if you translate in Spanish / Russian / Asian languages.

This is the new surface's space that is problematic, the script already includes special characters it seems, but I can't figure out what is the real issue here ...

Development / Re: Disable spin Attack?
« on: April 15, 2017, 02:08:38 pm »
You can, by overwriting the spin attack loading state in hero:on_state_changed

just unfreeze the hero and that would work

Development / Re: About color text dialogs
« on: April 15, 2017, 02:06:03 pm »
Oooooo, i like this, i'll try this with different language to see if that works correctly

I also suggest adding a horizontal text alignment thing like $vertical{"center"}
i don't know, maybe centering some text be cool

Development / Re: Bonjour j'ai un petit problème
« on: April 15, 2017, 02:04:53 pm »
Ca a a voir avec le script game_manager a tout les coups, envoi le script voir

Your projects / Re: Zelda: Book of Mudora
« on: April 11, 2017, 03:07:47 pm »
First we need to fix the spacing issue that occurs when giving the text a different color in the textbox script

Bugs & Feature requests / Re: Run Ability bug?
« on: April 08, 2017, 12:07:12 am »
Perhaps the engine try to jump with the animation on the same frame than the running animation's last known frame ?
i did faced this when making some items, using jumpers, I did fixed that by freezing the hero so it reset to frame 0

Bugs & Feature requests / Re: [Solved] Bug with "get_facing_entity" ?
« on: April 08, 2017, 12:04:05 am »
get_facing_entity() will return the entity in front of the hero, not the ground

You should use map:get_ground() with as base, slim_x, y variable

Bugs & Feature requests / Re: text surface fade_in and fade_out?
« on: April 07, 2017, 10:32:18 pm »
You still can draw the text on a clean surface, it should work.
I never succeeded to fade a text surface, no idea why

Si il n'y a plus d'erreur alors la seule chose manquante se situe au niveau du on_draw, sois la surface auquel tu dessines tes coeurs, sois le on_draw  du script des coeurs.

Development / Re: Small Key HUD ?
« on: April 05, 2017, 01:18:58 am »
Hmmmm, I do wonder if there is any difference between MoS and MC alteration of these scripts ? because MOS looks simpler ...

Pages: [1] 2 3 ... 31