Toggle shoutbox Shoutbox
|
Event Assembler Help
#1
Posted 21 April 2012 - 03:44 PM
My code for the Event assembler. I'm trying to load Lyn into a custom map at a specific point on the map however, it wont work properly.
#define DISABLE_TUTORIALS
#include EAstdlib.event
EventPointerTable(0x06,Pointers)
ORG 0xD80000
Pointers:
POIN Turn_events
POIN Character_events
POIN Location_events
POIN Misc_events
POIN BallistaData BallistaData
POIN Bad Bad Bad Bad
POIN Good Good Good Good
POIN Opening_event Ending_event
Bad:
UNIT
Good:
UNIT Lyn_t LynLord 0x00 Level(1,Ally,False) [03,10] [03,10]
[IronSword,Vulnerary] [0x00,0x00,0x00,0x00]
UNIT
Turn_events:
TurnEventPlayer(0x00,Opening_event,01)
TURN
Character_events:
CHAR
Location_events:
LOCA
Misc_events:
CauseGameOverIfLordDies
AFEV
Opening_event:
LOU1 Good
ENUN
ENDA
Ending_event:
MNCH 0x0F
ENDA
BallistaData:
BLST
ALIGN 4
#2
Posted 21 April 2012 - 04:57 PM
CODE |
Good: UNIT Lyn_t LynLord 0x00 Level(1,Ally,False) [03,10] [03,10] [IronSword,Vulnerary] [0x00,0x00,0x00,0x00] UNIT |
Also, you should replace MNCH 0x0F with
CODE |
MoveToChapter(0x0F) //I'd recommend making your own definitions file and defining 0x0F as a chapter~ |
#3
Posted 21 April 2012 - 10:15 PM
QUOTE (Aura Wolf @ Apr 21 2012, 11:57 AM) | ||||
Lyn's data needs to be on one line.
Also, you should replace MNCH 0x0F with
|
Thanks for your reply. Okay I got that to work and then also fixed the black screen starting fix with the OOBB command. I'm trying to learn this all from watching arch's tutorials on YouTube and The Ultimate Tutorials 1&2 from Blazer. So my next question is for offsets do I have to use free space or can i just write over the previous game chapters and edit them?Also you mentioned creating your own definitions and defining them with their Name + Hex ID. Do I just add # name of the file containing the definitions to my chapter events and place that in the same folder or is it something else? Next , I have FEditor Adv to text manipulation ,but i just cant figure out how it works. The tutorial doesn't explain what each index value is ,where to save the pictures, or how to upload/create new portraits. I know this is a lot of questions but if you can answer even one it would be very helpful.
Thanks again guys
#4
Posted 21 April 2012 - 10:52 PM
I'm assuming for your second question you're asking how to use your custom definitions.
So, you have your file with crap like:
CODE |
//Enemies #define GenericEnemy 0x76 //Chapters #define Chapter_1 0x0F |
After that, give the definitions file a name if you haven't already. Copy the name and put #include in your events by this area:
CODE |
#define DISABLE_TUTORIALS #include EAstdlib.event |
After the #include you made, paste the name of the definitions file and put .txt after it if it doesn't already. So it should look something like this:
CODE |
#define DISABLE_TUTORIALS #include EAstdlib.event #include MyDefinitions.txt |
For the FEditor questions:
1. The index values are basically the..."slots" for convos. You don't need to know where they are in the ROM iirc (As in, what offset they're at).
2. I'm assuming "pictures" = "sprites"? You just insert the sprites over the game's.
3. All you need to do to create one is follow a certain format the game follows. If you don't know what it is, dump one of the original portraits somewhere and follow that.
(Veterans, feel free to correct me on anything )
#5
Posted 21 April 2012 - 11:41 PM
Signature thanks to Shu.
#6
Posted 22 April 2012 - 12:03 AM
Aura - Added those two things plus 2 enemy units since I couldn't get the "Bad Units" to work properly.
#define DISABLE_TUTORIALS
#include EAstdlib.event
EventPointerTable(0x06,Pointers)
ORG 0xD80000
Pointers:
POIN Turn_events
POIN Character_events
POIN Location_events
POIN Misc_events
POIN BallistaData BallistaData
POIN Bad Bad Bad Bad
POIN Good Good Good Good
POIN Opening_event Ending_event
Bad:<<< I tried to edit this but it said bad not found in scope
UNIT
UNIT
Good:
UNIT Lyn_t 0x11 0x00 Level(5,Ally,False) [05,10] [05,10] [IronSword,Vulnerary,Elixir,0x00] [0x00,0x00,0x00,0x00]
UNIT Hector 0x3B 0x00 Level(5,Ally,False) [06,10] [06,10] [IronAxe,Vulnerary,Speedwings,0x00] [0x00,0x00,0x00,0x00]
UNIT Batta Brigand 0x00 Level(5,Enemy,False) [04,04] [04,04] [IronAxe,Vulnerary,Speedwings,0x00] [0x00,0x00,0x00,0x00]
UNIT Eliwood Soldier 0x00 Level(5,Enemy,False) [05,04] [05,04] [IronAxe,Vulnerary,Speedwings,0x00] [0x00,0x00,0x00,0x00]
UNIT
Turn_events:
Turn 0x00 Opening_event [01,00] 0x0 0x00
TURN
Character_events:
CHAR
Location_events:
House(0x05,House1,5,4)
Chest(Vulnerary,13,4)
LOCA
Misc_events:
CauseGameOverIfLordDies
AFEV
Opening_event:
LOU1 Good
OOBB
ENUN
ENDA
House1:<<<copied the info from the tutorial but I'm not sure if i can just use these values or do I have to edit them too in feditor adv.
FADI 10
BACG 0X02
FADU 10
TEX1 0X0810
REMA
WEA1 0X04
ENDA
Ending_event:
MNCH 0x01
ENDA
BallistaData:
BLST
ALIGN 4
MESSAGE Events end at offset currentOffset
//The map for this chapter is at offset: DA0000
#7
Posted 22 April 2012 - 12:16 AM
QUOTE |
UNIT UNIT |
Get rid of the bottom UNIT.
Now, for the chest and house problem. Did you count correctly? 0,0 is the nw corner of the map.
Also, there are bits that you can use a macro. Like this:
CODE |
[0x00,0x00,0x00,0x00] Lyn_t 0x11 Hector 0x3B |
can be:
CODE |
NoAI Lyn_t Swordmaster_F Hector Berserker |
Heck, teh Lyn_t and Hector can be a different macro as well.
#8
Posted 22 April 2012 - 12:18 AM
QUOTE (Aura Wolf @ Apr 21 2012, 07:16 PM) | ||
Get rid of the bottom UNIT. Now, for the chest and house problem. Did you count correctly? 0,0 is the nw corner of the map. |
Fixed the UNIT part.
Finished.
Messages:
Original ending offset is 13239684 and the new ending offset is CURRENTOFFSET
Original ending offset is 13239772 and the new ending offset is CURRENTOFFSET
Original ending offset is 13240160 and the new ending offset is CURRENTOFFSET
Original ending offset is 13267369 and the new ending offset is CURRENTOFFSET
Original ending offset is 13267723 and the new ending offset is CURRENTOFFSET
Original ending offset is 13268208 and the new ending offset is CURRENTOFFSET
Original ending offset is 13269502 and the new ending offset is CURRENTOFFSET
Original ending offset is 13269536 and the new ending offset is CURRENTOFFSET
Original ending offset is 13269968 and the new ending offset is CURRENTOFFSET
Original ending offset is 13270092 and the new ending offset is CURRENTOFFSET
Original ending offset is 13270272 and the new ending offset is CURRENTOFFSET
Original ending offset is 13271820 and the new ending offset is CURRENTOFFSET
Original ending offset is 13392800 and the new ending offset is CURRENTOFFSET
No errors or warnings.
Please continue being awesome.
I get that in Event Assembler report.
#9
Posted 22 April 2012 - 12:22 AM
EDIT: However, I'll try to help with the confusion in the shoutbox.
Yeah, it's his hex id.
So you know Nightmare, where Marcus has the hex id 0x1A, right? If, for example, I were to have some character called George occupy that slot, you don't have to use the macro Marcus. Instead, you could use George after defining it.
CODE |
#define George 0x1A |
One slot doesn't have to be for just one character; a slot can be for generics. However, if you wanted some generics to have +1 spd and some to have +1 def, you'd have to use two slots.
#10
Posted 22 April 2012 - 02:02 AM
I need more details on the problem itself though; what happens, when exactly does it happen, etc.
Signature thanks to Shu.
#11
Posted 22 April 2012 - 07:38 AM
What I noticed is when I kill the Boss instead the game hangs and the cursor disappears. I made a definition list also but haven't added much to it yet.
I was wondering about whether the code for all the chapter is in one file or is it a bunch of files that you have to assemble to the same rom before playing.
My process in getting to the first chapter after the prologue was inserting a map made by mappy into the game using mar inserter. Then I changed the value of the reference table from w.e it was to where I stored the map (da0000). Next I changed the tile set schemes or I'm not sure what they are called. Then i changed the Codes for where the events for the prologues were stored in the references + the chapter 1 map. Lastly, I added a new Chapter 1 events part to my existing prologues text file. Changed the 0x06 to 0x09 + the offset to 0xD80040 for events and changed that in nightmare as well. Leading me to this simple yet bizarre situation. No error comes up in Event assembler but the game like I said hangs.
Image: Lyn is frozen, Berserker is not. However, I have no control anything.
I added both the Prologue Code+Chapter 1 Code here:
#define DISABLE_TUTORIALS
#include EAstdlib.event
#include Definitions.txt
EventPointerTable(0x06,Pointers)
ORG 0xD80000
Pointers:
POIN Turn_events
POIN Character_events
POIN Location_events
POIN Misc_events
POIN BallistaData BallistaData
POIN Bad Bad Bad Bad
POIN Good Good Good Good
POIN Opening_event Ending_event
Bad:
UNIT
Good:
UNIT Lyn_t 0x11 0x00 Level(5,Ally,False) [05,10] [05,10] [IronSword,Vulnerary,Elixir,ChestKey] [NOAI]
UNIT Hector 0x3B 0x00 Level(5,Ally,False) [06,10] [06,10] [IronAxe,Vulnerary,Speedwings] [NOAI]
UNIT Batta Brigand 0x00 Level(5,Enemy,False) [04,04] [04,04] [IronAxe,Vulnerary,Speedwings] [NOAI]
UNIT Eliwood Soldier 0x00 Level(5,Enemy,False) [05,04] [05,04] [IronAxe,Vulnerary,Speedwings] [NOAI]
UNIT
Turn_events:
//Turn 0x00 Opening_event [01,00] 0x0 0x00
TurnEventPlayer(0x00,Opening_event,1)
TURN
Character_events:
CHAR
Location_events:
Chest(Vulnerary,13,4)
LOCA
Misc_events:
CauseGameOverIfLordDies
DefeatBoss(0x01)
AFEV
Opening_event:
LOU1 Good
OOBB
ENUN
ENDA
Ending_event:
MNCH 0x01
ENDA
BallistaData:
BLST
ALIGN 4
MESSAGE Events end at offset currentOffset
//The map for this chapter is at offset: DA0090
#define DISABLE_TUTORIALS
#include EAstdlib.event
//#include Definitions.txt
EventPointerTable(0x09,Pointers)
ORG 0xD80040
Pointers:
POIN Turn_events
POIN Character_events
POIN Location_events
POIN Misc_events
POIN BallistaData BallistaData
POIN Bad Bad Bad Bad
POIN Good Good Good Good
POIN Opening_event Ending_event
Bad:
UNIT
Good:
UNIT Lyn_t 0x11 0x00 Level(5,Ally,False) [04,05] [04,05] [IronSword,Vulnerary,Elixir,ChestKey] [NOAI]
UNIT
Turn_events:
//Turn 0x00 Opening_event [01,00] 0x0 0x00
TurnEventPlayer(0x00,Opening_event,1)
TURN
Character_events:
CHAR
Location_events:
Chest(Vulnerary,13,4)
LOCA
Misc_events:
CauseGameOverIfLordDies
DefeatBoss(0x03)
AFEV
Opening_event:
LOU1 Good
OOBB
ENUN
ENDA
Ending_event:
MNCH 0x01
ENDA
BallistaData:
BLST
ALIGN 4
MESSAGE Events end at offset currentOffset
//The map for this chapter is at offset: DA0000
#12
Posted 22 April 2012 - 07:51 AM
Right Click and chose open in new tab to view.
#13
Posted 22 April 2012 - 01:29 PM
QUOTE |
DefeatBoss(0x01) |
Change this to:
CODE |
DefeatBoss(Ending_event) //The "() is where you put the pointer to the ending event. |
QUOTE |
Next I changed the tile set schemes |
In which module? If it's the Chapter Data editor, you're fine, but if it's the Event References.... ._.
QUOTE |
Changed the 0x06 to 0x09 |
Did you change this in the Chapter Data editor for that chapter?
#14
Posted 22 April 2012 - 01:39 PM
Yea, the tile set was changed in the chapter editor, the event references table doesn't have that option anyway. For the part with 0x06 to 0x09 I changed that in the chapter 1 events folder + the offset. Then I went into the refaces table and under chapter 1 events I used the same offset. And yes for the data editor I made sure I optioned the part at the top and chose chapter 1 : there I changed the scheme but I didn't see an option to change the refences unless you meant event references chapter 1. That was already there so I left it alone.
#15
Posted 22 April 2012 - 02:33 PM
You're inserting data at 0xD80000 for the prologue. Right after, you're inserting data at 0xD80040. That's hardly ANY space for events.
In other words, the chapter 1 events are overwriting/replacing the prologue events. This is because you didn't give enough space in between them. Thus you have to ask yourself "how much space do I need?". What I usually do here is finish writing the first chapter events, and then give myself a bunch of extra space in case I need it later.
Here's what you should do:
1) Download a hex editor if you haven't already. HxD is my preferred one and the one I can help you with.
2) Drag your ROM into the hex editor or use Ctrl+O to load the ROM.
3) Go to your first events' starting offset. In this case, yours is "0xD80000". You should see a bunch of data, but you won't know what it means, most likely.
4) Scroll down until you see a bunch of "00's". Not just a few, like 4 or 8, but like, 20 or 30. That's what you SHOULD see if the space you're using is free space; if you never see 00's even after a long time of scrolling, then you've screwed up on a much larger scale.
5) When you see a large bunch of 00's, the events have ended. -for now-. The thing is, you'll want to add more stuff to it later. Thus what you should do is approximate how much space you might ever need, and then some, and make up a new offset to insert your new set of events at. Thus when you insert chapter 1 events, they'll be so far away from the Prologue events that you should never have to worry about one of them overwriting the other.
e.g. if my events end at
0xD81000 (you can see this offset at the bottom of the hex editor or to the left of the hex editor, btw, IIRC)
I'd give myself until maybe 0xD81500 before I start the next one.
Granted in YOUR chapter you've only just started the basics, right? Like I don't see any enemy units and I only see the bare-bones of other events. So I'd give yourself maybe double or even more space depending on what you have planned--and usually giving yourself extra doesn't hurt because you can always juts add more space to the ROM if you need it. You're VERY unlikely to EVER run out of space, or get even close.
So hypothetically (you have to do this process on your own; I'm just making this up as I go) we're giving until about 0xD81500 for your prologue events. Thus your chapter 1 events should start at 0xD81500. How do you apply this? Change the second offset from 0xD80040 (which is hardly ANY space) to 0xD81500. Then continue.
Also I have this feeling that I should make a -video- walkthrough since even if you're following Arch's tutorial or my tutorial, it's still hard to follow, and even now when you're explaining stuff, I hardly have any idea what you're talking about, so yeah... >_<
EDIT: Just so you know the line you have to change is this:
CODE |
ORG 0xD80040 |
Furthermore, whenever using free space, whether it's for events, graphic editing, miscellaneous data, or anything else, ALWAYS check to see if something is there and how much space there is. One great way to cause glitches or lose data is to insert over things you're not supposed to. If you think you're going to forget offsets, write them down! I have plenty of doc on what offsets I've used, and I've even dedicated entire sections to various things, such as entire sections of the ROM for graphics, music, events, etc... This is just like, uh, good "hacking ettiquette" I guess, all it really does is help you and prevent yourself from breaking your game past repair (or to the point where it gets really annoying to fix, at least). Note that I've *NEVER* had to restart a hack from scratch because I've always either prevented those crazy glitches OR I've managed to fix them because I know where my data is and when I go to the ROM in a hex editor I'm not clueless about what's going on.
Signature thanks to Shu.
#16
Posted 22 April 2012 - 02:42 PM
#17
Posted 22 April 2012 - 02:51 PM
#18
Posted 22 April 2012 - 03:15 PM
In order to make enemy units, you insert them just like you did allied units, but under the "Bad" category.
"UNIT" by itself loads a blank unit, it's a separator. it means "this is the end of the unit list". Since all you have is
QUOTE |
Bad: UNIT |
It says
"load the bad unit list"
"end the bad unit list"
with nothing in between, which is why there aren't any enemies.
So add UNIT codes to make enemies.
e.g.
CODE |
UNIT Lyn_t 0x11 0x00 Level(5,Ally,False) [05,10] [05,10] [IronSword,Vulnerary,Elixir,ChestKey] [NOAI] |
However you don't want to load characters like "Lyn", you're just going to load a bunch of generic bad guys. As for which character hex they have, pick a generic enemy unit from the Character Editor Nightmare module, and edit that guy as you like, then just use him a bunch of times. For the prologue you may want to use like, enemy 0x88. Be sure to change the levels, allegiances, starting locations, and inventory as well. Enemies also need more AI than allies--if you want them to attack within range or stay where they are without moving, you have to tell them to with the appropriate AI codes, which you can look up somewhere (I think some tutorial has them, probably Arch's).
here's an example from chapter 24 of my hack:
QUOTE |
EnemyUnitsENM: UNIT 0x3D 0xD 0x0 0x74 [0,1] [0,1] [0x90,0x4,0x63,0x0] [0x3,0x3,0x9,0x20] UNIT 0xC3 0x30 0x0 0x2D [21,10] [21,10] [0x30,0x33,0x0,0x0] [0x0,0x3,0x9,0x0] UNIT 0xC3 0x26 0x0 0x2D [6,15] [6,15] [0x45,0x46,0x0,0x0] [0x0,0x3,0x9,0x0] UNIT 0x12 0x26 0x0 0x42 [16,18] [16,18] [0x48,0x47,0x6C,0x0] [0x0,0x0,0x0,0x0] |
UNIT 0x3D = the boss. THe boss is also an enemy. He's usually at the beginning or end of the list.
UNIT 0xC3 are generic enemies. I just use the same character ID since they are generic, and then change the class, co-ordinates, level, etc., for each one. It takes a while but you should think through them--how strong they are, where they are, what weapons they have, and how they move (AI) are what make the game hard or easy or annoying! It's the gameplay! The challenge!
The last unit there, UNIT 0x12, is an NPC. Include NPC's in the enemy list, usually. Note that depending on how the chapter works you may want to include them separately instead of loading them with the bad guys. Usually though, if battle preparations are on and an NPC starts on the map on turn 1, you put them in the enemy unit list.
Hopefully that explains enough!
And I know you're not dumb, I'm just trying to be thorough! And watching a vid 8 times is a lot, though I do appreciate that you're putting forth a lot of effort on your own!
EDIT: though really, I didn't even really know there was a video event tutorial... I guess I don't have to make one now
Signature thanks to Shu.
#19
Posted 22 April 2012 - 03:22 PM
#20
Posted 22 April 2012 - 03:28 PM
it's called "Bad" not "bad" or "BAD", so you have to load it as such.
also my tutorial can't be 3-4 years outdated, the program wasn't even out that long, and my tutorial is only like a year old lol
and it's an NPC because of the 4th byte, which you can use a macro for:
CODE |
Level(5,NPC,False) |
which means "set this person to level 5, an NPC, withOUT autoleveling" ("False"=no autoleveling)
Signature thanks to Shu.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users