Jump to content

Event Assembler Questions Thread


CT075
 Share

Recommended Posts

I would like to change a unit's affiliation but don't know how to use the command CUSI correctly.

I have read this:

CUSI, 0x65, 12, -game:FE7 -indexMode:8

Character, 4, 2

Affiliation, 8, 2

And then I wrote this:

CUSI, 0x65, 12, -game:FE7 -indexMode:8

Wallace, 4, 2

NPC, 8, 2

However,it didn't work.What's the problem?I'd appreciate it if anyone can help me.

Link to comment
Share on other sites

  • Replies 3.3k
  • Created
  • Last Reply

Top Posters In This Topic

It can be found in "Event assembler\Language raws\Units\Change affiliation.txt"

My script which are associated with the problem:

Character_events:

CharacterEvent(0x10,Lyn_tTalkToWallace,Lyn_t,Wallace)

END_MAIN

Lyn_tTalkToWallace:

ScrollText(0x133E)

CUSI, 0x65, 12, -game:FE7 -indexMode:8

Wallace, 4, 2

NPC, 8, 2

ITGM BraveBow
ENDA

========================

Test Result:

After the text was shown,the game reseted.

And then I modify it to this:

----------------------------------------

Lyn_tTalkToWallace:
ScrollText(0x133E)
ITGM BraveBow
ENDA

-------------------------------------------

Test Result:It worked without any bugs.(Of course the Wallace's affiliation didn't change= =)

=============================================

The Whole Script:

//Made by markyjoe1990 of Youtube
//Modified by Nintenlord

#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 TrapData TrapData
POIN Bad Bad Bad Bad
POIN Good Good Good Good
POIN Opening_event Ending_event

Bad:
UNIT

Good:
UNIT

Turn_events:
OpeningTurnEvent(Opening_event)
END_MAIN

Character_events:
CharacterEvent(0x10,Lyn_tTalkToWallace,Lyn_t,Wallace)
END_MAIN

Location_events:
Seize(9,9)
END_MAIN

Misc_events:
CauseGameOverIfLordDies
END_MAIN

Opening_event:
OOBB
LOU1 Lord
LOU1 Boss
LOU1 Enemies
ENDA

Ending_event:
MoveToChapter(Final_pt1)
ENDA

Lord:
UNIT Lyn_t Sniper_F Lyn_t Level(1,Ally,False) [19,19] [19,19] [EmblemBow,Rienfleche,Longbow,Vulnerary] NoAI
UNIT Empty

Boss:
UNIT Lyn BladeLord Lyn Level(20,Enemy,False) [9,9] [9,9] [RuneSword,WoDao,KillerBow,Elixir] GuardTile
UNIT Empty

Enemies:
UNIT Rebecca Sniper_F Lyn Level(5,Enemy,True) [0,19] [0,19] [EmblemBow] AttackInRange
UNIT Dart Berserker Lyn Level(10,Enemy,True) [2,19] [2,19] [KillerAxe] PursueWithoutHeed
UNIT Nino Sage_F Lyn Level(4,Enemy,True) [2,19] [2,16] [bolting,Physic] HealUnits
UNIT Farina FalcoKnight Lyn Level(10,Enemy,True) [9,8] [16,16] [silverSpear] PursueWithoutHeed
UNIT Fiora FalcoKnight Lyn Level(10,Enemy,True) [9,8] [3,14] [braveSpear] PursueWithoutHeed
UNIT Jaffar Assassin Lyn Level(18,Enemy,True) [2,19] [1,8] [KillingEdge] PursueWithoutHeed
UNIT Wallace General Lyn Level(5,NPC,True) [19,4] [16,2] [Javelin] Guard
UNIT MorphDarin General Lyn Level(20,Enemy,True) [3,2] [3,2] [RexHasta] Guard
UNIT Sonia Sage_F Lyn Level(15,Enemy,True) [3,14] [3,14] [Fimbulvetr] Guard
UNIT Limstella UberSage Lyn Level(18,Enemy,True) [14,14] [14,14] [Fimbulvetr,Physic] HealUnits
UNIT MorphLloyd Swordmaster Lyn Level(20,Enemy,True) [14,4] [14,4] [RegalBlade] Guard
UNIT MorphLinus Hero Lyn Level(20,Enemy,True) [13,4] [13,4] [Tomahawk,BraveSword] Guard
UNIT MorphUrsula Valkyrie Lyn Level(20,Enemy,True) [5,4] [5,4] [Excalibur,Fortify] HealUnits
UNIT Nergal DarkDruid Lyn Level(20,Enemy,True) [5,12] [5,12] [Ereshkigal] Guard
UNIT

Lyn_tTalkToWallace:
ScrollText(0x133E)
ITGM BraveBow
ENDA

TrapData:
FIRE [8,10] 0x0 [1,1]
FIRE [9,10] 0x0 [1,1]
FIRE [9,11] 0x0 [1,1]
FIRE [9,12] 0x0 [1,1]
GAST [1,16] 0x2 [1,1]
GAST [16,16] 0x3 [1,1]
GAST [16,2] 0x2 [1,1]
GAST [3,2] 0x1 [1,1]
GAST [3,14] 0x3 [1,1]
GAST [15,2] 0x2 [1,1]
GAST [14,14] 0x0 [1,1]
GAST [14,4] 0x2 [1,1]
GAST [5,4] 0x1 [1,1]
GAST [9,8] 0x2 [1,1]
BLST [0,0] 0x34 //Normal Ballista
BLST [0,19] 0x36 //Killer Ballista
BLST [19,0] 0x35 //Iron Ballista
BLST [19,19] 0x34 //Second Normal Ballista
ENDTRAP

//BallistaData:

//BLST
//ALIGN 4

MESSAGE Events end at offset currentOffset
//The map for this chapter is at offset: 0xD00000

===========================

It is so long that I don't think you are interested in it,so I only show a few lines which I think are incorrect before.Sorry~~

Link to comment
Share on other sites

I think you need to check for a player unit; the way it is now it will trigger for any unit, including enemies.

Try something like this:

IFAT 0x1 0x7A2F1 (Checks for a player unit; will skip to ENIF 0x1 if it is)

ENUF 0x(EventID) (otherwise, reset the event ID)

ELSE 0x2

ENIF 0x1

(Stuff to do if a player unit steps in)

ENIF 0x2

You need to use IFAT because FE7 conditionals suck.

Up ! It worked for me. I just failed typing the Name of the event.

Well thank you very much ! I'll keep this in my pocket since i'll use it MUCH ! =)

Link to comment
Share on other sites

Hello all, so I went back on my prologue trying to insert a bunch of opening events like a typical prologue. Anyway I got this error

3amVXAx.png

here's the code

//Made by markyjoe1990 of Youtube
//Modified by Nintenlord
#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 TrapData TrapData
POIN Bad Bad Bad Bad
POIN Good Good Good Good
POIN Opening_event Ending_event
Good:
UNIT Lyn_t LynLord 0x00 Level(1, Ally, 0) [3,8] [3,8] [ManiKatti, Vulnerary]
NoAI
UNIT Eliwood EliwoodLord Lyn_t Level(1, Ally, 0) [3,0] [3,0] [Rapier, Vulnerary]
NoAI
UNIT
Bad:
UNIT Batta Brigand Eliwood Level(3, Enemy, 0) [12,2] [12,2] [ironAxe] Guard
UNIT Bandit Brigand Eliwood Level(2, Enemy, 0) [5,3] [5,3] [ironAxe]
AttackInRange
UNIT Bandit Brigand Eliwood Level(1, Enemy, 0) [5,7] [5,7] [ironAxe]
AttackInRange
UNIT Bandit Archer 0x00 Level(4, Enemy, 0) [8,8] [8,8] [ironBow] AttackInRange
UNIT Bandit Mercenary 0x00 Level(1, Enemy, 0) [10,3] [10,3] [ironSword]Guard
UNIT
Turn_events:
TURN 0x00 Opening_event [01, 00] 0x0 0x00
TURN 0x00 Turn1 [02, 00] 0x0 0x00
END_MAIN
Character_events:
CHAR 0x05 EliwoodLyn Eliwood Lyn_t $00000000
END_MAIN
Location_events:
Village(0x06,Village1,5,2)
House(0x07,House2,1,6)
House(0x08,House3,11,7)
Door(9,2)
Seize(12,2)
END_MAIN
Misc_events:
DefeatBoss(Ending_event)
CauseGameOverIfLordDies
AREA 0x09 RedGemArea [11,0] [11,0]
END_MAIN
Opening_event:
FAWI 10
BACG 0x5B
FAWU 10
TEX1 0x0800
SOUN 0x2E9
MORETEXT 0x801
SOUN 0x2EA
MORETEXT 0x802
SOUN 0x2ED
REMA
FAWI 10
LOU1 YoungBramCassander
ENUN
LOMA 0x2F [7,6]
MOVENEXTTO Elbert Zephiel
TEX1 0x803
REMA
FAWI 10
OOBB
CURF [12,2]
STAL 20
FADI 10
BACG 0x0D
FADU 10
MUS1 0x0012
TEX1 0x0816
REMA
LOU1 Good
ENUN
LOU1 Bad
ENUN
ENDA
Turn1:
MUS1 0x0042
TEX1 0x0813
REMA
ENDA
Ending_event:
MNCH 0x01
ENDA
EliwoodLyn:
MUS1 0x0044
TEX1 0x0815
REMA
ENDA
Village1:
FADI 10
BACG 0x01
FADU 10
TEX1 0x0814
REMA
ITGV Vulnerary
ENDA
House2:
FADI 10
BACG 0x01
FADU 10
TEX1 0x0817
REMA
ENDA
House3:
FADI 10
BACG 0x01
FADU 10
TEX1 0x0818
REMA
ITGV DoorKey
ENDA
RedGemArea:
ITGV RedGem
REMA
ENDA
TrapData:
ENDTRAP
//Manual Movement
//Units
YoungBramCassander:
UNIT 0x7A Prince Lyn_t Level(1, Ally, 0) [7,6] [7,6] [ironSword] NoAI // its a unit problem, so is the issue around here?
UNIT 0x7B Paladin Lyn_t Level(1, Ally, 0) [7,3] [7,3] [silverSword] NoAI
UNIT
MESSAGE Events end at offset currentOffset
//The map for this chapter is at offset: ????????

Link to comment
Share on other sites

from hextator's doc

Player 1 slot 1 0202BD50

Enemy/Player 3 slot 1 0202CEC0

0x0202CEC0 - 0x0202BD50 = 0x1170 bytes between

size of the unit struct is 0x48 bytes

0x1170 / 0x48 = 0x3E = 62 entries

i haven't run the exact calculations for enemy/npc slots but that should be about the number of units per affiliation you can have

i would recommend you steer clear of having 183 units on the map, though

Link to comment
Share on other sites

  • 2 weeks later...

Ok i'm so bad at this, but i want to post my question anyway xD

Mh i don't know what to do, i've got 3 problems (I'm new in the "fire emblem hacking world"):

- Rebecca doesn't appear

- When Lyn move anywhere the game crushes or restarts

- When it's time to reinforcements (Druid hector) to come the game crushes.

Here's the script, warning: there will be a lot of errors, i'm sure. Ah, i tried to do the things that Arch did in his video tutorial...

If i did anything wrong in posting this please tell me!

Another thing, the 2nd question in the first post says "- Have you tried disassembling a chapter from the vanilla game to see how it's done?" yes, i tried, but can't understand what is exactly writed. Sorry.

Oh, the Script:

//Made by markyjoe1990 of Youtube

//Modified by Nintenlord
#define DISABLE_TUTORIALS
#include EAstdlib.event
EventPointerTable(0x06,ThisChapter)
ORG 0x01000210
ThisChapter:
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 Rebecca Archsage 0x00 Level(8,Enemy,True) [2,2] [2,2] [bolting] [0x00,0x00,0x00,0x00]
UNIT Empty
Good:
UNIT Lyn_t LynLord 0x00 Level(1,Ally,False) [27,24] [24,26] [Elixir] [0x00,0x00,0x00,0x00]
UNIT Empty
Reinforcements:
UNIT Hector Druid_F 0x00 Level(1,NPC,False) [15,27] [15,26] [Flux] [0x00,0x00,0x00,0x00]
Turn_events:
TURN 0x00 Opening_event [01,00] 0x0 0x00
TURN 0x00 Turn2 [02,00] 0x0 0x00
ENDA
Character_events:
ENDA
Location_events:
ENDA
Misc_events:
CauseGameOverIfLordDies
ENDA
Opening_event:
LOU1 Good
OOBB
ENUN
ENDA
Turn2:
LOU1 Reinforcements
ENUN
TEX1 0x800
REMA
ENDA
Ending_event:
//MNCH 0x??
//STAL 1
//_0x1
ENDA
BallistaData:
BLST
MESSAGE Events end at offset currentOffset
//The map for this chapter is at offset: 1000240

Edited by Darkelont
Link to comment
Share on other sites

1) You didn't LOU1 Bad, so Rebecca won't appear unless you do that.

2) You forgot UNIT Empty after Hector, that's probably why the game crashes.

2.5) If that doesn't fix the crash, make sure Hector actually is able to make his way to where he needs to go after being loaded.

Not sure what's causing Lyn to crash, but try those fixes first and see if that clears up the problem.

Edited by jjl2357
Link to comment
Share on other sites

Ohoh, Hector and Rebecca have appeared! Thanks!

But there is still a problem, the game crash or restarts when i try to move Lyn or when Rebecca moves. I changed the AI of Rebecca and now she can't move, but how can i make the game not crash any time i move Lyn?

Link to comment
Share on other sites

What do you mean "move"? Do you mean move through events or move through gameplay? It's not in your events so I assume you mean gameplay, which means that it's probably got nothing to do with events. Have you changed anything else? Map sprites, etc.?

Link to comment
Share on other sites

What do you mean "move"? Do you mean move through events or move through gameplay? It's not in your events so I assume you mean gameplay, which means that it's probably got nothing to do with events. Have you changed anything else? Map sprites, etc.?

When any character (Yes, this happens when you move your units, but if a NPC or an enemy moves it happens anyway) moves by gameplay, the game crashes. I changed the map... I'll try to do the events on another clean rom without any map modified...

Link to comment
Share on other sites

it's actually quite a simple solution

// -----SNIP-----

Turn_events:
TURN 0x00 Opening_event [01,00] 0x0 0x00
TURN 0x00 Turn2 [02,00] 0x0 0x00
//ENDA
TURN //---------------------------------------------
 
Character_events:
//ENDA
CHAR //---------------------------------------------
 
Location_events:
//ENDA
LOCA //---------------------------------------------
 
Misc_events:
CauseGameOverIfLordDies
//ENDA
AFEV //---------------------------------------------
 
// SNIP

right now when anything moves it's trying to process an AREA event (which doesn't exist) that consists of the data of a bunch of ENDA's (which doesn't actually mean anything)

Edited by CT075
Link to comment
Share on other sites

it's actually quite a simple solution

right now when anything moves it's trying to process an AREA event (which doesn't exist) that consists of the data of a bunch of ENDA's (which doesn't actually mean anything)

Now it works! Thaaaaaanks!!

Link to comment
Share on other sites

Having a problem.

Error Message:

35 Errors occured.

File PVZ EVENTS.txt line 100 column 1:Code LOU1's offset $D8030E is divisible by 4

...

it goes on with a couple other things like ENUN and ENDA but all the divisible by 4 thing.

Code:

//Made by markyjoe1990 of Youtube
//Modified by Nintenlord
#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 TrapData TrapData
POIN Bad Bad Bad Bad
POIN Good Good Good Good
POIN Opening_event Ending_event
Bad:
UNIT Batta Brigand 0x00 Level(1,Enemy,False) [07,01] [07,01] [Vulnerary] [0x00,0x03,0x00,0x20]
Good:
UNIT Lyn_t LynLord 0x00 Level(1,Ally,False) [3,13] [3,13] [Mine,LightRune,IronBow, WhiteGem] [0x00,0x00,0x00,0x00]
UNIT Wil Archer 0x03 Level(2,Ally,False) [7,9] [7,9] [Vulnerary] [0x00,0x00,0x00,0x00]
UNIT Sain Archer 0x03 Level(2,Ally,False) [7,15] [7,15] [Vulnerary] [0x00,0x00,0x00,0x00]
UNIT Wallace Soldier 0x03 Level(3,Ally,False) [11,12] [11,12] [blueGem] [0x00,0x00,0x00,0x00]
Good2:
UNIT Kent Soldier 0x03 Level(2,Ally,False) [9,11] [9,11] [Vulnerary] [0x00,0x00,0x00,0x00]
UNIT Marcus Soldier 0x03 Level(1,Ally,False) [9,13] [9,13] [Vulnerary] [0x00,0x00,0x00,0x00]
UNIT
Wave1:
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,11] [15,11] [blueGem] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,12] [15,12] [Vulnerary] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,13][15,13] [blueGem] [0x00,0x04,0x01,0x00]
UNIT
Wave2:
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,11] [15,11] [blueGem] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,12] [15,12] [blueGem] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,13] [15,13] [Vulnerary] [0x00,0x04,0x01,0x00]
UNIT
Wave3:
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,10] [15,10] [Vulnerary] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,11] [15,11] [blueGem] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,12] [15,12] [blueGem] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,13] [15,13] [Vulnerary] [0x00,0x04,0x01,0x00]
UNIT
Wave4:
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,10] [15,10] [blueGem] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,11] [15,11] [blueGem] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,12] [15,12] [blueGem] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,13] [15,13] [Vulnerary] [0x00,0x04,0x01,0x00]
UNIT
Wave5:
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,10] [15,10] [Vulnerary] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,11] [15,11] [blueGem] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,12] [15,12] [ironSword] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,13] [15,13] [Vulnerary] [0x00,0x04,0x01,0x00]
UNIT Bandit Brigand 0x87 Level(1,Enemy,False)[15,14] [15,14] [Vulnerary] [0x00,0x04,0x01,0x00]
UNIT
Turn_events:
TURN 0x00 Opening_event [01,00] 0x0 0x00
TURN 0x00 Turn7 [07,00] 0x0 0x00
TURN 0x00 Turn9 [09,00] 0x0 0x00
TURN 0x00 Turn11 [011,00] 0x0 0x00
TURN 0x00 Turn13 [013,00] 0x0 0x00
TURN 0x00 Turn16 [016,00] 0x0 0x00
END_MAIN
Character_events:
END_MAIN
Location_events:
Seize(0x03,Ending_event,7,1)
Village(0x06,Village1,1,12)
Armory(ArmoryData,0,14)
Vendor(VendorData,1,14)
END_MAIN
Misc_events:
CauseGameOverIfLordDies
END_MAIN
ArmoryData:
SHLI IronBow 0x33 ShortBow IronSpear 0x15 0x1C
VendorData:
SHLI Mine LightRune Vulnerary
Opening_event:
LOU1 Good
LOU1 Good2
LOU1 Bad
ENUN
OOBB
ENDA
Turn7:
LOU1 Wave1
ENUN
ENDA
Turn9:
LOU1 Wave2
ENUN
ENDA
Turn11:
LOU1 Wave3
ENUN
ENDA
Turn13:
LOU1 Wave4
ENUN
ENDA
Turn16:
LOU1 Wave5
ENUN
ENDA
Village1:
FADI 10
BACG 0x02
FADU 10
TEX1 0x0810
REMA
ITGV IronSword
ENDA
Ending_event:
MoveToChapter(0x01)
ENDA
TrapData:
ENDTRAP
MESSAGE Events end at offset currentOffset
//The map for this chapter is at offset: ????????

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...