User File #3505341360933661

Upload All User Files

#3505341360933661 - Subtitles for ActRaiser (U) TAS (1747M)

ActRaiser (U) TAS Zidanax and Dunnius - Subtitles.lua
1477 downloads
Uploaded 12/27/2012 8:17 PM by dunnius (see all 3)
--Subtitles intended for Snes9x. Might work for other emulators. 
--Script mostly by FatRatKnight, zidanax added some modifications, then FatRatKnight went rampaging to make the perfect script 
-- Features: 
--  Adjustible position 
--  Variable duration 
--  Any arbitrary number of lines. 
--  Multiple instances of subtitles! 

-- Array-based version. 
-- Linked list seems to break horribly in FCEUX, by crashing it on close. 
-- This is why I'd rather hand out the array-based version. 

local emu 
if     FCEU   then emu= FCEU 
elseif snes9x then emu= snes9x 
elseif gens   then emu= gens 
end 


local Time, Duration, x,y= {}, {}, {},{} 
local LineArray= {} 
local i= 1 

-- Can take an arbitrary number of lines 
-- Its name is one letter long to save bytes. Lots of them. 
function S(st,sd , sx,sy , ...) --Time, Y-pos, duration, lines 
    if arg.n <= 0 then return end  -- Sanity 

    Time[i],Duration[i] , x[i],y[i]= st,sd , sx,sy 
    for z= 1, arg.n do 
        if not LineArray[z] then 
            LineArray[z]= {} 
        end 
        LineArray[z][i]= arg[z] 
    end 
    i=i+1 
end 

--***************************************************************************** 
-- Begin text 

--Format: 
-- S( Frame to appear, duration , X-pos , Y-pos , Line1, Line2, ... , LineN) 

-- It does not like it when things aren't in chronological order! 


--Intro--
S(  850, 480, 10, 25, "References to God and Satan are censored out.", "The player is God and Tanzra is Satan.", "The missing backstory will be explained later.")

--Fillmore Act 1--
S( 1700, 270, 10, 5, "First trick: God moves forward faster during", "a big fall (you can tell because he holds his", "sword behind him).")
S( 1980, 250, 10, 5, "Also, slashing at the right time during a jump", "raises jump height. Hence the slashes during", "a lot of jumps.")
S( 2240, 270, 10, 25, "And God moves faster for a few frames", "before a jump depending on when you", "start the jump.")

--Fillmore Sim--
S(  6600, 840, 10, 25, "The soul counter and construction system:", "When a monster is killed in the simulation,", "it increases the town's soul counter by 1.", "These souls become people who build the town.", "A maximum of 6 structures (houses and", "food providers) can be built each cycle.", "The goal is to have 6 structures built each cycle.")
S(  7504, 300, 10, 25, "Miracles suspend the construction counter,", "creating extra time to kill monsters.")
S(  7842, 520, 10, 25, "God tells the people where to build.", "The pointer was moved up, down, up to", "avoid building houses that catch on fire.", "This is also the reason for 15 souls this cycle.")
S(  8655, 150, 10, 25, "Monsters do not spawn during construction.")
S(  8835, 280, 10, 25, "When a food structure is built, the souls", "needed for it are returned to the soul counter.")
S(  9519, 260, 10, 25, "Building in more than 1 direction at a", "time seals the monsters' lairs quicker.")
S(  9980, 260, 10, 25, "The blue dragon dies with 3 arrows.", "It was manipulated to hold still.")
S( 10273, 400, 10, 25, "24 souls collected (enough for 6 low-level structures)", "with 5 frames to spare.  That was cut REALLY close!")
S( 11066, 240, 10, 25, "The construction counter is suspended", "while the monsters' lair is being sealed.")
S( 11336, 360, 10, 25, "Sealing a monsters' lair adds its", "monster count to the soul counter.", "6 structures will now be built every cycle.")
S( 11839, 260, 10, 25, "It is faster by 1 construction cycle to seal","the Southeast lair before the Northeast lair.")
S( 12129, 390, 10, 25, "Finding the pointer movement that leads", "to the quickest construction time was", "done by brute force testing.")
S( 12642, 260, 10, 25, "The lag before the construction is the game", "figuring out what and where to build.")
S( 12962, 540, 10, 25, "The fields here are called corn, but are originally", "called wheat.  Later, there will be superior blue", "fields called wheat, but are originally called rice.", "I guess Americans do not like rice?  :/")
S( 13600, 300, 10, 25, "There is lots and lots of time to kill in the", "simulation waiting for events to start or finish.")
S( 14082, 390, 10, 25, "The extra roads maintain maximum population", "growth.  After Act 2, the towns will", "continue growing after God leaves.")
S( 14500, 300, 10, 25, "3 lairs must be sealed before building over the", "river.  A variation of the \"broken bridge\" trope.")
S( 14830, 280, 10, 25, "That rock hides the magical fire spell", "and the forest hides a source of magic.")
S( 15160, 420, 10, 25, "These fields provide food for 32 people, and the blue", "fields feed 48.  Food provider structures are built", "when needed and do not add to the population.")
S( 15650, 560, 10, 25, "Two of the monsters' lairs give items when sealed,", "The other two raise the civilization level.",  "The population (and souls needed) for each structure", "is 4 for level 1, 6 for level 2, and 8 for level 3.")
S( 16266, 160, 10, 25, "Increasing the civilization level is a high priority.")
S( 16555, 140, 10, 25, "There is a few frames of lag when a bridge is built.")
S( 17081, 360, 10, 25, "Both civilization level monsters' lairs are sealed", "in the same cycle.  No level 2 houses will be built.")
S( 17675, 300, 10, 25, "The man predicts that a monster will curse everyone", "with death.  He has already been cursed and will die.")
S( 18005, 240, 10, 25, "Act 2 is available after sealing all 4 monsters' lairs.")
S( 18305, 360, 10, 25, "The Magical Fire and 2 Source of Magic take longer", "to get than the time saved to use them.")
S( 18750, 220, 10, 25, "The factory, a level 3 food structure, feeds 72 people.")
S( 19000, 390, 10, 25, "God gains levels by increasing the population.", "Bloodpool is available now, but", "doing Act 2 before is faster.")

--Fillmore Act 2--
S(19480, 310, 10, 5, "Another trick: getting hit lets God go through","water at normal speed instead of slogging", "through it.")
S(19800, 250, 10, 25, "Also, You can turn just before getting", "hit in order to be launched forward.")

--Between Fillmore and Bloodpool--
S( 25040, 260, 10, 25, "We get out of town before the people say anything.", "We do not waste time with messages.")

--Bloodpool Act 1--

