Users browsing this thread: 1 Guest(s)
Barubary NPC Sprite Request

#11
Posts: 161
Threads: 14
Thanks Received: 4
Thanks Given: 0
Joined: Sep 2010
Reputation: 5
Status
None
Ah I see what you're going for! This sounds neat but it's going to be a little hard to explain what it is we'll have to decide upon.
The hardest thing is getting the NPC to appear.
If this was a base character like Terra or Locke, it'd be a piece of cake. But because it's an NPC, it's downright hard lol.
But it's NOT impossible!
What you need to do is first find TWO unused event squares. The first one should be very small, not too many bytes. The best way to find an event square is to either watch youtube videos of parts where the characters step on a tile and something "small" executes. The other is looking for "If" statements in the event dump.
If statements are actually what an event square contains. It'll say "If xxxxx is set, branch to xxxx and then what follows is the events for that event square. When it says "If" it's basically checking to see if the character stepped on that tile. An event square ALWAYS ends with $FE. That means "return".
So once you find a small event square, the next one needs to be a little bit bigger, about 15 or 18 bytes at your disposal.
OK! So once the hard part is out of the way, here's the part where you'll have to pay extreme attention.
The game does this alot and from what I can tell, it shouldn't be too hard to manipulate.
The map that is going to contain the exit that takes you to map $0DF will send you to a tile, correct? Whenever you lay out the coordinates for the tile that you want the character to be set to, put the FIRST event square that I mentioned you finding right on top of the tile that the exit is.
So you'll have an exit on an event square.
Then, still in the level editor, find the NPC for Barubary and place him further up in the $0DF map. Make sure he can't be seen once your sent to the $ODF map. Right before his sprite, perhaps down 3 tiles, place the SECOND event square.
OK! Now you're probably wondering where on the earth I'm going with this, don't worry I'll explain.
I'll help you write out all this. For the FIRST event square, we'll be putting this:
42, XX, 45
This will say "Hide Object, XX, Refresh Objects.
So what this does is makes Barubary's sprite, which shouldn't be on screen from this first event square, disappear.
Now as the character walks up, they'll go to the second, bigger event square. This one will contain this:

41, XX, 45, XX, 02, 86, FF, 91, 4B, XX, C0, 92, 4D, XX, 3F, B2, A9, 5E, 00, 96

"XX" is going to be Baraubary's NPC byte. This will read as:

"SHOW Object (XX)," (45) Refresh Objects) (XX) Begin action queue for object XX, ($02) 2 bytes long, go down 2 tiles (86), FF (End Queue). (91) Pause for 15 unites, (4B) Display Text (XX) (Tell me what text you want displayed here and I'll get the byte) (C0) Display that text on the bottom of the screen, with no text box. (92) Pause for 30 unites, (4D) Invoke Battle Enemy Set (XX) Tell me what formation you'll be using for the boss) (3F) (3F sets the battle background to "defualt for this area"; this can be changed in LE. (B2 all the way to $00 is the subroutine that checks to see if the characters have died. If they have, it initiates the "game over" screen. (96) Restore screen from fade.


So that's the bigger event square data! Wink Long huh? Not too bad actually lol.

But yeah, I understand this is a little tough, but we'll pull through with this in the end

EDIT:
Fixed error in second event square script.


[Image: funnysiga.jpg]

MY YOUTUBE CHANNEL Laugh
http://www.youtube.com/user/xJCSx1
  Find
 

#12
Posts: 831
Threads: 41
Thanks Received: 16
Thanks Given: 12
Joined: Nov 2009
Reputation: 18
Status
None
Ok, I've had no problems so far with the info that you gave me JCS, but I have a ಠ_ಠ:

(01-21-2011, 11:32 PM)xJCSx Wrote: For the FIRST event square, we'll be putting this:
42, XX, 45
This will say "Hide Object, XX, Refresh Objects.

This code by itself works fine, but if I want to introduce some dialogue along with the NPC vanishing it should look like this (at least I think):

Code:
42, 10, 45, 4B, C9, C0, FE

I'm using general leo as a test for now (hence the 10). When I use that code, the (random C9) dialogue chosen keeps popping up again and again. Then I realized I need an IF,ELSE to be able to set an event bit after the square has been stepped on, so the dialogue pops only once.

The IF,ELSE I tried using was the one that is used by the guardian when he pushes you out of vector so you can't go in at all (when you're supposed to go to the sealed gate), but it's not working:
Code:
CC/8321: C1    If ($1E80($06B) [$1E8D, bit 3] is clear) or ($1E80($079) [$1E8F, bit 1] is set), branch to $CA5EB3 (simply returns)

I am testing the event right after locke leaves with terra from narshe at the start of the game, which means the event bits for the guardian have not occurred yet, and in theory should work just fine. But it's not happening at all, and Leo never vanishes either.

You have any ideas on what may be happening here? Thanks :p
 

#13
Posts: 161
Threads: 14
Thanks Received: 4
Thanks Given: 0
Joined: Sep 2010
Reputation: 5
Status
None
Ah ok I have several theories, but I think the first one is the issue.
Ok this is something I have kind of forgotten. But as you noted, every event square checks to see if a bit corresponding to it has been set. If it has, it executes the events following. If not, it ignores it.
So what I need to know, is the event sqaure your editing and then I'll find the commands to set the event bit in a hex editor. The main reason I need to look it up is b/c everything (especially numbers) are different in a hex editor than the event dump.
So once you find that, we'll need to find either a live scene in your game or make an NPC that sets that event bit so that whenever you step on the event square, it sees that it has been set, and then executes what comes up next.
What surprises me is that you said it actually did execute the text. Normally, that shouldn't have happened at all, so I'll give my second theory just to tinker with.

Whenever the event square says branch to CA5EB3, it's actually referring to a variable that just tells the event square to "return" at the end. Luckily, you don't have to study the variable. Just know the command for it - $FE.
Now what your saying is it's repeating?
This can be caused by multiple reasons, so we'll have to eliminate a good bit.
Anyways, this is what I propose:
After all the "If" statements in your hex editor, place an $FD all the way to the $FE. Actually, overwrite the $FE with an $FD. Use that last $FD as your flag to know when to not go over.
Anywways, go out and write this:

42, 10, 45, 4B, 00, 00, FE

I made this fairly simple. It says hide object 10 and then display dialogue message $00, and the $00 is the flag that tells the game to make it just a normal text box at the top of the screen. Then an $FE.
Now, depending on the length of the event square, you may have some more $FD's ahead of the FE. Just ignore them :p
Now concerning those Guardian event bits...hmm I'm not too sure if those are linked to that event square. I know that event bits aren't hardcoded to specific event squares but by what your saying, it should work...might need to look into this one myself.
Now test out the game, and if the same problem persists, then the first theory is more than likely the issue.
If all else fails, we can go to SlickProductions and see if Leno has any ideas.
But lets try to eliminate all possible variables.

P.S.
Concerning my last post, I'm just wanting to make sure you understand what I'm going for - like the instant the player enters the $0DF map, that event square right where there teleported to will execute an event square that "hides" the NPC a couple 5 more tiles ahead. Then once they walk up and step on the second event square, he'll appear and attak.
Lol I'm sure you did understand it all, just like to know ha I'm paranoid.


[Image: funnysiga.jpg]

MY YOUTUBE CHANNEL Laugh
http://www.youtube.com/user/xJCSx1
  Find
 

#14
Posts: 831
Threads: 41
Thanks Received: 16
Thanks Given: 12
Joined: Nov 2009
Reputation: 18
Status
None
(01-23-2011, 11:13 AM)xJCSx Wrote: Ah ok I have several theories, but I think the first one is the issue.
Ok this is something I have kind of forgotten. But as you noted, every event square checks to see if a bit corresponding to it has been set. If it has, it executes the events following. If not, it ignores it.
So what I need to know, is the event sqaure your editing and then I'll find the commands to set the event bit in a hex editor. The main reason I need to look it up is b/c everything (especially numbers) are different in a hex editor than the event dump.
So once you find that, we'll need to find either a live scene in your game or make an NPC that sets that event bit so that whenever you step on the event square, it sees that it has been set, and then executes what comes up next.
What surprises me is that you said it actually did execute the text. Normally, that shouldn't have happened at all, so I'll give my second theory just to tinker with.

Whenever the event square says branch to CA5EB3, it's actually referring to a variable that just tells the event square to "return" at the end. Luckily, you don't have to study the variable. Just know the command for it - $FE.
Now what your saying is it's repeating?
This can be caused by multiple reasons, so we'll have to eliminate a good bit.
Anyways, this is what I propose:
After all the "If" statements in your hex editor, place an $FD all the way to the $FE. Actually, overwrite the $FE with an $FD. Use that last $FD as your flag to know when to not go over.
Anywways, go out and write this:

42, 10, 45, 4B, 00, 00, FE

I made this fairly simple. It says hide object 10 and then display dialogue message $00, and the $00 is the flag that tells the game to make it just a normal text box at the top of the screen. Then an $FE.
Now, depending on the length of the event square, you may have some more $FD's ahead of the FE. Just ignore them :p
Now concerning those Guardian event bits...hmm I'm not too sure if those are linked to that event square. I know that event bits aren't hardcoded to specific event squares but by what your saying, it should work...might need to look into this one myself.
Now test out the game, and if the same problem persists, then the first theory is more than likely the issue.
If all else fails, we can go to SlickProductions and see if Leno has any ideas.
But lets try to eliminate all possible variables.

P.S.
Concerning my last post, I'm just wanting to make sure you understand what I'm going for - like the instant the player enters the $0DF map, that event square right where there teleported to will execute an event square that "hides" the NPC a couple 5 more tiles ahead. Then once they walk up and step on the second event square, he'll appear and attak.
Lol I'm sure you did understand it all, just like to know ha I'm paranoid.

Haha ok just to be clear, I'll make a video of what I got without the use of IF/ELSE statement. I'll post it here in this thread, so don't be paranoid lol.

What I did was erase all the event squares concerning the guardian in vector (there are three or five, that point to the address 28321, or CC/8321). But your first theory sounds like the source of the problem. Probably we can add a NPC that warns about barubary, a demon hidden in a cave, and then have the NPC activate the specific event.

But I don't want you messing around with hacking, or else your parents are going to be mad, you just tell me your ideas and I'll mess around with them.

Since the IF statement I'm using is
Code:
CC/8321: C1    If ($1E80($06B) [$1E8D, bit 3] is clear) or ($1E80($079) [$1E8F, bit 1] is set), branch to $CA5EB3 (simply returns)

Do I need to find the the address $1E80 and set bit 3? OR I also need to go to 1E8F and make sure that bit is clear?
OK Linky's here to what I've done with your help, but there are no IF/ELSE statements here.

http://www.youtube.com/watch?v=M2aA50rzrGk
 

#15
Posts: 161
Threads: 14
Thanks Received: 4
Thanks Given: 0
Joined: Sep 2010
Reputation: 5
Status
None
OK well first of all, I must congratulate you, this event looks superb for your first one! Once you get the base laid out, I suppose then you can add some extra stuff like an upbeat or ominous song with some screen shaking?
Idk all your game ha but anyways, putting my serious cap back on.
This is a somewhat weird event square compared to a normal one, but I think I see what needs to be done.
The event bit I believe you need to look at is this: $1E80($079) [$1E8F, bit 1].
What needs to be done near the end of the event square, BEFORE the $FE is placed, is the setting of this event bit. This is all my bad, should've remembered this. But things aren't always what they appear in the event dump so this is what it needs to look like in your hex editor to set that event bit.

$D0, $79

So after the battle was invoked and before the $FE you placed, but a $D0 $79. See if the event square has been set to not execute again. If not, awesome! If so, I think that OR statement should be an "and" statement.
If that's the case, then tell me and I'll hunt down the setting of the If ($1E80($06B) [$1E8D, bit 3] is clear sequence.
Now concerning making the NPC disappear, this is what I think you should script:

4D, XX, 3F, 42, 10, 45, 96, D0, 79, FE

You could always insert other things but what this does it after the fight is making NPC $10 vanish of course, despite the fact the map hasn't been restored via $96. Always write out any graphical actions you want for any NPCs after a fight before you insert a $96.
Nevertheless, this might work, if not then tell me and I'll hunt down this thing like crazy lolz.
But just know that the code above is just for the part where you have the $4D spot - it's not what I want you to replace from the beginning of the second event square, just the part starting with your $4D.
Anyways I must say congrats on the event so far, it's looking awesome! And the AI script on your Tube channel is excellent!

EDIT:
Hmm whichever IF/Else statement you provided was the event square that I was referring to that might/should not execute again. We'll have to do this for both event squares. So if the above code works, then awesome. Then just provide the code for the other event square and I'll find the "setting" bytes for it Wink. If none of it works...back to the drawing board lolz :p


[Image: funnysiga.jpg]

MY YOUTUBE CHANNEL Laugh
http://www.youtube.com/user/xJCSx1
  Find
 

#16
Posts: 831
Threads: 41
Thanks Received: 16
Thanks Given: 12
Joined: Nov 2009
Reputation: 18
Status
None
Yes, I got it to work (FINALLY LOL)

It looks like that in an event square, you cannot set and clear a variable at the same time. Crazy me, I wanted to do both at once lol. You can use one even to either set OR clear a bit, but not the two at the same time.

The screen shaking will not be seen in the dark room, I tried before and you can't notice lol. Gotta try the screen colors, though.

Question: Is there a way that I can make the boss appear VERY SLOWLY instead of re-appearing very fast? Something like "Start Appearing, pause 30 units, start appearing, pause 30 units, etc...."

Now I have to do the decision part (let the player choose between fighting barubary with one character or all 4 characters at the same time). I found the code that does this to be B6 XX XX XX YY YY YY. I just need to choose two addresses (XX XX XX YY YY YY) and code them.
 

#17
Posts: 161
Threads: 14
Thanks Received: 4
Thanks Given: 0
Joined: Sep 2010
Reputation: 5
Status
None
Sweet action xD Glad you figured it out - I wish I could tinker with the code and execution myself - would make this go by much faster but yeah...
Ha but glad you got it working! And idiotic me, I didn't even think about the screen shaking being in a dark room. I'm dumb like that :p
Screen colors sound cool, but I'm gonna explain what I think you should do with screen colors below.
To make the boss appear, vanish, and then re-appear was something I remember wanting to do so many times in my hack. I looked around like crazy for some subroutine or instructions that make such a thing possible, but I'd say that I'm about 89% sure you can't do it easily.
But there's an alternative that I think will work fairly well.
Try this code wherever you want Wink

B0, *03, 42, 10, 45, 91, F4, 67, 92, 41, 10, 45, B1, 92

I'll translate this I suppose Laugh

(B0) Execute the following (03) times (42) Hide Object (10) (45) Refresh Objects (91) Pause for 15 units (F4) Play sound effect (67) (92) Pause for 30 units (41) Show Object 10 (45) Refresh Objects (B1) End block of repeating commands (92) Pause for 30 units

Again this can be re-modified of course to your liking. I think this should work somewhat good with the timing, but not sure. The thing is the CPU is FAST - it can compute 1+1 just as fast as 100 + 100.
So those "pause" bytes can be changed to either 91, 92, 94, or 95. That's all in order of the time span - 95 being the longest units.
Hope this helped!

Now concerning the sequence where you want to execute the option for the player to fight solo or all together...hmm I'm not quite sure how to use this instruction.
As you already figured out, it indexes a set subroutine and the follows up with the result. I think you might need to ask Nattak or someone at Slick productions how this works. It might/probably is simple, but I don't wanna provide faulty code. And if your re-modifying the subroutine it branches to, it could be a little risky.
But post a Tube video when this is complete! Laugh


* The (03) can be changed to any number, it will tell the game how many times to execute the following bytes all the way to the (B1) and then it'll quit.


[Image: funnysiga.jpg]

MY YOUTUBE CHANNEL Laugh
http://www.youtube.com/user/xJCSx1
  Find
 

#18
Posts: 831
Threads: 41
Thanks Received: 16
Thanks Given: 12
Joined: Nov 2009
Reputation: 18
Status
None
(01-25-2011, 08:23 PM)xJCSx Wrote: Sweet action xD Glad you figured it out - I wish I could tinker with the code and execution myself - would make this go by much faster but yeah...
Ha but glad you got it working! And idiotic me, I didn't even think about the screen shaking being in a dark room. I'm dumb like that :p
Screen colors sound cool, but I'm gonna explain what I think you should do with screen colors below.
To make the boss appear, vanish, and then re-appear was something I remember wanting to do so many times in my hack. I looked around like crazy for some subroutine or instructions that make such a thing possible, but I'd say that I'm about 89% sure you can't do it easily.
But there's an alternative that I think will work fairly well.
Try this code wherever you want Wink

B0, *03, 42, 10, 45, 91, F4, 67, 92, 41, 10, 45, B1, 92

I'll translate this I suppose Laugh

(B0) Execute the following (03) times (42) Hide Object (10) (45) Refresh Objects (91) Pause for 15 units (F4) Play sound effect (67) (92) Pause for 30 units (41) Show Object 10 (45) Refresh Objects (B1) End block of repeating commands (92) Pause for 30 units

Again this can be re-modified of course to your liking. I think this should work somewhat good with the timing, but not sure. The thing is the CPU is FAST - it can compute 1+1 just as fast as 100 + 100.
So those "pause" bytes can be changed to either 91, 92, 94, or 95. That's all in order of the time span - 95 being the longest units.
Hope this helped!

Now concerning the sequence where you want to execute the option for the player to fight solo or all together...hmm I'm not quite sure how to use this instruction.
As you already figured out, it indexes a set subroutine and the follows up with the result. I think you might need to ask Nattak or someone at Slick productions how this works. It might/probably is simple, but I don't wanna provide faulty code. And if your re-modifying the subroutine it branches to, it could be a little risky.
But post a Tube video when this is complete! Laugh


* The (03) can be changed to any number, it will tell the game how many times to execute the following bytes all the way to the (B1) and then it'll quit.

I think that the option of fighting together or just one on one is not that difficult. In the case of one-on-one, just create a party consisting of only the one character with the code you sent me by email, right? The thing may be to not send the party members to the airship, but don't include them in the battle either.

But yeah as soon as I get some time I'll finish this and post it on YT, just waiting to see if Poco Loco is able to create the barubary sprite.
 

#19
Posts: 161
Threads: 14
Thanks Received: 4
Thanks Given: 0
Joined: Sep 2010
Reputation: 5
Status
None
Oh I see Wink
Yes that email should be enough to make a party, place characters in it, and set a party as the default one used for the menu and battles. So just make a second party and place whomever in there.
But don't worry about them being sent to the airship - as long as you don't follow up with a $3E to delete the characters originally in party 1, they'll still be in party 1.
So once you get all done with party 2 just write this out somewhere:
46, 01
And that'll make party 1 the default party. And the characters that were originally in party 1 will still be there.
But yeah how's the sprite coming along so far, Poco? :p Can't wait to see this all in action!


[Image: funnysiga.jpg]

MY YOUTUBE CHANNEL Laugh
http://www.youtube.com/user/xJCSx1
  Find
 

#20
Posts: 831
Threads: 41
Thanks Received: 16
Thanks Given: 12
Joined: Nov 2009
Reputation: 18
Status
None
JCS, you remember you said you were to start learning event hacking -in battles- before you decided to stop hacking?

I wonder if you could give me a brief introduction as to where to look for those events coded in battles. I don't think they're labeled as regular events (for example, those battles that you fight kefka while using his character sprite at the imperial camp and the sealed gate) since they don't appear in the event dump.

Thanks for your time man :p
 



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite