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

Pages: 1 [2] 3 4 ... 6
Development / Re: Count how many file exists with a certain prefix ?
« on: March 12, 2017, 10:35:00 pm »
Well, my advice is to only load the visible files in the menu when required to show them (i.e. a scrolling menu where only three are shown at a time.), store the variable that you need into a list with in a list (arrays work too). This should spread out the load time to when the user attempts to access the other files additional files. Also, you should probably make it so that it sorts by most recently saved. Most users are not going to touch their old saves unless they want to show off their progress or just mess with it.

You could also attempt to use
Code: ( lua) [Select]
local game_var = require("path/to/save/data.dat")
But don't know if that will work.

General discussion / An example of the Engine.
« on: March 11, 2017, 11:57:40 pm »
So I decided to do a test of the engine. Here are the results.

The asssets (referring to graphics and music) used in this are ffomega's Hyrule map pack, some custom made sprites, some edits of sprites from alttp, and the remainder are just from ZSDX.

Code is mostly custom made but is based off the code from ZSDX and zelda ROTH SE.

Game art & music / Re: Requesting
« on: March 11, 2017, 04:36:23 pm »
Try searching here if you want minish cap tiles,
Great site for finding sprites and tiles of different games.

Also, house tiles can be found in ffomega's Full Hyrule tileset, which can be found at,881.0.html

Also, since the topic of errors has been brought up again, I would like to point out this tileset error in all of the dungeon tilesets.
Which should look like,
The red circle highlighting the issue. The outer corner lower cave walls use the incorrect tiling from the walls. (using the middle tile layer instead of the bottom.)

Development / Re: Separator_on_activated direction4
« on: February 14, 2017, 11:44:45 pm »
Like Diarandor said, direction4 is a variable, here is how to use it. (This was typed before Diarandor's post had appeared.)

The function of separators "on_activated(direction4)" The information in the brackets are defined when they are called and should be stored in a variable like so:
Code: (lua) [Select]
function generic_separator:on_activated(direction4)
  if direction4 == 3 then
  -- Your code here
The reason this works is because when the engine calls this function, it stores the argument that you may need for a script in the variable.

However, one cannot have what they want the call back to be done like so,
Code: (lua) [Select]
function generic_separator:on_activated(3)
  --Your code here
This does not work as putting the number three in the variable slot will produce an error as that slot is not for defining what you want that information to be, but rather for a variable that may change.

Game art & music / Re: Game Over animation
« on: February 02, 2017, 11:18:58 pm »
The animation has an almost Castlevania vibe to it. Still see the potential for usage though.

General discussion / Re: Pictures in posts
« on: January 28, 2017, 02:54:55 am »
To have an image visible while browsing the forums without being logged-in require you to upload the image to another site (e.g. imgur) and posting the image link on the forums.
Like so;
Code: [Select]
[img][/img] produces this ->

Development / Re: Custom entity and associate sprite : strange offset
« on: January 28, 2017, 12:03:41 am »
Try setting the origin of the sprite to (8, 13).

The reason this happens is due to the fact that the engine hard codes rendering the sprite of a custom entity by rendering the origin of the image 8 pixels right and 13 pixels down from the top left corner of the entity instead of rendering at the center or rendering the sprite center horizontally and subtraction 3 pixels from the total entity size.

Development / Re: How to specify custom attack sprite
« on: December 29, 2016, 06:37:11 pm »
Try using the sprite value that is given in the function.
enemy:on_custom_attack_received(attack, sprite)

Called when this enemy receives an attack with a custom effect.

This function is called if you have set consequence of the attack to "custom". You have to define what happens, for example hurting the enemy, making a special reaction, etc.

attack (string): The attack that was received: "sword", "thrown_item", "explosion", "arrow", "hookshot", "boomerang" or "fire".
sprite (sprite): The sprite of this enemy that receives the attack, or nil if the attack does not come from a pixel-precise collision.

So to run the function I would do,
Code: (lua) [Select]
function enemy:on_custom_attack_received(attack, sprite)
  if attack == "thrown_item"
    and sprite:get_animation_set() == "entities/boss3block" then

Development / Re: Pickable Item with No Shadow
« on: December 25, 2016, 12:31:16 am »
Try this:
Code: (lua) [Select]
item:set_shadow(nil)nil is a non-existent value and that is what the engine is searching for in this method. It should work as I just ran a quick test in a quest that I'm building from scratch.

Your scripts / Re: [UPDATE 1.1] Dash Required Blockade
« on: November 01, 2016, 10:53:15 pm »
Could you maybe show us an example or maybe how to implement it?
The way that I had implemented the script was by putting it into the entities folder. I guess I never explained how to set it up properly.

If you can I'd love to add this file to my Full Hyrule entities pack, which includes 8 different dash rock types to use.
There are few edits I would make when using your entities pack. In order for your rocks in the pack to look correct, the origin for the animations needs to be adjusted a bit. Specifically, an origin of x = 16, y = 13. The destroy animation has to have it's own origin of x = 16 and y = 21 to look correct when using this script as of solarus 1.5.0.

Also, if there is a way, could this script be modified to be a "Left Level Required" blockade like the large rocks in LttP?
Yes, this should be simple to implement. Just a few additional lines of code to add a check for that are necessary for the script, and another function to preform in the Lua file of the map that the entity is on.

I'll start working on the improvement right away.

Your scripts / [UPDATE 1.2] Dash Required Blockade
« on: October 28, 2016, 03:52:51 am »
Today I present to you, the Rock pile script for rock stacks from alttp or other entities with similar behaviors.

Requires the multi-event script which one can find HERE!,784.0.html

Code: (lua) [Select]
-- Rockstack script ment for rock piles similar to those in alttp.
-- Requires the muti-event script for full functionality.
-- which can be found here;
-- This script is a custom entity script and provides the functions:
-- custom_entity:keep_existing() which tells the script to respawn the
-- rockstack after being destoryed.
-- custom_entity:get_value() which will return the value of where this
-- entity's destoryed mem state is stored in the save data.
-- custom_entity:lift_requirement(lvl)
-- lvl - sets the lifting ability that the hero needs
-- inorder to topple the rockstack.
-- Made by yoshimario2000.
-- Version 1.2

-- Local required varables for this script to function properly.

local entity = ...
local game = entity:get_game()
local map = entity:get_map()
local hero = entity:get_game():get_hero()
local name = entity:get_name()

local exist_kep = false
local lvl_chk = 0

local underlayer = map:has_entity(entity:get_name() .. "_destroy")
local remains_exist = map:has_entity(entity:get_name() .. "_remains")

function lift_requirement(lvl)
  if lvl >= 0 then
    lvl_chk = lvl
    lvl_chk = 0

-- Call if you wish for this entity to respawn after leaving the map.
function keep_existing()
  exist_kep = true

-- Call to get the game var state of this entity.
function get_value()
  local map_id_new = string.gsub(entity:get_map():get_id(), "/", "__")

  return map_id_new .. "_" .. entity:get_name() .. "_destoryed"


local function destroy_self()
  if remains_exists then
    map:get_entity(entity:get_name() .. "_remains"):set_enabled(true)
  if underlayer then
      map:get_entity(entity:get_name() .. "_destroy"):set_enabled(false)

  -- If your sprite has a diffrent animation for being destoryed, change the string "destroy"  into that animation id.
  entity:get_sprite():set_animation("destroy", function()
    print("setting game value: " .. get_value())

    -- code for checking if to continue existing afterwards.
    if not exist_kep then
      game:set_value(get_value(), true)

-- Event called when the custom entity is initialized.
function entity:on_created()

  -- code for self removale if the rockstack has already been rammed.
  if game:get_ability("lift") >= lvl_chk then
    if game:get_value(get_value()) then
      if underlayer then
        map:get_entity(entity:get_name() .. "_destroy"):remove()

-- If you wish to preform the checks another way, please feel free to do so.
-- this was the best way that I could come up with personally though.
map:register_event("on_update", function()
  if map:has_entity(name) then
    if entity:overlaps(hero, "facing") and hero:get_state() == "running" then

To use this script, put the code into a .lua file in the entities folder of your quest's data.

Feel free to change some of the code around to better fit how you wish for the code to be run.

Edit: Updated for a few bug fixes and improvements in functionality.

Game art & music / Re: [UPDATE] Full Hyrule Tileset Now Has Summit Tiles
« on: September 26, 2016, 07:46:17 pm »
Beautiful! I foresee myself using that sometime in the future.

Development / Re: [Help] Sprite rendering
« on: September 20, 2016, 02:07:33 am »
Well, Seeing as that improved built-in functionality probably won't happen until 1.6 or something, I think I'll just go the custom entity route. Shouldn't be hard right?

Development / Re: [Help] Sprite rendering
« on: September 20, 2016, 12:43:35 am »

Pages: 1 [2] 3 4 ... 6