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

#31
Development / Re: Problem w global go value
April 02, 2017, 02:33:59 PM
Here's the code for the octorok stone:

Code (lua) Select
-- Stone shot by Octorok.

local enemy = ...

function enemy:on_created()

  enemy:set_life(1)
  enemy:set_damage(2)
  enemy:create_sprite("enemies/" .. enemy:get_breed())
  enemy:set_size(8, 8)
  enemy:set_origin(4, 4)
  enemy:set_invincible()
  enemy:set_obstacle_behavior("flying")
end

function enemy:on_obstacle_reached()

  enemy:remove()
end

function enemy:go(direction4)

  local angle = direction4 * math.pi / 2
  local movement = sol.movement.create("straight")
  movement:set_speed(192)
  movement:set_angle(angle)
  movement:set_smooth(false)
  movement:start(enemy)

  enemy:get_sprite():set_direction(direction4)
end

#32
Development / Re: Problem w global go value
April 02, 2017, 01:50:36 AM
I tried swapping lines 45 and 46 and no changed happened.  Here is the exact error message.  It only appears when the hero gets close enough to the octorok to trigger it to shoot at him.

Error: In timer callback: [string "enemies/Octoroks/octorok.lua"]:55: attempt to call method 'go' (a nil value)
#33
Development / Re: Problem w global go value
April 01, 2017, 11:58:57 PM
I'm receiving a similar error message from the octorok script, only instead it is giving an error for method 'go' instead of global 'go'.  Also in my case, the octorok moves as it should until the hero gets close to it, then it stops moving.  It continues to animate the walking animation, but it is unable to move.  It also does not shoot a projectile, but the stone sound can be heard.  The hero can even kill it like a normal enemy.

Here's the code:

Code (lua) Select
-- Octorok: shoots stones.

local enemy = ...

local children = {}

local can_shoot = true

function enemy:on_created()

  enemy:set_life(3)
  enemy:set_damage(2)
  enemy:create_sprite("enemies/" .. enemy:get_breed())
end

local function go_hero()

  local sprite = enemy:get_sprite()
  sprite:set_animation("walking")
  local movement = sol.movement.create("target")
  movement:set_speed(64)
  movement:start(enemy)
end

local function shoot()

  local map = enemy:get_map()
  local hero = map:get_hero()
  if not enemy:is_in_same_region(hero) then
    return true  -- Repeat the timer.
  end

  local sprite = enemy:get_sprite()
  local x, y, layer = enemy:get_position()
  local direction = sprite:get_direction()

  -- Where to create the projectile.
  local dxy = {
    {  8,  -4 },
    {  0, -13 },
    { -8,  -4 },
    {  0,   0 },
  }

  sprite:set_animation("shooting")
  enemy:stop_movement()
  sol.timer.start(enemy, 300, function()
    sol.audio.play_sound("stone")
    local stone = enemy:create_enemy({
      breed = "octorok_stone",
      x = dxy[direction + 1][1],
      y = dxy[direction + 1][2],
    })
    children[#children + 1] = stone
    stone:go(direction)

    sol.timer.start(enemy, 500, go_hero)
  end)
end

function enemy:on_restarted()

  local map = enemy:get_map()
  local hero = map:get_hero()

  go_hero()

  can_shoot = true

  sol.timer.start(enemy, 100, function()

    local hero_x, hero_y = hero:get_position()
    local x, y = enemy:get_center_position()

    if can_shoot then
      local aligned = (math.abs(hero_x - x) < 16 or math.abs(hero_y - y) < 16)
      if aligned and enemy:get_distance(hero) < 200 then
        shoot()
        can_shoot = false
        sol.timer.start(enemy, 1500, function()
          can_shoot = true
        end)
      end
    end
    return true  -- Repeat the timer.
  end)
end

function enemy:on_movement_changed(movement)

  local direction4 = movement:get_direction4()
  local sprite = self:get_sprite()
  sprite:set_direction(direction4)
end

local previous_on_removed = enemy.on_removed
function enemy:on_removed()

  if previous_on_removed then
    previous_on_removed(enemy)
  end

  for _, child in ipairs(children) do
    child:remove()
  end
end


In a previous message, it was mentioned that 'go' has to be defined.  Is this the case here as well? If so, I do not know how to do this
#34
I thought I'd share with you a new type of soldier for Solarus--the Hyrule Castle Tower soldiers.

These soldiers were basically the same as the sword-carrying soldiers scattered all over Hyrule in A Link to the Past, except these were only seen inside Hyrule Castle tower, and unlike their brothers, these guys held their sword up high and had different helmets as well.

I created these sprites because they barely exist outside of single poses from search engines.  The only place I was able to find more than one pose of these guys was on a single sprite sheet on the Spriters' Resource, so I decided to create an entire sheet for Solarus, in ten variants.  The simple soldiers have also been given the new helmets (Again, if you want to use these alongside existing soldiers, create copies of the sprites and scripts, then just assign the new copies to this sheet):



Script-wise, they function exactly like the regular soldiers who carry swords.  You can copy the scripts and assign them to the new sprites, or you may choose to overwrite the ones you already have for a more menacing looking soldier.  The choice is yours!

UPDATE! I added Spear soldiers now.  Again, these sprites use the same scripts as the soldiers do, and can be made from copies of the soldiers scripts, or as replacements to the soldiers:

#35
Hmmm alright that's not a problem :) I'll fix it

I was looking through the first half of Link to the Past and noticed that there are at least 5-6 different types of soldiers:

Simple
Sword Knight
Sword Knight type 2 (holding sword up high with no shield)
Spear Knight
Archer or Spear-Throwing Knight
Bomb Knight
Ball & Chain Trooper

These are not including NPC soldiers the hero finds before going into Hyrule Castle for the first time, or the ones seen outside the castle at the end credits.  Currently I have ten variants of the simple soldiers and the Sword Knights.  I am working on Sword Knight type 2.  These knights can be found inside Hyrule Castle Tower, and are the ones which more closely resemble Chris' soldiers in Mystery of Solarus.

These are going to take some time to put together, as there are almost no full sprite sheets of the other soldier types online (at least by using a search), except maybe a still frame of a pose.  Anyway, the package has been updated :)
#36
Development / Mystery of Solarus: Signs and Eggs
March 23, 2017, 02:30:26 AM
I'm looking through the maps in Mystery of Solarus, and noticed that signs are created as NPC entities.  So in order to replicate the sign, being able to show the hero a dialogue, as well as be lifted, thrown, and then destroyed, I was unable to find the code that shows how to do that.

The millasaur eggs in the first dungeon would be kind of perfect for the large black and white rocks littered around hyrule.  I noticed that they were marked as enemy entities, which is fine to be honest.  I do not need the segments that allow them to hatch however.

In the case of the eggs, is it wise to leave it as an enemy or (considering I don't need the enemy to spawn from it), can it be copied and pasted in as a custom entity?

In the case of the signs, where within your game would I be able to find the code that allows me to lift, throw, and destroy NPCs to make the signs work like a destructable that can be spoken to?
#37
the modifications are made

By the way Chris.  I noticed that whenever I overwrite files in the webspace you provided for me, visually it appends rather than replaces.  When I browse folder in the directory, there are multiple folders and files with the same name, and the number grows every time I try to replace a file or folder (I have made 4 edits to the tilesets in question, and have replaced the package more than once...and there is an extra duplicate of every file for the number of times it has been replaced.

Is that something I need concern myself with?
#38
Okay I'll fix those.  Should I do this for all the stairs or just the ones turned to the side?
#39
Alright I'll fix the weak walls.  I also went in and fixed the outside tileset.  I realized that when I made it, I did not place a grass tile down next to the water tiles.  Originally, I had it set in my mind that users could pick whatever tile color they wanted so there would be no need for a grass tile, as it would be redundant.

However, looking back on it, and with your comment, I decided to add it back for simplicity, as finding the tile in the palette proved difficult even for me.

The two tiles for both light world and dark world are actually here:


I have replaced the origfinal grass tile by placing it next to the water tiles.
#40
Quote from: Christopho on March 12, 2017, 01:07:20 PM
I have another question now. Why are weak walls semi-transparent?

The darker lines should be opaque or almost opaque, no?

The reason the weak walls are semi-transparent is because I thought users might want to place bombable walls on lower levels.  By using the weak wall and very weak wall patterns with opaque colors, the walls did not look like they blended into the lower level walls at all.  I figured I would experiment and see if they would look better semi-transparent to allow users to place them on lower walls without having to create images of cracked walls that would look right against the lower walls

Quote from: Christopho on March 12, 2017, 04:22:17 PM
And another small bug:

Some white pixels instead of transparent in the torch.
I reported it a while ago, apparently it is only okay in the bright blue tileset (ice colors).

For whatever reason, this one always sneaks up on me xD  I took care of this bug three times now already and for some reason, it's like a ghost I can't seem to get rid of lol

Quote from: Christopho on March 12, 2017, 02:16:33 PM
I think there is are slight inaccuracies with the palette of the outside tileset. As far as I know, all colors in ALTTP have RGB values that are multiples of 8. For example, in the dungeon tilesets, the blue tiles used for deep water should be 56,96,168. This is the value I have from Hyrule Magic. (Or 88, 128, 200 in the PAL version, because there is an offset of 32 for all 3 RGB values). In your tileset, this color is currently 57,99,173. Not a huge difference, but when transitioning from a map made with my old tilesets to a map made with yours, the difference is visible.
It looks like this rule is better respected in your dungeon tilesets.

The blue color of the water can be fixed easily, but given the tileset currently has 1,079 colors in it, it would be more difficult to go in and change all of them to match perfectly with the palette of Hyrule Magic.  I also have palette swaps of tiles containing colors Hyrule Magic does not have.  The Dark World water tiles have a slightly different shade in the dark color because I felt that black color in the waters' walls was less appealing.  I think (and I can be wrong) that for the most part, most of the remaining tiles are correct in color, or at least close.

I fixed the bug (once again) for the tall lamps.  If you want I can revert the semi-transparent colors for the weak walls back to opaque.  I can change the color of the water in the outdoor tileset as well, but changing the entire thing to perfectly match the colors in LTTP might be more challenging than the dungeon tilesets' palettes.
#41
Game art & music / Re: Requesting
March 11, 2017, 07:11:54 PM
I was originally going to consider putting some minish cap style houses in my tileset, but I'm not sure yet.  Let me know if you guys think I should :)

If I do add them, they will not have the luxury of being resizable like the Link to the Past houses can be, but I will be able to use the same alpha trick on them that I used on the Link to the Past houses
#42


I decided to add 8 new patterns that should fix the beach sand patterns.  It's just the same 2 patterns split into 4 parts each.

I hope that helps :)
#43
Absolute Hyrule Maps Pack

Okay, I fixed the door patterns as well as removed the stray pixels in the entities sheets.

I have also updated the link to the package to reflect the new webspace.
#44
Oh...wow I actually never noticed that lol

See when I edited certain patterns at the discovery of an error, I simply inverted the patterns without realoizing those very minute pixel differences.  I will change this and then upload the new file to the new location.

HOPEFULLY this time, when I update the new image, the new package will contain the new versions of all the tiles.  if not, then I will add the new images to the server individually so you can update what you need as you need it.

Just a heads up however, today marks the release of Breath of the Wild and I preordered a copy so if it comes in, I might be a little harder to reach xD
#45
I double checked the tileset just now, and even downloaded the copy on my site to ensure it was the correct one.

The borders around the outside castle tile patterns are colored in now.  If I recall in an earlier post, you suggested that the corners of the patterns be filled in so the tile pattern underneath it would be less obvious.  You also suggested I color in the darkest color of the patterns to a darker, less transparent, or more opaque color to allow the patterns to stand out more.

The darkest color was indeed darkened.  If you prefer we can change it to a solid color instead.  As far as I remembered (having read through the entire post again), did I miss something that you said needed fixed? >__< Apologies, but I am not understanding.

Also, if you'd like to discuss this and any other matters regarding my tileset in real time, you may add me via skype!! I am almost always online, and have a rather erratic sleep schedule at times