Jump to content

Photo

Enemy Script Requests


  • Please log in to reply
13 replies to this topic

#1 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 12 September 2011 - 01:17 PM

1. Remember how Link's Awakening has Goombas like many Mario games? Well, I was wondering if I could have a script to replicate this enemy.
2. Could anyone make a script for the Oracle of Seasons version of Mothula?
3. Would it be possible to make a script for Dark Link?
4. Could anyone make a Beamos script, if there isn't one in the database already?

#2 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 12 September 2011 - 01:41 PM

There is in fact a beamos script. It can't be destroyed, but if you need a destructible beamos I'm sure it could me modified for you.

For the other scripts, I've learned to be very specific. How exactly do these enemies behave? The more precise, the better.

#3 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 12 September 2011 - 01:55 PM

For the Goombas, step speed, halt rate, random rate, and homing factor would apply. The first combo would be used for its walking animation, and the second combo would be the tile to use for when Link stomps on it. Link would bounce off of the Goomba upon stomping on it, and it would have a property to determine whether or not Link needs the stomp boots to stomp on it. If 0, he would be able to stomp on it without the stomp boots. Also, they always dropped hearts when stomped on, so maybe a second item drop set might be necessary.

Here is how Mothula fights in Oracle of Seasons:
QUOTE
It fights by circling around the room and spitting fire at Link. It also releases larvae from time to time to defend itself. After a short period of time, it settles on one of the two platforms in the middle of the room, leaving itself open for attack.


In any game that Dark Link appears in, he generally goes towards Link tries to hit him with his sword and his shield blocks any frontal attacks. Perhaps, Dark Link could use a spiraling death animation like Link. Also, step speed should be applicable so that you can make him move at the same speed as Link.

And I'm not sure whether or not the existing Beamos Script is even compatible with RC2.

Edited by XMuppetSB, 12 September 2011 - 02:01 PM.


#4 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 12 September 2011 - 02:40 PM

On the contrary, I use the beamos script in my own quest and it works fine.

#5 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 15 September 2011 - 02:31 PM

CODE
ffc script Goomba{
    void run(int enemyID){
        npc ghost = Ghost_InitAutoGhost(this, enemyID, GHF_NORMAL);
        //Movement variables.
        int counter = -1;  
        int step = ghost->Step;
        int rate = ghost->Rate;
        int homing = ghost->Homing;
        int hunger = ghost->Attributes[3];
        int zheight = ghost->Attributes[4];
        while(true){
            counter = Ghost_ConstantWalk4(counter, step, rate, homing, hunger);
            ghost->Dir = Ghost_Dir;
            if(Link->Jump < 0 && Link->Z <= zheight){
                if(XYCollision(ghost)){
                    ghost->CollDetection = false;
                    ghost->OriginalTile = ghost->Attributes[0];
                    Ghost_WaitframesLight(ghost->Attributes[1]);
                    ghost->ItemSet = ghost->Attributes[2];
                    Ghost_HP = 0;
                }
            }
            Ghost_Waitframe(this, ghost, true, true);
        }
    }
    bool XYCollision(npc n){
        int ax = Link->X + Link->HitXOffset;
        int bx = n->X + Link->HitXOffset;
        int ay = Link->Y + Link->HitYOffset;
        int by = n->Y + Link->HitYOffset;
        return RectCollision(ax, ay, ax + Link->HitWidth, ay + Link->HitHeight, bx, by, bx + n->HitWidth, by + n->HitHeight);
    }
}

Type is Other.
Uses HP, Damage, Step, Random Rate, and Homing.
Attributes used are 1-5, 11, and 12.
1. Stomp Original Tile. The enemies original tile, will be changed to this when he is stomped.
2. Number of frames stomp animation is to be displayed for.
3. Stomp Item Set, The enemies drop set will be changed to this when he is stomped.
4. The enemies' hunger, legal values 0 - 4.
5. This should be higher then the normal hitzheight of the enemy.
11. Set this to 1.
12. Set this to the ffc slot number you put the script in.
[/list]

Let me know if that works for you, and if not I'll go back and try again. ^_^


#6 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 15 September 2011 - 03:43 PM

This isn't working at all! Every time I try to stomp it, Link gets hurt and its stomp tile is never displayed, and the alternate item drop set is never used! Also, you forgot to include an attribute for the stomp sound. And technically, this is not even ghosted at all. Maybe we should ask Saffith about this one.

Edited by XMuppetSB, 15 September 2011 - 04:03 PM.


#7 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 15 September 2011 - 04:09 PM

QUOTE(XMuppetSB @ Sep 15 2011, 02:43 PM) View Post

This isn't working at all! Every time I try to stomp it, Link gets hurt and its stomp tile is never displayed, and the alternate item drop set is never used! Also, you forgot to include an attribute for the stomp sound. And technically, this is not even ghosted at all. Maybe we should ask Saffith about this one.


What do you have attribute 5 set to? And yes it's very ghosted. It uses the ghost walk function ConstantWalk4.

Edited by blackbishop89, 15 September 2011 - 04:10 PM.


#8 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 15 September 2011 - 04:16 PM

Okay, I tried setting the value to 10 and it worked. However, it seems to be lacking a stomp sound, and furthermore, in Link's Awakening, it didn't use the normal death sprite or the normal death sound when stomped, it just displayed the stomped tile for a few seconds before it disappeared. I also mentioned that Link should bounce off of it when he stomps on it. Also, it seems to be ignoring Sideview Gravity, even though it is set to Other, which is supposed to fall when used on Sideview screens.

Perhaps there should be a revised setup, like this:

--- COMBOS ---

1: Walking
2: Stomped


--- ENEMIES ---

Main enemy: Goomba
- Type: Other
- Step speed, halt rate, random rate, and homing factor are used

Attributes
1. Sound to use when stomped
2. Number of frames stomp animation is to be displayed for.
3. Stomp Item Set, The enemies drop set will be changed to this when he is stomped.
4. Stomp Boots required- 1- yes; 0- no
5. This should be higher then the normal hitzheight of the enemy.
6. Whether or not Link bounces off if it. 0- no; 1- yes
11. Combo used for walking animation.
12. Set this to the ffc slot number you put the script in.

Edited by XMuppetSB, 15 September 2011 - 04:42 PM.


#9 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 15 September 2011 - 04:46 PM

QUOTE(XMuppetSB @ Sep 15 2011, 03:16 PM) View Post

Oops! I must have missed that attribute. I left it a 0. What does it need to be set to?


icon_lol.gif It should be higher then the enemies ZHeight. Try 4 which is what I used.

#10 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 15 September 2011 - 04:48 PM

QUOTE(blackbishop89 @ Sep 15 2011, 04:46 PM) View Post

icon_lol.gif It should be higher then the enemies ZHeight. Try 4 which is what I used.


I tried setting it to 10, and it worked. But I stated a few other problems in my post above:

1. It seems to be lacking a stomp sound
2.In Link's Awakening, it didn't use the normal death sprite or the normal death sound when stomped, it just displayed the stomped tile for a few seconds before it disappeared
3. Link should bounce off of it when he stomps on it.
4. It seems to be ignoring Sideview Gravity, even though it is set to Other, which is supposed to fall when used on Sideview screens.

Perhaps there should be a revised setup, like this:

--- COMBOS ---

1: Walking
2: Stomped


--- ENEMIES ---

Main enemy: Goomba
- Type: Other
- Step speed, halt rate, random rate, and homing factor are used

Attributes
1. Sound to use when stomped
2. Number of frames stomp animation is to be displayed for.
3. Stomp Item Set, The enemies drop set will be changed to this when he is stomped.
4. Stomp Boots required- 1- yes; 0- no
5. This should be higher then the normal hitzheight of the enemy.
6. Whether or not Link bounces off if it. 0- no; 1- yes
11. Combo used for walking animation.
12. Set this to the ffc slot number you put the script in.

Edited by XMuppetSB, 15 September 2011 - 08:11 PM.


#11 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 16 September 2011 - 08:30 AM

CODE
ffc script Goomba{
    void run(int enemyID){
        npc ghost = Ghost_InitAutoGhost(this, enemyID, GHF_NORMAL);
        int counter = -1;
        int step = ghost->Step;
        int rate = ghost->Rate;
        int homing = ghost->Homing;
        int haltrate = ghost->Haltrate;
        int zheight = ghost->Attributes[4];
        while(true){
            counter = Ghost_HaltingWalk4(counter, step, rate, homing, 0, haltrate, 48);      
            if(Link->Jump < 0 && Link->Z <= zheight){
                if(XYCollision(ghost) && CanSquash(ghost->Attributes[3])){
                    Game->PlaySound(ghost->Attributes[0]);
                    ghost->CollDetection = false;
                    Ghost_Data++;
                    if(ghost->Attributes[5]) Link->Jump = 3;
                    Ghost_Waitframes(this, ghost, true, true, ghost->Attributes[1]);
                    ghost->ItemSet = ghost->Attributes[2];
                    Ghost_HP = HP_SILENT;
                }
            }
            Ghost_Waitframe(this, ghost, true, true);
        }        
    }
    bool XYCollision(npc n){
        int ax = Link->X + Link->HitXOffset;
        int bx = n->X + Link->HitXOffset;
        int ay = Link->Y + Link->HitYOffset;
        int by = n->Y + Link->HitYOffset;
        return RectCollision(ax, ay, ax + Link->HitWidth, ay + Link->HitHeight, bx, by, bx + n->HitWidth, by + n->HitHeight);
    }
    bool CanSquash(bool boots){
        if(Link->Item[I_STOMPBOOTS]) return true;
        else return !boots;
    }
}

Hopefully I got it right this time. Let me know if I missed something or somethings not working. Oh and the value of attribute 11 is the combo the ffc will use. And the one after it must be the stomped combo. Make sense?

#12 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 16 September 2011 - 05:38 PM

Okay, the misc properties have me completely confused! icon_confused.gif Please give me more details. And the Goomba still floats in sideview gravity when it should be falling in sideview gravity, since it is set to other, not other (floating).

Edited by XMuppetSB, 16 September 2011 - 06:05 PM.


#13 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 17 September 2011 - 09:44 AM

QUOTE(XMuppetSB @ Sep 16 2011, 04:38 PM) View Post

Okay, the misc properties have me completely confused! icon_confused.gif Please give me more details. And the Goomba still floats in sideview gravity when it should be falling in sideview gravity, since it is set to other, not other (floating).


What confuses you about it? Just use the attribute set up you gave me which is what I used.

QUOTE
1. Sound to use when stomped
2. Number of frames stomp animation is to be displayed for.
3. Stomp Item Set, The enemies drop set will be changed to this when he is stomped.
4. Stomp Boots required- 1- yes; 0- no
5. This should be higher then the normal hitzheight of the enemy.
6. Whether or not Link bounces off if it. 0- no; 1- yes
11. Combo used for walking animation.
12. Set this to the ffc slot number you put the script in.


Also I'll take a look at the sideview bug and see if I can fix it somehow.

#14 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 17 September 2011 - 12:32 PM

Sorry. I was just reading what was in the script. Anyway, thanks. And when you're done with the bug fix, I'd like to see your version of the Beamos Script next.

Edited by XMuppetSB, 17 September 2011 - 01:01 PM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users