Jump to content

Photo

[Request] My general purpose "I need stuff" thread

Request Midis Composers Plz Scripts Enemies Programmers Plz Etc custom tiles Sprite Artists Plz

  • Please log in to reply
8 replies to this topic

#1 FireSeraphim

FireSeraphim

    Behold the might of legend!

  • Members
  • Real Name:Patrick Casey Spurlock

Posted 06 February 2016 - 03:53 AM

I'm going to keep it simple and place all of my requests for stuff in this thread. As of right now I have just a few things that I kinda need.

 

Midis Request

I would appreciate having the following songs recomposed as midis

 

https://www.youtube....h?v=4HNEPXbNEK4

Battle #58 (Dawn of YS version)

 

https://www.youtube....h?v=R3dMtkRJp84

Bronze District (Mask of the Sun version, this song is unique from the other versions)

 

Script Request

I would appreciate having the following scripts created

  • A script that makes the pre-existing Stalfoses jump back when they're attack with the sword like in ALTTP

 

 

That is all for now.

 



#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 06 February 2016 - 07:28 AM

I'm pretty sure that the jumping stalfos has already been done. Might be a Moosh thing.

 

You should pop that over to the script requests board, or scripting discussion, so that we all see it.



#3 FireSeraphim

FireSeraphim

    Behold the might of legend!

  • Members
  • Real Name:Patrick Casey Spurlock

Posted 06 February 2016 - 08:59 AM

I figured it would be better to keep all of my requests here in one thread, just to keep it simple.



#4 Ranagus

Ranagus

  • Members

Posted 07 February 2016 - 09:51 AM

How about this:

Spoiler

This script modifies the level 1, 2, and 3 Stalfoses and assumes that the sword is always equipped to the A button.

Set the shadow ID and the sounds with the constants.

The shadow cset can be set using D0 or globally using the constant.

Enemies won't jump while stunned.

 

Bugs:

-Doesn't check if Link can actually use a sword (eg cursed).

-Stalfoses can jump onto walkable water and pits.



#5 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 07 February 2016 - 10:57 AM

How about this:

Spoiler

This script modifies the level 1, 2, and 3 Stalfoses and assumes that the sword is always equipped to the A button.

Set the shadow ID and the sounds with the constants.

The shadow cset can be set using D0 or globally using the constant.

Enemies won't jump while stunned.

 

Bugs:

-Doesn't check if Link can actually use a sword (eg cursed).

-Stalfoses can jump onto walkable water and pits.

 

You can check for NumLWeaponsOf(LW_SWORD) instead of button presses, as well as proximity* to Link. This would make whether the sword is on A, or B irrelevent, and would also ensure that jinxes work. Likewise, checking proximity will prevent them all jumping for no reason. I'd also check that Link is facing the enemy, before making it jump.

 

This would work better as a global component, rather than an ffc. I'd say that the bugs preclude its use, but it's fixable.

 

Either that, or an AutoGhost script, so that it's tied specifically to a desired npc, rather than affecting all Stalfos in a game.

 

Last, reading the tile on which the enemy would land (you already know the coordinates) to see if it's a bad type, and cancelling the jump if it is, would solve the other major bugs.

 

*I made functions specifically to do this, ProximityX() and ProximityY(), if you want them.

 

---

 

The reason that I advise posting the script request in the 'Script Requests' board, is that some of us don't read this board frequently, but we check the scripting boards daily. It increases your chances of fast results; but don't expect anything 'fast' from me. I have enough backlog for two years.


Edited by ZoriaRPG, 07 February 2016 - 11:01 AM.


#6 Ranagus

Ranagus

  • Members

Posted 07 February 2016 - 06:22 PM

Alright, here's an update.

Spoiler
  • Added a direction check.
  • Improved proximity check.  And it adjusts depending on whether or not the player has slash.
  • Added check for water, pits, and no-enemy tiles.
  • Made the script global.
  • Jinxes work properly.
  • Sword can be used in either A or B.

As elegant as checking for LW_SWORD sounds, it doesn't really work because its too late to dodge by the time the lweapon is on screen.  Detecting the player's attack at button press gives the enemy an extra frame or 2 to react, making it much harder to hit :)
That, and I think sword beams count as swords?

Here's what I ended up doing instead:

if(Link->Action == LA_ATTACKING && ((Sword_EquippedA() && Link->InputA) || (Sword_EquippedB() && Link->InputB))...

Edit:

Found a hole in my logic.. Jinx check added.


Edited by Ranagus, 07 February 2016 - 09:38 PM.


#7 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 07 February 2016 - 06:29 PM

 

That, and I think sword beams count as swords?

No, they don't. Sword beams have the ID LW_BEAM, while swords have LW_SWORD.


Edited by Coolgamer012345, 07 February 2016 - 06:29 PM.


#8 FireSeraphim

FireSeraphim

    Behold the might of legend!

  • Members
  • Real Name:Patrick Casey Spurlock

Posted 08 February 2016 - 03:40 AM

I think the coding is solid and all but comes a rather problematic issue. How do you go about adding it in if you're using ghost.zh? I still can't quite wrap my head around the initial instructions in Lejes's tutorial.

 

 

Did you write import "ghost.zh" at the top of your script file? Good. Doing that automatically imports a bunch of stuff, including the ghost.zh global script.
If it's your only global script, you just need to put "GhostZHActiveScript" in your Active global slot. If you're using others, use this handy guide to combine them!

import "std.zh"
import "string.zh"
import "ghost.zh"

global script GhostAndOtherStuff
{
    void run()
    {
        int dumbvariable;
        float someotherdumbvariable;
        bool dumboolean;
        int dumbarray[10];
        
        StartGhostZH();
        
        while (true)
        {
            UpdateGhostZH1();
            DumbFunction();
            Waitdraw();
            Z3Scrolling();
            UpdateGhostZH2();
            Waitframe();
        }
    }
}

The important things to look at here are the start of the while loop, Waitdraw(), and Waitframe(). The three global ghost functions need to be placed in relation to these.
As long as they're in the proper order, everything should work fine.

What does all that mean exactly? especially in context of all the global variables you placed at the start of your script and the fact it's a global script?

 

Oh and I really would appreciate it if any of this site's fine musicians would be up for covering the two requests I stated in my opening post.


Edited by FireSeraphim, 08 February 2016 - 03:41 AM.


#9 Ranagus

Ranagus

  • Members

Posted 08 February 2016 - 09:26 AM

So what they're saying is that Ghost comes with a global script for your convenience.  But, since ZQuest allows you to put only one script into the active slot, you'll need to make your own global script, use that instead, and call the functions yourself.

 

Do something like this:

global script GhostAndOtherStuff{
  void run(){        
    StartGhostZH();
    while(true){
      UpdateGhostZH1();
      Waitdraw();
      UpdateGhostZH2();
      Waitframe();
      Stalfos_Jump();
      //followed by other global "scripts"
    }
  }
}

The only "script" here is "GhostAndOtherStuff".  The rest are just functions that get called every frame to actually do the work, well besides StartGhostZH(); which gets called only once because it's outside of the while loop.

 

As for the global constants..  Just put them near the top of the file, outside of any script or function.


Edited by Ranagus, 08 February 2016 - 09:26 AM.




Also tagged with one or more of these keywords: Request, Midis, Composers Plz, Scripts, Enemies, Programmers Plz, Etc, custom tiles, Sprite Artists Plz

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users