--Bloodpool Sim--
S( 30440, 480, 10, 25, "There is a total of 6 towns to be populated.", "Each town has 2 acts.  The finale is a boss", "rush of the 6 Act 2 bosses, followed by Tanzra.")
S( 30980, 120, 10, 25, "The bridge item will be used immediately.")
S( 31210, 280, 10, 25, "The Strength of Angel item makes soul gathering", "easier by temporarily making monsters die in 1 hit.")
S( 31690, 180, 10, 25, "These gray blobs are marshes, in case you could not tell.")
S( 32030, 300, 10, 25, "Killing monsters barely off screen is faster since","it takes less time to go to the next one.")
S( 32489, 400, 10, 25, "The difficulty of optimizing this is finding the", "best time to use the sunlight miracle.  The 3", "monsters must be spawned with minimal waiting.")
S( 32925, 450, 10, 25, "The soul counter was 22.  But it does not matter", "since only 4 structures will be built.", "Now it is easier to get 24 souls in the next cycle.")
S( 33567, 560, 10, 25, "Bridges somehow provide food for 32 people.", "That is why no fields were built.  I tried", "an alternate route that built 2 extra",  "bridges, but it was slower overall.")
S( 34605, 160, 10, 25, "The soul counter was 26 at the end of the cycle.")
S( 34860, 240, 10, 25, "This field will be upgraded later", "for maximum population growth.")
S( 35150, 120, 10, 25, "The next town requires one more level.")
S( 35300, 120, 10, 25, "They learned how to grow wheat/rice.")
S( 35540, 420, 10, 25, "The world population increased dramatically", "because Fillmore's population grew.", "Completed towns grow once every 6 cycles.")
S( 36041, 300, 10, 25, "We could build a road to Fillmore and upgrade its", "fields, but it is not worth the frame cost.")
S( 36400, 360, 10, 25, "Moving the pointer (and menus) also suspend the", "construction counter, so they need to be minimized.")
S( 36900, 300, 10, 25, "Miracles make soul gathering easier, but it", "saves frames to use as few of them as possible.")
S( 37390, 300, 10, 25, "The Strength of Angel wore off.  But it was", "needed only before sealing a monsters' lair.")
S( 37900, 300, 10, 25, "The lake is red because of the red demon lair.", "When it is sealed, the lake will return to normal.")
S( 38650, 150, 10, 25, "Act 2 will take place in this castle.")
S( 38850, 300, 10, 25, "Teddy ran away from home.  The people", "want God to give Teddy a loaf of bread.")
S( 39320, 300, 10, 25, "Teddy returned home with info about the lake.", "He also found a Magic Skull item.")
S( 39667, 260, 10, 25, "The skull is the only way to seal the red demon lair.", "There is no item from this lair.")
S( 40059, 520, 10, 25, "The \"Let us Listen\" was delayed because the", "skull item was used a few frames before the", "monsters' lair was sealed.  There is no frame", "cost to make the events be out of sequence.")
S( 40670, 150, 10, 25, "This Source of Magic costs no frames to get.")
S( 40954, 340, 10, 25, "Extra roads again built for future population growth.", "The ones chosen cause faster construction times.")
S( 41540, 150, 10, 25, "It seems that this boat helps cause random lag.")
S( 41900, 520, 10, 25, "If we had built toward the southern lair", "earlier, it would have been sealed by now.", "But since we have to wait for the next", "level increase, it does not matter.")
S( 42760, 320, 10, 25, "It took effort to prevent random lag.", "That is why the angel's movement", "is a little bit random here.")
S( 43250, 260, 10, 25, "Random lag is less of a problem when", "there are fewer monsters flying around.")
S( 43700, 280, 10, 25, "Upgrading the field earlier delays the level", "up by a cycle because an extra field is built.")
S( 44020, 360, 10, 25, "Perhaps a reason that bridges provide food", "is that the people eat trolls.  That does", "seem like a good place to raise them.")
S( 44490, 560, 10, 25, "Because the final monsters' lair had an item,", "the message that explains why the people are", "worried was skipped.  It can still be viewed", "by selecting \"Let us Listen\" from the menu.")
S( 45110,  50,105,120, "What, me worry?")
S( 45450, 510, 10, 25, "The missing message says that a monster appeared", "from the castle and demanded human sacrifices.", "Teddy was 1 of the 3 people picked by drawing lots.")

--Bloodpool Act 2--

--Between Bloodpool and Kasandora--
S( 54180, 390, 10, 25, "We have to listen to the people giving", "thanks to get Magical Stardust spell.", "We take all of the offering items again.")
S( 54800, 450, 10, 25, "Magical Stardust can be the most powerful", "spell, but it falls at random.  So a", "lua script is necessary to manipulate it.")

--Kasandora Act 1--

--Kasandora Sim--
S( 61190, 450, 10, 25, "Each monster killed adds to the spell", "points, SP.  Napper Bats add 1, Blue", "Dragons add 2, and Red Demons add 4.")
S( 62044, 330, 10, 25, "The bomb/rain combo lets the monsters'", "souls arrive at the temple before", "the construction counter resumes.")
S( 62415, 200, 10, 25, "It is better to use the 2 bombs", "immediately to get 24 souls.")
S( 62645, 600, 10, 25, "This is the most difficult cycle to get 24 souls.", "Bloodpool did not have a Strength of Angel item.", "But the 8 souls from the 2 bombs and the construction", "counter delay of the many rain miracles help.")
S( 63460, 200, 10, 185, "This red demon was luck manipulated", "to move closer to the angel.")
S( 63942, 300, 10, 25, "24 souls with 2 frames left in the cycle.", "That was cut REALLY close.")
S( 64302, 200, 10, 25, "Fortunately, the bat's lair will", "be sealed in the next cycle.")
S( 64812, 260, 10, 25, "The wheat/rice item is used now so that", "the future fields will be automatically upgraded.")
S( 65132, 520, 10, 25, "The town will not be directed to the people", "lost in the desert.  When found, they are", "already dead.  This causes Kasandora to", "discover music and find a Source of Magic.")
S( 65712, 390, 10, 25, "This also allows the people to find", "another scroll in the mountains, and", "it also triggers a plague after Act 2.")
S( 66362, 280, 10, 25, "It takes longer to get any Source of Magic", "here compared to the savings using them.")
S( 66869, 450, 10, 25, "Finding the fastest build for this town was", "difficult due to many possibilities.  I tested many", "paths and ended up burning myself out, TWICE!")
S( 67384, 240, 10, 25, "This post construction lag is caused", "by the other towns being built.")
S( 67684, 340, 10, 25, "It is very easy to make the angel fly backwards.", "It is done by changing directions right after shooting.")
S( 68200, 390, 10, 25, "The pointer can be moved a maximum of 8 squares", "per \"direct the people\".  That is why", "the pointer movements are split into segments.")
S( 68900, 420, 10, 25, "When the pointer is moved 8 squares, there", "is 8 frames of lag.  It is faster to have", "segments that are less than 8 squares.")
S( 69430, 220, 10, 25, "When a monster goes off the map," ,"its lair's counter does not decrease.")
S( 70077, 260, 10, 25, "Surprisingly, using an extra rain miracle", "and building on its square is faster.")
S( 70650, 450, 10, 25, "Casting the earthquake miracle destroys non-level", "3 houses.  But here it would shake a slab of the", "pyramid loose and reveal a Source of Life.")
S( 71350, 490, 10, 25, "The simulation's SP is not at all related to", "the action's.  Sealing a monsters' lair and", "leveling both fully restore the simulation's SP.")
S( 72000, 600, 10, 25, "The blue dragon's lair will be sealed and", "built on as late as possible.  Any sooner", "changes the growth pattern, and prevents", "510 population by the end of Marahna.")
S( 72700, 340, 10, 25, "Building on the square with the pyramid will be", "delayed until the end for faster construction times.")
S( 73250, 640, 10, 65, "After Act 2, the people find a tablet.  Its use", "is to tell Marahna to go to an island shaped like", "this bird.  The rock shows where to cast lightning.", "The result is the Magical Aura spell.")
S( 73950, 390, 10, 25, "Since the remainder of Kasandora is waiting,", "here is a translation of the intro from", "the Japanese manual, thanks to Ryusui.")
S( 74370, 560, 10, 25, "In ancient times, the world fell into chaos.", "A loving God who guards the peace of humankind...", "The Devil, Satan, who threatens that", " peace from the darkness...")
S( 74960, 520, 10, 25, "The humans who live in this world worship God", " while living in fear of the Devil.", "God and the Devil opposed each other,", " but their powers were equal.")
S( 75510, 640, 10, 25, "Even in the midst of chaos, the world", " kept turning in steady balance.", "Conquest and destruction. That is what the Devil wanted...", "To seize control of the world. That was his darkest desire...")
S( 76180, 640, 10, 25, "However, he could not defeat God with his power alone.", "Thus did he command his six most devoted minions,", " armed with the power of evil:", "\"Crush God, that we may dominate this earth.\"")
S( 76780,  58,134,120, "Z")
S( 76850, 280, 10, 25, "The world was still at peace, but little by little,", " the balance began to tilt towards darkness.")
S( 76864,  74,134,120, "I")
S( 76950,  64,134,120, "D")
S( 77042,  58,134,120, "A")
S( 77124,  58,134,120, "N")
S( 77160, 330, 10, 25, "That day... The Devil and his minions", " rose from the darkness and set their sights", " upon God's heavenly palace.")
S( 77208,  58,134,120, "A")
S( 77290,  78,134,120, "X")
S( 77520, 440, 10, 25, "God knew of the Devil's attack", " and made a heroic stand against it.", "However, the combined might of the Devil", " and his minions was overwhelming.")
S( 77534,  64,134,120, "D")
S( 77626,  48,134,120, "U")
S( 77700,  58,134,120, "N")
S( 77784,  58,134,120, "N")
S( 77854,  74,134,120, "I")
S( 77954,  48,134,120, "U")
S( 77990, 520, 10, 25, "The battle raged on for seven days and seven nights,"," until the wounded God was forced to retreat", " into his palace, and with the last of his strength", " erect a shield around it.")
S( 78028,  72,134,120, "S")
S( 78540, 520, 10, 25, "His power exhausted in the battle,", " this was God's only remaining course of action.", "To heal his wounds and recover his strength,", " God fell into an age-long slumber.")
S( 79090, 420, 10, 25, "Thus did God's power fade from this world.", "With no one left to oppose him, the Devil and", " his minions ravaged the land without mercy.")
S( 79540, 450, 10, 25, "Without God's protection, the humans had", " no means of defending themselves save for fleeing.", "Before long, most were transformed into demons.")
S( 80020, 280, 10, 25, "The Devil split the world into six lands, and"," appointed each of his minions to rule them.")
S( 80330, 390, 10, 25, "The world fell into ruin, and all that remained to", " tell of humanity's existence was the", " stone monuments they made to honor God.")
S( 80750, 420, 10, 25, "Centuries have passed since the earth fell", " into the demons' hands, and in the heavenly palace,", " God opens his eyes after his peaceful rest.")
S( 81200, 550, 10, 25, "However, even though his wounds sustained in", " battle with the Devil had healed, with the", " extinction of humankind, faith was gone from the", " world, and so was his former might.")
S( 81780, 360, 10, 25, "Thus did God grieve.","The humans had been stolen from him by the Devil.","Without them, he was powerless.")
S( 82170, 280, 10, 25, "In his deep despair, God resolved to defeat the", " Devil and restore peace to the world.")
S( 82480, 520, 10, 25, "Soon the shield shall fall, and the heavenly palace", " will move through the skies once more.","The battle to rid the earth of the demons"," which plague it is about to begin...") 
S( 83030, 110, 10, 25, "(End of manual's intro)")

--Kasandora Act 2--
S( 83210, 480, 10, 25, "The Act 2 message was skipped just like Bloodpool.", "The pyramid was enticing them, and is the main monsters'", "lair.  The bomb item from the lair is not taken.")

--Between Kasandora and Aitos--

--Aitos Act 1--

--Aitos Sim--
S( 98630, 850, 10, 25, "The construction counter, the time between constructions,", "is 720 frames. The same counter is used for all towns.", "When cycle 1 does not need all 720, some of the counter", "can be used in the previous town for Stardust manipulation.", "No time is lost because cycle 1 is shorter by those frames.")
S( 99640, 280, 10, 25, "The Strength of Angel is required.  I did a", "test without it and could not get 24 souls.")
S(100070, 260, 10, 25, "The blue dragon is manipulated into committing", "suicide by flying into the lightning.")
S(100390, 280, 10, 25, "When a monster is killed by a miracle, the", "soul counter is increased, but not the SP.")
S(101070, 280, 10, 25, "Getting 24 souls by the end of the cycle is easy", "because many lightning miracles are needed.")
S(101430, 280, 10, 25, "I kill 3 monsters each miracle without having to", "wait for them to spawn before the next miracle.")
S(102140, 450, 10, 25, "This monster is a Skull Head, a redundant name.", "It has 8 HP, and with the Strength of Angel", "it dies with 2 arrows.  Killing it gives 12 SP.")
S(102900, 300, 10, 25, "The Skull Heads are a pain because they can move", "really fast and they damage the angel quite a bit.")
S(103610, 550, 10, 25, "The angel takes damage when colliding with a monster.", "At 0 HP, the angel is unable to shoot arrows.", "Some HP are recovered at the start of each construction.")
S(105150, 480, 10, 25, "The angel jumps backwards a bit when taking damage.", "It is possible to change direction before getting", "hit to get a speed boost.  However, it is not useful.")
S(105950, 340, 10, 25, "This town builds ranches, which feed 32 people.", "Later they build windmills, which feed 72.")
S(106527, 450, 10, 25, "The guy was fatally injured and wants to be", "covered by God's tears (rain) before he dies.", "God is too busy to bother because it wastes frames.")
S(107630, 520, 10, 25, "Each type of miracle has a different SP cost.", "Lightning costs 10, rain costs 20, sunlight costs", "30, wind costs 80, and earthquake costs 160.")
S(108222, 100, 10, 25, "Ominous volcano...")
S(108610, 120, 10, 25, "The guy died a sad death.")
S(109370, 260, 10, 25, "The Eastern lair will be sealed last", "to do the Act 2 message skip.")
S(109790, 160, 10, 25, "The windmills won't work without wind.", "We wish for wind.")
S(109980, 390, 10, 25, "It is hard to tell, but the blue dragon was", "hit by the arrow heading the same direction.", "The angel was hit intentionally.")
S(110950, 420, 10, 25, "Even Aitos needs a couple of extra roads", "built for future growth.  This is because", "the area for building is rather small.")
S(111580, 260, 10, 25, "Do the windmills provide food", "by catching Don Quixote wannabes?")
S(111875, 120, 10, 25, "The angel wants to be Don Quixote.")
S(112300, 320, 10, 25, "The reason for waiting until the next cycle to build", "to the other lair is faster construction times.")
S(112900, 640, 10, 25, "The people are about to learn to make sheep's fleece.", "The offering is used in Northwall to keep them warm.", "It was called Sheepskin in the Japanese version.", "I guess suggesting skinning sheep is taboo.")
S(114000, 480, 10, 25, "The skipped message is that the volcano is erupting.", "The eruptions do not harm the town or the angel.", "But they cause lag so they will not be seen.")

--Aitos Act 2--

--Aitos Sim, again--
S(120290, 360, 10, 25, "Act 2 was done early because it suspends events.", "The mountain climbing will reveal a Source of Magic.")
S(120950, 260, 10, 25, "There should be sheep in these ranches.", "The game cannot keep up with the speedrun.")
S(121500, 180, 10, 25, "This Source of Magic costs about 2.5 seconds.")
S(122050, 360, 10, 25, "Only the Source of Magic and Sheep's Fleece are obtained.", "It is several frames faster to skip the 2 unneeded items.")
S(122800, 280, 10, 25, "God must gain 2 levels (1 for Fillmore)", "to be able to go the next town.")
S(123230, 650, 10, 25, "Here is what the monsters do:", "Napper Bats nab people; can be saved by shooting the bat.", "Blue Dragons destroy houses.", "Red Demons destroy crops; rain fixes them.", "Skull Heads cause earthquakes.")
S(124150, 280, 10, 25, "This square is finally built on.  Being close", "to the temple makes the construction faster.")
S(124750, 260, 10, 25, "The angel is dancing to the music.", "This is the last cycle of Aitos.")
S(125400, 260, 10, 25, "With all that constant moving around,", "the angel must be dead tired.  :D")

--Marahna Act 1--

--Marahna Sim--
S(131900, 450, 10, 25, "Marahna has the fewest buildable squares,", "but the lairs are really spread out.", "2 levels are gained in 6 cycles thanks to the other towns.")
S(132480, 300, 10, 25, "EARTHQUAKE!!!  Is required to seal the", "northern lair.  It connects the islands.")
S(133380, 300, 10, 25, "The earthquake also adds 22 to the soul counter", "for some reason.  Thanks for the help, game!")
S(134180, 450, 10, 25, "The central monster lair will not be sealed in cycle 2.", "The pointer movement is about 30 frames faster.", "However, it requires more soul gathering.")
S(134700, 200, 10, 25, "A temple suddenly appeared; not at all suspicious. ;)")
S(135310, 180, 10, 25, "This is the last town to have upgraded fields.")
S(135810, 280, 10, 25, "Building toward the North and South lair", "simultaneously requires a sizeable detour.")
S(136500, 240, 10, 25, "It is a few frames faster to seal the", "northern lair before the southern lair.")
S(137100, 240, 10, 25, "And the Eastern lair will be sealed", "last to skip the Act 2 message.")
S(137863, 120, 10, 25, "The central lair will now be sealed.")
S(138020,  80, 10, 25, "SUPER SPIN ATTACK!")
S(139300, 340, 10, 25, "The temple is causing many people to turn against God.", "But they are going to try to solve this themselves.")
S(140260, 160, 10, 25, "The angel's path avoids a lag frame.")
S(140705, 240, 10, 25, "Random lag caused me to redo sizeable portions of the sims.")
S(141210, 540, 10, 25, "When the tablet from Kasandora is used, the people", "say that a tablet fell from the sky.  The bird shape", "on it refers to this island.  Note the resemblance.")
S(142520, 260, 10, 25, "The next level up will be the last.", "Death Heim has no level requirement.")
S(143850, 360, 10, 25, "The people are supposed to offer herbs to cure plagues.", "But the message is skipped because this is done quick.") 
S(144550, 300, 10, 25, "The offerings are skipped because they are", "not needed.  This saves about 2.5 seconds.")
S(145430, 260, 10, 25, "Cast Lightning here to get the Magical", "Aura spell hidden on this island.")
S(146060, 100, 10, 25, "Invisible leaders...")
S(146190, 390, 10, 25, "The Act 2 message skip combines the leaders", "abandoning God and the item offering.", "It is both humorous and faster.")
S(146800, 320, 10, 25, "The population will be 1902.  It is 2 more", "than required for the last mandatory level.")

--Marahna Act 2--

--Between Marahna and Northwall--
S(153490, 240, 10, 25, "Some construction counter frames are", "used here for Stardust manipulation.")

--Northwall Act 1--
S(161200, 300, 10, 25, "This battle was redone after the Northwall sim", "was finished.  Luckily, the sim synced up.")

--Northwall Sim--
S(161970, 320, 10, 25, "In Northwall, population growth is not a concern.", "The objective is to seal the lairs quickly.")
S(162820, 300, 10, 25, "If the sheep's fleece is not used, the town will", "stop building when the population reaches 22.")
S(163550, 320, 10, 25, "Only 8 souls are needed for cycle 1.", "The construction is faster with fewer structures built.")
S(164308, 250, 10, 25, "Moving the pointer Up, Right, Up", "manipulates building on both squares.")
S(164600, 380, 10, 25, "Only 1 house needs to be built next cycle, and the field", "returns its 4 souls.  No monsters need to be killed.")
S(165250, 240, 10, 25, "The fields will not be upgraded, but they must be protected.")
S(165850, 360, 10, 25, "Building to the East is delayed because like Fillmore,", "the people learn to build bridges after sealing lairs.")
S(166400, 510, 10, 25, "This is the longest cycle in the run.", "It is over 4700 frames until the next construction.", "3 monsters' lairs are sealed in this cycle.") 
S(167560, 260, 10, 25, "Melting the ice here reveals a lake, and", "the people find the Magical Light spell.")
S(167880, 450, 10, 25, "The sheep's fleece can be skipped by uncovering", "the lake before the population reaches 22.", "But the extra sun miracles make that slower.")
S(168750, 330, 10, 25,"Sealing the Red Demon's lair before the Skull Head's", "lair causes the construction to be a little faster.")
S(169672, 320, 10, 25, "The Act 2 message will not be skipped because", "the lair order is forced, just like Fillmore.")
S(170050, 540, 10, 25, "The replacement message for needing the sheep's fleece", "is the generic thanks message.  It is skipped by keeping", "the population below 22 before sealing the 3 lairs.")
S(171075, 140, 10, 25, "Whew!  Cycle 3 is now over.")
S(171400, 250, 10, 50, "Come to Northwall and ski the slopes of")
S(171401, 249, 18, 59, "Mt.")
S(171830, 300, 10, 25, "The people noticed initials carved on the tree.", "They also found a Source of Magic.")
S(172750, 260, 10, 25, "Only the Source of Magic was obtained.", "Getting it costs 2.5 seconds.")
S(173290, 120,100, 134, "A Bridge to Nowhere!")
S(173450, 320, 10, 25, "Casting lightning on the temple scares the people", "into offering a Source of Life that they were keeping.")
S(174150, 140, 10, 25, "The game does not care that a monster is alive.")

--Northwall Act 2--
S(179230, 280, 10, 25, "The fancy background causes much lag.", "It makes it hard to optimize.")

--Death Heim--

--End text 




--***************************************************************************** 

-- Initializes important stuff. Then goes on to display said stuff. 
-- In co-routine form so I can create multiple instances of subtitles. 
function CoRoutine_DispMsg(Index, DurationOverride) 
    if not Index then 
        return 
    end 
    local D , X,Y= Duration[Index] , x[Index], y[Index] 
    local L= {} 
    if DurationOverride then 
        D= DurationOverride 
    end 

    local n= 1 
    while LineArray[n] do 
        L[n]= LineArray[n][Index] 
        n= n+1 
    end 
    n= n-1 
    coroutine.yield() -- Initialized. Stop here 

    for a= 1, D do 
        for b= 1, n do 
            if L[b] then 
                gui.text( X , Y +9*b, L[b] ) 
            end 
        end 
        if coroutine.yield() == "die" then return end 
    end 
end 

local routines= {} 
local LastRoutine= 0 

-- Finds the correct index on state load or lua open 
-- Loads all text that should exist on stateload, with proper endpoints 
-- Will also kill previously existing subtitles 
function FindIndex() 
    if LastRoutine > 0 then 
        for j= 1, LastRoutine do 
            coroutine.resume(routines[j],"die") 
            routines[j]= nil 
        end 
        LastRoutine= 0 
    end 

    i= 1 
    local fc= movie.framecount() 

    while Time[i] and Time[i] <= fc do 
        local endframe= Time[i] + Duration[i] 
        if endframe > fc then 
            LastRoutine= LastRoutine+1 
            routines[LastRoutine]= coroutine.create(CoRoutine_DispMsg) 
            coroutine.resume( routines[LastRoutine] , i , endframe-fc ) 
        end 
        i= i+1 
    end 
end 


-- Load-state stability 

if savestate.registerload then 
    savestate.registerload(FindIndex)   -- Well, it exists. Use it! 

else  -- Implement pseudo load-state detector 
    local fc, lastfc= 0, 0 
    gui.register( function () 
        fc= movie.framecount() 
        if (fc ~= lastfc) and (fc-1 ~= lastfc) then  FindIndex() end 
        lastfc= fc 
    end) 
end 


-- Executes co-routines. Will also clear away dead ones. 
function RoutineJunk() 
    local a= 1 
    while a <= LastRoutine do 
        if coroutine.status(routines[a]) == "dead" then 
            for j= a, LastRoutine do 
                routines[j]= routines[j+1] 
            end 
            LastRoutine= LastRoutine-1 
        else 
            coroutine.resume(routines[a]) 
            a= a+1 
        end 
    end 
    if FCEU then  gui.drawpixel(1,1,"clear") end  -- FCEUX display tends to stick 
end 

--***************************************************************************** 
-- Finally at main body of executable code 

FindIndex() 

while true do -- In case of state-load after the last subtitle is loaded 

-- Wait until the right time for the next subtitle 
-- Loads new subtitle routine, if any should show up, 
-- then runs all current routines. 
while Time[i] do 
    if Time[i] <= movie.framecount() then 
        LastRoutine= LastRoutine+1 
        routines[LastRoutine]= coroutine.create(CoRoutine_DispMsg) 
        coroutine.resume(routines[LastRoutine],i)  -- Trigger initalize code 
        i= i+1 
    end 
    RoutineJunk() 
    emu.frameadvance() 
end 

local timer= 0  -- Bleh... Cute, random timer. 

-- Idle loop. Basically sit there and do nothing. 
while not Time[i] do 
    RoutineJunk() -- To get those last messages... 
    timer= timer+1 
    emu.frameadvance() 

    if timer >= 72000 then 
        gui.text(0,200,"You have an active script...") 
    end 
    if timer >=216000 then 
        gui.text(0,210,"If you want hidden messages, open the script") 
    end 
end 

end