Arch Posted May 22, 2012 Share Posted May 22, 2012 The title says it all. This is a compilation of sample event scripts, for reference by anyone looking for an example of a complete chapter. If you've got any scripts you'd like to contribute, just include them in a reply! [spoiler=Raven's Old Tale] //From Elibian Nights #define DISABLE_TUTORIALS #include "EAstdlib.event" #include "BSFE7 definitions.txt" EventPointerTable(0x0F,ThisChapter) ORG 0xD81860 ThisChapter: POIN TurnEvents CharacterEvents LocationEvents MiscEvents POIN Ballista Ballista POIN Araphen Araphen Araphen Araphen POIN Cornwell Cornwell Cornwell Cornwell POIN OpeningEvent EndingEvent Cornwell: UNIT Raven Hero 0x00 Level(10,Ally,False) [3,1] [3,1] [berveil,SteelAxe,SteelSword,Elixir] [NoAI] UNIT Priscilla Valkyrie Raven Level(4,Ally,False) [4,1] [4,1] [Mend,Physic,Thunder] [NoAI] UNIT Lucius Bishop Raven Level(5,Ally,False) [1,2] [1,2] [Divine,Artemis,Mend,Vulnerary] [NoAI] UNIT Wil Sniper Raven Level(7,Ally,False) [5,2] [5,2] [steelBow,EmblemBow,Vulnerary] [NoAI] UNIT Geitz Warrior Raven Level(7,Ally,False) [4,3] [4,3] [KillerAxe,SwordSlayer,IronBow,Vulnerary] [NoAI] UNIT Empty Heath1: UNIT Heath WyvernKnight Raven Level(10,Ally,False) [1,9] [3,3] [AxeReaver,ShortSpear,Greatlance] [NoAI] UNIT Empty Araphen: UNIT Thorben Sage 0x00 Level(1,Enemy,False) [19,1] [19,1] [bolting,Thunder] [GuardTile] UNIT 0xAC Halberdier 0x00 Level(6,Enemy,True) [19,4] [19,4] [shortSpear] [AttackInRange] UNIT 0xAC Halberdier 0x00 Level(6,Enemy,True) [20,4] [20,4] [shortSpear] [AttackInRange] UNIT 0x92 GreatKnight 0x00 Level(4,Enemy,True) [8,16] [8,16] [steelAxe,SteelSpear] [NoAI] UNIT 0x92 GreatKnight 0x00 Level(5,Enemy,True) [8,15] [8,15] [steelSword,SteelSpear] [NoAI] UNIT 0x92 GreatKnight 0x00 Level(4,Enemy,True) [9,16] [9,16] [steelAxe,SteelSpear] [NoAI] UNIT 0x92 GreatKnight 0x00 Level(3,Enemy,True) [9,15] [9,15] [steelSpear,SteelSword] [NoAI] UNIT 0x93 NomadTrooper 0x00 Level(4,Enemy,True) [10,15] [10,15] [steelBow] [NoAI] UNIT 0x93 NomadTrooper 0x00 Level(4,Enemy,True) [10,16] [10,16] [Longbow] [NoAI] UNIT 0x93 NomadTrooper 0x00 Level(6,Enemy,True) [12,16] [12,16] [steelBow,SteelSword,Vulnerary] [AttackInRange] UNIT 0x93 NomadTrooper 0x00 Level(2,Enemy,True) [13,15] [13,15] [steelBow,Vulnerary] [AttackInRange] UNIT 0x95 Mage 0x00 Level(16,Enemy,True) [14,18] [14,18] [Aircalibur] [AttackInRange] UNIT 0x96 General 0x00 Level(2,Enemy,True) [9,12] [9,12] [steelSpear] [GuardTile] UNIT 0x96 General 0x00 Level(2,Enemy,True) [10,12] [10,12] [HandAxe] [GuardTile] UNIT 0x96 General 0x00 Level(2,Enemy,True) [11,12] [11,12] [steelBlade] [GuardTile] UNIT 0xAC Halberdier 0x00 Level(4,Enemy,True) [8,9] [8,9] [AxeReaver] [AttackInRange] UNIT 0xAC Halberdier 0x00 Level(3,Enemy,True) [7,10] [7,10] [steelSpear] [AttackInRange] UNIT 0x95 Mage 0x00 Level(16,Enemy,True) [6,9] [6,9] [Thunder] [AttackInRange] UNIT 0x95 Mage 0x00 Level(16,Enemy,True) [5,10] [5,10] [Elfire] [AttackInRange] UNIT 0x93 NomadTrooper 0x00 Level(2,Enemy,True) [15,8] [15,8] [Rienfleche,Vulnerary] [AttackInRange] UNIT 0x93 NomadTrooper 0x00 Level(2,Enemy,True) [5,7] [5,7] [shamshir,Vulnerary] [AttackInRange] UNIT 0x8A MageKnight 0x00 Level(4,Enemy,True) [6,7] [6,7] [Elfire] [AttackInRange] UNIT 0xE8 General 0x00 Level(9,Enemy,False) [11,4] [11,4] [spear,SilverAxe,Elixir] [GuardTile] UNIT 0xE8 General 0x00 Level(9,Enemy,False) [18,10] [18,10] [silverBlade,ChestKey] [AttackInRange] UNIT 0x95 Soldier 0x00 Level(20,Enemy,True) [13,8] [13,8] [Greatlance] [NoAI] UNIT 0x95 Soldier 0x00 Level(20,Enemy,True) [14,8] [14,8] [steelSpear,Javelin] [NoAI] UNIT 0x95 Soldier 0x00 Level(20,Enemy,True) [13,4] [13,4] [KillerLance] [NoAI] UNIT 0xAC Halberdier 0x00 Level(2,Enemy,True) [14,3] [14,3] [shortSpear] [NoAI] UNIT 0x95 Mage 0x00 Level(16,Enemy,True) [14,5] [14,5] [Thunder] [AttackInRange] UNIT 0x95 Bishop 0x00 Level(12,Enemy,True) [18,1] [18,1] [Physic] [NoAI] UNIT 0x95 Bishop 0x00 Level(12,Enemy,True) [10,10] [10,10] [Mend] [NoAI] UNIT 0x8A MageKnight 0x00 Level(4,Enemy,True) [14,9] [14,9] [Thunder,Mend] [AttackInRange] UNIT 0x88 Paladin 0x00 Level(4,Enemy,True) [9,7] [9,7] [steelAxe,SteelSword] [AttackInRange] UNIT 0x88 Paladin 0x00 Level(4,Enemy,True) [8,6] [8,6] [Dragonspear,SteelAxe] [AttackInRange] UNIT Empty Reinforcements: UNIT 0x92 GreatKnight 0x00 Level(4,Enemy,True) [24,6] [24,6] [steelSword,SteelSpear] [NoAI] UNIT 0x92 GreatKnight 0x00 Level(4,Enemy,True) [24,6] [24,7] [steelAxe,SteelSpear] [NoAI] UNIT 0x88 Paladin 0x00 Level(4,Enemy,True) [24,6] [23,6] [steelAxe,SteelSword] [NoAI] UNIT 0x88 Paladin 0x00 Level(4,Enemy,True) [24,6] [23,7] [steelLance,SteelSword] [NoAI] UNIT 0x8A MageKnight 0x00 Level(4,Enemy,True) [24,6] [22,6] [Thunder,Mend] [NoAI] UNIT 0x8A MageKnight 0x00 Level(4,Enemy,True) [24,6] [22,7] [Thunder,Mend] [NoAI] UNIT Empty AssassinMan: UNIT 0xAD Assassin 0x00 Level(10,Enemy,False) [19,2] [19,2] [0x7E,Elixir] [GuardTile] UNIT Empty Assassin1: UNIT 0xAE Assassin 0x00 Level(4,Enemy,True) [11,9] [11,9] [silverSword] [NoAI] UNIT Empty Assassin2: UNIT 0xAE Assassin 0x00 Level(4,Enemy,True) [5,6] [5,6] [silverSword] [NoAI] UNIT Empty SoldierHelp: UNIT 0x95 Soldier 0x00 Level(20,Enemy,True) [11,9] [10,9] [steelSpear,Javelin] [NoAI] UNIT 0x95 Soldier 0x00 Level(20,Enemy,True) [11,9] [11,10] [shortSpear] [NoAI] UNIT Empty SoldierHelp2: UNIT 0xAC Halberdier 0x00 Level(2,Enemy,True) [14,1] [13,1] [steelSpear] [NoAI] UNIT 0xAC Halberdier 0x00 Level(2,Enemy,True) [14,1] [14,2] [steelSpear] [NoAI] UNIT Empty GKs: UNIT 0x92 GreatKnight 0x00 Level(4,Enemy,True) [14,1] [13,1] [steelAxe,SteelSpear] [NoAI] UNIT 0x92 GreatKnight 0x00 Level(4,Enemy,True) [14,1] [14,2] [steelSword,SteelSpear] [NoAI] UNIT Empty TurnEvents: TURN 0x00 OpeningEvent [01,00] 0x0 0x00 TURN 0x00 EndOfTurn1 [01,00] 0x8 0x00 TURN 0x00 Turn2 [02,00] 0x8 0x00 TURN 0x00 Turn5 [05,00] 0x8 0x00 TURN 0x00 Turn7 [07,00] 0x8 0x00 TURN 0x00 Turn8 [08,00] 0x8 0x00 TURN 0x00 Turn10 [10,00] 0x8 0x00 TURN 0x00 Turn7 [13,00] 0x8 0x00 TURN 0x00 Turn15 [15,00] 0x8 0x00 TURN 0x00 Turn5 [17,00] 0x8 0x00 TURN 0x00 Turn7 [18,00] 0x8 0x00 TURN CharacterEvents: CHAR 0x0A RavenLucius Raven Lucius $00000000 CHAR 0x0A RavenLucius Lucius Raven $00000000 CHAR 0x0B HeathPriscilla Heath Priscilla $00000000 CHAR 0x0B HeathPriscilla Priscilla Heath $00000000 CHAR 0x0C LuciusGeitz Lucius Geitz $00000000 CHAR 0x0C LuciusGeitz Geitz Lucius $00000000 CHAR 0x0D RavenWil Raven Wil $00000000 CHAR 0x0D RavenWil Wil Raven $00000000 CHAR LocationEvents: Chest(Elixir,20,9) Chest(Spear,22,10) LOCA MiscEvents: CauseGameOverIfLordDies DefeatBoss(EndingEvent) AFEV Ballista: BLST ALIGN 4 OpeningEvent: //Chapter fades in to black. MUS1 0x0034 LOU1 Cornwell Araphen ENUN CAM1 Raven BACG 0x10 TEX1 0x0820 REMA MUEN 0x01 STAL 0x10 CURF Raven TEX1 0x0821 REMA MUS1 0x0033 CMOF LOU1 Heath1 ENUN MOVE Lucius [2,2] ENUN FADI 10 LOU1 Heath1 BACG 0x04 FADU 10 TEX1 0x0822 MUS1 0x0057 //Music change mid-dialogue MORETEXT 0x0824 REMA ENDA EndOfTurn1: MUS1 0x0052 CAM1 Thorben _0xE3 0xCB401C [304,32] //Assassin Arrival Effect SOUN 0x2F6 LOU1 AssassinDouche CURF Thorben FADI 10 BACG 0x14 FADU 10 TEX1 0x0823 REMA MOVE [19,2] [15,2] ENDA Turn2: CAM1 [11,9] MUS1 0x000D LOU1 SoldierHelp ENUN ENDA Turn5: CAM1 [11,9] MUS1 0x000D LOU1 Assassin1 ENUN ENDA Turn7: CAM1 [5,6] MUS1 0x000D LOU1 Assassin2 ENUN ENDA Turn8: MUS1 0x000D LOU1 SoldierHelp2 ENUN ENDA Turn10: MUS1 0x000D LOU1 Reinforcements ENUN ENDA Turn15: MUS1 0x000D LOU1 GKs ENUN ENDA EndingEvent: IFTU 0x1A 0x0F IFEF 0x1B 0x95 TEX6 0x5 [0,0] 0xE3B REBB ENUT 0x95 ENIF 0x1B ENIF 0x1A MUS1 0x0039 FADI 10 BACG 0x14 FADU 10 TEX1 0x0825 ClearAllUnits BecomeNPC(Raven) BecomeNPC(Priscilla) BecomeNPC(Lucius) BecomeNPC(Heath) BecomeNPC(Wil) BecomeNPC(Geitz) ENUT 0x69 FAWI 0x10 MUEN 0x01 STAL 0x40 SOUN 0x00D3 STAL 0x60 FAWU 0x10 MORETEXT 0x0827 REMA STAL 0x10 FADI 10 BACG 0x02 FADU 10 MUS1 0x0034 TEX1 0x0826 MUS1 0x0057 MORETEXT 0x0828 REMA MNCH 0x06 ENDA RavenLucius: MUS1 0x0034 TEX1 0x0849 REMA ENDA HeathPriscilla: MUS1 0x0051 TEX1 0x0838 REMA ENDA LuciusGeitz: MUS1 0x006A TEX1 0x0902 REMA ENDA RavenWil: MUS1 0x0033 TEX1 0x0903 REMA ITGC Wil KillerBow ENDA MESSAGE Events end at offset currentOffset [spoiler=Nintenlord Saga Prologue] #ifndef FULL_MAKE #include "NLSaga Def.txt" EventPointerTable(6, PointerList) ORG 0xD80000 #endif PointerList: POIN TurnBasedEvents POIN CharacterBasedEvents POIN LocationBasedEvents POIN MiscBasedEvents POIN MiscBasedEvents MiscBasedEvents POIN EnemyUnitsENM EnemyUnitsENM EnemyUnitsENM EnemyUnitsENM POIN AllyUnitsENM AllyUnitsENM AllyUnitsENM AllyUnitsENM POIN BeginningScene EndingScene TurnBasedEvents: TurnEventPlayer(0x0, BeginningScene, 1) TurnEventPlayer(0x0, AddToPool(PlayerReinforcement(SerraAndKentUnit,0x816)), 2) TurnEventPlayer(0x0, BattaScreamAndEnemyReinforcements1, 4) TurnEventPlayer(0x0, AddToPool(ReinforcementEvent(Bandits2)), 5) TurnEventPlayer(0x0, AddToPool(ReinforcementEvent(Bandits3)), 6) TURN CharacterBasedEvents: CharacterEvent(0x6, KentSword, Kent,Timo) CHAR LocationBasedEvents: Seize(1,2) LOCA MiscBasedEvents: CauseGameOverIfLordDies AFEV BeginningScene: CMOF LOU1 EnemyUnitsENM ENUN ASMC 0x7A939 0x7A9D5 FADUCG 2 SHOWMAP TEX5 0x813 MUS1 0x3F STAL 60 FADI 4 HIDEMAP ASMC 0x7A95D STAL 32 BACG 0x23 FADU 4 SHOWMAP TEX1 0x814 REBU MUEN 4 REMA STAL 32 LOU1 AllyUnitsENM ENUN STAL 64 TEX1 0x815 REMA _ASM0x42 0x83181 ENDA BattaScreamAndEnemyReinforcements1: CURF 0x87 TEX1 0x819 REMA LOU1 Bandits1 ENUN ENDA KentSword: TEX1 0x817 REMA _FADU2 SHOWMAP ITGC 0x2F 0x1 REMA ENDA EndingScene: MUS1 0x38 FADI 1 HIDEMAP BACG 0x23 FADU 16 SHOWMAP TEX1 0x81C MoveToChapter(CliffRiver) #pool AllyUnitsENM: UNIT Timo TimoLord 0x0 Level(1,Ally,False) [13,0] [12,2] [Light_Brand,Iron_Sword,Vulnerary] NoAI UNIT SerraAndKentUnit: UNIT Kent Cavalier Timo Level(1,Ally,False) [0,8] [1,8] [iron_Lance] NoAI UNIT Serra Cleric Timo Level(1,Ally,False) [0,8] [0,8] [Heal,Vulnerary] NoAI UNIT EnemyUnitsENM: UNIT Batta Brigand 0x0 Level(2,Enemy,False) [1,2] [1,2] [iron_Axe] GuardTile BanditUnit(Batta, 1, 6, 8, [iron_Axe], AttackInRange) BanditUnit(Batta, 1, 7, 8, [iron_Axe], AttackInRange) BanditUnit(Batta, 1, 11, 5, [iron_Axe], AttackInRange) BigBanditUnit(Batta, 2, 4, 7, [steel_Axe], GuardTile) UNIT Bandits1: BanditUnit(Batta, 1, 2, 6, [iron_Axe], NoAI) BanditUnit(Batta, 1, 0, 4, [iron_Axe], NoAI) UNIT Bandits2: BanditUnit(Batta, 1, 2, 5, [iron_Axe], NoAI) BanditUnit(Batta, 1, 0, 5, [iron_Axe], NoAI) UNIT Bandits3: BanditUnit(Batta, 1, 2, 4, [iron_Axe], NoAI) BanditUnit(Batta, 1, 0, 6, [iron_Axe], NoAI) UNIT Definitions: #ifndef NLSAGA_DEF #define NLSAGA_DEF #define DISABLE_TUTORIALS #define _NO_FE7_DEFINITIONS_ #include EAstdlib.event #define none 0 #define all 0 #define null 0 //Player characters #define Timo 3 #define Oswin 0xb #define Serra 0x11 #define Erk 0x13 #define Nino 0x14 #define Matthew 0x23 #define Timo2 0x2D #define Kent 0x2f #define Wil 0x2e //NPC's #define Treck 0x9e #define GrandbellCava 0xa4 #define GrandbellKnight 0x90 #define AkaneiaKing 0xc5 #define Tactician 0xcd //Generic enemies #define Bandit 0x88 #define BanditBig 0x8A #define MercSwordmaster 0x8B #define MercMonk 0x8C #define MercArcher 0x8D #define MercMerc 0x8E #define MercMage 0x8F #define AkaMage 0x91 #define AkaShaman 0x92 #define AkaArcher 0x93 #define AkaKnight 0x95 #define AkaTroubadour 0x96 #define AkaThief 0x97 #define AkaPegKnight 0x98 #define AkaSoldier 0x9B #define AkaMercenary 0x9C #define AkaCavalier 0x9D #define AkaGeneral 0xA0 #define AkaSniper 0xA1 #define AkaSage 0xA2 #define AkaCleric 0xA3 #define AkaSoldier2 0x9A //Enemy bosses #define Marvin 0xa6 #define Bug 0x99 #define Carjiga 0x94 #define Batta 0x87 #define Zugu 0x89 #define Bool 0x9f #define Aion 0x4c #define Moulder 0x58 #define Ursula 0x51 #define Percival 0x63 #define Glen 0x64 //Classes #define TimoLord 2 #define Mercenary 0xA #define Swordmaster 0x10 #define Warrior 0x13 #define Knight 0x14 #define Archer 0x18 #define Monk 0x1C #define Cleric 0x1D #define Mage 0x20 #define MageF 0x21 #define Sage 0x22 #define SageF 0x23 #define Shaman 0x24 #define Cavalier 0x28 #define Paladin 0x2A #define Troubadour 0x2C #define PegKnight 0x32 #define Pegasus_Knight 0x32 #define Pegasus_knight 0x32 #define Soldier 0x38 #define Brigand 0x39 #define Thief 0x3C //Items #define Iron_Sword 1 #define Iron_sword 1 #define Slim_Sword 2 #define Slim_sword 2 #define Steel_Sword 3 #define Iron_Blade 5 #define Iron_blade 5 #define Nihilist_Sword 5 #define Nihilist_sword 5 #define Crystal_Blade 7 #define Crystal_blade 7 #define Poison_Sword 8 #define Wo_Dao 0xC #define Wo_dao 0xC #define Armorslayer 0xE #define Light_Brand 0x10 #define Light_brand 0x10 #define Iron_Lance 0x14 #define Iron_lance 0x14 #define Slim_Lance 0x15 #define Slim_lance 0x15 #define Steel_Lance 0x16 #define Steel_lance 0x16 #define Silver_Lance 0x17 #define Javelin 0x1C #define Spear 0x1D #define Iron_Axe 0x1F #define Iron_axe 0x1F #define Steel_Axe 0x20 #define Steel_axe 0x20 #define Hammer 0x26 #define Hand_Axe 0x28 #define Hand_axe 0x28 #define Swordreaver 0x2A #define Tomahawk 0x29 #define Brave_Axe 0x23 #define Iron_Bow 0x2c #define Iron_bow 0x2C #define Steel_Bow 0x2d #define Steel_bow 0x2d #define Brave_Bow 0x31 #define Longbow 0x33 #define Fire 0x37 #define Thunder 0x38 #define Elfire 0x39 #define Shine 0x3F #define Divine 0x40 #define Purge 0x41 #define Flux 0x44 #define Nosferatu 0x46 #define Eclipse 0x47 #define Heal 0x4A #define Physic 0x4D #define Guiding_Ring 0x67 #define Lockpick 0x6A #define Vulnerary 0x6b #define Elixir 0x6c #define White_Gem 0x73 #define White_gem 0x73 #define Wind_Sword 0x80 #define Flame_Lance 0x81 #define Thunder_Axe 0x82 //Unit helpers #define BanditUnit(Boss,level,X,Y,Inventory,AI) "UNIT Bandit Brigand Boss Level(level,Enemy,True) [X,Y] [X,Y] Inventory AI" #define BigBanditUnit(Boss,level,X,Y,Inventory,AI) "UNIT BanditBig Brigand Boss Level(level,Enemy,True) [X,Y] [X,Y] Inventory AI" //Chapters #define NewPrologue 0x00 #define CliffRiver 0x01 #define TheBorder 0x02 #define ThickForest 0x03 #define NightTown 0x04 #define SymmetryFortress 0x05 //Events #define PlayerReinforcement(units,textID) "LOU1 units; ENUN; MUS1 TogetherWeRide; TEX1 textID; REMA; ENDA" #endif There's also the complete FE4A event source for your reference as well. However, the files are likely quite dated at this point. Link to comment Share on other sites More sharing options...
Primefusion Posted May 22, 2012 Share Posted May 22, 2012 Something I've seen asked about a few times is tile changes. Without further ado here is an example: [spoiler=Tile Changes Sample] #include EAstdlib.event org 0xC9C9C8+(4*0x46) // - Pointer to tile map changes POIN TileChanges org 0x00D50480 TileChanges: TileMap(0x01,0x01,0x08,0x03,0x03,VillageRuins) TileMap(0x00,0x02,0x0A,0x01,0x01,VillageGate) TileMap(0x02,0x02,0x05,0x01,0x03,Snag) TileMap(0x03,0x0C,0x09,0x01,0x03,Snag) CODE $FF CODE $00 CODE $00 ALIGN 4 VillageGate: CODE 0x80 0x00 0x00 0x00 CODE $00 ALIGN 4 VillageRuins: CODE 0x1C 0x0E 0x20 0x0E CODE 0x24 0x0E 0x9C 0x0E CODE 0xA0 0x0E 0xA4 0x0E CODE 0x1C 0x0F 0x20 0x0F CODE 0x24 0x0F 0x00 0x00 CODE $00 ALIGN 4 // It should be noted that village ruins need to come after the village gate changes in order to work properly. // NL made a post about why this needs to be but I'm feeling too lazy to find it. Snag: CODE 0x1C 0x00 0x9C 0x00 CODE 0x2C 0x00 0x00 0x00 CODE $00 ALIGN 4 // Notice how I've got 2 tilemaps pointing to 1 set of changes (In this case snags). If you've got identical changes being used in // different parts of a map you can just have 1 set of changes and have all the tilemaps point there. Also, things may be marginally different in the latest version of EA (I still use an older build). But, the principle is still the same. Double check the doc to be sure though. Link to comment Share on other sites More sharing options...
Nintenlord Posted May 22, 2012 Share Posted May 22, 2012 I'll fix that example to work with the latest version: #include EAstdlib.event EventPointerTable(0x46, TileChanges) // - Pointer to tile map changes ORG 0x00D50480 TileChanges: TileMap(0x01, 1, 8, 3, 3, VillageRuins) TileMap(0x00, 2, 10, 1, 1, VillageGate) TileMap(0x02, 2, 5, 1, 3, Snag) TileMap(0x03, 12, 9, 1, 3, Snag) TileMapEnd //This macro won't be supported until next version, which will come soonish. // It should be noted that village ruins need to come after the village gate changes in order to work properly. // NL made a post about why this needs to be in here http://serenesforest.net/forums/index.php?showtopic=32004 VillageGate: SHORT 0x0080 VillageRuins: SHORT 0x0E1C 0x0E20 0x0E24 SHORT 0x0E9C 0x0EA0 0x0EA4 SHORT 0x0F1C 0x0F20 0x0F24 //Notice how the tiles are in the same shape as they are in the map. This makes things easier to visualize. Snag: SHORT 0x001C 0x009C 0x002C // Notice how I've got 2 tilemaps pointing to 1 set of changes (In this case snags). If you've got identical changes being used in // different parts of a map you can just have 1 set of changes and have all the tilemaps point there. Link to comment Share on other sites More sharing options...
CT075 Posted May 22, 2012 Share Posted May 22, 2012 somebody should make a converter that changes old!EA scripts to be compatible with new!EA things (CODE -> WORD/BYTE/SHORT, etc). Link to comment Share on other sites More sharing options...
Nintenlord Posted May 22, 2012 Share Posted May 22, 2012 It's trivial to do, by hand or by machine. Even you could do it, Cam: You start with this: CODE param1 param2 param3 ... For every param, if the param starts with 0x, add BYTE param, else add WORD param. Example: CODE 0x5 0x7 $DEADBEEF 5 17 (16*7) 0xFF becomes: BYTE 0x5 BYTE 0x7 WORD $DEADBEEF WORD 5 WORD 17 WORD (16*7) BYTE 0xFF Here's the same in pseudocode: FOREACH code CODE in a file: remove name CODE FOREACH parameter W in code: IF W starts with 0x THEN replace W by BYTE W\n ELSE replace W by WORD W\n ENDFOREACH ENDFOREACH Link to comment Share on other sites More sharing options...
Crimson Red Posted May 22, 2012 Share Posted May 22, 2012 I'd like to post some: [spoiler=Tactics Universe Sample Event Script with Notation]#include EAstdlib.event //#include NewMacros.event – this would load my custom macros. You can add a line like this //to load your own macro file, which can contain your own macros and macros by others. //I suggest you download Arch’s and my macros from the FEShrine as they are very useful. org 0xC9C9C8+(4*0x5A) // - tells the game where the pointer to this chapter’s events is POIN Pointers // - makes the pointer org 0xCB2000 // - tells where to insert data Pointers: // label name POIN Turn_events // makes a pointer to turn events, same for others but different events POIN CharacterTalk POIN Location_events POIN Misc_events POIN Ballista_events Ballista_events POIN BadEN BadEH BadEN BadEH POIN GoodEN GoodEH GoodEN GoodEH POIN Opening_event Ending_event Turn_events: // name of turn events. Look how it matches with the POIN to the top. TURN 0x00 PreBattle [01,01] 0x00 0x00 // - creates a turn scene on turn 1 on the ally phase CODE 0x00 // ends structure events PreBattle: // the actual turn scene that is referenced in the turn event. be careful with //capitalization and spelling always! BlackOff // custom macro used to fade out of a black screen at the beginning of a chapter or // after battle preps ENDA // ends the scenic event CharacterTalk: // for character talks, most commonly recruitment conversations CODE 0x00 // ends structure events Location_events: Village(0x07,Village1,3,2) // creates a village with event ID 0x07 Village(0x08,Village2,3,8) // creates a village whose scene is “Village2” Village(0x09,Village3,2,11) // creates a village with co-ordinates (2,11) Village(0x00,Village4,1,14) // village that can be visited repetitively due to 0x00 as event ID Door(9,14) // allows a door to be opened at 9,14 Door(10,14) Armory(WeaponShop,6,16) // creates an armory at (6,16) Vendor(ItemShop,9,17) // creates a shop with a list of weapons called ItemShop CODE 0x00 // ends location events/structural events Village1: Text(0x0D,0x970) // text macro that loads background 0x0D and text 0x970 ITGV KnightsCrest // gives a KnightsCrest to the active unit visiting the village REMA // removes graphics/returns to map ENDA // end scenic event Village2: Text(0x01,0x971) MONE 0x00 5000 // gives 5,000 gold to player, for villages (cutscene would be 0x01, not 0x00) REMA ENDA Village3: Text(0x0D,0x972) ITGV 0xA5 // gives item/weapon 0xA5 to current unit ENDA Village4: Text(0x01,0x973) REMA ENDA WeaponShop: SHLI IronSword SteelSword IronSpear SteelSpear Javelin IronAxe SteelAxe HandAxe IronBow SteelBow // list of weapons available at weapon shop CODE 0x00 // data separator ItemShop: // same structure as weaponshop SHLI Heal Mend Fire Thunder Lightning Shine Vulnerary Antitoxin CODE 0x00 Misc_events: // miscellaneous events, triggered events ALIGN 4 // prevents misalignment from shops CauseGameOverIfLordDies // when event 0x65 is triggered, game over screen will occur DefeatAll(Ending_event) // when all enemies are defeated, the game goes to “Ending_event” AREA 0x14 ItemFind [9,13] [12,14] // area event with event ID 0x14 called “ItemFind”. //Item can be found by waiting anywhere between [9,13] or [12,14] CODE 0x00 ItemFind: ITGV DoorKey // gives a doorkey REMA ENDA Ballista_events: CODE 0x00 Opening_event: ALIGN 4 // prevents misalignment from ballista data CameraOff // custom macro that turns the camera off so it doesn’t follow unit movement CAM1 [0,0] // moves camera to position [0,0] UnitClear // custom macro that clears all units from the field (redundant, no units loaded yet) BlackOff // custom macro that removes black screen CAM1 [0,0] ENUN // waits for event to finish/camera to move LOU1 Allies // loads unit group “Allies” ENUN // waits for units to move CAM1 [3,10] STAL 40 // stalls the game for time of ‘40’, a short pause that helps the flow of events CAM1 [6,14] STAL 40 CAM1 [14,14] LOU1 Kelik // loads unit group “Kelik” (NOT necessarily the character “Kelik”) ENUN STAL 40 CURF [14,15] // flashes the cursor on (14,15) FADI 0x10 // fades in with speed of 0x10 BACG 0x0A // loads background 0x0A FADU 0x10 // fades out with speed of 0x10 TEX1 0x967 // loads text REMA // clears text and returns to map STAL 0x10 // stall, but with hex input ENDB // goes to battlepreps, one can alternatively use a macro Allies: // name of unit group/event label UNIT Sain 0x00 0x00 Level(1,Ally,False) [6,16] [6,16] [0x00] [00000000] // loads character “Sain” UNIT Lyn 0x00 0x00 Level(1,Ally,False) [3,12] [3,12] [0x00] [00000000] // class “0x00” // the game knows to load Lyn’s class as Lyn is already an allied unit in the save data UNIT 0x49 Myrmidon 0x00 Level(15,NPC,False) [14,15] [14,15] [0x00] [00000000] // loads level 15 NPC without autoleveling (automatically adding stats) UNIT Empty // unit separator to prevent glitches Kelik: UNIT 0x02 0x00 0x00 Level(1,Ally,False) [16,14] [16,15] [0x00] [00000000] UNIT Empty Ending_event: MUEN 0x05 // fades out of music at speed 0x05 FADI 0x10 BACG 0x0A MUS1 0x0038 // loads music 0x0038 FADU 0x10 TEX1 0x968 MNCH 0x17 // goes to chapter 0x17 (not exactly chapter 17, but the 0x17th chapter in the data) ENDA GoodEN: // allied units, controls positioning and # allowed in battle preps UNIT 0x02 0x00 0x00 Level(1,Ally,False) [16,10] [16,10] [0x00] [00000000] UNIT Sain 0x00 0x00 Level(1,Ally,False) [8,12] [8,12] [0x00] [00000000] UNIT Lyn 0x00 0x00 Level(1,Ally,False) [16,4] [16,4] [0x00] [00000000] UNIT Empty GoodEH: // allied units in hard mode (you can limit the # allowed in battle preps) UNIT 0x02 0x00 0x00 Level(1,Ally,False) [16,10] [16,10] [0x00] [00000000] UNIT Sain 0x00 0x00 Level(1,Ally,False) [8,12] [8,12] [0x00] [00000000] UNIT Lyn 0x00 0x00 Level(1,Ally,False) [3,4] [3,4] [0x00] [00000000] UNIT Empty BadEN: // normal mode enemy units UNIT 0x49 Myrmidon 0x00 Level(15,Enemy,False) [16,2] [16,2] [0x9C] [0x00, 0x03, 0x09, 0x00] UNIT 0xB3 Archer 0x00 Level(10,Enemy,True) [14,15] [14,15] [shortBow,IronBow,Vulnerary] [0x00, 0x03, 0x09, 0x00] // loads inventory of ShortBow etc. UNIT 0xB3 Pirate 0x00 Level(10,Enemy,True) [18,13] [18,13] [steelAxe,HandAxe] [0x00, 0x03, 0x09, 0x00] // unit has AI of “attack in range” (00030900) UNIT 0xB3 Pirate 0x00 Level(10,Enemy,True) [2,12] [2,12] [PoisonAxe,Vulnerary] [0x00, 0x03, 0x09, 0x00] // unit DOES autolevel (set to true) UNIT 0xB3 Pirate 0x00 Level(10,Enemy,True) [10,6] [10,6] [ironAxe,HandAxe] [0x00, 0x03, 0x09, 0x00] UNIT 0xB3 Pirate 0x00 Level(10,Enemy,True) [6,7] [6,7] [HandAxe,Vulnerary] [0x00, 0x03, 0x09, 0x00] UNIT 0xB3 Fighter 0x00 Level(10,Enemy,True) [15,6] [15,6] [steelAxe,HandAxe] [0x00, 0x03, 0x09, 0x00] UNIT 0xB3 Mercenary 0x00 Level(10,Enemy,True) [7,3] [7,3] [steelSword] [0x00, 0x03, 0x09, 0x00] UNIT 0xB3 Mercenary 0x00 Level(10,Enemy,True) [12,10] [12,10] [PoisonSword,Antitoxin] [0x00, 0x03, 0x09, 0x00] UNIT Empty BadEH: // for hard mode units UNIT 0x49 Myrmidon 0x00 Level(15,Enemy,False) [16,2] [16,2] [0x9C] [00000000] UNIT 0xB3 Archer 0x00 Level(12,Enemy,True) [14,15] [14,15] [shortBow,Longbow,Vulnerary] [00000000] UNIT 0xB3 Pirate 0x00 Level(12,Enemy,True) [18,13] [18,13] [steelAxe,HandAxe] [00000000] UNIT 0xB3 Pirate 0x00 Level(12,Enemy,True) [2,12] [2,12] [PoisonAxe,Vulnerary] [00000000] UNIT 0xB3 Pirate 0x00 Level(12,Enemy,True) [10,6] [10,6] [ironAxe,HandAxe] [00000000] UNIT 0xB3 Pirate 0x00 Level(12,Enemy,True) [6,7] [6,7] [HandAxe,Vulnerary] [00000000] UNIT 0xB3 Fighter 0x00 Level(12,Enemy,True) [15,6] [15,6] [steelAxe,HandAxe] [00000000] UNIT 0xB3 Mercenary 0x00 Level(12,Enemy,True) [7,3] [7,3] [steelBlade,Vulnerary] [00000000] UNIT 0xB3 Mercenary 0x00 Level(12,Enemy,True) [12,10] [12,10] [PoisonSword,Antitoxin] [00000000] UNIT Empty org 0xC9C9C8+(4*0x59) // - Pointer to tile map changes POIN TileChanges // repoints tile changes org 0xCB1F00 // puts data at offset 0xCB1F00 TileChanges: // list of tile changes TileMap(0x00,0x03,0x02,0x01,0x01,VillageGate) // tile change #0 (0x00) TileMap(0x01,0x03,0x08,0x01,0x01,VillageGate) // top-left tile of change is [0x03,0x08] or [3,8] TileMap(0x02,0x02,0x0B,0x01,0x01,VillageGate) // [0x02,0x0B] = [2,11] – convert to hex TileMap(0x03,0x01,0x0E,0x01,0x01,VillageGate) // w/ your head or a calculator TileMap(0x04,0x09,0x0E,0x02,0x01,TownGate) // tile area is 2 tiles horizontal, 1 tile vertical CODE $FF // terminates tile changes CODE $00 // above CODE $00 // above VillageGate: // name of tile data group CODE 0x80 0x00 0x00 0x00 // one tile [0x80,0x00] – use reference tilesets to obtain hex TownGate: CODE 0x24 0x08 0x28 0x08 CODE 0x00 // separator to prevent mixing of data Copied/pasted from the Ultimate Tutorial, chapter 52. Don't ask what chapter from TU it is, I don't know. Actually I just looked at the unit data and now I do... but it's still a secret Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.