mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-05-02 06:51:57 +00:00
Update CS to v1.13
This commit is contained in:
parent
43f4f7aec2
commit
6befdb09fe
7 changed files with 655 additions and 303 deletions
|
|
@ -54,7 +54,7 @@ end
|
|||
|
||||
-- Version Data --
|
||||
MOD_VERSION_API = 1
|
||||
MOD_VERSION_MAJOR = 12
|
||||
MOD_VERSION_MAJOR = 13
|
||||
MOD_VERSION_MINOR = 0
|
||||
MOD_VERSION_INDEV = false
|
||||
MOD_VERSION_STRING = tostring(MOD_VERSION_API) .. "." .. tostring(MOD_VERSION_MAJOR) .. (MOD_VERSION_MINOR > 0 and ("." .. tostring(MOD_VERSION_MINOR)) or "") .. (MOD_VERSION_INDEV and " (In-Dev)" or "")
|
||||
|
|
@ -205,12 +205,14 @@ for i = 0, MAX_PLAYERS - 1 do
|
|||
forceChar = 0,
|
||||
modelId = E_MODEL_MARIO,
|
||||
isUpdating = false,
|
||||
movesetToggle = true,
|
||||
modelEditOffset = 0,
|
||||
}
|
||||
end
|
||||
|
||||
local stallPacket = 0
|
||||
local function update()
|
||||
stallPacket = (stallPacket+1)%5 -- refresh rate (to reduce stress)
|
||||
stallPacket = (stallPacket+1)%3 -- refresh rate (to reduce stress)
|
||||
if stallPacket == 0 then
|
||||
network_send(false, gCSPlayers[0])
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,9 +1,192 @@
|
|||
-- Made by EliteMasterEric along with CoopDX PR #321 to replace dialog depending on character --
|
||||
-- Original Made by EliteMasterEric along with CoopDX PR #321 to replace dialog depending on character --
|
||||
-- https://github.com/coop-deluxe/sm64coopdx/pull/321 --
|
||||
if not smlua_text_utils_dialog_get then return end
|
||||
-- Eric's Original stuffs will be added as soon as there is some way to directly get dialog strings
|
||||
|
||||
-- localize functions to improve performance - dialog.lua
|
||||
local smlua_text_utils_dialog_replace,smlua_text_utils_dialog_get = smlua_text_utils_dialog_replace,smlua_text_utils_dialog_get
|
||||
local dialogTable = {}
|
||||
local function define_cs_dialog(dialogId, unused, linesPerBox, leftOffset, width, str)
|
||||
dialogTable[dialogId] = {
|
||||
unused = unused,
|
||||
linesPerBox = linesPerBox,
|
||||
leftOffset = leftOffset,
|
||||
width = width,
|
||||
str = str,
|
||||
}
|
||||
end
|
||||
|
||||
local real_dialog_replace = smlua_text_utils_dialog_replace
|
||||
_G.smlua_text_utils_dialog_replace = define_cs_dialog
|
||||
|
||||
-- All Base SM64 Dialog added to the Dialog Table
|
||||
define_cs_dialog(DIALOG_000, 1, 6, 30, 200, ("Wow! You're smack in the\nmiddle of the battlefield.\nYou'll find the Power\nStars that Bowser stole\ninside the painting\nworlds.\nFirst, talk to the\nBob-omb Buddy. (Press [B]\nto talk.) He'll certainly\nhelp you out, and so will\nhis comrades in other\nareas.\nTo read signs, stop, face\nthem and press [B]. Press [A]\nor [B] to scroll ahead. You\ncan talk to some other\ncharacters by facing them\nand pressing [B]."))
|
||||
define_cs_dialog(DIALOG_001, 1, 4, 95, 200, ("Watch out! If you wander\naround here, you're liable\nto be plastered by a\nwater bomb!\nThose enemy Bob-ombs love\nto fight, and they're\nalways finding ways to\nattack.\nThis meadow has become\na battlefield ever since\nthe Big Bob-omb got his\npaws on the Power Star.\nCan you recover the Star\nfor us? Cross the bridge\nand go left up the path\nto find the Big Bob-omb.\nPlease come back to see\nme after you've retrieved\nthe Power Star!"))
|
||||
define_cs_dialog(DIALOG_002, 1, 4, 95, 200, ("Hey, you! It's dangerous\nahead, so listen up! Take\nmy advice.\n\nCross the two\nbridges ahead, then\nwatch for falling\nwater bombs.\nThe Big Bob-omb at the\ntop of the mountain is\nvery powerful--don't let\nhim grab you!\nWe're Bob-omb Buddies,\nand we're on your side.\nYou can talk to us\nwhenever you'd like to!"))
|
||||
define_cs_dialog(DIALOG_003, 1, 5, 95, 200, ("Thank you, Mario! The Big\nBob-omb is nothing but a\nbig dud now! But the\nbattle for the castle has\njust begun.\nOther enemies are holding\nthe other Power Stars. If\nyou recover more Stars,\nyou can open new doors\nthat lead to new worlds!\nMy Bob-omb Buddies are\nwaiting for you. Be sure\nto talk to them--they'll\nset up cannons for you."))
|
||||
define_cs_dialog(DIALOG_004, 1, 3, 95, 200, ("We're peace-loving\nBob-ombs, so we don't use\ncannons.\nBut if you'd like\nto blast off, we don't\nmind. Help yourself.\nWe'll prepare all of the\ncannons in this course for\nyou to use. Bon Voyage!"))
|
||||
define_cs_dialog(DIALOG_005, 1, 3, 30, 200, ("Hey, Mario! Is it true\nthat you beat the Big\nBob-omb? Cool!\nYou must be strong. And\npretty fast. So, how fast\nare you, anyway?\nFast enough to beat me...\nKoopa the Quick? I don't\nthink so. Just try me.\nHow about a race to the\nmountaintop, where the\nBig Bob-omb was?\nWhaddya say? When I say\n『Go,』 let the race begin!\n\nReady....\n\n//Go!////Don't Go"))
|
||||
define_cs_dialog(DIALOG_006, 1, 3, 30, 200, ("Hey!!! Don't try to scam\nME. You've gotta run\nthe whole course.\nLater. Look me up when\nyou want to race for\nreal."))
|
||||
define_cs_dialog(DIALOG_007, 1, 5, 30, 200, ("Hufff...fff...pufff...\nWhoa! You...really...are...\nfast! A human blur!\nHere you go--you've won\nit, fair and square!"))
|
||||
define_cs_dialog(DIALOG_008, 1, 4, 30, 200, ("BEWARE OF CHAIN CHOMP\nExtreme Danger!\nGet close and press [C]▲\nfor a better look.\nScary, huh?\nSee the Red Coin on top\nof the stake?\n\nWhen you collect eight of\nthem, a Power Star will\nappear in the meadow\nacross the bridge."))
|
||||
define_cs_dialog(DIALOG_009, 1, 5, 30, 200, ("Long time, no see! Wow,\nhave you gotten fast!\nHave you been training\non the sly, or is it the\npower of the Stars?\nI've been feeling down\nabout losing the last\nrace. This is my home\ncourse--how about a\nrematch?\nThe goal is in\nWindswept Valley.\nReady?\n\n//Go//// Don't Go"))
|
||||
define_cs_dialog(DIALOG_010, 1, 4, 30, 200, ("You've stepped on the\nWing Cap Switch. Wearing\nthe Wing Cap, you can\nsoar through the sky.\nNow Wing Caps will pop\nout of all the red blocks\nyou find.\n\nWould you like to Save?\n\n//Yes////No"))
|
||||
define_cs_dialog(DIALOG_011, 1, 4, 30, 200, ("You've just stepped on\nthe Metal Cap Switch!\nThe Metal Cap makes\nMario invincible.\nNow Metal Caps will\npop out of all of the\ngreen blocks you find.\n\nWould you like to Save?\n\n//Yes////No"))
|
||||
define_cs_dialog(DIALOG_012, 1, 4, 30, 200, ("You've just stepped on\nthe Vanish Cap Switch.\nThe Vanish Cap makes\nMario disappear.\nNow Vanish Caps will pop\nfrom all of the blue\nblocks you find.\n\nWould you like to Save?\n\n//Yes////No"))
|
||||
define_cs_dialog(DIALOG_013, 1, 5, 30, 200, ("You've collected 100\ncoins! Mario gains more\npower from the castle.\nDo you want to Save?\n//Yes////No"))
|
||||
define_cs_dialog(DIALOG_014, 1, 4, 30, 200, ("Wow! Another Power Star!\nMario gains more courage\nfrom the power of the\ncastle.\nDo you want to Save?\n\n//You Bet//Not Now"))
|
||||
define_cs_dialog(DIALOG_015, 1, 4, 30, 200, ("You can punch enemies to\nknock them down. Press [A]\nto jump, [B] to punch.\nPress [A] then [B] to Kick.\nTo pick something up,\npress [B], too. To throw\nsomething you're holding,\npress [B] again."))
|
||||
define_cs_dialog(DIALOG_016, 1, 3, 30, 200, ("Hop on the shiny shell and\nride wherever you want to\ngo! Shred those enemies!"))
|
||||
define_cs_dialog(DIALOG_017, 1, 4, 30, 200, ("I'm the Big Bob-omb, lord\nof all blasting matter,\nking of ka-booms the\nworld over!\nHow dare you scale my\nmountain? By what right\ndo you set foot on my\nimperial mountaintop?\nYou may have eluded my\nguards, but you'll never\nescape my grasp...\n\n...and you'll never take\naway my Power Star. I\nhereby challenge you,\nMario!\nIf you want the Star I\nhold, you must prove\nyourself in battle.\n\nCan you pick me up from\nthe back and hurl me to\nthis royal turf? I think\nthat you cannot!"))
|
||||
define_cs_dialog(DIALOG_018, 1, 4, 30, 200, ("I'm sleeping because...\n...I'm sleepy. I don't\nlike being disturbed.\nPlease walk quietly."))
|
||||
define_cs_dialog(DIALOG_019, 1, 2, 30, 200, ("Shhh! Please walk\nquietly in the hallway!"))
|
||||
define_cs_dialog(DIALOG_020, 1, 6, 95, 150, ("Dear Mario:\nPlease come to the\ncastle. I've baked\na cake for you.\nYours truly--\nPrincess Toadstool"))
|
||||
define_cs_dialog(DIALOG_021, 1, 5, 95, 200, ("Welcome.\nNo one's home!\nNow scram--\nand don't come back!\nGwa ha ha!"))
|
||||
define_cs_dialog(DIALOG_022, 1, 2, 95, 200, ("You need a key to open\nthis door."))
|
||||
define_cs_dialog(DIALOG_023, 1, 3, 95, 200, ("This key doesn't fit!\nMaybe it's for the\nbasement..."))
|
||||
define_cs_dialog(DIALOG_024, 1, 5, 95, 200, ("You need Star power to\nopen this door. Recover a\nPower Star from an enemy\ninside one of the castle's\npaintings."))
|
||||
define_cs_dialog(DIALOG_025, 1, 4, 95, 200, ("It takes the power of\n3 Stars to open this\ndoor. You need [%] more\nStars."))
|
||||
define_cs_dialog(DIALOG_026, 1, 4, 95, 200, ("It takes the power of\n8 Stars to open this\ndoor. You need [%] more\nStars."))
|
||||
define_cs_dialog(DIALOG_027, 1, 4, 95, 200, ("It takes the power of\n30 Stars to open this\ndoor. You need [%] more\nStars."))
|
||||
define_cs_dialog(DIALOG_028, 1, 4, 95, 200, ("It takes the power of\n50 Stars to open this\ndoor. You need [%] more\nStars."))
|
||||
define_cs_dialog(DIALOG_029, 1, 5, 95, 200, ("To open the door that\nleads to the 『endless』\nstairs, you need 70\nStars.\nBwa ha ha!"))
|
||||
define_cs_dialog(DIALOG_030, 1, 6, 30, 200, ("Hello! The Lakitu Bros.,\ncutting in with a live\nupdate on Mario's\nprogress. He's about to\nlearn a technique for\nsneaking up on enemies.\nThe trick is this: He has\nto walk very slowly in\norder to walk quietly.\n\n\n\nAnd wrapping up filming\ntechniques reported on\nearlier, you can take a\nlook around using [C]▶ and\n[C]◀. Press [C]▼ to view the\naction from a distance.\nWhen you can't move the\ncamera any farther, the\nbuzzer will sound. This is\nthe Lakitu Bros.,\nsigning off."))
|
||||
define_cs_dialog(DIALOG_031, 1, 5, 30, 200, ("No way! You beat me...\nagain!! And I just spent\nmy entire savings on\nthese new Koopa\nMach 1 Sprint shoes!\nHere, I guess I have to\nhand over this Star to\nthe winner of the race.\nCongrats, Mario!"))
|
||||
define_cs_dialog(DIALOG_032, 1, 5, 30, 200, ("If you get the Wing Cap,\nyou can fly! Put the cap\non, then do a Triple\nJump--jump three times\nin a row--to take off.\nYou can fly even higher\nif you blast out of a\ncannon wearing the\nWing Cap!\n\nUse the [C] Buttons to look\naround while flying, and\npress [Z] to land."))
|
||||
define_cs_dialog(DIALOG_033, 1, 6, 30, 200, ("Ciao! You've reached\nPrincess Toadstool's\ncastle via a warp pipe.\nUsing the controller is a\npiece of cake. Press [A] to\njump and [B] to attack.\nPress [B] to read signs,\ntoo. Use the Control Stick\nin the center of the\ncontroller to move Mario\naround. Now, head for\nthe castle."))
|
||||
define_cs_dialog(DIALOG_034, 1, 6, 30, 200, ("Good afternoon. The\nLakitu Bros., here,\nreporting live from just\noutside the Princess's\ncastle.\n\nMario has just arrived\non the scene, and we'll\nbe filming the action live\nas he enters the castle\nand pursues the missing\nPower Stars.\nAs seasoned cameramen,\nwe'll be shooting from the\nrecommended angle, but\nyou can change the\ncamera angle by pressing\nthe [C] Buttons.\nIf we can't adjust the\nview any further, we'll\nbuzz. To take a look at\nthe surroundings, stop\nand press [C]▲.\n\nPress [A] to resume play.\nSwitch camera modes with\nthe [R] Button. Signs along\nthe way will review these\ninstructions.\n\nFor now, reporting live,\nthis has been the\nLakitu Bros."))
|
||||
define_cs_dialog(DIALOG_035, 1, 5, 30, 200, ("There are four camera, or\n『[C],』 Buttons. Press [C]▲\nto look around using the\nControl Stick.\n\nYou'll usually see Mario\nthrough Lakitu's camera.\nIt is the camera\nrecommended for normal\nplay.\nYou can change angles by\npressing [C]▶. If you press\n[R], the view switches to\nMario's camera, which\nis directly behind him.\nPress [R] again to return\nto Lakitu's camera. Press\n[C]▼ to see Mario from\nafar, using either\nLakitu's or Mario's view."))
|
||||
define_cs_dialog(DIALOG_036, 1, 5, 30, 200, ("OBSERVATION PLATFORM\nPress [C]▲ to take a look\naround. Don't miss\nanything!\n\nPress [R] to switch to\nMario's camera. It\nalways follows Mario.\nPress [R] again to switch\nto Lakitu's camera.\nPause the game and\nswitch the mode to 『fix』\nthe camera in place while\nholding [R]. Give it a try!"))
|
||||
define_cs_dialog(DIALOG_037, 1, 2, 30, 200, ("I win! You lose!\nHa ha ha ha!\nYou're no slouch, but I'm\na better sledder!\nBetter luck next time!"))
|
||||
define_cs_dialog(DIALOG_038, 1, 3, 95, 200, ("Reacting to the Star\npower, the door slowly\nopens."))
|
||||
define_cs_dialog(DIALOG_039, 1, 4, 30, 200, ("No visitors allowed,\nby decree of\nthe Big Bob-omb\n\nI shall never surrender my\nStars, for they hold the\npower of the castle in\ntheir glow.\nThey were a gift from\nBowser, the Koopa King\nhimself, and they lie well\nhidden within my realm.\nNot a whisper of their\nwhereabouts shall leave\nmy lips. Oh, all right,\nperhaps one hint:\nHeed the Star names at\nthe beginning of the\ncourse.\n//--The Big Bob-omb"))
|
||||
define_cs_dialog(DIALOG_040, 1, 3, 30, 200, ("Warning!\nCold, Cold Crevasse\nBelow!"))
|
||||
define_cs_dialog(DIALOG_041, 1, 3, 30, 200, ("I win! You lose!\nHa ha ha!\n\nThat's what you get for\nmessin' with Koopa the\nQuick.\nBetter luck next time!"))
|
||||
define_cs_dialog(DIALOG_042, 1, 4, 30, 200, ("Caution! Narrow Bridge!\nCross slowly!\n\n\nYou can jump to the edge\nof the cliff and hang on,\nand you can climb off the\nedge if you move slowly.\nWhen you want to let go,\neither press [Z] or press\nthe Control Stick in the\ndirection of Mario's back.\nTo climb up, press Up on\nthe Control Stick. To\nscurry up quickly, press\nthe [A] Button."))
|
||||
define_cs_dialog(DIALOG_043, 1, 5, 30, 200, ("If you jump and hold the\n[A] Button, you can hang on\nto some objects overhead.\nIt's the same as grabbing\na flying bird!"))
|
||||
define_cs_dialog(DIALOG_044, 1, 5, 95, 200, ("Whooo's there? Whooo\nwoke me up? It's still\ndaylight--I should be\nsleeping!\n\nHey, as long as I'm\nawake, why not take a\nshort flight with me?\nPress and hold [A] to grab\non. Release [A] to let go.\nI'll take you wherever\nyou want to go, as long\nas my wings hold out.\nWatch my shadow, and\ngrab on."))
|
||||
define_cs_dialog(DIALOG_045, 1, 6, 95, 200, ("Whew! I'm just about\nflapped out. You should\nlay off the pasta, Mario!\nThat's it for now. Press\n[A] to let go. Okay,\nbye byyyyyyeeee!"))
|
||||
define_cs_dialog(DIALOG_046, 1, 5, 30, 200, ("You have to master three\nimportant jumping\ntechniques.\nFirst try the Triple Jump.\n\nRun fast, then jump three\ntimes, one, two, three.\nIf you time the jumps\nright, you'll hop, skip,\nthen jump really high.\nNext, go for distance\nwith the Long Jump. Run,\npress [Z] to crouch then [A]\nto jump really far.\n\nTo do the Wall Kick, press\n[A] to jump at a wall, then\njump again when you hit\nthe wall.\n\nGot that? Triple Jump,\nLong Jump, Wall Kick.\nPractice, practice,\npractice. You don't stand\na chance without them."))
|
||||
define_cs_dialog(DIALOG_047, 1, 2, 95, 200, ("Hi! I'll prepare the\ncannon for you!"))
|
||||
define_cs_dialog(DIALOG_048, 1, 4, 30, 200, ("Snow Mountain Summit\nWatch for slippery\nconditions! Please enter\nthe cottage first."))
|
||||
define_cs_dialog(DIALOG_049, 1, 5, 30, 200, ("Remember that tricky Wall\nKick jump? It's a\ntechnique you'll have to\nmaster in order to reach\nhigh places.\nUse it to jump from wall\nto wall. Press the\nControl Stick in the\ndirection you want to\nbounce to gain momentum.\nPractice makes perfect!"))
|
||||
define_cs_dialog(DIALOG_050, 1, 4, 30, 200, ("Hold [Z] to crouch and\nslide down a slope.\nOr press [Z] while in the\nair to Pound the Ground!\nIf you stop, crouch, then\njump, you'll do a\nBackward Somersault!\nGot that?\nThere's more. Crouch and\nthen jump to do a\nLong Jump! Or crouch and\nwalk to...never mind."))
|
||||
define_cs_dialog(DIALOG_051, 1, 6, 30, 200, ("Climbing's easy! When you\njump at trees, poles or\npillars, you'll grab them\nautomatically. Press [A] to\njump off backward.\n\nTo rotate around the\nobject, press Right or\nLeft on the Control Stick.\nWhen you reach the top,\npress Up to do a\nhandstand!\nJump off from the\nhandstand for a high,\nstylin' dismount."))
|
||||
define_cs_dialog(DIALOG_052, 1, 5, 30, 200, ("Stop and press [Z] to\ncrouch, then press [A]\nto do a high, Backward\nSomersault!\n\nTo perform a Side\nSomersault, run, do a\nsharp U-turn and jump.\nYou can catch lots of\nair with both jumps."))
|
||||
define_cs_dialog(DIALOG_053, 1, 5, 30, 200, ("Sometimes, if you pass\nthrough a coin ring or\nfind a secret point in a\ncourse, a red number will\nappear.\nIf you trigger five red\nnumbers, a secret Star\nwill show up."))
|
||||
define_cs_dialog(DIALOG_054, 1, 5, 30, 200, ("Welcome to the snow\nslide! Hop on! To speed\nup, press forward on the\nControl Stick. To slow\ndown, pull back."))
|
||||
define_cs_dialog(DIALOG_055, 1, 4, 30, 200, ("Hey-ey, Mario, buddy,\nhowzit goin'? Step right\nup. You look like a fast\nsleddin' kind of guy.\nI know speed when I see\nit, yes siree--I'm the\nworld champion sledder,\nyou know. Whaddya say?\nHow about a race?\nReady...\n\n//Go//// Don't Go"))
|
||||
define_cs_dialog(DIALOG_056, 1, 6, 30, 200, ("You brrrr-oke my record!\nUnbelievable! I knew\nthat you were the coolest.\nNow you've proven\nthat you're also the\nfastest!\nI can't award you a gold\nmedal, but here, take this\nStar instead. You've\nearned it!"))
|
||||
define_cs_dialog(DIALOG_057, 1, 4, 30, 200, ("Egad! My baby!! Have you\nseen my baby??? She's\nthe most precious baby in\nthe whole wide world.\n(They say she has my\nbeak...) I just can't\nremember where I left\nher.\nLet's see...I stopped\nfor herring and ice cubes,\nthen I...oohh! I just\ndon't know!"))
|
||||
define_cs_dialog(DIALOG_058, 1, 4, 30, 200, ("You found my precious,\nprecious baby! Where\nhave you been? How can\nI ever thank you, Mario?\nOh, I do have this...\n...Star. Here, take it\nwith my eternal\ngratitude."))
|
||||
define_cs_dialog(DIALOG_059, 1, 4, 30, 200, ("That's not my baby! She\nlooks nothing like me!\nHer parents must be\nworried sick!"))
|
||||
define_cs_dialog(DIALOG_060, 1, 4, 30, 200, ("ATTENTION!\nRead Before Diving In!\n\n\nIf you stay under the\nwater for too long, you'll\nrun out of oxygen.\n\nReturn to the surface for\nair or find an air bubble\nor coins to breathe while\nunderwater.\nPress [A] to swim. Hold [A]\nto swim slow and steady.\nTap [A] with smooth timing\nto gain speed.\nPress Up on the\nControl Stick and press [A]\nto dive.\n\nPress Down on the Control\nStick and press [A] to\nreturn to the surface.\n\nHold Down and press [A]\nwhile on the surface near\nthe edge of the water to\njump out."))
|
||||
define_cs_dialog(DIALOG_061, 1, 4, 30, 200, ("BRRR! Frostbite Danger!\nDo not swim here.\nI'm serious.\n/--The Penguin"))
|
||||
define_cs_dialog(DIALOG_062, 1, 3, 30, 200, ("Hidden inside the green\nblock is the amazing\nMetal Cap.\nWearing it, you won't\ncatch fire or be hurt\nby enemy attacks.\nYou don't even have to\nbreathe while wearing it.\n\nThe only problem:\nYou can't swim in it."))
|
||||
define_cs_dialog(DIALOG_063, 1, 5, 30, 200, ("The Vanish Cap is inside\nthe blue block. Mr. I.\nwill be surprised, since\nyou'll be invisible when\nyou wear it!\nEven the Big Boo will be\nfooled--and you can walk\nthrough secret walls, too."))
|
||||
define_cs_dialog(DIALOG_064, 1, 5, 30, 200, ("When you put on the Wing\nCap that comes from a\nred block, do the Triple\nJump to soar high into\nthe sky.\nUse the Control Stick to\nguide Mario. Pull back to\nto fly up, press forward\nto nose down, and press [Z]\nto land."))
|
||||
define_cs_dialog(DIALOG_065, 1, 6, 30, 200, ("Swimming Lessons!\nTap [A] to do the breast\nstroke. If you time the\ntaps right, you'll swim\nfast.\n\nPress and hold [A] to do a\nslow, steady flutter kick.\nPress Up on the Control\nStick to dive, and pull\nback on the stick to head\nfor the surface.\nTo jump out of the water,\nhold Down on the Control\nStick, then press [A].\nEasy as pie, right?\n\n\nBut remember:\nMario can't breathe under\nthe water! Return to the\nsurface for air when the\nPower Meter runs low.\n\nAnd one last thing: You\ncan't open doors that\nare underwater."))
|
||||
define_cs_dialog(DIALOG_066, 1, 5, 30, 200, ("Mario, it's Peach!\nPlease be careful! Bowser\nis so wicked! He will try\nto burn you with his\nhorrible flame breath.\nRun around behind and\ngrab him by the tail with\nthe [B] Button. Once you\ngrab hold, swing him\naround in great circles.\nRotate the Control Stick\nto go faster and faster.\nThe faster you swing him,\nthe farther he'll fly.\n\nUse the [C] Buttons to look\naround, Mario. You have\nto throw Bowser into one\nof the bombs in the four\ncorners.\nAim well, then press [B]\nagain to launch Bowser.\nGood luck, Mario! Our\nfate is in your hands."))
|
||||
define_cs_dialog(DIALOG_067, 1, 5, 30, 200, ("Tough luck, Mario!\nPrincess Toadstool isn't\nhere...Gwa ha ha!! Go\nahead--just try to grab\nme by the tail!\nYou'll never be able to\nswing ME around! A wimp\nlike you won't throw me\nout of here! Never! Ha!"))
|
||||
define_cs_dialog(DIALOG_068, 1, 5, 30, 200, ("It's Lethal Lava Land!\nIf you catch fire or fall\ninto a pool of flames,\nyou'll be hopping mad, but\ndon't lose your cool.\nYou can still control\nMario--just try to keep\ncalm!"))
|
||||
define_cs_dialog(DIALOG_069, 1, 6, 30, 200, ("Sometimes you'll bump into\ninvisible walls at the\nedges of the painting\nworlds. If you hit a wall\nwhile flying, you'll bounce\nback."))
|
||||
define_cs_dialog(DIALOG_070, 1, 5, 30, 200, ("You can return to the\ncastle's main hall at any\ntime from the painting\nworlds where the enemies\nlive.\nJust stop, stand still,\npress Start to pause the\ngame, then select\n『Exit Course.』\n\nYou don't have to collect\nall Power Stars in one\ncourse before going on to\nthe next.\n\nReturn later, when you're\nmore experienced, to pick\nup difficult ones.\n\n\nWhenever you find a Star,\na hint for finding the\nnext one will appear on\nthe course's start screen.\n\nYou can, however, collect\nany of the remaining\nStars next. You don't\nhave to recover the one\ndescribed by the hint."))
|
||||
define_cs_dialog(DIALOG_071, 1, 3, 30, 200, ("Danger Ahead!\nBeware of the strange\ncloud! Don't inhale!\nIf you feel faint, run for\nhigher ground and fresh\nair!\nCircle: Shelter\nArrow: Entrance-Exit"))
|
||||
define_cs_dialog(DIALOG_072, 1, 5, 30, 200, ("High winds ahead!\nPull your Cap down tight.\nIf it blows off, you'll\nhave to find it on this\nmountain."))
|
||||
define_cs_dialog(DIALOG_073, 1, 4, 95, 200, ("Aarrgh! Ahoy, matey. I\nhave sunken treasure,\nhere, I do.\n\nBut to pluck the plunder,\nyou must open the\nTreasure Chests in the\nright order.\nWhat order is that,\nye say?\n\n\nI'll never tell!\n\n//--The Cap'n"))
|
||||
define_cs_dialog(DIALOG_074, 1, 5, 30, 200, ("You can grab on to the\nedge of a cliff or ledge\nwith your fingertips and\nhang down from it.\n\nTo drop from the edge,\neither press the Control\nStick in the direction of\nMario's back or press the\n[Z] Button.\nTo get up onto the ledge,\neither press Up on the\nControl Stick or press [A]\nas soon as you grab the\nledge to climb up quickly."))
|
||||
define_cs_dialog(DIALOG_075, 1, 5, 30, 200, ("Mario!! My castle is in\ngreat peril. I know that\nBowser is the cause...and\nI know that only you can\nstop him!\nThe doors in the castle\nthat have been sealed by\nBowser can be opened only\nwith Star Power.\n\nBut there are secret\npaths in the castle,\npaths that Bowser hasn't\nfound.\n\nOne of those paths is in\nthis room, and it holds\none of the castle's Secret\nStars!\n\nFind that Secret Star,\nMario! It will help you\non your quest. Please,\nMario, you have to\nhelp us!\nRetrieve all of the\nPower Stars in the castle\nand free us from this\nawful prison!\nPlease!"))
|
||||
define_cs_dialog(DIALOG_076, 1, 6, 30, 200, ("Thanks to the power of\nthe Stars, life is\nreturning to the castle.\nPlease, Mario, you have\nto give Bowser the boot!\n\nHere, let me tell you a\nlittle something about the\ncastle. In the room with\nthe mirrors, look carefully\nfor anything that's not\nreflected in the mirror.\nAnd when you go to the\nwater town, you can flood\nit with a high jump into\nthe painting. Oh, by the\nway, look what I found!"))
|
||||
define_cs_dialog(DIALOG_077, 1, 2, 150, 200, ("It is decreed that one\nshall pound the pillars."))
|
||||
define_cs_dialog(DIALOG_078, 1, 5, 30, 200, ("Break open the Blue Coin\nBlock by Pounding the\nGround with the [Z] Button.\nOne Blue Coin is worth\nfive Yellow Coins.\nBut you have to hurry!\nThe coins will disappear\nif you're not quick to\ncollect them! Too bad."))
|
||||
define_cs_dialog(DIALOG_079, 1, 4, 30, 200, ("Owwwuu! Let me go!\nUukee-kee! I was only\nteasing! Can't you take\na joke?\nI'll tell you what, let's\ntrade. If you let me go,\nI'll give you something\nreally good.\nSo, how about it?\n\n//Free him/ Hold on"))
|
||||
define_cs_dialog(DIALOG_080, 1, 1, 30, 200, ("Eeeh hee hee hee!"))
|
||||
define_cs_dialog(DIALOG_081, 1, 4, 30, 200, ("The mystery is of Wet\nor Dry.\nAnd where does the\nsolution lie?\nThe city welcomes visitors\nwith the depth they bring\nas they enter."))
|
||||
define_cs_dialog(DIALOG_082, 1, 4, 30, 200, ("Hold on to your hat! If\nyou lose it, you'll be\ninjured easily.\n\nIf you do lose your Cap,\nyou'll have to find it in\nthe course where you\nlost it.\nOh, boy, it's not looking\ngood for Peach. She's\nstill trapped somewhere\ninside the walls.\nPlease, Mario, you have\nto help her! Did you know\nthat there are enemy\nworlds inside the walls?\nYup. It's true. Bowser's\ntroops are there, too.\nOh, here, take this. I've\nbeen keeping it for you."))
|
||||
define_cs_dialog(DIALOG_083, 1, 6, 30, 200, ("There's something strange\nabout that clock. As you\njump inside, watch the\nposition of the big hand.\nOh, look what I found!\nHere, Mario, catch!"))
|
||||
define_cs_dialog(DIALOG_084, 1, 3, 30, 200, ("Yeeoww! Unhand me,\nbrute! I'm late, so late,\nI must make haste!\nThis shiny thing? Mine!\nIt's mine. Finders,\nkeepers, losers...\nLate, late, late...\nOuch! Take it then! A\ngift from Bowser, it was.\nNow let me be! I have a\ndate! I cannot be late\nfor tea!"))
|
||||
define_cs_dialog(DIALOG_085, 1, 5, 30, 200, ("You don't stand a ghost\nof a chance in this house.\nIf you walk out of here,\nyou deserve...\n...a Ghoul Medal..."))
|
||||
define_cs_dialog(DIALOG_086, 1, 3, 30, 200, ("Running around in circles\nmakes some bad guys roll\ntheir eyes."))
|
||||
define_cs_dialog(DIALOG_087, 1, 4, 30, 200, ("Santa Claus isn't the only\none who can go down a\nchimney! Come on in!\n/--Cabin Proprietor"))
|
||||
define_cs_dialog(DIALOG_088, 1, 5, 30, 200, ("Work Elevator\nFor those who get off\nhere: Grab the pole to the\nleft and slide carefully\ndown."))
|
||||
define_cs_dialog(DIALOG_089, 1, 5, 95, 200, ("Both ways fraught with\ndanger! Watch your feet!\nThose who can't do the\nLong Jump, tsk, tsk. Make\nyour way to the right.\nRight: Work Elevator\n/// Cloudy Maze\nLeft: Black Hole\n///Underground Lake\n\nRed Circle: Elevator 2\n//// Underground Lake\nArrow: You are here"))
|
||||
define_cs_dialog(DIALOG_090, 1, 6, 30, 200, ("Bwa ha ha ha!\nYou've stepped right into\nmy trap, just as I knew\nyou would! I warn you,\n『Friend,』 watch your\nstep!"))
|
||||
define_cs_dialog(DIALOG_091, 2, 2, 30, 200, ("Danger!\nStrong Gusts!\nBut the wind makes a\ncomfy ride."))
|
||||
define_cs_dialog(DIALOG_092, 1, 5, 30, 200, ("Pestering me again, are\nyou, Mario? Can't you see\nthat I'm having a merry\nlittle time, making\nmischief with my minions?\nNow, return those Stars!\nMy troops in the walls\nneed them! Bwa ha ha!"))
|
||||
define_cs_dialog(DIALOG_093, 1, 5, 30, 200, ("Mario! You again! Well\nthat's just fine--I've\nbeen looking for something\nto fry with my fire\nbreath!\nYour Star Power is\nuseless against me!\nYour friends are all\ntrapped within the\nwalls...\nAnd you'll never see the\nPrincess again!\nBwa ha ha ha!"))
|
||||
define_cs_dialog(DIALOG_094, 1, 4, 30, 200, ("Get a good run up the\nslope! Do you remember\nthe Long Jump? Run, press\n[Z], then jump!"))
|
||||
define_cs_dialog(DIALOG_095, 1, 4, 30, 200, ("To read a sign, stand in\nfront of it and press [B],\nlike you did just now.\n\nWhen you want to talk to\na Koopa Troopa or other\nanimal, stand right in\nfront of it.\nPlease recover the Stars\nthat were stolen by\nBowser in this course."))
|
||||
define_cs_dialog(DIALOG_096, 1, 4, 30, 200, ("The path is narrow here.\nEasy does it! No one is\nallowed on top of the\nmountain!\nAnd if you know what's\ngood for you, you won't\nwake anyone who's\nsleeping!\nMove slowly,\ntread lightly."))
|
||||
define_cs_dialog(DIALOG_097, 1, 5, 30, 200, ("Don't be a pushover!\nIf anyone tries to shove\nyou around, push back!\nIt's one-on-one, with a\nfiery finish for the loser!"))
|
||||
define_cs_dialog(DIALOG_098, 1, 2, 95, 200, ("Come on in here...\n...heh, heh, heh..."))
|
||||
define_cs_dialog(DIALOG_099, 1, 5, 95, 200, ("Eh he he...\nYou're mine, now, hee hee!\nI'll pass right through\nthis wall. Can you do\nthat? Heh, heh, heh!")) -- unused
|
||||
define_cs_dialog(DIALOG_100, 1, 3, 95, 200, ("Ukkiki...Wakkiki...kee kee!\nHa! I snagged it!\nIt's mine! Heeheeheeee!"))
|
||||
define_cs_dialog(DIALOG_101, 1, 3, 95, 200, ("Ackk! Let...go...\nYou're...choking...me...\nCough...I've been framed!\nThis Cap? Oh, all right,\ntake it. It's a cool Cap,\nbut I'll give it back.\nI think it looks better on\nme than it does on you,\nthough! Eeeee! Kee keee!"))
|
||||
define_cs_dialog(DIALOG_102, 1, 5, 30, 200, ("Pssst! The Boos are super\nshy. If you look them\nin the eyes, they fade\naway, but if you turn\nyour back, they reappear.\nIt's no use trying to hit\nthem when they're fading\naway. Instead, sneak up\nbehind them and punch."))
|
||||
define_cs_dialog(DIALOG_103, 1, 4, 95, 200, ("Upon four towers\none must alight...\nThen at the peak\nshall shine the light..."))
|
||||
define_cs_dialog(DIALOG_104, 1, 5, 30, 200, ("The shadowy star in front\nof you is a 『Star\nMarker.』 When you collect\nall 8 Red Coins, the Star\nwill appear here."))
|
||||
define_cs_dialog(DIALOG_105, 1, 3, 95, 200, ("Ready for blastoff! Come\non, hop into the cannon!\n\nYou can reach the Star on\nthe floating island by\nusing the four cannons.\nUse the Control Stick to\naim, then press [A] to fire.\n\nIf you're handy, you can\ngrab on to trees or poles\nto land."))
|
||||
define_cs_dialog(DIALOG_106, 1, 2, 95, 200, ("Ready for blastoff! Come\non, hop into the cannon!"))
|
||||
define_cs_dialog(DIALOG_107, 1, 3, 95, 200, ("Ghosts...\n...don't...\n...DIE!\nHeh, heh, heh!\nCan you get out of here...\n...alive?"))
|
||||
define_cs_dialog(DIALOG_108, 1, 2, 95, 200, ("Boooooo-m! Here comes\nthe master of mischief,\nthe tower of terror,\nthe Big Boo!\nKa ha ha ha..."))
|
||||
define_cs_dialog(DIALOG_109, 1, 4, 95, 200, ("Ooooo Nooooo!\nTalk about out-of-body\nexperiences--my body\nhas melted away!\nHave you run in to any\nheadhunters lately??\nI could sure use a new\nbody!\nBrrr! My face might\nfreeze like this!"))
|
||||
define_cs_dialog(DIALOG_110, 1, 5, 95, 200, ("I need a good head on my\nshoulders. Do you know of\nanybody in need of a good\nbody? Please! I'll follow\nyou if you do!"))
|
||||
define_cs_dialog(DIALOG_111, 1, 4, 95, 200, ("Perfect! What a great\nnew body! Here--this is a\npresent for you. It's sure\nto warm you up."))
|
||||
define_cs_dialog(DIALOG_112, 1, 4, 30, 200, ("Collect as many coins as\npossible! They'll refill\nyour Power Meter.\n\nYou can check to see how\nmany coins you've\ncollected in each of the\n15 enemy worlds.\nYou can also recover\npower by touching the\nSpinning Heart.\n\nThe faster you run\nthrough the heart, the\nmore power you'll recover."))
|
||||
define_cs_dialog(DIALOG_113, 1, 6, 30, 200, ("There are special Caps in\nthe red, green and blue\nblocks. Step on the\nswitches in the hidden\ncourses to activate the\nCap Blocks."))
|
||||
define_cs_dialog(DIALOG_114, 1, 5, 95, 200, ("It makes me so mad! We\nbuild your houses, your\ncastles. We pave your\nroads, and still you\nwalk all over us.\nDo you ever say thank\nyou? No! Well, you're not\ngoing to wipe your feet\non me! I think I'll crush\nyou just for fun!\nDo you have a problem\nwith that? Just try to\npound me, wimp! Ha!"))
|
||||
define_cs_dialog(DIALOG_115, 1, 5, 95, 200, ("No! Crushed again!\nI'm just a stepping stone,\nafter all. I won't gravel,\ner, grovel. Here, you win.\nTake this with you!"))
|
||||
define_cs_dialog(DIALOG_116, 1, 5, 95, 200, ("Whaaa....Whaaat?\nCan it be that a\npipsqueak like you has\ndefused the Bob-omb\nking????\nYou might be fast enough\nto ground me, but you'll\nhave to pick up the pace\nif you want to take King\nBowser by the tail.\nMethinks my troops could\nlearn a lesson from you!\nHere is your Star, as I\npromised, Mario.\n\nIf you want to see me\nagain, select this Star\nfrom the menu. For now,\nfarewell."))
|
||||
define_cs_dialog(DIALOG_117, 1, 1, 95, 200, ("Who...walk...here?\nWho...break...seal?\nWake..ancient..ones?\nWe no like light...\nRrrrummbbble...\nWe no like...intruders!\nNow battle...\n...hand...\n...to...\n...hand!"))
|
||||
define_cs_dialog(DIALOG_118, 1, 6, 95, 200, ("Grrrrumbbble!\nWhat...happen?\nWe...crushed like pebble.\nYou so strong!\nYou rule ancient pyramid!\nFor today...\nNow, take Star of Power.\nWe...sleep...darkness."))
|
||||
define_cs_dialog(DIALOG_119, 1, 6, 30, 200, ("Grrr! I was a bit\ncareless. This is not as I\nhad planned...but I still\nhold the power of the\nStars, and I still have\nPeach.\nBwa ha ha! You'll get no\nmore Stars from me! I'm\nnot finished with you yet,\nbut I'll let you go for\nnow. You'll pay for this...\nlater!"))
|
||||
define_cs_dialog(DIALOG_120, 1, 4, 30, 200, ("Ooowaah! Can it be that\nI've lost??? The power of\nthe Stars has failed me...\nthis time.\nConsider this a draw.\nNext time, I'll be in\nperfect condition.\n\nNow, if you want to see\nyour precious Princess,\ncome to the top of the\ntower.\nI'll be waiting!\nGwa ha ha ha!"))
|
||||
define_cs_dialog(DIALOG_121, 1, 5, 30, 200, ("Nooo! It can't be!\nYou've really beaten me,\nMario?!! I gave those\ntroops power, but now\nit's fading away!\nArrgghh! I can see peace\nreturning to the world! I\ncan't stand it! Hmmm...\nIt's not over yet...\n\nC'mon troops! Let's watch\nthe ending together!\nBwa ha ha!"))
|
||||
define_cs_dialog(DIALOG_122, 1, 4, 30, 200, ("The Black Hole\nRight: Work Elevator\n/// Cloudy Maze\nLeft: Underground Lake"))
|
||||
define_cs_dialog(DIALOG_123, 1, 4, 30, 200, ("Metal Cavern\nRight: To Waterfall\nLeft: Metal Cap Switch"))
|
||||
define_cs_dialog(DIALOG_124, 1, 4, 30, 200, ("Work Elevator\nDanger!!\nRead instructions\nthoroughly!\nElevator continues in the\ndirection of the arrow\nactivated."))
|
||||
define_cs_dialog(DIALOG_125, 1, 3, 30, 200, ("Hazy Maze-Exit\nDanger! Closed.\nTurn back now."))
|
||||
define_cs_dialog(DIALOG_126, 2, 3, 30, 200, ("Up: Black Hole\nRight: Work Elevator\n/// Hazy Maze"))
|
||||
define_cs_dialog(DIALOG_127, 3, 4, 30, 200, ("Underground Lake\nRight: Metal Cave\nLeft: Abandoned Mine\n///(Closed)\nA gentle sea dragon lives\nhere. Pound on his back to\nmake him lower his head.\nDon't become his lunch."))
|
||||
define_cs_dialog(DIALOG_128, 1, 4, 95, 200, ("You must fight with\nhonor! It is against the\nroyal rules to throw the\nking out of the ring!"))
|
||||
define_cs_dialog(DIALOG_129, 1, 5, 30, 200, ("Welcome to the Vanish\nCap Switch Course! All of\nthe blue blocks you find\nwill become solid once you\nstep on the Cap Switch.\nYou'll disappear when you\nput on the Vanish Cap, so\nyou'll be able to elude\nenemies and walk through\nmany things. Try it out!"))
|
||||
define_cs_dialog(DIALOG_130, 1, 5, 30, 200, ("Welcome to the Metal Cap\nSwitch Course! Once you\nstep on the Cap Switch,\nthe green blocks will\nbecome solid.\nWhen you turn your body\ninto metal with the Metal\nCap, you can walk\nunderwater! Try it!"))
|
||||
define_cs_dialog(DIALOG_131, 1, 5, 30, 200, ("Welcome to the Wing Cap\nCourse! Step on the red\nswitch at the top of the\ntower, in the center of\nthe rainbow ring.\nWhen you trigger the\nswitch, all of the red\nblocks you find will\nbecome solid.\n\nTry out the Wing Cap! Do\nthe Triple Jump to take\noff and press [Z] to land.\n\n\nPull back on the Control\nStick to go up and push\nforward to nose down,\njust as you would when\nflying an airplane."))
|
||||
define_cs_dialog(DIALOG_132, 1, 4, 30, 200, ("Whoa, Mario, pal, you\naren't trying to cheat,\nare you? Shortcuts aren't\nallowed.\nNow, I know that you\nknow better. You're\ndisqualified! Next time,\nplay fair!"))
|
||||
define_cs_dialog(DIALOG_133, 1, 6, 30, 200, ("Am I glad to see you! The\nPrincess...and I...and,\nwell, everybody...we're all\ntrapped inside the castle\nwalls.\n\nBowser has stolen the\ncastle's Stars, and he's\nusing their power to\ncreate his own world in\nthe paintings and walls.\n\nPlease recover the Power\nStars! As you find them,\nyou can use their power\nto open the doors that\nBowser has sealed.\n\nThere are four rooms on\nthe first floor. Start in\nthe one with the painting\nof Bob-omb inside. It's\nthe only room that Bowser\nhasn't sealed.\nWhen you collect eight\nPower Stars, you'll be\nable to open the door\nwith the big star. The\nPrincess must be inside!"))
|
||||
define_cs_dialog(DIALOG_134, 1, 5, 30, 200, ("The names of the Stars\nare also hints for\nfinding them. They are\ndisplayed at the beginning\nof each course.\nYou can collect the Stars\nin any order. You won't\nfind some Stars, enemies\nor items unless you select\na specific Star.\nAfter you collect some\nStars, you can try\nanother course.\nWe're all waiting for\nyour help!"))
|
||||
define_cs_dialog(DIALOG_135, 1, 5, 30, 200, ("It was Bowser who stole\nthe Stars. I saw him with\nmy own eyes!\n\n\nHe's hidden six Stars in\neach course, but you\nwon't find all of them in\nsome courses until you\npress the Cap Switches.\nThe Stars you've found\nwill show on each course's\nstarting screen.\n\n\nIf you want to see some\nof the enemies you've\nalready defeated, select\nthe Stars you recovered\nfrom them."))
|
||||
define_cs_dialog(DIALOG_136, 1, 6, 30, 200, ("Wow! You've already\nrecovered that many\nStars? Way to go, Mario!\nI'll bet you'll have us out\nof here in no time!\n\nBe careful, though.\nBowser and his band\nwrote the book on 『bad.』\nTake my advice: When you\nneed to recover from\ninjuries, collect coins.\nYellow Coins refill one\npiece of the Power Meter,\nRed Coins refill two\npieces, and Blue Coins\nrefill five.\n\nTo make Blue Coins\nappear, pound on Blue\nCoin Blocks.\n\n\n\nAlso, if you fall from\nhigh places, you'll\nminimize damage if you\nPound the Ground as you\nland."))
|
||||
define_cs_dialog(DIALOG_137, 1, 6, 30, 200, ("Thanks, Mario! The castle\nis recovering its energy\nas you retrieve Power\nStars, and you've chased\nBowser right out of here,\non to some area ahead.\nOh, by the by, are you\ncollecting coins? Special\nStars appear when you\ncollect 100 coins in each\nof the 15 courses!"))
|
||||
define_cs_dialog(DIALOG_138, 1, 3, 30, 200, ("Down: Underground Lake\nLeft: Black Hole\nRight: Hazy Maze (Closed)"))
|
||||
define_cs_dialog(DIALOG_139, 1, 6, 30, 200, ("Above: Automatic Elevator\nElevator begins\nautomatically and follows\npre-set course.\nIt disappears\nautomatically, too."))
|
||||
define_cs_dialog(DIALOG_140, 1, 6, 30, 200, ("Elevator Area\nRight: Hazy Maze\n/// Entrance\nLeft: Black Hole\n///Elevator 1\nArrow: You are here"))
|
||||
define_cs_dialog(DIALOG_141, 1, 5, 150, 200, ("You've recovered one of\nthe stolen Power Stars!\nNow you can open some of\nthe sealed doors in the\ncastle.\nTry the Princess's room\non the second floor and\nthe room with the\npainting of Whomp's\nFortress on Floor 1.\nBowser's troops are still\ngaining power, so you\ncan't give up. Save us,\nMario! Keep searching for\nStars!"))
|
||||
define_cs_dialog(DIALOG_142, 1, 5, 150, 200, ("You've recovered three\nPower Stars! Now you can\nopen any door with a 3\non its star.\n\nYou can come and go from\nthe open courses as you\nplease. The enemies ahead\nare even meaner, so be\ncareful!"))
|
||||
define_cs_dialog(DIALOG_143, 1, 6, 150, 200, ("You've recovered eight of\nthe Power Stars! Now you\ncan open the door with\nthe big Star! But Bowser\nis just ahead...can you\nhear the Princess calling?"))
|
||||
define_cs_dialog(DIALOG_144, 1, 6, 150, 200, ("You've recovered 30\nPower Stars! Now you can\nopen the door with the\nbig Star! But before you\nmove on, how's it going\notherwise?\nDid you pound the two\ncolumns down? You didn't\nlose your hat, did you?\nIf you did, you'll have to\nstomp on the condor to\nget it back!\nThey say that Bowser has\nsneaked out of the sea\nand into the underground.\nHave you finally\ncornered him?"))
|
||||
define_cs_dialog(DIALOG_145, 1, 6, 150, 200, ("You've recovered 50\nPower Stars! Now you can\nopen the Star Door on the\nthird floor. Bowser's\nthere, you know.\n\nOh! You've found all of\nthe Cap Switches, haven't\nyou? Red, green and blue?\nThe Caps you get from the\ncolored blocks are really\nhelpful.\nHurry along, now. The\nthird floor is just ahead."))
|
||||
define_cs_dialog(DIALOG_146, 1, 6, 150, 200, ("You've found 70 Power\nStars! The mystery of the\nendless stairs is solved,\nthanks to you--and is\nBowser ever upset! Now,\non to the final bout!"))
|
||||
define_cs_dialog(DIALOG_147, 1, 5, 30, 200, ("Are you using the Cap\nBlocks? You really should,\nyou know.\n\n\nTo make them solid so you\ncan break them, you have\nto press the colored Cap\nSwitches in the castle's\nhidden courses.\nYou'll find the hidden\ncourses only after\nregaining some of the\nPower Stars.\n\nThe Cap Blocks are a big\nhelp! Red for the Wing\nCap, green for the Metal\nCap, blue for the Vanish\nCap."))
|
||||
define_cs_dialog(DIALOG_148, 1, 6, 30, 200, ("Snowman Mountain ahead.\nKeep out! And don't try\nthe Triple Jump over the\nice block shooter.\n\n\nIf you fall into the\nfreezing pond, your power\ndecreases quickly, and\nyou won't recover\nautomatically.\n//--The Snowman"))
|
||||
define_cs_dialog(DIALOG_149, 1, 3, 30, 200, ("Welcome to\nPrincess Toadstool's\nsecret slide!\nThere's a Star hidden\nhere that Bowser couldn't\nfind.\nWhen you slide, press\nforward to speed up,\npull back to slow down.\nIf you slide really\nfast, you'll win the Star!"))
|
||||
define_cs_dialog(DIALOG_150, 1, 5, 30, 200, ("Waaaa! You've flooded my\nhouse! Wh-why?? Look at\nthis mess! What am I\ngoing to do now?\n\nThe ceiling's ruined, the\nfloor is soaked...what to\ndo, what to do? Huff...\nhuff...it makes me so...\nMAD!!!\nEverything's been going\nwrong ever since I got\nthis Star...It's so shiny,\nbut it makes me feel...\nstrange..."))
|
||||
define_cs_dialog(DIALOG_151, 1, 4, 30, 200, ("I can't take this\nanymore! First you get\nme all wet, then you\nstomp on me!\nNow I'm really, really,\nREALLY mad!\nWaaaaaaaaaaaaaaaaa!!!"))
|
||||
define_cs_dialog(DIALOG_152, 1, 3, 30, 200, ("Owwch! Uncle! Uncle!\nOkay, I give. Take this\nStar!\nWhew! I feel better now.\nI don't really need it\nanymore, anyway--\nI can see the stars\nthrough my ceiling at\nnight.\nThey make me feel...\n...peaceful. Please, come\nback and visit anytime."))
|
||||
define_cs_dialog(DIALOG_153, 1, 4, 30, 200, ("Hey! Who's there?\nWhat's climbing on me?\nIs it an ice ant?\nA snow flea?\nWhatever it is, it's\nbugging me! I think I'll\nblow it away!"))
|
||||
define_cs_dialog(DIALOG_154, 1, 5, 30, 200, ("Hold on to your hat! If\nyou lose it, you'll be\neasily injured. If you\nlose it, look for it in the\ncourse where you lost it.\nSpeaking of lost, the\nPrincess is still stuck in\nthe walls somewhere.\nPlease help, Mario!\n\nOh, you know that there\nare secret worlds in the\nwalls as well as in the\npaintings, right?"))
|
||||
define_cs_dialog(DIALOG_155, 1, 6, 30, 200, ("Thanks to the power of\nthe Stars, life is\nreturning to the castle.\nPlease, Mario, you have\nto give Bowser the boot!\n\nHere, let me tell you a\nlittle something about the\ncastle. In the room with\nthe mirrors, look carefully\nfor anything that's not\nreflected in the mirror.\nAnd when you go to the\nwater town, you can flood\nit with a high jump into\nthe painting."))
|
||||
define_cs_dialog(DIALOG_156, 1, 5, 30, 200, ("The world inside the\nclock is so strange!\nWhen you jump inside,\nwatch the position of\nthe big hand!"))
|
||||
define_cs_dialog(DIALOG_157, 1, 5, 30, 200, ("Watch out! Don't let\nyourself be swallowed by\nquicksand.\n\n\nIf you sink into the sand,\nyou won't be able to\njump, and if your head\ngoes under, you'll be\nsmothered.\nThe dark areas are\nbottomless pits."))
|
||||
define_cs_dialog(DIALOG_158, 1, 6, 30, 200, ("1. If you jump repeatedly\nand time it right, you'll\njump higher and higher.\nIf you run really fast and\ntime three jumps right,\nyou can do a Triple Jump.\n2. Jump into a solid wall,\nthen jump again when you\nhit the wall. You can\nbounce to a higher level\nusing this Wall Kick."))
|
||||
define_cs_dialog(DIALOG_159, 1, 6, 30, 200, ("3. If you stop, press [Z]\nto crouch, then jump, you\ncan perform a Backward\nSomersault. To do a Long\nJump, run fast, press [Z],\nthen jump."))
|
||||
define_cs_dialog(DIALOG_160, 1, 4, 30, 200, ("Press [B] while running\nfast to do a Body Slide\nattack. To stand while\nsliding, press [A] or [B]."))
|
||||
define_cs_dialog(DIALOG_161, 1, 4, 30, 200, ("Mario!!!\nIt that really you???\nIt has been so long since\nour last adventure!\nThey told me that I might\nsee you if I waited here,\nbut I'd just about given\nup hope!\nIs it true? Have you\nreally beaten Bowser? And\nrestored the Stars to the\ncastle?\nAnd saved the Princess?\nI knew you could do it!\nNow I have a very special\nmessage for you.\nThanks for playing Super\nMario 64! This is the\nend of the game, but not\nthe end of the fun.\nWe want you to keep on\nplaying, so we have a\nlittle something for you.\nWe hope that you like it!\nEnjoy!!!\n\nThe Super Mario 64 Team"))
|
||||
define_cs_dialog(DIALOG_162, 1, 4, 30, 200, ("No, no, no! Not you\nagain! I'm in a great\nhurry, can't you see?\n\nI've no time to squabble\nover Stars. Here, have it.\nI never meant to hide it\nfrom you...\nIt's just that I'm in such\na rush. That's it, that's\nall. Now, I must be off.\nOwww! Let me go!"))
|
||||
define_cs_dialog(DIALOG_163, 1, 5, 30, 200, ("Noooo! You've really\nbeaten me this time,\nMario! I can't stand\nlosing to you!\n\nMy troops...worthless!\nThey've turned over all\nthe Power Stars! What?!\nThere are 120 in all???\n\nAmazing! There were some\nin the castle that I\nmissed??!!\n\n\nNow I see peace\nreturning to the world...\nOooo! I really hate that!\nI can't watch--\nI'm outta here!\nJust you wait until next\ntime. Until then, keep\nthat Control Stick\nsmokin'!\nBuwaa ha ha!"))
|
||||
define_cs_dialog(DIALOG_164, 1, 4, 30, 200, ("Mario! What's up, pal?\nI haven't been on the\nslide lately, so I'm out\nof shape.\nStill, I'm always up for a\ngood race, especially\nagainst an old sleddin'\nbuddy.\nWhaddya say?\nReady...set...\n\n//Go//// Don't Go"))
|
||||
define_cs_dialog(DIALOG_165, 1, 5, 30, 200, ("I take no responsibility\nwhatsoever for those who\nget dizzy and pass out\nfrom running around\nthis post."))
|
||||
define_cs_dialog(DIALOG_166, 1, 4, 30, 200, ("I'll be back soon.\nI'm out training now,\nso come back later.\n//--Koopa the Quick"))
|
||||
define_cs_dialog(DIALOG_167, 1, 4, 30, 200, ("Princess Toadstool's\ncastle is just ahead.\n\n\nPress [A] to jump, [Z] to\ncrouch, and [B] to punch,\nread a sign, or grab\nsomething.\nPress [B] again to throw\nsomething you're holding."))
|
||||
define_cs_dialog(DIALOG_168, 1, 5, 30, 200, ("Hey! Knock it off! That's\nthe second time you've\nnailed me. Now you're\nasking for it, linguine\nbreath!"))
|
||||
define_cs_dialog(DIALOG_169, 1, 4, 30, 200, ("Keep out!\nThat means you!\nArrgghh!\n\nAnyone entering this cave\nwithout permission will\nmeet certain disaster."))
|
||||
|
||||
local DIALOG_NAME = "Mario"
|
||||
|
||||
|
|
@ -12,24 +195,26 @@ function dialog_set_replace_name(name)
|
|||
DIALOG_NAME = name
|
||||
end
|
||||
|
||||
local prevChar = currChar
|
||||
local prevCharName = ""
|
||||
|
||||
local function dialog_swap()
|
||||
for i = DIALOG_000, DIALOG_COUNT - 1 do
|
||||
local dialog = smlua_text_utils_dialog_get(i)
|
||||
local name = characterTable[currChar][characterTable[currChar].currAlt].name
|
||||
local replaced_dialog = dialog.str:gsub(DIALOG_NAME, currChar)
|
||||
smlua_text_utils_dialog_replace(DIALOG_034, dialog.unused, dialog.linesPerBox, dialog.leftOffset, dialog.width, replaced_dialog)
|
||||
local function dialog_swap(charName)
|
||||
for i = DIALOG_000, #dialogTable do
|
||||
if dialogTable[i] ~= nil then
|
||||
local dialog = dialogTable[i]
|
||||
charName = charName:gsub('"', "'")
|
||||
local replaced_dialog = dialog.str:gsub(DIALOG_NAME, charName)
|
||||
real_dialog_replace(i, dialog.unused, dialog.linesPerBox, dialog.leftOffset, dialog.width, replaced_dialog)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function update()
|
||||
-- Query Character Swapped
|
||||
if prevChar ~= currChar then
|
||||
dialog_swap()
|
||||
prevChar = currChar
|
||||
local charName = characterTable[currChar][characterTable[currChar].currAlt].name
|
||||
if prevCharName ~= charName then
|
||||
dialog_swap(charName)
|
||||
prevCharName = charName
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
hook_event(HOOK_UPDATE, update)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
-- name: Character Select
|
||||
-- description:\\#ffff33\\-- Character Select Coop v1.12 --\n\n\\#dcdcdc\\A Library / API made to make adding and using Custom Characters as simple as possible!\nUse\\#ffff33\\ /char-select\\#dcdcdc\\ to get started!\n\nCreated by:\\#008800\\ Squishy6094\n\n\\#AAAAFF\\Updates can be found on\nCharacter Select's Github:\n\\#6666FF\\Squishy6094/character-select-coop
|
||||
-- description:\\#ffff33\\--- Character Select Coop v1.13 ---\n\n\\#dcdcdc\\A Library / API made to make adding and using Custom Characters as simple as possible!\nUse\\#ffff33\\ /char-select\\#dcdcdc\\ to get started!\n\nCreated by:\\#008800\\ Squishy6094\n\n\\#AAAAFF\\Updates can be found on\nCharacter Select's Github:\n\\#6666FF\\Squishy6094/character-select-coop
|
||||
-- pausable: false
|
||||
-- category: cs
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ characterTable = {
|
|||
credit = "Nintendo / Coop Team",
|
||||
color = { r = 255, g = 50, b = 50 },
|
||||
model = E_MODEL_MARIO,
|
||||
offset = 0,
|
||||
ogModel = E_MODEL_MARIO,
|
||||
forceChar = CT_MARIO,
|
||||
lifeIcon = gTextures.mario_head,
|
||||
starIcon = gTextures.star,
|
||||
|
|
@ -80,7 +80,7 @@ characterTable = {
|
|||
credit = "Nintendo / Coop Team",
|
||||
color = { r = 50, g = 255, b = 50 },
|
||||
model = E_MODEL_LUIGI,
|
||||
offset = 0,
|
||||
ogModel = E_MODEL_LUIGI,
|
||||
forceChar = CT_LUIGI,
|
||||
lifeIcon = gTextures.luigi_head,
|
||||
starIcon = gTextures.star,
|
||||
|
|
@ -97,7 +97,7 @@ characterTable = {
|
|||
credit = "Nintendo / Coop Team",
|
||||
color = { r = 50, g = 50, b = 255 },
|
||||
model = E_MODEL_TOAD_PLAYER,
|
||||
offset = 0,
|
||||
ogModel = E_MODEL_TOAD_PLAYER,
|
||||
forceChar = CT_TOAD,
|
||||
lifeIcon = gTextures.toad_head,
|
||||
starIcon = gTextures.star,
|
||||
|
|
@ -114,7 +114,7 @@ characterTable = {
|
|||
credit = "Nintendo / Coop Team",
|
||||
color = { r = 130, g = 25, b = 130 },
|
||||
model = E_MODEL_WALUIGI,
|
||||
offset = 0,
|
||||
ogModel = E_MODEL_WALUIGI,
|
||||
forceChar = CT_WALUIGI,
|
||||
lifeIcon = gTextures.waluigi_head,
|
||||
starIcon = gTextures.star,
|
||||
|
|
@ -132,7 +132,7 @@ characterTable = {
|
|||
credit = "Nintendo / Coop Team",
|
||||
color = { r = 255, g = 255, b = 50 },
|
||||
model = E_MODEL_WARIO,
|
||||
offset = 0,
|
||||
ogModel = E_MODEL_WARIO,
|
||||
forceChar = CT_WARIO,
|
||||
lifeIcon = gTextures.wario_head,
|
||||
starIcon = gTextures.star,
|
||||
|
|
@ -157,14 +157,13 @@ optionTableRef = {
|
|||
inputLatency = 5,
|
||||
showLocked = 6,
|
||||
-- Characters
|
||||
autoPalette = 7,
|
||||
localMoveset = 8,
|
||||
localModels = 9,
|
||||
localVoices = 10,
|
||||
localMoveset = 7,
|
||||
localModels = 8,
|
||||
localVoices = 9,
|
||||
-- CS
|
||||
credits = 11,
|
||||
debugInfo = 12,
|
||||
resetSaveData = 13,
|
||||
credits = 10,
|
||||
debugInfo = 11,
|
||||
resetSaveData = 12,
|
||||
}
|
||||
|
||||
optionTable = {
|
||||
|
|
@ -221,14 +220,6 @@ optionTable = {
|
|||
toggleMax = 1,
|
||||
description = {"Toggles if Locked Characters", "Display In-Menu"}
|
||||
},
|
||||
[optionTableRef.autoPalette] = {
|
||||
name = "Auto-Apply Palette",
|
||||
toggle = tonumber(mod_storage_load("autoPalette")),
|
||||
toggleSaveName = "autoPalette",
|
||||
toggleDefault = 1,
|
||||
toggleMax = 1,
|
||||
description = {"If On, Automatically", "sets your palette to the", "Character's Preset if avalible"}
|
||||
},
|
||||
[optionTableRef.localMoveset] = {
|
||||
name = "Character Moveset",
|
||||
toggle = tonumber(mod_storage_load("localMoveset")),
|
||||
|
|
@ -308,29 +299,6 @@ local menuColorTable = {
|
|||
{ r = 50, g = 50, b = 50 }
|
||||
}
|
||||
|
||||
-- Default Player Adjustments
|
||||
local defaultMenuColors = {
|
||||
[CT_MARIO] = menuColorTable[1],
|
||||
[CT_LUIGI] = menuColorTable[4],
|
||||
[CT_TOAD] = menuColorTable[5],
|
||||
[CT_WALUIGI] = menuColorTable[7],
|
||||
[CT_WARIO] = menuColorTable[3]
|
||||
}
|
||||
local defaultModels = {
|
||||
[CT_MARIO] = E_MODEL_MARIO,
|
||||
[CT_LUIGI] = E_MODEL_LUIGI,
|
||||
[CT_TOAD] = E_MODEL_TOAD_PLAYER,
|
||||
[CT_WALUIGI] = E_MODEL_WALUIGI,
|
||||
[CT_WARIO] = E_MODEL_WARIO
|
||||
}
|
||||
local defaultForceChar = {
|
||||
[CT_MARIO] = "CT_MARIO",
|
||||
[CT_LUIGI] = "CT_LUIGI",
|
||||
[CT_TOAD] = "CT_TOAD",
|
||||
[CT_WALUIGI] = "CT_WALUIGI",
|
||||
[CT_WARIO] = "CT_WARIO"
|
||||
}
|
||||
|
||||
---@param m MarioState
|
||||
local function nullify_inputs(m)
|
||||
local c = m.controller
|
||||
|
|
@ -524,7 +492,7 @@ end
|
|||
local stallFrame = 0
|
||||
local noLoop = false
|
||||
|
||||
local CUTSCENE_CS_MENU = 0xFA
|
||||
CUTSCENE_CS_MENU = 0xFA
|
||||
|
||||
local ignoredSurfaces = {
|
||||
SURFACE_BURNING, SURFACE_QUICKSAND, SURFACE_INSTANT_QUICKSAND, SURFACE_INSTANT_MOVING_QUICKSAND, SURFACE_DEEP_MOVING_QUICKSAND, SURFACE_INSTANT_QUICKSAND, SURFACE_DEEP_QUICKSAND, SURFACE_SHALLOW_MOVING_QUICKSAND,
|
||||
|
|
@ -556,6 +524,7 @@ local menuActBlacklist = {
|
|||
[ACT_PUSHING_DOOR] = true,
|
||||
[ACT_UNLOCKING_KEY_DOOR] = true,
|
||||
[ACT_UNLOCKING_STAR_DOOR] = true,
|
||||
[ACT_IN_CANNON] = true,
|
||||
-- Dialog Acts
|
||||
[ACT_READING_NPC_DIALOG] = true,
|
||||
[ACT_WAITING_FOR_DIALOG] = true,
|
||||
|
|
@ -563,31 +532,6 @@ local menuActBlacklist = {
|
|||
[ACT_READING_AUTOMATIC_DIALOG] = true,
|
||||
}
|
||||
|
||||
local faceAngle = 0
|
||||
local function anim_generic_idle_offset(offset, animFrame)
|
||||
return offset - math.max((math.sin((animFrame)/24*MATH_PI)+1.1)*2, 1.8)
|
||||
end
|
||||
local altOffsetAnim = {
|
||||
[MARIO_ANIM_CROUCHING] = true,
|
||||
[ACT_READING_AUTOMATIC_DIALOG] = true,
|
||||
[MARIO_ANIM_FALL_OVER_BACKWARDS] = true,
|
||||
[MARIO_ANIM_SLIDE_KICK] = false,
|
||||
[MARIO_ANIM_GROUND_POUND] = false,
|
||||
[MARIO_ANIM_GROUND_POUND_LANDING] = false,
|
||||
[MARIO_ANIM_SLEEP_IDLE] = false,
|
||||
[MARIO_ANIM_SLEEP_LYING] = false,
|
||||
[MARIO_ANIM_SLEEP_START_LYING] = false,
|
||||
[MARIO_ANIM_IDLE_HEAD_LEFT] = function (offset, animFrame)
|
||||
return anim_generic_idle_offset(offset, animFrame)
|
||||
end,
|
||||
[MARIO_ANIM_IDLE_HEAD_CENTER] = function (offset, animFrame)
|
||||
return anim_generic_idle_offset(offset, animFrame)
|
||||
end,
|
||||
[MARIO_ANIM_IDLE_HEAD_RIGHT] = function (offset, animFrame)
|
||||
return anim_generic_idle_offset(offset, animFrame)
|
||||
end,
|
||||
}
|
||||
|
||||
local prevBaseCharFrame = gNetworkPlayers[0].modelIndex
|
||||
local prevAnim = 0
|
||||
local animTimer = 0
|
||||
|
|
@ -628,15 +572,15 @@ local function mario_update(m)
|
|||
if charTable[charTable.currAlt].forceChar ~= nil then
|
||||
p.forceChar = charTable[charTable.currAlt].forceChar
|
||||
end
|
||||
p.modelEditOffset = charTable[charTable.currAlt].model - charTable[charTable.currAlt].ogModel
|
||||
m.marioObj.hookRender = 1
|
||||
else
|
||||
p.modelId = nil
|
||||
p.forceChar = defaultTable.forceChar
|
||||
p.modelEditOffset = 0
|
||||
currChar = 1
|
||||
end
|
||||
|
||||
p.offset = charTable[charTable.currAlt].offset
|
||||
|
||||
if menuAndTransition then
|
||||
--play_secondary_music(0, 0, 0.5, 0)
|
||||
camera_freeze()
|
||||
|
|
@ -659,7 +603,6 @@ local function mario_update(m)
|
|||
gLakituState.pos.z = m.pos.z + coss(faceAngle) * 500 * camScale
|
||||
|
||||
if m.forwardVel == 0 and m.pos.y == m.floorHeight and not ignoredSurfaces[m.floor.type] and m.health > 255 and not menuActBlacklist[m.action] then
|
||||
set_mario_action(m, ACT_IDLE, 0)
|
||||
set_mario_animation(m, MARIO_ANIM_FIRST_PERSON)
|
||||
end
|
||||
noLoop = false
|
||||
|
|
@ -712,6 +655,8 @@ local function mario_update(m)
|
|||
for i = 1, #optionTable do
|
||||
optionTable[i].optionBeingSet = false
|
||||
end
|
||||
|
||||
p.movesetToggle = optionTable[optionTableRef.localMoveset].toggle ~= 0
|
||||
end
|
||||
|
||||
local marioGfx = m.marioObj.header.gfx
|
||||
|
|
@ -721,27 +666,11 @@ local function mario_update(m)
|
|||
end
|
||||
animTimer = animTimer + 1
|
||||
|
||||
|
||||
local networkOffset = p.offset
|
||||
local forceChar = p.forceChar
|
||||
if networkOffset ~= 0 and networkOffset ~= nil then
|
||||
if m.playerIndex == 0 then
|
||||
end
|
||||
local offset = altOffsetAnim[marioGfx.animInfo.animID]
|
||||
if offset ~= false then
|
||||
if type(offset) == TYPE_FUNCTION then
|
||||
marioGfx.pos.y = marioGfx.pos.y + offset(networkOffset, marioGfx.animInfo.animFrame)
|
||||
elseif type(offset) == TYPE_TABLE then
|
||||
marioGfx.pos.y = marioGfx.pos.y - offset[(math.min(animTimer, #offset))]*networkOffset + networkOffset
|
||||
elseif type(offset) == TYPE_INTEGER then
|
||||
marioGfx.pos.y = marioGfx.pos.y + networkOffset*offset
|
||||
else
|
||||
marioGfx.pos.y = (altOffsetAnim[marioGfx.animInfo.animID] and m.pos.y or marioGfx.pos.y) + networkOffset
|
||||
end
|
||||
end
|
||||
end
|
||||
if forceChar ~= nil then
|
||||
np.overrideModelIndex = forceChar
|
||||
|
||||
if p.forceChar ~= nil then
|
||||
np.overrideModelIndex = p.forceChar
|
||||
else
|
||||
np.overrideModelIndex = CT_MARIO
|
||||
end
|
||||
|
||||
-- Character Animations
|
||||
|
|
@ -778,10 +707,27 @@ function set_model(o, model)
|
|||
if optionTable[optionTableRef.localModels].toggle == 0 then return end
|
||||
if obj_has_behavior_id(o, id_bhvMario) ~= 0 then
|
||||
local i = network_local_index_from_global(o.globalPlayerIndex)
|
||||
if gCSPlayers[i].modelId ~= nil and obj_has_model_extended(o, gCSPlayers[i].modelId) == 0 then
|
||||
settingModel = true
|
||||
obj_set_model_extended(o, gCSPlayers[i].modelId)
|
||||
settingModel = false
|
||||
local localModelData = nil
|
||||
for c = 1, #characterTable do
|
||||
if gCSPlayers[i].saveName == characterTable[c].saveName then
|
||||
if gCSPlayers[i].currAlt <= #characterTable[c] then
|
||||
localModelData = characterTable[c][gCSPlayers[i].currAlt].ogModel + gCSPlayers[i].modelEditOffset
|
||||
end
|
||||
end
|
||||
end
|
||||
if localModelData ~= nil then
|
||||
if obj_has_model_extended(o, localModelData) == 0 then
|
||||
settingModel = true
|
||||
obj_set_model_extended(o, localModelData)
|
||||
settingModel = false
|
||||
end
|
||||
else
|
||||
-- Original/Backup
|
||||
if gCSPlayers[i].modelId ~= nil and obj_has_model_extended(o, gCSPlayers[i].modelId) == 0 then
|
||||
settingModel = true
|
||||
obj_set_model_extended(o, gCSPlayers[i].modelId)
|
||||
settingModel = false
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
|
|
@ -857,7 +803,7 @@ local TEXT_DESCRIPTION = "Character Description:"
|
|||
local TEXT_PREF_SAVE = "Press A to Set as Preferred Character"
|
||||
local TEXT_PREF_SAVE_AND_PALETTE = "A - Set Preference | Y - Toggle Palette"
|
||||
local TEXT_PAUSE_Z_OPEN = "Z Button - Character Select"
|
||||
local TEXT_PAUSE_UNAVALIBLE = "Character Select is Unavalible"
|
||||
local TEXT_PAUSE_UNAVAILABLE = "Character Select is Unavailable"
|
||||
local TEXT_PAUSE_CURR_CHAR = "Current Character: "
|
||||
local TEXT_MOVESET_RESTRICTED = "Movesets are Restricted"
|
||||
local TEXT_PALETTE_RESTRICTED = "Palettes are Restricted"
|
||||
|
|
@ -876,7 +822,6 @@ local TEXT_DESCRIPTION_SHORT = "Description:"
|
|||
local TEXT_LIFE_ICON = "Life Icon:"
|
||||
local TEXT_STAR_ICON = "Star Icon:"
|
||||
local TEXT_FORCED_CHAR = "Forced: "
|
||||
local TEXT_OFFSET = "Offset: "
|
||||
local TEXT_TABLE_POS = "Table Position: "
|
||||
local TEXT_PALETTE = "Palette: "
|
||||
|
||||
|
|
@ -892,6 +837,14 @@ local TEXT_CREDITS_HEADER = "Credits"
|
|||
|
||||
menuColor = characterTable[1][1].color
|
||||
|
||||
local forceCharStrings = {
|
||||
[CT_MARIO] = "CT_MARIO",
|
||||
[CT_LUIGI] = "CT_LUIGI",
|
||||
[CT_TOAD] = "CT_TOAD",
|
||||
[CT_WALUIGI] = "CT_WALUIGI",
|
||||
[CT_WARIO] = "CT_WARIO"
|
||||
}
|
||||
|
||||
local MATH_DIVIDE_320 = 1/320
|
||||
local MATH_DIVIDE_64 = 1/64
|
||||
local MATH_DIVIDE_32 = 1/32
|
||||
|
|
@ -972,21 +925,22 @@ local function on_hud_render()
|
|||
local TEXT_ALT = "Alt: " .. character.currAlt .. "/" .. #character
|
||||
character = characterTable[currChar][character.currAlt]
|
||||
local paletteCount = characterColorPresets[gCSPlayers[0].modelId] ~= nil and #characterColorPresets[gCSPlayers[0].modelId] or 0
|
||||
local currPaletteTable = characterColorPresets[gCSPlayers[0].modelId] and characterColorPresets[gCSPlayers[0].modelId] or {currPalette = 0}
|
||||
if optionTable[optionTableRef.debugInfo].toggle == 0 then
|
||||
-- Actual Description --
|
||||
local TEXT_NAME = string_underscore_to_space(character.name)
|
||||
local TEXT_CREDIT = "Credit: " .. character.credit
|
||||
local TEXT_DESCRIPTION_TABLE = character.description
|
||||
local TEXT_PRESET = "Preset Character Palette: "..(gCSPlayers[0].presetPalette > 0 and (paletteCount > 1 and "("..gCSPlayers[0].presetPalette.."/"..paletteCount..")" or "On") or "Off")
|
||||
local TEXT_PRESET = "Preset Character Palette: "..((paletteCount > 1 and "("..currPaletteTable.currPalette.."/"..paletteCount..")" or (currPaletteTable.currPalette > 0 and "Off" or "On")) or "Off")
|
||||
local TEXT_PREF = "Preferred Character:"
|
||||
local TEXT_PREF_LOAD_NAME = string_underscore_to_space(TEXT_PREF_LOAD_NAME)
|
||||
local TEXT_PREF_LOAD_NAME = ' "' .. string_underscore_to_space(TEXT_PREF_LOAD_NAME) .. '"' .. ((TEXT_PREF_LOAD_ALT ~= 1 and TEXT_PREF_LOAD_NAME ~= "Default" and currChar ~= 1) and " ("..TEXT_PREF_LOAD_ALT..")" or "")
|
||||
if djui_hud_measure_text(TEXT_PREF_LOAD_NAME) / widthScale > 110 then
|
||||
TEXT_PREF = "Preferred Char:"
|
||||
end
|
||||
if djui_hud_measure_text(TEXT_PREF_LOAD_NAME) / widthScale > 164 then
|
||||
TEXT_PREF = "Pref Char:"
|
||||
end
|
||||
TEXT_PREF = TEXT_PREF .. ' "' .. TEXT_PREF_LOAD_NAME .. '"' .. ((TEXT_PREF_LOAD_ALT ~= 1 and TEXT_PREF_LOAD_NAME ~= "Default" and currChar ~= 1) and " ("..TEXT_PREF_LOAD_ALT..")" or "")
|
||||
TEXT_PREF = TEXT_PREF .. TEXT_PREF_LOAD_NAME
|
||||
|
||||
local textX = x * 0.5
|
||||
djui_hud_print_text(TEXT_NAME, width - textX - djui_hud_measure_text(TEXT_NAME) * 0.3, 55, 0.6)
|
||||
|
|
@ -1013,16 +967,17 @@ local function on_hud_render()
|
|||
end
|
||||
end
|
||||
|
||||
local modelId = gCSPlayers[0].modelId and gCSPlayers[0].modelId or defaultModels[gMarioStates[0].character.type]
|
||||
local modelId = gCSPlayers[0].modelId
|
||||
djui_hud_print_text(TEXT_PREF, width - textX - djui_hud_measure_text(TEXT_PREF) * 0.15, height - 22, 0.3)
|
||||
local text = TEXT_PREF_SAVE
|
||||
if characterColorPresets[modelId] and not stopPalettes then
|
||||
djui_hud_print_text(TEXT_PRESET, width - textX - djui_hud_measure_text(TEXT_PRESET) * 0.15, height - 31, 0.3)
|
||||
djui_hud_set_font(FONT_TINY)
|
||||
djui_hud_print_text(TEXT_PREF_SAVE_AND_PALETTE, width - textX - djui_hud_measure_text(TEXT_PREF_SAVE_AND_PALETTE) * 0.25, height - 13, 0.5)
|
||||
else
|
||||
djui_hud_set_font(FONT_TINY)
|
||||
djui_hud_print_text(TEXT_PREF_SAVE, width - textX - djui_hud_measure_text(TEXT_PREF_SAVE) * 0.25, height - 13, 0.5)
|
||||
text = TEXT_PREF_SAVE_AND_PALETTE
|
||||
elseif stopPalettes then
|
||||
djui_hud_print_text(TEXT_PALETTE_RESTRICTED, width - textX - djui_hud_measure_text(TEXT_PALETTE_RESTRICTED) * 0.15, height - 31, 0.3)
|
||||
end
|
||||
djui_hud_set_font(FONT_TINY)
|
||||
djui_hud_print_text(text, width - textX - djui_hud_measure_text(TEXT_PREF_SAVE) * 0.25, height - 13, 0.5)
|
||||
else
|
||||
-- Debugging Info --
|
||||
local TEXT_NAME = "Name: " .. character.name
|
||||
|
|
@ -1032,7 +987,7 @@ local function on_hud_render()
|
|||
local TEX_LIFE_ICON = character.lifeIcon
|
||||
local TEX_STAR_ICON = character.starIcon
|
||||
local TEXT_SCALE = "Camera Scale: " .. character.camScale
|
||||
local TEXT_PRESET = "Preset Palette: ("..gCSPlayers[0].presetPalette.."/"..paletteCount..")"
|
||||
local TEXT_PRESET = "Preset Palette: ("..currPaletteTable.currPalette.."/"..paletteCount..")"
|
||||
local TEXT_PREF = "Preferred: " .. TEXT_PREF_LOAD_NAME .. " ("..TEXT_PREF_LOAD_ALT..")"
|
||||
local TEXT_PREF_COLOR = "Pref Color: R-" .. prefCharColor.r .. ", G-" .. prefCharColor.g .. ", B-" .. prefCharColor.b
|
||||
|
||||
|
|
@ -1092,20 +1047,18 @@ local function on_hud_render()
|
|||
djui_hud_render_texture(TEX_STAR_ICON, width - x + 35, y + 1, 0.4 / (TEX_STAR_ICON.width * MATH_DIVIDE_16), 0.4 / (TEX_STAR_ICON.height * MATH_DIVIDE_16))
|
||||
y = y + 7
|
||||
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
||||
djui_hud_print_text(TEXT_FORCED_CHAR .. defaultForceChar[character.forceChar], width - x + 8, y, 0.5)
|
||||
y = y + 7
|
||||
djui_hud_print_text(TEXT_OFFSET .. character.offset, width - x + 8, y, 0.5)
|
||||
djui_hud_print_text(TEXT_FORCED_CHAR .. forceCharStrings[character.forceChar], width - x + 8, y, 0.5)
|
||||
y = y + 7
|
||||
djui_hud_print_text(TEXT_TABLE_POS .. currChar, width - x + 8, y, 0.5)
|
||||
y = y + 7
|
||||
djui_hud_print_text(TEXT_SCALE, width - x + 8, y, 0.5)
|
||||
local modelId = gCSPlayers[0].modelId and gCSPlayers[0].modelId or defaultModels[gMarioStates[0].character.type]
|
||||
local modelId = gCSPlayers[0].modelId
|
||||
y = y + 7
|
||||
if characterColorPresets[modelId] ~= nil then
|
||||
djui_hud_print_text(TEXT_PALETTE, width - x + 8, y, 0.5)
|
||||
local x = x - djui_hud_measure_text(TEXT_PALETTE)*0.5
|
||||
local currPalette = gCSPlayers[0].presetPalette > 0 and gCSPlayers[0].presetPalette or 1
|
||||
local paletteTable = characterColorPresets[modelId][currPalette]
|
||||
local currPalette = currPaletteTable.currPalette > 0 and currPaletteTable.currPalette or 1
|
||||
local paletteTable = currPaletteTable[currPalette]
|
||||
for i = 0, #paletteTable do
|
||||
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
||||
djui_hud_render_rect(width - x + 6.5 + (6.5 * i), y + 1.5, 6, 6)
|
||||
|
|
@ -1113,7 +1066,7 @@ local function on_hud_render()
|
|||
djui_hud_render_rect(width - x + 7 + (6.5 * i), y + 2, 5, 5)
|
||||
end
|
||||
y = y + 7
|
||||
djui_hud_set_color(character.color.r, character.color.g, character.color.b, 255)
|
||||
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
||||
end
|
||||
djui_hud_print_text(TEXT_MOVESET, width - x + 8, y, 0.5)
|
||||
y = y + 7
|
||||
|
|
@ -1492,7 +1445,7 @@ local function on_hud_render()
|
|||
djui_hud_set_font(FONT_USER)
|
||||
if optionTable[optionTableRef.openInputs].toggle == 1 then
|
||||
currCharY = 27
|
||||
local text = menu_is_allowed() and TEXT_PAUSE_Z_OPEN or TEXT_PAUSE_UNAVALIBLE
|
||||
local text = menu_is_allowed() and TEXT_PAUSE_Z_OPEN or TEXT_PAUSE_UNAVAILABLE
|
||||
width = djui_hud_get_screen_width() - djui_hud_measure_text(text)
|
||||
djui_hud_set_color(255, 255, 255, 255)
|
||||
djui_hud_print_text(text, width - 20, 16, 1)
|
||||
|
|
@ -1558,7 +1511,6 @@ local function before_mario_update(m)
|
|||
end
|
||||
|
||||
local cameraToObject = m.marioObj.header.gfx.cameraToObject
|
||||
|
||||
if menuAndTransition and not options then
|
||||
if menu then
|
||||
if inputStallTimerDirectional == 0 and optionTable[optionTableRef.localModels].toggle ~= 0 and not charBeingSet then
|
||||
|
|
@ -1579,8 +1531,10 @@ local function before_mario_update(m)
|
|||
buttonScroll = buttonScrollCap
|
||||
end
|
||||
play_sound(SOUND_MENU_MESSAGE_NEXT_PAGE, cameraToObject)
|
||||
gCSPlayers[0].presetPalette = 0
|
||||
if currChar > #characterTable then currChar = 1 end
|
||||
if characterColorPresets[characterTable[currChar]] ~= nil then
|
||||
characterColorPresets[characterTable[currChar]].currPalette = 0
|
||||
end
|
||||
end
|
||||
if (controller.buttonPressed & U_JPAD) ~= 0 or (controller.buttonPressed & U_CBUTTONS) ~= 0 or controller.stickY > 60 then
|
||||
currChar = currChar - 1
|
||||
|
|
@ -1599,8 +1553,10 @@ local function before_mario_update(m)
|
|||
buttonScroll = -buttonScrollCap
|
||||
end
|
||||
play_sound(SOUND_MENU_MESSAGE_NEXT_PAGE, cameraToObject)
|
||||
gCSPlayers[0].presetPalette = 0
|
||||
if currChar < 1 then currChar = #characterTable end
|
||||
if characterColorPresets[characterTable[currChar]] ~= nil then
|
||||
characterColorPresets[characterTable[currChar]].currPalette = 0
|
||||
end
|
||||
end
|
||||
|
||||
-- Alt switcher
|
||||
|
|
@ -1639,20 +1595,23 @@ local function before_mario_update(m)
|
|||
if (controller.buttonPressed & START_BUTTON) ~= 0 then
|
||||
options = true
|
||||
end
|
||||
local modelId = gCSPlayers[0].modelId and gCSPlayers[0].modelId or defaultModels[m.character.type]
|
||||
local modelId = gCSPlayers[0].modelId
|
||||
local paletteCount = characterColorPresets[gCSPlayers[0].modelId] ~= nil and #characterColorPresets[gCSPlayers[0].modelId] or 0
|
||||
local currPaletteTable = characterColorPresets[gCSPlayers[0].modelId] and characterColorPresets[gCSPlayers[0].modelId] or {currPalette = 0}
|
||||
|
||||
if (controller.buttonPressed & Y_BUTTON) ~= 0 then
|
||||
if characterColorPresets[modelId] and optionTable[optionTableRef.localModels].toggle > 0 and not stopPalettes then
|
||||
play_sound(SOUND_MENU_CLICK_FILE_SELECT, cameraToObject)
|
||||
gCSPlayers[0].presetPalette = gCSPlayers[0].presetPalette + 1
|
||||
currPaletteTable.currPalette = currPaletteTable.currPalette + 1
|
||||
inputStallTimerButton = inputStallToButton
|
||||
else
|
||||
play_sound(SOUND_MENU_CAMERA_BUZZ, cameraToObject)
|
||||
inputStallTimerButton = inputStallToButton
|
||||
end
|
||||
end
|
||||
end
|
||||
if characterColorPresets[gCSPlayers[0].modelId] ~= nil then
|
||||
if #characterColorPresets[gCSPlayers[0].modelId] < gCSPlayers[0].presetPalette then gCSPlayers[0].presetPalette = 0 end
|
||||
if characterColorPresets[gCSPlayers[0].modelId] ~= nil then
|
||||
if paletteCount < currPaletteTable.currPalette then currPaletteTable.currPalette = 0 end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -1742,7 +1701,7 @@ local function chat_command(msg)
|
|||
menu = not menu
|
||||
return true
|
||||
else
|
||||
djui_chat_message_create(TEXT_PAUSE_UNAVALIBLE)
|
||||
djui_chat_message_create(TEXT_PAUSE_UNAVAILABLE)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -252,30 +252,6 @@ function life_icon_from_local_index(localIndex)
|
|||
return "?"
|
||||
end
|
||||
|
||||
local TYPE_STRING = "string"
|
||||
--- @param localIndex integer
|
||||
--- @param x integer
|
||||
--- @param y integer
|
||||
--- @param scale integer
|
||||
function render_life_icon_from_local_index(localIndex, x, y, scale)
|
||||
if localIndex == nil then localIndex = 0 end
|
||||
local lifeIcon = life_icon_from_local_index(localIndex)
|
||||
local startFont = djui_hud_get_font()
|
||||
local startColor = djui_hud_get_color()
|
||||
|
||||
if type(lifeIcon) == TYPE_STRING then
|
||||
local color = color_from_local_index(localIndex)
|
||||
djui_hud_set_font(FONT_RECOLOR_HUD)
|
||||
djui_hud_set_color(color.r/startColor.r*255, color.g/startColor.g*255, color.b/startColor.b*255, startColor.a)
|
||||
djui_hud_print_text(lifeIcon, x - scale, y - 11*scale, scale)
|
||||
-- Reset HUD Modifications
|
||||
djui_hud_set_font(startFont)
|
||||
djui_hud_set_color(startColor.r, startColor.g, startColor.b, startColor.a)
|
||||
else
|
||||
djui_hud_render_texture(lifeIcon, x, y, scale / (lifeIcon.width * MATH_DIVIDE_16), scale / (lifeIcon.height * MATH_DIVIDE_16))
|
||||
end
|
||||
end
|
||||
|
||||
--- @param localIndex integer
|
||||
--- @return TextureInfo
|
||||
--- This assumes multiple characters will not have the same model,
|
||||
|
|
@ -292,6 +268,53 @@ function star_icon_from_local_index(localIndex)
|
|||
return gTextures.star
|
||||
end
|
||||
|
||||
local TYPE_STRING = "string"
|
||||
--- @param localIndex integer
|
||||
--- @param x integer
|
||||
--- @param y integer
|
||||
--- @param scale integer
|
||||
function render_life_icon_from_local_index(localIndex, x, y, scale)
|
||||
if localIndex == nil then localIndex = 0 end
|
||||
local lifeIcon = life_icon_from_local_index(localIndex)
|
||||
local startFont = djui_hud_get_font()
|
||||
local startColor = djui_hud_get_color()
|
||||
|
||||
if type(lifeIcon) == TYPE_STRING then
|
||||
local color = color_from_local_index(localIndex)
|
||||
djui_hud_set_font(FONT_RECOLOR_HUD)
|
||||
djui_hud_set_color(color.r/startColor.r*255, color.g/startColor.g*255, color.b/startColor.b*255, startColor.a)
|
||||
djui_hud_print_text(lifeIcon, x - scale/4, y - 10*scale - scale/4, scale)
|
||||
-- Reset HUD Modifications
|
||||
djui_hud_set_font(startFont)
|
||||
djui_hud_set_color(startColor.r, startColor.g, startColor.b, startColor.a)
|
||||
else
|
||||
djui_hud_render_texture(lifeIcon, x, y, scale / (lifeIcon.width * MATH_DIVIDE_16), scale / (lifeIcon.height * MATH_DIVIDE_16))
|
||||
end
|
||||
end
|
||||
|
||||
--- @param localIndex integer
|
||||
--- @param x integer
|
||||
--- @param y integer
|
||||
--- @param scale integer
|
||||
function render_life_icon_from_local_index_interpolated(localIndex, prevX, prevY, prevScale, x, y, scale)
|
||||
if localIndex == nil then localIndex = 0 end
|
||||
local lifeIcon = life_icon_from_local_index(localIndex)
|
||||
local startFont = djui_hud_get_font()
|
||||
local startColor = djui_hud_get_color()
|
||||
|
||||
if type(lifeIcon) == TYPE_STRING then
|
||||
local color = color_from_local_index(localIndex)
|
||||
djui_hud_set_font(FONT_RECOLOR_HUD)
|
||||
djui_hud_set_color(color.r/startColor.r*255, color.g/startColor.g*255, color.b/startColor.b*255, startColor.a)
|
||||
djui_hud_print_text_interpolated(lifeIcon, prevX - prevScale/4, prevY - 10*prevScale - prevScale/4, prevScale, x - scale/4, y - 10*scale - scale/4, scale)
|
||||
-- Reset HUD Modifications
|
||||
djui_hud_set_font(startFont)
|
||||
djui_hud_set_color(startColor.r, startColor.g, startColor.b, startColor.a)
|
||||
else
|
||||
djui_hud_render_texture_interpolated(lifeIcon, prevX, prevY, prevScale / (lifeIcon.width * MATH_DIVIDE_16), prevScale / (lifeIcon.height * MATH_DIVIDE_16), x, y, scale / (lifeIcon.width * MATH_DIVIDE_16), scale / (lifeIcon.height * MATH_DIVIDE_16))
|
||||
end
|
||||
end
|
||||
|
||||
--- @param localIndex integer
|
||||
--- @param x integer
|
||||
--- @param y integer
|
||||
|
|
@ -302,6 +325,16 @@ function render_star_icon_from_local_index(localIndex, x, y, scale)
|
|||
djui_hud_render_texture(starIcon, x, y, scale / (starIcon.width * MATH_DIVIDE_16), scale / (starIcon.height * MATH_DIVIDE_16))
|
||||
end
|
||||
|
||||
--- @param localIndex integer
|
||||
--- @param x integer
|
||||
--- @param y integer
|
||||
--- @param scale integer
|
||||
function render_star_icon_from_local_index_interpolated(localIndex, prevX, prevY, prevScale, x, y, scale)
|
||||
if localIndex == nil then localIndex = 0 end
|
||||
local starIcon = star_icon_from_local_index(localIndex)
|
||||
djui_hud_render_texture_interpolated(starIcon, prevX, prevY, prevScale / (starIcon.width * MATH_DIVIDE_16), prevScale / (starIcon.height * MATH_DIVIDE_16), x, y, scale / (starIcon.width * MATH_DIVIDE_16), scale / (starIcon.height * MATH_DIVIDE_16))
|
||||
end
|
||||
|
||||
local TEXT_DEFAULT_METER_PREFIX = "char-select-custom-meter-"
|
||||
local TEX_DEFAULT_METER_LEFT = get_texture_info(TEXT_DEFAULT_METER_PREFIX.."left")
|
||||
local TEX_DEFAULT_METER_RIGHT = get_texture_info(TEXT_DEFAULT_METER_PREFIX.."right")
|
||||
|
|
@ -656,6 +689,66 @@ function render_playerlist_and_modlist()
|
|||
end
|
||||
end
|
||||
|
||||
-- Yes the ending stuffs is hardcoded, no there's not much of a better way to do it
|
||||
|
||||
local DIALOG_ENDING_REPLACE_1 = "$CHARNAME!"
|
||||
local DIALOG_ENDING_REPLACE_2 = "Thank you $CHARNAME!"
|
||||
local DIALOG_ENDING_REPLACE_3 = "...for $CHARNAME..."
|
||||
|
||||
local END_PEACH_CUTSCENE_DIALOG_1 = 6
|
||||
local END_PEACH_CUTSCENE_DIALOG_2 = 7
|
||||
local END_PEACH_CUTSCENE_DIALOG_3 = 10
|
||||
local END_PEACH_CUTSCENE_RUN_TO_CASTLE = 11
|
||||
|
||||
local fadeLength = 5
|
||||
local function render_hud_ending_dialog()
|
||||
djui_hud_set_font(FONT_TINY)
|
||||
local m = gMarioStates[0]
|
||||
if m.action ~= ACT_END_PEACH_CUTSCENE then return end
|
||||
|
||||
local width = djui_hud_get_screen_width()
|
||||
|
||||
local charName = characterTable[currChar][characterTable[currChar].currAlt].name
|
||||
local string = ""
|
||||
local startTime = 0
|
||||
local endTime = 0
|
||||
if m.actionArg == END_PEACH_CUTSCENE_DIALOG_1 and m.actionTimer >= 230 and m.actionTimer <= 275 then
|
||||
string = DIALOG_ENDING_REPLACE_1
|
||||
startTime = 230
|
||||
endTime = 275
|
||||
elseif m.actionArg == END_PEACH_CUTSCENE_DIALOG_2 and m.actionTimer >= 75 and m.actionTimer <= 130 then
|
||||
string = DIALOG_ENDING_REPLACE_2
|
||||
startTime = 75
|
||||
endTime = 130
|
||||
elseif m.actionArg == END_PEACH_CUTSCENE_DIALOG_3 and m.actionTimer >= 130 and m.actionTimer <= 195 then
|
||||
string = DIALOG_ENDING_REPLACE_3
|
||||
startTime = 130
|
||||
endTime = 195
|
||||
elseif m.actionArg == END_PEACH_CUTSCENE_RUN_TO_CASTLE and m.actionTimer >= 95 and m.actionTimer <= 150 then
|
||||
string = DIALOG_ENDING_REPLACE_1
|
||||
startTime = 95
|
||||
endTime = 150
|
||||
end
|
||||
|
||||
if string ~= "" then
|
||||
djui_hud_set_color(0, 0, 0, 255)
|
||||
djui_hud_render_rect(0, 210, width, 30)
|
||||
string = string:gsub("$CHARNAME", charName)
|
||||
local opacity = 255
|
||||
local startToTimer = m.actionTimer - startTime
|
||||
local endToTimer = endTime - m.actionTimer
|
||||
if startToTimer >= 0 then
|
||||
opacity = math.min(startToTimer, fadeLength)/fadeLength * 255
|
||||
end
|
||||
if endToTimer >= 0 and startToTimer >= fadeLength then
|
||||
opacity = math.min(endToTimer, fadeLength)/fadeLength * 255
|
||||
end
|
||||
djui_hud_set_color(255, 255, 255, opacity)
|
||||
local x = width*0.5 - djui_hud_measure_text(string)*0.5
|
||||
djui_hud_print_text(string, x, 210, 1)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_hud_render_behind()
|
||||
FONT_USER = djui_menu_get_font()
|
||||
djui_hud_set_resolution(RESOLUTION_N64)
|
||||
|
|
@ -665,6 +758,7 @@ local function on_hud_render_behind()
|
|||
if gNetworkPlayers[0].currActNum == 99 or gMarioStates[0].action == ACT_INTRO_CUTSCENE or hud_is_hidden() then
|
||||
return
|
||||
end
|
||||
|
||||
if obj_get_first_with_behavior_id(id_bhvActSelector) == nil then
|
||||
render_hud_mario_lives()
|
||||
render_hud_stars()
|
||||
|
|
@ -689,6 +783,10 @@ local function on_hud_render()
|
|||
render_act_select_hud()
|
||||
end
|
||||
|
||||
if gNetworkPlayers[0].currActNum == 99 then
|
||||
render_hud_ending_dialog()
|
||||
end
|
||||
|
||||
gServerSettings.enablePlayerList = false -- Disables the original playerlist and modlist
|
||||
|
||||
local enablePlayerList = gServerSettingsCS.enablePlayerList -- gServerSettings.enablePlayerList but for the character select playerlist
|
||||
|
|
|
|||
|
|
@ -13,17 +13,13 @@ local table_insert,djui_hud_measure_text,smlua_model_util_get_id,type,tonumber =
|
|||
--- @field public forceChar CharacterType
|
||||
--- @field public lifeIcon TextureInfo
|
||||
--- @field public camScale integer
|
||||
--- @field public offset integer
|
||||
|
||||
local characterVoices = {}
|
||||
local saveNameTable = {}
|
||||
|
||||
local E_MODEL_ARMATURE = smlua_model_util_get_id("armature_geo")
|
||||
|
||||
---------
|
||||
-- API --
|
||||
---------
|
||||
|
||||
---@ignore
|
||||
local function split_text_into_lines(text)
|
||||
local words = {}
|
||||
for word in text:gmatch("%S+") do
|
||||
|
|
@ -52,29 +48,27 @@ local TYPE_TABLE = "table"
|
|||
local TYPE_TEX_INFO = "userdata"
|
||||
local TYPE_FUNCTION = "function"
|
||||
|
||||
---@param name string|nil Underscores turn into Spaces
|
||||
---@param description table|string|nil {"string"}
|
||||
---@param credit string|nil
|
||||
---@param color Color|string|nil {r, g, b}
|
||||
---@param modelInfo ModelExtendedId|integer|nil Use smlua_model_util_get_id()
|
||||
---@param forceChar CharacterType|nil CT_MARIO, CT_LUIGI, CT_TOAD, CT_WALUIGI, CT_WARIO
|
||||
---@param lifeIcon TextureInfo|string|nil Use get_texture_info()
|
||||
---@param camScale integer|nil Zooms the camera based on a multiplier (Default 1.0)
|
||||
---@param offset integer|nil Visually offsets the character
|
||||
---@return integer
|
||||
local function character_add(name, description, credit, color, modelInfo, forceChar, lifeIcon, camScale, offset)
|
||||
---@description A function that adds a Character to the Character Table
|
||||
---@param name string|nil `"Custom Model"`
|
||||
---@param description table|string|nil `{"string"}`
|
||||
---@param credit string|nil `"You!"`, Credit the creators
|
||||
---@param color Color|string|nil `{r, g, b}`
|
||||
---@param modelInfo ModelExtendedId|integer|nil Use `smlua_model_util_get_id`
|
||||
---@param forceChar CharacterType|nil Character Type, such as `CT_MARIO`
|
||||
---@param lifeIcon TextureInfo|string|nil Use get_texture_info
|
||||
---@param camScale integer|nil Zooms the camera based on a multiplier (Default `1`)
|
||||
---@return integer --The index of the character in the character table
|
||||
local function character_add(name, description, credit, color, modelInfo, forceChar, lifeIcon, camScale)
|
||||
if type(description) == TYPE_STRING then
|
||||
description = split_text_into_lines(description)
|
||||
end
|
||||
if color ~= nil and type(color) == TYPE_STRING then
|
||||
color = {r = tonumber(color:sub(1,2), 16), g = tonumber(color:sub(3,4), 16), b = tonumber(color:sub(5,6), 16) }
|
||||
end
|
||||
if type(offset) ~= TYPE_INTEGER then
|
||||
offset = (forceChar == CT_WALUIGI and 25 or 0)
|
||||
end
|
||||
if lifeIcon ~= nil and type(lifeIcon) == TYPE_STRING then
|
||||
lifeIcon = lifeIcon:sub(1,1)
|
||||
end
|
||||
local addedModel = (modelInfo and modelInfo ~= E_MODEL_ERROR_MODEL) and modelInfo or E_MODEL_ARMATURE
|
||||
table_insert(characterTable, {
|
||||
saveName = type(name) == TYPE_STRING and string_space_to_underscore(name) or "Untitled",
|
||||
currAlt = 1,
|
||||
|
|
@ -85,9 +79,9 @@ local function character_add(name, description, credit, color, modelInfo, forceC
|
|||
description = type(description) == TYPE_TABLE and description or {"No description has been provided"},
|
||||
credit = type(credit) == TYPE_STRING and credit or "Unknown",
|
||||
color = type(color) == TYPE_TABLE and color or {r = 255, g = 255, b = 255},
|
||||
model = (modelInfo and modelInfo ~= E_MODEL_ERROR_MODEL) and modelInfo or E_MODEL_ARMATURE,
|
||||
model = addedModel,
|
||||
ogModel = addedModel,
|
||||
forceChar = forceChar and forceChar or CT_MARIO,
|
||||
offset = offset and offset or 0,
|
||||
lifeIcon = (type(lifeIcon) == TYPE_TABLE or type(lifeIcon) == TYPE_TEX_INFO or type(lifeIcon) == TYPE_STRING) and lifeIcon or "?",
|
||||
starIcon = gTextures.star,
|
||||
camScale = type(camScale) == TYPE_INTEGER and camScale or 1,
|
||||
|
|
@ -99,17 +93,18 @@ local function character_add(name, description, credit, color, modelInfo, forceC
|
|||
return #characterTable
|
||||
end
|
||||
|
||||
---@param charNum integer Use _G.charSelect.character_get_number_from_string() or _G.charSelect.character_add()'s return value
|
||||
---@param name string|nil Underscores turn into Spaces
|
||||
---@param description table|string|nil {"string"}
|
||||
---@param credit string|nil
|
||||
---@param color Color|nil {r, g, b}
|
||||
---@param modelInfo ModelExtendedId|integer|nil Use smlua_model_util_get_id()
|
||||
---@param forceChar integer|CharacterType|nil CT_MARIO, CT_LUIGI, CT_TOAD, CT_WALUIGI, CT_WARIO
|
||||
---@param lifeIcon TextureInfo|nil Use get_texture_info()
|
||||
---@param camScale integer|nil Zooms the camera based on a multiplier (Default 1.0)
|
||||
---@param offset integer|nil Visually offsets the character
|
||||
local function character_add_costume(charNum, name, description, credit, color, modelInfo, forceChar, lifeIcon, camScale, offset)
|
||||
---@description A function that adds a Costume to an Existing Character, all inputs mimic character_edit
|
||||
---@param charNum integer The number/table position of the Character you want to add a costume to
|
||||
---@param name string|nil `"Custom Model"`
|
||||
---@param description table|string|nil `{"string"}`
|
||||
---@param credit string|nil `"You!"`, Credit the creators
|
||||
---@param color Color|string|nil `{r, g, b}`
|
||||
---@param modelInfo ModelExtendedId|integer|nil Use `smlua_model_util_get_id`
|
||||
---@param forceChar CharacterType|nil Character Type, such as `CT_MARIO`
|
||||
---@param lifeIcon TextureInfo|string|nil Use get_texture_info
|
||||
---@param camScale integer|nil Zooms the camera based on a multiplier (Default `1`)
|
||||
---@return integer --The index of the costume in the character's table
|
||||
local function character_add_costume(charNum, name, description, credit, color, modelInfo, forceChar, lifeIcon, camScale)
|
||||
if tonumber(charNum) == nil or charNum > #characterTable or charNum < 0 then return end
|
||||
if type(description) == TYPE_STRING then
|
||||
description = split_text_into_lines(description)
|
||||
|
|
@ -117,21 +112,19 @@ local function character_add_costume(charNum, name, description, credit, color,
|
|||
if type(color) == TYPE_STRING then
|
||||
color = {r = tonumber(color:sub(1,2), 16), g = tonumber(color:sub(3,4), 16), b = tonumber(color:sub(5,6), 16) }
|
||||
end
|
||||
if type(offset) ~= TYPE_INTEGER then
|
||||
offset = (forceChar == CT_WALUIGI and 25 or 0)
|
||||
end
|
||||
if lifeIcon ~= nil and type(lifeIcon) == TYPE_STRING then
|
||||
lifeIcon = lifeIcon:sub(1,1)
|
||||
end
|
||||
local addedModel = (modelInfo and modelInfo ~= E_MODEL_ERROR_MODEL) and modelInfo or tableCache.model
|
||||
local tableCache = characterTable[charNum][1]
|
||||
table_insert(characterTable[charNum], {
|
||||
name = type(name) == TYPE_STRING and name or tableCache.name,
|
||||
description = type(description) == TYPE_TABLE and description or tableCache.description,
|
||||
credit = type(credit) == TYPE_STRING and credit or tableCache.credit,
|
||||
color = type(color) == TYPE_TABLE and color or tableCache.color,
|
||||
model = (modelInfo and modelInfo ~= E_MODEL_ERROR_MODEL) and modelInfo or tableCache.model,
|
||||
model = addedModel,
|
||||
ogModel = addedModel,
|
||||
forceChar = type(forceChar) == TYPE_INTEGER and forceChar or tableCache.forceChar,
|
||||
offset = type(offset) == TYPE_INTEGER and offset or tableCache.offset,
|
||||
lifeIcon = (type(lifeIcon) == TYPE_TABLE or type(lifeIcon) == TYPE_TEX_INFO or type(lifeIcon) == TYPE_STRING) and lifeIcon or tableCache.lifeIcon,
|
||||
starIcon = tableCache.starIcon, -- Done to prevent it getting lost in the sauce
|
||||
camScale = type(camScale) == TYPE_INTEGER and camScale or tableCache.camScale,
|
||||
|
|
@ -140,18 +133,18 @@ local function character_add_costume(charNum, name, description, credit, color,
|
|||
return #characterTable[charNum]
|
||||
end
|
||||
|
||||
---@param charNum integer Use _G.charSelect.character_get_number_from_string() or _G.charSelect.character_add()'s return value
|
||||
---@param charAlt integer
|
||||
---@param name string|nil Underscores turn into Spaces
|
||||
---@param description table|string|nil {"string"}
|
||||
---@param credit string|nil
|
||||
---@param color Color|nil {r, g, b}
|
||||
---@param modelInfo ModelExtendedId|integer|nil Use smlua_model_util_get_id()
|
||||
---@param forceChar integer|CharacterType|nil CT_MARIO, CT_LUIGI, CT_TOAD, CT_WALUIGI, CT_WARIO
|
||||
---@param lifeIcon TextureInfo|nil Use get_texture_info()
|
||||
---@param camScale integer|nil Zooms the camera based on a multiplier (Default 1.0)
|
||||
---@param offset integer|nil Visually offsets the character
|
||||
local function character_edit_costume(charNum, charAlt, name, description, credit, color, modelInfo, forceChar, lifeIcon, camScale, offset)
|
||||
---@description A function that Edits an existing Costume
|
||||
---@param charNum integer The number/table position of the Character you want to edit the costume of
|
||||
---@param charAlt integer The number/table position of the Costume you want to edit, this can be found by making a variable equal
|
||||
---@param name string|nil `"Custom Model"`
|
||||
---@param description table|string|nil `{"string"}`
|
||||
---@param credit string|nil `"You!"`, Credit the creators
|
||||
---@param color Color|string|nil `{r, g, b}`
|
||||
---@param modelInfo ModelExtendedId|integer|nil Use `smlua_model_util_get_id`
|
||||
---@param forceChar CharacterType|nil Character Type, such as `CT_MARIO`
|
||||
---@param lifeIcon TextureInfo|string|nil Use get_texture_info
|
||||
---@param camScale integer|nil Zooms the camera based on a multiplier (Default `1`)
|
||||
local function character_edit_costume(charNum, charAlt, name, description, credit, color, modelInfo, forceChar, lifeIcon, camScale)
|
||||
if tonumber(charNum) == nil or charNum > #characterTable or charNum < 0 then return end
|
||||
if type(description) == TYPE_STRING then
|
||||
description = split_text_into_lines(description)
|
||||
|
|
@ -159,9 +152,6 @@ local function character_edit_costume(charNum, charAlt, name, description, credi
|
|||
if type(color) == TYPE_STRING then
|
||||
color = {r = tonumber(color:sub(1,2), 16), g = tonumber(color:sub(3,4), 16), b = tonumber(color:sub(5,6), 16) }
|
||||
end
|
||||
if type(offset) ~= TYPE_INTEGER then
|
||||
offset = (forceChar == CT_WALUIGI and 25 or 0)
|
||||
end
|
||||
if lifeIcon ~= nil and type(lifeIcon) == TYPE_STRING then
|
||||
lifeIcon = lifeIcon:sub(1,1)
|
||||
end
|
||||
|
|
@ -173,52 +163,126 @@ local function character_edit_costume(charNum, charAlt, name, description, credi
|
|||
credit = type(credit) == TYPE_STRING and credit or tableCache.credit,
|
||||
color = type(color) == TYPE_TABLE and color or tableCache.color,
|
||||
model = (modelInfo and modelInfo ~= E_MODEL_ERROR_MODEL) and modelInfo or tableCache.model,
|
||||
ogModel = tableCache.ogModel,
|
||||
forceChar = type(forceChar) == TYPE_INTEGER and forceChar or tableCache.forceChar,
|
||||
offset = type(offset) == TYPE_INTEGER and offset or tableCache.offset,
|
||||
lifeIcon = (type(lifeIcon) == TYPE_TABLE or type(lifeIcon) == TYPE_TEX_INFO or type(lifeIcon) == TYPE_STRING) and lifeIcon or tableCache.lifeIcon,
|
||||
starIcon = tableCache.starIcon, -- Done to prevent it getting lost in the sauce
|
||||
camScale = type(camScale) == TYPE_INTEGER and camScale or tableCache.camScale,
|
||||
healthTexture = tableCache.healthTexture,
|
||||
} or nil
|
||||
|
||||
local ccp = characterColorPresets
|
||||
if modelInfo ~= nil and ccp[modelInfo] ~= nil and ccp[tableCache.model] ~= nil and ccp[modelInfo].currPalette <= ccp[tableCache.model].currPalette then
|
||||
ccp[modelInfo].currPalette = ccp[tableCache.model].currPalette
|
||||
end
|
||||
end
|
||||
|
||||
---@param charNum integer Use _G.charSelect.character_get_number_from_string() or _G.charSelect.character_add()'s return value
|
||||
---@param name string|nil Underscores turn into Spaces
|
||||
---@param description table|string|nil {"string"}
|
||||
---@param credit string|nil
|
||||
---@param color Color|nil {r, g, b}
|
||||
---@param modelInfo ModelExtendedId|integer|nil Use smlua_model_util_get_id()
|
||||
---@param forceChar integer|CharacterType|nil CT_MARIO, CT_LUIGI, CT_TOAD, CT_WALUIGI, CT_WARIO
|
||||
---@param lifeIcon TextureInfo|nil Use get_texture_info()
|
||||
---@param camScale integer|nil Zooms the camera based on a multiplier (Default 1.0)
|
||||
---@param offset integer|nil Visually offsets the character
|
||||
local function character_edit(charNum, name, description, credit, color, modelInfo, forceChar, lifeIcon, camScale, offset)
|
||||
character_edit_costume(charNum, 1, name, description, credit, color, modelInfo, forceChar, lifeIcon, camScale, offset)
|
||||
---@description A function that Edits an Existing Character
|
||||
---@param charNum integer The number/table position of the Character you want to edit
|
||||
---@param name string|nil `"Custom Model"`
|
||||
---@param description table|string|nil `{"string"}`
|
||||
---@param credit string|nil `"You!"`, Credit the creators
|
||||
---@param color Color|string|nil `{r, g, b}`
|
||||
---@param modelInfo ModelExtendedId|integer|nil Use `smlua_model_util_get_id`
|
||||
---@param forceChar CharacterType|nil Character Type, such as `CT_MARIO`
|
||||
---@param lifeIcon TextureInfo|string|nil Use get_texture_info
|
||||
---@param camScale integer|nil Zooms the camera based on a multiplier (Default `1`)
|
||||
local function character_edit(charNum, name, description, credit, color, modelInfo, forceChar, lifeIcon, camScale)
|
||||
character_edit_costume(charNum, 1, name, description, credit, color, modelInfo, forceChar, lifeIcon, camScale)
|
||||
end
|
||||
|
||||
---@param modelInfo ModelExtendedId|integer
|
||||
---@param clips table
|
||||
---@description A function that adds a voice table to a character
|
||||
---@param modelInfo ModelExtendedId|integer Model Information Received from smlua_model_util_get_id
|
||||
---@param clips table A Table with your Character's Sound File Names
|
||||
---@note ```lua
|
||||
---@note local VOICETABLE_CHAR = {
|
||||
---@note [CHAR_SOUND_ATTACKED] = 'NES-Hit.ogg',
|
||||
---@note [CHAR_SOUND_DOH] = 'NES-Bump.ogg',
|
||||
---@note [CHAR_SOUND_DROWNING] = 'NES-Die.ogg',
|
||||
---@note [CHAR_SOUND_DYING] = 'NES-Die.ogg',
|
||||
---@note [CHAR_SOUND_GROUND_POUND_WAH] = 'NES-Squish.ogg',
|
||||
---@note [CHAR_SOUND_HAHA] = 'NES-1up.ogg',
|
||||
---@note [CHAR_SOUND_HAHA_2] = 'NES-1up.ogg',
|
||||
---@note [CHAR_SOUND_HERE_WE_GO] = 'NES-Flagpole.ogg',
|
||||
---@note [CHAR_SOUND_HOOHOO] = 'NES-Jump.ogg',
|
||||
---@note [CHAR_SOUND_MAMA_MIA] = 'NES-Warp.ogg',
|
||||
---@note [CHAR_SOUND_OKEY_DOKEY] = 'NES-1up.ogg',
|
||||
---@note [CHAR_SOUND_ON_FIRE] = 'NES-Enemy_Fire.ogg',
|
||||
---@note [CHAR_SOUND_OOOF] = 'NES-Hit.ogg',
|
||||
---@note [CHAR_SOUND_OOOF2] = 'NES-Hit.ogg',
|
||||
---@note [CHAR_SOUND_PUNCH_HOO] = 'NES-Kick.ogg',
|
||||
---@note [CHAR_SOUND_PUNCH_WAH] = 'NES-Thwomp.ogg',
|
||||
---@note [CHAR_SOUND_PUNCH_YAH] = 'NES-Thwomp.ogg',
|
||||
---@note [CHAR_SOUND_SO_LONGA_BOWSER] = 'NES-Bowser_Die.ogg',
|
||||
---@note [CHAR_SOUND_TWIRL_BOUNCE] = 'NES-Item.ogg',
|
||||
---@note [CHAR_SOUND_WAAAOOOW] = 'NES-Vine.ogg',
|
||||
---@note [CHAR_SOUND_WAH2] = 'NES-Kick.ogg',
|
||||
---@note [CHAR_SOUND_WHOA] = 'NES-Item.ogg',
|
||||
---@note [CHAR_SOUND_YAHOO] = 'NES-Jump.ogg',
|
||||
---@note [CHAR_SOUND_YAHOO_WAHA_YIPPEE] = 'NES-Jump.ogg',
|
||||
---@note [CHAR_SOUND_YAH_WAH_HOO] = 'NES-Big_Jump.ogg',
|
||||
---@note [CHAR_SOUND_YAWNING] = 'NES-Pause.ogg',
|
||||
---@note }
|
||||
---@note ```
|
||||
local function character_add_voice(modelInfo, clips)
|
||||
characterVoices[modelInfo] = type(clips) == TYPE_TABLE and clips or nil
|
||||
end
|
||||
|
||||
---@param modelInfo ModelExtendedId|integer
|
||||
---@param caps table
|
||||
---@description A function that adds a caps table to a character
|
||||
---@param modelInfo ModelExtendedId|integer Model Information Received from smlua_model_util_get_id
|
||||
---@param caps table Cap
|
||||
---@note ```lua
|
||||
---@note local CAPTABLE_CHAR = {
|
||||
---@note normal = smlua_model_util_get_id("custom_model_cap_normal_geo"),
|
||||
---@note wing = smlua_model_util_get_id("custom_model_cap_wing_geo"),
|
||||
---@note metal = smlua_model_util_get_id("custom_model_cap_metal_geo"),
|
||||
---@note metalWing = smlua_model_util_get_id("custom_model_cap_wing_geo")
|
||||
---@note }
|
||||
---@note ```
|
||||
local function character_add_caps(modelInfo, caps)
|
||||
characterCaps[modelInfo] = type(caps) == TYPE_TABLE and caps or nil
|
||||
end
|
||||
|
||||
---@param charNum integer
|
||||
---@param charAlt integer
|
||||
---@param healthTexture table|nil
|
||||
---@description A function that gets a model's cap table
|
||||
---@param modelInfo ModelExtendedId|integer|nil Model Information Received from smlua_model_util_get_id
|
||||
local function character_get_caps(modelInfo)
|
||||
if modelInfo == nil then modelInfo = characterTable[currChar][characterTable[currChar].currAlt].model end
|
||||
return characterCaps[modelInfo]
|
||||
end
|
||||
|
||||
---@description A function that adds health meter textures to a character
|
||||
---@param charNum integer The number/table position of the Character you want to add a meter to
|
||||
---@param charAlt integer The number/table position of the Costume you want to add a meter to
|
||||
---@param healthTexture table|nil A Table with your Character's Health Textures (Table Shown in character_add_health_meter)
|
||||
local function character_add_costume_health_meter(charNum, charAlt, healthTexture)
|
||||
if type(charNum) ~= TYPE_INTEGER or charNum == nil then return end
|
||||
if type(charAlt) ~= TYPE_INTEGER or charAlt == nil then return end
|
||||
characterTable[charNum][charAlt].healthTexture = type(healthTexture) == TYPE_TABLE and healthTexture or nil
|
||||
end
|
||||
|
||||
---@param charNum integer
|
||||
---@param healthTexture table|nil
|
||||
---@description A function that adds health meter textures to a character
|
||||
---@param charNum integer The number/table position of the Character you want to add a meter to
|
||||
---@param healthTexture table|nil A Table with your Character's Health Textures (Table Shown Below)
|
||||
---@note ```lua
|
||||
---@note local HEALTH_METER_CHAR = {
|
||||
---@note label = {
|
||||
---@note left = get_texture_info("hp-back-left"),
|
||||
---@note right = get_texture_info("hp-back-right"),
|
||||
---@note },
|
||||
---@note pie = {
|
||||
---@note [1] = get_texture_info("hp-pie-1"),
|
||||
---@note [2] = get_texture_info("hp-pie-2"),
|
||||
---@note [3] = get_texture_info("hp-pie-3"),
|
||||
---@note [4] = get_texture_info("hp-pie-4"),
|
||||
---@note [5] = get_texture_info("hp-pie-5"),
|
||||
---@note [6] = get_texture_info("hp-pie-6"),
|
||||
---@note [7] = get_texture_info("hp-pie-7"),
|
||||
---@note [8] = get_texture_info("hp-pie-8"),
|
||||
---@note }
|
||||
---@note }
|
||||
---@note ```
|
||||
---@note This method is restricted to the default meter format, you can refer to the Disassembled sections in the image below for how to format your health meter (Spriters Resource Page)
|
||||
---@note <p align=center> <img src="https://www.spriters-resource.com/resources/sheets/7/6841.png?updated=1595395218" width="720"> </p>
|
||||
local function character_add_health_meter(charNum, healthTexture)
|
||||
character_add_costume_health_meter(charNum, 1, healthTexture)
|
||||
end
|
||||
|
|
@ -232,15 +296,17 @@ local function character_add_costume_course(charNum, charAlt, courseTexture)
|
|||
characterTable[charNum][charAlt].courseTexture = type(courseTexture) == TYPE_TABLE and courseTexture or nil
|
||||
end
|
||||
|
||||
---@param charNum integer
|
||||
---@description A function that adds a custom texture to the star select
|
||||
---@param charNum integer The number/table position of the Character you want to add a course texture to
|
||||
---@param courseTexture table|nil
|
||||
local function character_add_course(charNum, courseTexture)
|
||||
character_add_costume_course(charNum, 1, courseTexture)
|
||||
end
|
||||
|
||||
---@param modelInfo ModelExtendedId|integer
|
||||
---@param starModel ModelExtendedId|integer
|
||||
---@param starIcon TextureInfo|nil Use get_texture_info()
|
||||
---@description A function that adds a celebration star model to a character
|
||||
---@param modelInfo ModelExtendedId|integer Model Information Received from smlua_model_util_get_id()
|
||||
---@param starModel ModelExtendedId|integer Model Information Received from smlua_model_util_get_id()
|
||||
---@param starIcon TextureInfo|nil Texture Information Received from get_texture_info()
|
||||
local function character_add_celebration_star(modelInfo, starModel, starIcon)
|
||||
characterCelebrationStar[modelInfo] = starModel
|
||||
for i = 2, #characterTable do
|
||||
|
|
@ -254,8 +320,21 @@ local function character_add_celebration_star(modelInfo, starModel, starIcon)
|
|||
return false
|
||||
end
|
||||
|
||||
---@description A function that adds a palette preset to a character
|
||||
---@param modelInfo ModelExtendedId|integer
|
||||
---@param paletteTable table
|
||||
---@param paletteTable table
|
||||
---@note ```lua
|
||||
---@note local PALETTE_CHAR = {
|
||||
---@note [PANTS] = {r = 0x00, g = 0x00, b = 0xff},
|
||||
---@note [SHIRT] = {r = 0xff, g = 0x00, b = 0x00},
|
||||
---@note [GLOVES] = {r = 0xff, g = 0xff, b = 0xff},
|
||||
---@note [SHOES] = {r = 0x72, g = 0x1c, b = 0x0e},
|
||||
---@note [HAIR] = {r = 0x73, g = 0x06, b = 0x00},
|
||||
---@note [SKIN] = {r = 0xfe, g = 0xc1, b = 0x79},
|
||||
---@note [CAP] = {r = 0xff, g = 0x00, b = 0x00},
|
||||
---@note }
|
||||
---@note ```
|
||||
---@note Strings can also be used rather than RGB tables, ex. `[PANTS] = "0000ff"`
|
||||
local function character_add_palette_preset(modelInfo, paletteTable)
|
||||
local paletteTableOut = {}
|
||||
local defaultColors = characterColorPresets[E_MODEL_MARIO]
|
||||
|
|
@ -274,7 +353,9 @@ local function character_add_palette_preset(modelInfo, paletteTable)
|
|||
end
|
||||
end
|
||||
if characterColorPresets[modelInfo] == nil then
|
||||
characterColorPresets[modelInfo] = {}
|
||||
characterColorPresets[modelInfo] = {
|
||||
currPalette = 1,
|
||||
}
|
||||
end
|
||||
table_insert(characterColorPresets[modelInfo], paletteTableOut)
|
||||
end
|
||||
|
|
@ -285,6 +366,11 @@ local function character_add_animations(modelInfo, animTable)
|
|||
characterAnims[modelInfo] = type(animTable) == TYPE_TABLE and animTable or nil
|
||||
end
|
||||
|
||||
---@param modelInfo ModelExtendedId|integer
|
||||
local function character_get_animations(modelInfo)
|
||||
return characterAnims[modelInfo]
|
||||
end
|
||||
|
||||
---@param tablePos integer|nil
|
||||
---@param charAlt integer|nil
|
||||
---@return CharacterTable
|
||||
|
|
@ -441,6 +527,11 @@ local function character_hook_moveset(charNum, hookEventType, func)
|
|||
characterTable[charNum].hasMoveset = true
|
||||
end
|
||||
|
||||
---@param charNum integer
|
||||
local function character_get_moveset(charNum)
|
||||
return characterMovesets[charNum]
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
local function is_options_open()
|
||||
return options
|
||||
|
|
@ -544,6 +635,7 @@ _G.charSelect = {
|
|||
character_edit_costume = character_edit_costume,
|
||||
character_add_voice = character_add_voice,
|
||||
character_add_caps = character_add_caps,
|
||||
character_get_caps = character_get_caps,
|
||||
character_add_celebration_star = character_add_celebration_star,
|
||||
character_add_health_meter = character_add_health_meter,
|
||||
character_add_costume_health_meter = character_add_costume_health_meter,
|
||||
|
|
@ -551,6 +643,7 @@ _G.charSelect = {
|
|||
character_add_costume_course_texture = character_add_costume_course,
|
||||
character_add_palette_preset = character_add_palette_preset,
|
||||
character_add_animations = character_add_animations,
|
||||
character_get_animations = character_get_animations,
|
||||
character_get_current_table = character_get_current_table,
|
||||
character_get_full_table = character_get_full_table,
|
||||
character_get_current_number = character_get_current_number,
|
||||
|
|
@ -563,11 +656,14 @@ _G.charSelect = {
|
|||
character_get_voice = character_get_voice,
|
||||
character_get_life_icon = life_icon_from_local_index, -- Function located in n-hud.lua
|
||||
character_render_life_icon = render_life_icon_from_local_index, -- Function located in n-hud.lua
|
||||
character_render_life_icon_interpolated = render_life_icon_from_local_index_interpolated, -- Function located in n-hud.lua
|
||||
character_get_star_icon = star_icon_from_local_index, -- Function located in n-hud.lua
|
||||
character_render_star_icon = render_star_icon_from_local_index, -- Function located in n-hud.lua
|
||||
character_render_star_icon_interpolated = render_star_icon_from_local_index_interpolated, -- Function located in n-hud.lua
|
||||
character_get_health_meter = health_meter_from_local_index, -- Function located in n-hud.lua
|
||||
character_render_health_meter = render_health_meter_from_local_index, -- Function located in n-hud.lua
|
||||
character_set_locked = character_set_locked,
|
||||
character_get_moveset = character_get_moveset,
|
||||
|
||||
-- Hud Element Functions --
|
||||
hud_hide_element = hud_hide_element,
|
||||
|
|
@ -593,10 +689,11 @@ _G.charSelect = {
|
|||
-- Misc --
|
||||
dialog_set_replace_name = dialog_set_replace_name, -- Function located in dialog.lua
|
||||
|
||||
-- Tables --
|
||||
-- Tables & Variables --
|
||||
optionTableRef = optionTableRef,
|
||||
controller = controller,
|
||||
gCSPlayers = gCSPlayers,
|
||||
CUTSCENE_CS_MENU = CUTSCENE_CS_MENU,
|
||||
|
||||
-- Custom Hooks --
|
||||
hook_allow_menu_open = hook_allow_menu_open,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ local function find_character_number(index)
|
|||
end
|
||||
|
||||
local function mario_update(m)
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
if stopMovesets or not gCSPlayers[m.playerIndex].movesetToggle then return end
|
||||
local hook = HOOK_MARIO_UPDATE
|
||||
local currMoveset = characterMovesets[find_character_number(m.playerIndex)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
|
|
@ -21,7 +21,7 @@ end
|
|||
hook_event(HOOK_MARIO_UPDATE, mario_update)
|
||||
|
||||
local function before_mario_update(m)
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
if stopMovesets or not gCSPlayers[m.playerIndex].movesetToggle then return end
|
||||
local hook = HOOK_BEFORE_MARIO_UPDATE
|
||||
local currMoveset = characterMovesets[find_character_number(m.playerIndex)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
|
|
@ -30,7 +30,7 @@ end
|
|||
hook_event(HOOK_BEFORE_MARIO_UPDATE, before_mario_update)
|
||||
|
||||
local function before_phys_step(m, stepType)
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
if stopMovesets or not gCSPlayers[m.playerIndex].movesetToggle then return end
|
||||
local hook = HOOK_BEFORE_PHYS_STEP
|
||||
local currMoveset = characterMovesets[find_character_number(m.playerIndex)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
|
|
@ -39,35 +39,43 @@ end
|
|||
hook_event(HOOK_BEFORE_PHYS_STEP, before_phys_step)
|
||||
|
||||
local function allow_pvp_attack(attacker, victim, int)
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
local hook = HOOK_ON_PVP_ATTACK
|
||||
if stopMovesets then return end
|
||||
local hook = HOOK_ALLOW_PVP_ATTACK
|
||||
local attackerMoveset = characterMovesets[find_character_number(attacker.playerIndex)]
|
||||
local victimMoveset = characterMovesets[find_character_number(victim.playerIndex)]
|
||||
if (attackerMoveset ~= nil and attackerMoveset[hook] ~= nil) then
|
||||
attackerMoveset[hook](attacker, victim, int)
|
||||
if gCSPlayers[attacker.playerIndex].movesetToggle then
|
||||
if (attackerMoveset ~= nil and attackerMoveset[hook] ~= nil) then
|
||||
attackerMoveset[hook](attacker, victim, int)
|
||||
end
|
||||
end
|
||||
if (victimMoveset ~= nil and victimMoveset[hook] ~= nil) then
|
||||
victimMoveset[hook](attacker, victim, int)
|
||||
if gCSPlayers[victim.playerIndex].movesetToggle then
|
||||
if (victimMoveset ~= nil and victimMoveset[hook] ~= nil) then
|
||||
victimMoveset[hook](attacker, victim, int)
|
||||
end
|
||||
end
|
||||
end
|
||||
hook_event(HOOK_ALLOW_PVP_ATTACK, allow_pvp_attack)
|
||||
|
||||
local function on_pvp_attack(attacker, victim, int)
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
if stopMovesets then return end
|
||||
local hook = HOOK_ON_PVP_ATTACK
|
||||
local attackerMoveset = characterMovesets[find_character_number(attacker.playerIndex)]
|
||||
local victimMoveset = characterMovesets[find_character_number(victim.playerIndex)]
|
||||
if (attackerMoveset ~= nil and attackerMoveset[hook] ~= nil) then
|
||||
attackerMoveset[hook](attacker, victim, int)
|
||||
if gCSPlayers[attacker.playerIndex].movesetToggle then
|
||||
if (attackerMoveset ~= nil and attackerMoveset[hook] ~= nil) then
|
||||
attackerMoveset[hook](attacker, victim, int)
|
||||
end
|
||||
end
|
||||
if (victimMoveset ~= nil and victimMoveset[hook] ~= nil) then
|
||||
victimMoveset[hook](attacker, victim, int)
|
||||
if gCSPlayers[victim.playerIndex].movesetToggle then
|
||||
if (victimMoveset ~= nil and victimMoveset[hook] ~= nil) then
|
||||
victimMoveset[hook](attacker, victim, int)
|
||||
end
|
||||
end
|
||||
end
|
||||
hook_event(HOOK_ON_PVP_ATTACK, on_pvp_attack)
|
||||
|
||||
local function on_interact(m, o, intType, intValue)
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
if stopMovesets or not gCSPlayers[m.playerIndex].movesetToggle then return end
|
||||
local hook = HOOK_ON_INTERACT
|
||||
local currMoveset = characterMovesets[find_character_number(m.playerIndex)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
|
|
@ -76,8 +84,8 @@ end
|
|||
hook_event(HOOK_ON_INTERACT, on_interact)
|
||||
|
||||
local function allow_interact(m, o, intType)
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
local hook = HOOK_ON_INTERACT
|
||||
if stopMovesets or not gCSPlayers[m.playerIndex].movesetToggle then return end
|
||||
local hook = HOOK_ALLOW_INTERACT
|
||||
local currMoveset = characterMovesets[find_character_number(m.playerIndex)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
return currMoveset[hook](m, o, intType)
|
||||
|
|
@ -85,7 +93,7 @@ end
|
|||
hook_event(HOOK_ALLOW_INTERACT, allow_interact)
|
||||
|
||||
local function on_set_mario_action(m)
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
if stopMovesets or not gCSPlayers[m.playerIndex].movesetToggle then return end
|
||||
local hook = HOOK_ON_SET_MARIO_ACTION
|
||||
local currMoveset = characterMovesets[find_character_number(m.playerIndex)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
|
|
@ -94,7 +102,7 @@ end
|
|||
hook_event(HOOK_ON_SET_MARIO_ACTION, on_set_mario_action)
|
||||
|
||||
local function before_set_mario_action(m, nextAct)
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
if stopMovesets or not gCSPlayers[m.playerIndex].movesetToggle then return end
|
||||
local hook = HOOK_BEFORE_SET_MARIO_ACTION
|
||||
local currMoveset = characterMovesets[find_character_number(m.playerIndex)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
|
|
@ -103,8 +111,8 @@ end
|
|||
hook_event(HOOK_BEFORE_SET_MARIO_ACTION, before_set_mario_action)
|
||||
|
||||
local function on_death(m)
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
local hook = HOOK_BEFORE_SET_MARIO_ACTION
|
||||
if stopMovesets or not gCSPlayers[m.playerIndex].movesetToggle then return end
|
||||
local hook = HOOK_ON_DEATH
|
||||
local currMoveset = characterMovesets[find_character_number(m.playerIndex)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
return currMoveset[hook](m)
|
||||
|
|
@ -112,7 +120,7 @@ end
|
|||
hook_event(HOOK_ON_DEATH, on_death)
|
||||
|
||||
local function hud_render()
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
if stopMovesets or not gCSPlayers[0].movesetToggle then return end
|
||||
local hook = HOOK_ON_HUD_RENDER
|
||||
local currMoveset = characterMovesets[find_character_number(0)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
|
|
@ -121,7 +129,7 @@ end
|
|||
hook_event(HOOK_ON_HUD_RENDER, hud_render)
|
||||
|
||||
local function hud_render_behind()
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
if stopMovesets or not gCSPlayers[0].movesetToggle then return end
|
||||
local hook = HOOK_ON_HUD_RENDER_BEHIND
|
||||
local currMoveset = characterMovesets[find_character_number(0)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
|
|
@ -130,7 +138,7 @@ end
|
|||
hook_event(HOOK_ON_HUD_RENDER_BEHIND, hud_render_behind)
|
||||
|
||||
local function level_init()
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
if stopMovesets or not gCSPlayers[0].movesetToggle then return end
|
||||
local hook = HOOK_ON_LEVEL_INIT
|
||||
local currMoveset = characterMovesets[find_character_number(0)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
|
|
@ -139,10 +147,19 @@ end
|
|||
hook_event(HOOK_ON_LEVEL_INIT, level_init)
|
||||
|
||||
local function sync_valid()
|
||||
if stopMovesets or optionTable[optionTableRef.localMoveset].toggle == 0 then return end
|
||||
if stopMovesets or not gCSPlayers[0].movesetToggle then return end
|
||||
local hook = HOOK_ON_SYNC_VALID
|
||||
local currMoveset = characterMovesets[find_character_number(0)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
return currMoveset[hook]()
|
||||
end
|
||||
hook_event(HOOK_ON_SYNC_VALID, sync_valid)
|
||||
hook_event(HOOK_ON_SYNC_VALID, sync_valid)
|
||||
|
||||
local function object_render(obj)
|
||||
if stopMovesets or not gCSPlayers[0].movesetToggle then return end
|
||||
local hook = HOOK_ON_OBJECT_RENDER
|
||||
local currMoveset = characterMovesets[find_character_number(0)]
|
||||
if currMoveset == nil or currMoveset[hook] == nil then return end
|
||||
return currMoveset[hook](obj)
|
||||
end
|
||||
hook_event(HOOK_ON_OBJECT_RENDER, object_render)
|
||||
|
|
@ -6,6 +6,7 @@ local network_player_set_override_palette_color,network_player_reset_override_pa
|
|||
|
||||
characterColorPresets = {
|
||||
[E_MODEL_MARIO] = {
|
||||
currPalette = 0,
|
||||
[1] = {
|
||||
[PANTS] = { r = 0x00, g = 0x00, b = 0xff },
|
||||
[SHIRT] = { r = 0xff, g = 0x00, b = 0x00 },
|
||||
|
|
@ -18,6 +19,7 @@ characterColorPresets = {
|
|||
},
|
||||
},
|
||||
[E_MODEL_LUIGI] = {
|
||||
currPalette = 0,
|
||||
[1] = {
|
||||
[PANTS] = { r = 0x00, g = 0x00, b = 0xff },
|
||||
[SHIRT] = { r = 0x00, g = 0xff, b = 0x00 },
|
||||
|
|
@ -30,6 +32,7 @@ characterColorPresets = {
|
|||
},
|
||||
},
|
||||
[E_MODEL_TOAD_PLAYER] = {
|
||||
currPalette = 0,
|
||||
[1] = {
|
||||
[PANTS] = { r = 0xff, g = 0xff, b = 0xff },
|
||||
[SHIRT] = { r = 0x4c, g = 0x2c, b = 0xd3 },
|
||||
|
|
@ -42,6 +45,7 @@ characterColorPresets = {
|
|||
},
|
||||
},
|
||||
[E_MODEL_WALUIGI] = {
|
||||
currPalette = 0,
|
||||
[1] = {
|
||||
[PANTS] = { r = 0x16, g = 0x16, b = 0x27 },
|
||||
[SHIRT] = { r = 0x61, g = 0x26, b = 0xb0 },
|
||||
|
|
@ -55,6 +59,7 @@ characterColorPresets = {
|
|||
},
|
||||
},
|
||||
[E_MODEL_WARIO] = {
|
||||
currPalette = 0,
|
||||
[1] = {
|
||||
[PANTS] = { r = 0x7f, g = 0x20, b = 0x7a },
|
||||
[SHIRT] = { r = 0xff, g = 0xbd, b = 0x00 },
|
||||
|
|
@ -98,8 +103,6 @@ end
|
|||
-- API funcs
|
||||
_G.charSelect.update_preset_palette = update_preset_palette
|
||||
|
||||
local prevChar = currChar
|
||||
local prevAlt = 1
|
||||
local stallTimer = 5
|
||||
|
||||
local prevPresetPalette = {}
|
||||
|
|
@ -114,54 +117,45 @@ local function mario_update(m)
|
|||
p.isUpdating = true
|
||||
for i = 1, MAX_PLAYERS - 1 do
|
||||
prevPresetPalette[i] = gCSPlayers[i].presetPalette
|
||||
prevModel[i] = gCSPlayers[i].modelId and gCSPlayers[i].modelId or defaultModels[gMarioStates[i].character.type]
|
||||
prevModel[i] = gCSPlayers[i].modelId
|
||||
end
|
||||
end
|
||||
|
||||
if m.playerIndex == 0 then
|
||||
if not stopPalettes then
|
||||
gCSPlayers[0].presetPalette = characterColorPresets[gCSPlayers[0].modelId] ~= nil and characterColorPresets[gCSPlayers[0].modelId].currPalette or 0
|
||||
end
|
||||
|
||||
if stallTimer > 0 then
|
||||
stallTimer = stallTimer - 1
|
||||
end
|
||||
end
|
||||
|
||||
if np.connected then
|
||||
local modelId = p.modelId and p.modelId or defaultModels[m.character.type]
|
||||
if p.presetPalette == nil or characterColorPresets[modelId] == nil then
|
||||
if p.presetPalette == nil or characterColorPresets[p.modelId] == nil then
|
||||
if p.presetPalette == nil then
|
||||
prevPresetPalette[m.playerIndex] = 0
|
||||
end
|
||||
p.presetPalette = 0
|
||||
end
|
||||
|
||||
if (prevPresetPalette[m.playerIndex] ~= p.presetPalette or prevModel[m.playerIndex] ~= modelId) then
|
||||
if p.presetPalette == 0 or not characterColorPresets[modelId] then
|
||||
if (prevPresetPalette[m.playerIndex] ~= p.presetPalette or prevModel[m.playerIndex] ~= p.modelId) then
|
||||
if p.presetPalette == 0 or not characterColorPresets[p.modelId] then
|
||||
network_player_reset_override_palette(np)
|
||||
end
|
||||
end
|
||||
|
||||
prevPresetPalette[m.playerIndex] = p.presetPalette
|
||||
prevModel[m.playerIndex] = modelId
|
||||
prevModel[m.playerIndex] = p.modelId
|
||||
|
||||
if p.presetPalette > 0 and characterColorPresets[modelId] and not stopPalettes then
|
||||
network_player_set_full_override_palette(np, characterColorPresets[modelId][p.presetPalette])
|
||||
if p.presetPalette > 0 and characterColorPresets[p.modelId] and not stopPalettes then
|
||||
network_player_set_full_override_palette(np, characterColorPresets[p.modelId][p.presetPalette])
|
||||
end
|
||||
else
|
||||
if p.isUpdating then
|
||||
p.isUpdating = false
|
||||
end
|
||||
end
|
||||
|
||||
if m.playerIndex == 0 then
|
||||
if (menuAndTransition or (prevChar ~= currChar or prevAlt ~= currAlt)) and stallTimer == 0 then
|
||||
local modelId = p.modelId and p.modelId or defaultModels[m.character.type]
|
||||
if optionTable[optionTableRef.autoPalette].toggle > 0 and optionTable[optionTableRef.localModels].toggle > 0 and (currChar ~= 1 and (prevChar ~= currChar or prevAlt ~= currAlt) and p.presetPalette == 0) and characterColorPresets[modelId] and not stopPalettes then
|
||||
p.presetPalette = 1
|
||||
end
|
||||
if optionTable[optionTableRef.localModels].toggle == 0 then
|
||||
p.presetPalette = 0
|
||||
end
|
||||
prevChar = currChar
|
||||
prevAlt = currAlt
|
||||
end
|
||||
|
||||
if stallTimer > 0 then
|
||||
stallTimer = stallTimer - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hook_event(HOOK_MARIO_UPDATE, mario_update)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue