Jump to content

Photo

ghost.zh


  • Please log in to reply
645 replies to this topic

#211 Mero

Mero

    Touch Fluffy Tail

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

Posted 09 February 2013 - 07:25 PM

I think I PMed you about this, but I'll post it as a reminder. How's the Peehat/Ghini/Keese style movement function coming?

Also, I was wondering how to go about autoghosting the composite npcs.

#212 Saffith

Saffith

    IPv7 user

  • Members

Posted 12 February 2013 - 12:50 PM

I've barely done anything in ZC since 2.50. I'll probably get back into it fairly soon.

AutoGhost doesn't have any support for segmented enemies. You could modify it or run another function in advance to mark the extra segments. I guess I could add it at some point, but it's a lot of extra code for a few rare special cases.

#213 Zefram

Zefram

    Initiate

  • Members

Posted 13 February 2013 - 04:03 AM

Dumb noobish questions, but I'm still trying to make sense of the readme.

How is it possible to have more than one ghosted enemy per screen given that position and speed are handled by a single set of global variables?
Do I need to replace ALL waitframe() calls in the quest (in other ffcs, global scripts, etc.) with ghost_waitframe or only the ones in the ghost script?
Do I need to make any modifications to my global scripts or is everything handled through ffc scripts?

#214 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 13 February 2013 - 04:23 AM

QUOTE
How is it possible to have more than one ghosted enemy per screen given that position and speed are handled by a single set of global variables?

Actually, each enemy is handled by a ffc script that is set up and run automatically.

QUOTE
Do I need to replace ALL waitframe() calls in the quest (in other ffcs, global scripts, etc.) with ghost_waitframe or only the ones in the ghost script?

Nope, just the ones in the ghost scripts.

QUOTE
Do I need to make any modifications to my global scripts or is everything handled through ffc scripts?

You just need to add this small bit into your main global loop:
CODE
UpdateEWeapons();
            UpdateClock();
            CleanUpGhostFFCs();
            Waitdraw();
            AutoGhost();


#215 Moosh

Moosh

    The Mush

  • Moderators

Posted 13 February 2013 - 07:34 AM

QUOTE(Saffith @ Feb 9 2013, 12:07 PM) View Post

Did you get this worked out?
Were you using an existing save? That's all I can think of, offhand.

Yeah I solved it myself...and then promptly forgot the lesson I learned and did it again recently. Well now I know why my ghosted enemies stopped working...

QUOTE(Russ @ Feb 13 2013, 04:23 AM) View Post

You just need to add this small bit into your main global loop:
CODE
UpdateEWeapons();
            UpdateClock();
            CleanUpGhostFFCs();
            Waitdraw();
            AutoGhost();


Russ, are you giving out dated information? Because that sure looks like the old global script. The new one changed some things.

CODE
global script GhostZHActiveScript
{
    void run()
    {
        InitializeGhostZHData();

        while(true)
        {
            UpdateGhostZHData();
            UpdateEWeapons();
            CleanUpGhostFFCs(); // Only needed if __GH_USE_DRAWCOMBO is 0

            Waitdraw();
            
            AutoGhost();
            DrawGhostFFCs();

            Waitframe();
        }
    }
}

Edited by Moosh, 13 February 2013 - 07:39 AM.


#216 Saffith

Saffith

    IPv7 user

  • Members

Posted 13 February 2013 - 09:44 AM

QUOTE(Zefram @ Feb 13 2013, 04:03 AM) View Post
How is it possible to have more than one ghosted enemy per screen given that position and speed are handled by a single set of global variables?

That's part of what Ghost_Waitframe does. The values are saved and restored between frames, so each script effectively has its own copy.

#217 Anthus

Anthus

    anthus

  • Contributors
  • Real Name:Antbus
  • Location:Ohio

Posted 18 February 2013 - 04:32 PM

I got this set up (first try icon_biggrin.gif) and it's awesome to see AlttP enemies in ZC. I only added the Popo just to see if it works right, and it does.

#218 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 18 February 2013 - 04:56 PM

QUOTE(Moosh @ Feb 13 2013, 04:34 AM) View Post

Russ, are you giving out dated information? Because that sure looks like the old global script. The new one changed some things.

Wait, it got changed? This is news to me. Then again, I haven't updated ghost cuz I don't want any problems popping up at the late stage of development I'm in...

#219 Anthus

Anthus

    anthus

  • Contributors
  • Real Name:Antbus
  • Location:Ohio

Posted 19 February 2013 - 12:20 AM

The Armos Knight boss one works, but I have some questions. I noticed that the Armos Knight plays two 'hit', and 'death' SFX at the same time. It plays the default classic ones, plus the ones I picked in the enemy editor. Is there a way to make it so the script doesn't play those default sounds? I don't mind picking all the hit and death sounds manually in the editor, cause I like to use a lot of different sounds anyway. I didn't notice this with the other enemies so far cause they all use the default sounds anyway.

Secondly.. um, well, they kinda look like this. It functions perfectly though, it just looks kind of weird. I set everything up right, to my knowledge, but it appears to be using the wrong combos. The upper left part is combo 1660 as defined in the enemy attributes, but the other three are random combos.

EDIT I just changed the empty combo in ghost.zh from 1 to combo 7, and it still does it. Also, when the last Armos is killed, it leaves behind the junk tiles. [pic] I don't -think- it did that the first time, but I don't remember.

Edited by Anthus, 19 February 2013 - 12:36 AM.


#220 Saffith

Saffith

    IPv7 user

  • Members

Posted 19 February 2013 - 12:50 AM

QUOTE(Anthus @ Feb 19 2013, 12:20 AM) View Post
The Armos Knight boss one works, but I have some questions. I noticed that the Armos Knight plays two 'hit', and 'death' SFX at the same time. It plays the default classic ones, plus the ones I picked in the enemy editor.

There's no stopping it; that's hard-coded in ZC. The only thing I can think of to do is make the regular hit sound silent and set a custom hit sound for every single enemy.

QUOTE
Secondly.. um, well, they kinda look like this.

It looks like the FFC part is correct and the enemy tile is wrong, which means the problem should be GH_BLANK_TILE. I'm guessing it's 10440. It's drawing a 2x2 sprite directly from the tile page, so the blank tile needs to be the top-left corner of a whole block of blank tiles. Your blank combo should also use a tile like that.

#221 Anthus

Anthus

    anthus

  • Contributors
  • Real Name:Antbus
  • Location:Ohio

Posted 19 February 2013 - 01:14 AM

QUOTE(Saffith @ Feb 19 2013, 12:50 AM) View Post

There's no stopping it; that's hard-coded in ZC. The only thing I can think of to do is make the regular hit sound silent and set a custom hit sound for every single enemy.


Hm, I might go ahead and do that (I'm hoping it will take all of 10 minutes).

QUOTE(Saffith @ Feb 19 2013, 12:50 AM) View Post

It looks like the FFC part is correct and the enemy tile is wrong, which means the problem should be GH_BLANK_TILE. I'm guessing it's 10440. It's drawing a 2x2 sprite directly from the tile page, so the blank tile needs to be the top-left corner of a whole block of blank tiles. Your blank combo should also use a tile like that.


Okay, I think it is the blank tile parameter. I didn't set that one at all, I only set the combo under "GH_INVISIBLE_COMBO" and the tile number for "GH_SHADOW_TILE". I'll change that to a blank 4x4 grid, and post results. I'm pretty sure that's it though. (btw, by default, it is 65456)


EDIT: Yep, that fixed it, thanks icon_smile.gif

I also happened to notice that killing the Armos Knights didn't open the shutters. Is there a way to make that work, or do I need to have a "regular" invisible enemy on screen to kill?

Edited by Anthus, 19 February 2013 - 01:20 AM.


#222 Saffith

Saffith

    IPv7 user

  • Members

Posted 19 February 2013 - 01:53 AM

Hm, I don't know. That should just work. Does it work if you replace the knights with a regular enemy?


By the way, I just found a bug in the Armos Knights script. It's been updated. (The one in the database. Signature link's obsolete. I need to fix that... icon_razz.gif)

#223 Anthus

Anthus

    anthus

  • Contributors
  • Real Name:Antbus
  • Location:Ohio

Posted 19 February 2013 - 02:56 AM

Yeah, I dunno. I have screen data set to trigger secrets, and an item, but neither happen. I saw a Youtube comment dealing with this same situation, and it looked like there was a line to change? I just don't want to go switching stuff around without knowing for sure if it's the problem.

Edit: What's the bug anyway? Other than my tile error, it seemed to work perfectly. However, I was wondering if there is a way to make the enemy move faster? I feel like they're easier to kill in ZC cause you can fire arrows MUCH quicker in Zelda 1 than in ALttP. I feel like if the Knights could go faster it'd make up for that. If not, it's not a big concern, I was just curious to if small tweaks like that are, in fact, small tweaks icon_razz.gif

Edited by Anthus, 19 February 2013 - 03:04 AM.


#224 Saffith

Saffith

    IPv7 user

  • Members

Posted 19 February 2013 - 10:10 AM

Ah, right. If you used the version in the database, the problem mentioned in the YouTube comment should have been fixed already (the ones linked in my signature are still the old ones). But, actually, it was still wrong. The problem this time was that if you had it set for enemies to flicker, if you got to the last knight and died or left the screen, it would think you'd beaten them all. That's because it was actually waiting for the combo to become invisible to determine when it had died.

Try this: enable level 4 cheats and turn on Cheat > Show/Hide Layer > Current FFC Scripts. If it's working correctly, the last copy of the script should disappear when the last knight finishes exploding. If there's still a copy hanging around, it's probably a similar problem.

As for speeding them up, there's no way to do that from ZQuest, but check the constants at the top of the script.
AK_PART_1_ROTATE_SPEED controls how fast the positions in the circle rotate. It's in degrees per frame, so the default value of 1 is one full circle every six seconds.
AK_PART_1_STEP controls how fast the individual knights move. They'll move in strange ways if they can't keep up with the circle.
AK_PART_2_STEP is how fast the last knight moves. If you change that, you may also need to play with AK_PART_2_RISE_DIVISOR, which controls how fast it moves upward relative to their lateral movement.

#225 Anthus

Anthus

    anthus

  • Contributors
  • Real Name:Antbus
  • Location:Ohio

Posted 20 February 2013 - 02:15 PM

When I checked the screen, there are seven instances of the Armos Knight, and the six on screen go away, but there is one that remains. Misc Attr 1 is set to 6 for six knights.

I grabbed the version from the DB, and it works, doors, secrets and all. icon_smile.gif And I didn't realize the code was suppose to generate 7 copes. But either way, the last two go away when the last knight is killed.

EDIT 2 million: Also, I've decided to keep its spped the same, but double its HP to 24 instead of 12. Better bring atleast.. 36 arrows icon_razz.gif

I was also wondering how you make a different ghost.zh file for another quest for future reference.

Edited by Anthus, 20 February 2013 - 03:08 PM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users