Users browsing this thread: 2 Guest(s)
Event Hacking question

#41
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
(07-16-2013, 02:41 PM)ribbits Wrote: hmm this seems to be causing me some confusion. If I understand you need to have it an event thats already defined, and it needs to point whatever I want to happen when he's talked to. For ease sake at the moment, I'd like to have it so its just him saying something incoherrent and Umaro-esque (caveman gibberish).

This is the line in the event dump that i am looking at, is it wrong?
CB/1B4E: D0 Set event bit $1E80($05C) [$1E8B, bit 4]

you said it was pointing to CB/E8B4 - what am I missing?

I have homework for you to do:

First, in FF3LE, change Umaro's event to 20946. Also, move him somewhere there is a fair amount of space to avoid collisions during your assignment, your character is going to be moving. Then run your game and talk to Umaro from below, see what happens.

Next go to the EventScriptTxt.txt and look up the address CC/0946. Read what it says until you get to "FE Return". The Return command is what ends an event. Meaning the game will keep running line after line of code until it hits FE. It's a short set of commands and you don't really need to worry about what it all means, just read the descriptions. Does it sound like an accurate description of what you saw?

Now comes the Math. Why did Event 20946 start running code at CC/0946? First drop the "/", it makes it a little easier to see as a complete number... CC0946. Now events begin at CA0000 and all of the events are offset by this number... Meaning if you wanted to run code starting at CA/0001, you would get Event 1. CA/0123 is Event 123. If you want code to start running at CB/5555 you would use Event 15555 (CB - CA = 1, then 5555). So then CC0946 - CA0000 = 20946. Make sense?

So then let's put this into practice: I want you to look up in EventScriptTxt.txt the commands starting at CB/6906. Read it and write out what you think will happen when you set Umaro to this event code. What line will the code stop running? and finally, using the method I showed you above, what Event # will run the code starting at CB/6909? Write all of these answers down, put the event number on Umaro in LE and run your game. What happened?

Once you are done with this we will talk about the dialogue command, editing text and FF3usME, and making your own event for Umaro.

Happy Hacking!
  Find
Quote  

#42
Posts: 174
Threads: 23
Thanks Received: 0
Thanks Given: 6
Joined: Feb 2011
Reputation: 0
Status
None
(07-16-2013, 03:13 PM)Synchysi Wrote: The event field is for an offset; it has nothing to do with event bits. You said you changed his event to 1E8B4. Remember that these are all relative to bank CA, so to find the event it's pointing to, you would add 1E8B4 to CA/0000:

CA0000 + 1E8B4 = CBE8B4

You can do hexadecimal arithmetic fairly easily in Windows calculator, if you're using Vista or later.

So to in actuality i'm looking for the event 11B4E (CB/1B4E -CA000), correct? Its the event just prior to the coin flip scene where Setzer puts Celes in the room and says he'll come back later. This should make Umaro visible because the event is already defined by previous coding, correct?

EDIT- well 11B4E displays umaro still, but when I talk to him it awkwardly goes through the previous scene. Once that's completed, I am back at the "empires made me a rich man scene." So not it either.

Quote:Now, to have Umaro saying something unintelligible, you would need to write your own event for it. The captions already exist for this sort of thing, so all you'd need to do is write a caption call event. You can find many, many examples of this in the event dump.

by a caption call are you referring to 'display dialogue'? or something else entirely.


Quote:
Quote:Heres the all the hex work I have done:
In CA/AE2E (AB02E):
D0 00 C0 27 01 1C 1E 01

In CB/2221 (B2421):
Inserted - B2 30 02 27
Overwrote - 94 5A 08 5C (what was overwritten) ********

In F1/0230 (310430):
Inserted: 94 5A 08 5C (the stuff I overwrote) *********
Inserted: D0 7E D4 ED D4 FD D1 00 FE

In level editor:
On NPC 19 (umaro)
X,Y: 9,8
Event: 1E8B4
'If Mem Set'
Address: 1E80
Bit: 0

What I have overwritten is by the *******

At a glance I don't see anything wrong with that. Your game is crashing well before that, though, so you may have inadvertently changed something at a different address.

If you can't revert it back to normal (by comparing it with an unmodified ROM), your best bet may be to continue your work on a fresh ROM.

I may have to try on a fresh rom to see if that solves the crashing. How can you tell that the game is crashing before hand already?
  Find
Quote  

#43
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(07-16-2013, 03:35 PM)ribbits Wrote: So to in actuality i'm looking for the event 11B4E (CB/1B4E -CA000), correct? Its the event just prior to the coin flip scene where Setzer puts Celes in the room and says he'll come back later. This should make Umaro visible because the event is already defined by previous coding, correct?

It's not the event that display Umaro but the appearance bit. The event is what is happening when you talk to Umaro like a dialogue or the movement of the character or any other action. You'll have to code your own but it can be only a dialogue box showing with some text. Now you're saying you want Setzer to put Celes in the room when you talk to Umaro?!?

Edit: If you're doing this only for testing purpose, it may lead to a game crashing depending what is in the event you're giving to a NPC, e.g. a character that is not not there and require to be.
  Find
Quote  

#44
Posts: 290
Threads: 3
Thanks Received: 40
Thanks Given: 1
Joined: Apr 2012
Reputation: 9
Status
None
(07-16-2013, 03:35 PM)ribbits Wrote: So to in actuality i'm looking for the event 11B4E (CB/1B4E -CA000), correct? Its the event just prior to the coin flip scene where Setzer puts Celes in the room and says he'll come back later. This should make Umaro visible because the event is already defined by previous coding, correct?

EDIT- well 11B4E displays umaro still, but when I talk to him it awkwardly goes through the previous scene. Once that's completed, I am back at the "empires made me a rich man scene." So not it either.

The event field is what gets executed when you interact with the NPC. It has nothing to do with whether s/he should be present.

Read Edrin's post above. It's a good tutorial to beginner's event hacking and should give you a better idea of how all these different elements interact.

Quote:by a caption call are you referring to 'display dialogue'? or something else entirely.

Correct. 'Dialogue message' and 'caption' are interchangeable terms in this case.

Quote:I may have to try on a fresh rom to see if that solves the crashing. How can you tell that the game is crashing before hand already?

Mainly because of what you said earlier about the game crashing at the coin flip. That happens well before any of your changes were implemented.


GET A SILK BAG FROM THE GRAVEYARD DUCK TO LIVE LONGER.

Brave New World
  Find
Quote  

#45
Posts: 174
Threads: 23
Thanks Received: 0
Thanks Given: 6
Joined: Feb 2011
Reputation: 0
Status
None
(07-16-2013, 05:23 PM)Madsiur Wrote: Now you're saying you want Setzer to put Celes in the room when you talk to Umaro?!?

No, I was just playing around with the different events. I only want Umaro present in the coin flip scene and have him join afterwards. In the future when I understand more, then maybe to have to battle him to join instead of the coin toss.

I will do Edrin's homework, I totally missed his post.

THANK YOU to ALL of you who have had patience and with me. Your input is much appreciated! You guys are great!
  Find
Quote  

#46
Posts: 174
Threads: 23
Thanks Received: 0
Thanks Given: 6
Joined: Feb 2011
Reputation: 0
Status
None
(07-16-2013, 03:34 PM)Edrin Wrote: I have homework for you to do:

First, in FF3LE, change Umaro's event to 20946. Also, move him somewhere there is a fair amount of space to avoid collisions during your assignment, your character is going to be moving. Then run your game and talk to Umaro from below, see what happens.

Next go to the EventScriptTxt.txt and look up the address CC/0946. Read what it says until you get to "FE Return". The Return command is what ends an event. Meaning the game will keep running line after line of code until it hits FE. It's a short set of commands and you don't really need to worry about what it all means, just read the descriptions. Does it sound like an accurate description of what you saw?

when i talked to Umaro I went diagonal down across the screen and disappeared off screen.

Quote: Now comes the Math. Why did Event 20946 start running code at CC/0946? First drop the "/", it makes it a little easier to see as a complete number... CC0946. Now events begin at CA0000 and all of the events are offset by this number... Meaning if you wanted to run code starting at CA/0001, you would get Event 1. CA/0123 is Event 123. If you want code to start running at CB/5555 you would use Event 15555 (CB - CA = 1, then 5555). So then CC0946 - CA0000 = 20946. Make sense?


yes, this makes sense.

Quote: So then let's put this into practice: I want you to look up in EventScriptTxt.txt the commands starting at CB/6906. Read it and write out what you think will happen when you set Umaro to this event code. What line will the code stop running?

what i think will happen- when I talk to Umaro, the party will move straight back in a jumping motion fast. It will be 1 tile backwards. Player will get walkign control back after this. Then a dialogue box will come up that says 'Yaaaouch!!!'
code stops running at CB/6911 with the hex FE

Quote: finally, using the method I showed you above, what Event # will run the code starting at CB/6909? Write all of these answers down, put the event number on Umaro in LE and run your game. What happened?

event 16909 will run the code at CB/6909
what happened -dialogue box appeared with sabin eating. then an hp/mp recover message with the shimmer effect. Setzer then moved to the right off the screen and then came back.
  Find
Quote  

#47
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
Ok, you appear to be getting the right answers, but something doesn't seem to be working right, try again with a fresh ROM as Synchysi suggested, if you are still having the same problem, send me a copy of your ROM and I will take a look. Also maybe try putting the same events on another NPC in a totally different part of the game and see if you get the same results.
  Find
Quote  

#48
Posts: 174
Threads: 23
Thanks Received: 0
Thanks Given: 6
Joined: Feb 2011
Reputation: 0
Status
None
(07-17-2013, 11:51 AM)Edrin Wrote: Ok, you appear to be getting the right answers, but something doesn't seem to be working right, try again with a fresh ROM as Synchysi suggested, if you are still having the same problem, send me a copy of your ROM and I will take a look. Also maybe try putting the same events on another NPC in a totally different part of the game and see if you get the same results.

All of your homework on a fresh rom?
  Find
Quote  

#49
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
Yeah, lets try that, grab a fresh ROM, change some random NPC to the events I have on there and check that first... if its working, go make your changes where you are going from the Opera House directly to Setzer and Umaro and do it again... see if Umaro does the same thing as the random NPC you tried it on first and that it's actually what the event script says it should be.

Edit: Aha... I typoed... it should be BC/6906, not BC/6909... For the first one, you should have only moved right 2 squares, so double check and make sure you have the correct event ID in there and that you have at least 2 spaces of walkable space next to you.
  Find
Quote  

#50
Posts: 174
Threads: 23
Thanks Received: 0
Thanks Given: 6
Joined: Feb 2011
Reputation: 0
Status
None
(07-17-2013, 12:58 PM)Edrin Wrote: Edit: Aha... I typoed... it should be BC/6906, not BC/6909... For the first one, you should have only moved right 2 squares, so double check and make sure you have the correct event ID in there and that you have at least 2 spaces of walkable space next to you.

you have BC/6906, is that what you meant or CB/6906

I just changed the event ID to CB/6906 and it was 2 squares back saying yaaouch! This was not on a fresh rom yet though. That I will do shortly.
  Find
Quote  



Forum Jump:

Users browsing this thread: 2 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite