You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scaleObject(name, factor) scales an object's picture and body together, for scripts (the editor's 0 / 9 keys use the same steps).
Marmosets.extra_scripts/16_marmosets.lua plays Angry Birds Rio's marmosets in the other games the way Rio 1.4.2 plays them: each frame the first animation whose triggers hold (speed, spin, strength left, jointed) is chosen, it starts after its threshold time, its frames, idle variations and sounds run on Rio's timers, fatal and destroyJoints act as in Rio, and a destroyed marmoset adds to settings.marmosetsDestroyed. The definitions, pictures and sounds are read from Rio 1.4.2's own files in a marmosets folder of the game's data folder (see the file); the level editor gets them as a block palette on L / D.
Portal pictures.portals.link gives the two portals Seasons 4.1.0's blue and orange pictures when the game has data/portals/INGAME_PORTAL_ASSETS_1.sheet.json (copied from Seasons 4.1.0's data/images/common_ios, with its .pvr).
Christmas tree slingshot. Insert puts it up or takes it down (F6 is a restart key in some games); the baubles no longer hit the bird they are shot with (ballsHitBird = false).
Older saves with per-device counters. The 1.x games stopped with "attempt to perform arithmetic on field '?'" when a bird was shot from a save that keeps birdsShooted (and the other counters: pigs, blocks, restarts, stars) as one entry per device. Each of these is now added up into one number when the save loads, as playtime and gameStarts already were; the file as it was is kept as <file>.original.
Outlines, two ways.addOutline takes a mode: "outside" (the default) goes only round the shape, "behind" is a fattened copy under it. The aiming aid's dots use the outside outline (outlineMode in 02_aiming_aid.lua).
Stella's abilities. The game's speed always comes back to exactly 1 when Stella's slow motion eases out; Dahlia's kick is four times as strong (kickStrength); Willow rolls on at the same speed after she hits something (keepSpeed).
The Facebook boomerang.extra_scripts/14_facebook_boomerang.lua switches on 4.0.0's unused facebookBoomerangMode, the boomerang's sharp turn back at a steady speed (off by default).
Blocks that stay asleep. A block whose support is popped can hang asleep in the air, as in every retail game. The engine keeps this; extra_scripts/15_keep_blocks_awake.lua wakes the blocks round a removed object when it is switched on.
The joint window in more games. A game is given the joint window (motor, limits, anchors) when its own level code reads the 1.6.0 joints, not only when its version number says 1.6 or later.
Editor: draw order, size and collision. 8 / 7 move the selected objects in front / behind (Shift: all the way), 0 / 9 make them 10 % bigger / smaller (the body too: a polygon's points or a circle's radius), Shift + 0 turns their collision on or off (number keys: the block palettes, Rio's above all, use the letters).
Taking over what the exe loads.config.lua takes loadScripts (scripts loaded at every start) and replaceFiles (any file the exe reads swapped for another), and engine.on("readFile", ...) lets a script change or block every file the exe reads.
The mods folder. A mods folder beside the game's data folder is read first whenever it exists, so an edited plain copy of any script or level replaces the game's own without a command-line switch.
Clipping for mods.res.setClipRect takes a tween between two rectangles with an easing curve, and is joined by res.clipFill (meters in six directions), res.pushClipRect / res.popClipRect / res.withClip (nested clips), res.resetClipRect, and res.ease / res.easings.
Extra scripts: 13_menu_pages.lua. Menu pages from the template of the game's comments, a fill meter for any item and tweens of any value.
Editor: joints stack. A second joint between the same two objects gets the next free name (a .. b .. "_2", "_3" ...) instead of replacing the first.
Angry Birds 4.0 (PC): Surf and Turf page 2's background stands still. In Classic 4.0 / Seasons 4.x a number as the fifth entry of a background layer is its position (theme20: 800), not a drift; it moved the layer 800 pixels a frame. Their layers drift by v = ....
Angry Birds 4.0 (PC): the Mighty Eagle no longer breaks the solid ground pieces. A static block takes no damage from a bird.
Angry Birds 4.0 (PC): purchases need a connection. The store stand-in only offers a store, and a purchase only succeeds, while isNetworkConnected() is true.
Red's Mighty Feathers: the forced tutorial freezes the world.physicsSpeedFactor = 0 now stops the physics (it was ignored).
Extra scripts: Stella's rays stop on the ground. The level's ground (ground or Ground, no sprite) counts as a hit even when the game keeps it under another key.
Classic 2.0.0 (PC) loads again. The Seasons 6.6.2 check above also covers the PC 2.0.0 data (it has EventManager.lua and subsystemsapi.lua too): its pictures and fonts come from images/pc and fonts/pc again instead of 480x320, and starTable is there.
Editor: Escape during a Shift+P playtest only ends the playtest. The key press that returns to the editor is no longer also read by the editor as "leave", which went on to the level list.
Editor: three or more objects can be jointed. With three or more objects selected, Shift+J (and F1, F2, F3, F5 or F11 with the joint window) joints each one to the next in the order they were selected.
Restricted aspect ratio: the borders stay black. A sky or background drawn across the whole window no longer shows in the side borders (Angry Birds 4.0 for PC).
Tints above 1 brighten.setTint(2, 1, 1, name) and the other highlight colours now light a sprite up: a vertex colour above 1 is drawn as an extra additive pass. The highlights of the extra scripts (Luca's beam, Dahlia's teleport and kick, Stella's aim) show for the first time.
A body with its collision off is no hit. A touch with a body whose collision is off (setCollisionEnabled(false), the portals of the extra scripts) gives no damage and no collision to the game, so a bird that goes through a portal comes out with its ability.
New script function:addOutline(newName, sourceSprite, width [, r, g, b, a]) (a copy of a sprite with an outline round it). Sprites made with createSilhouette can be used as the source of addOutline.
Extra scripts:episodes.lua moved into the extra_scripts folder (a copy next to gamelogic.lua is still read); the aiming aid's bird silhouettes have a dark outline (outlineWidth, outlineColor); Stella's slow motion eases back to normal speed when her ability ends (speedBackDuration); Dahlia's kick moves heavy objects less and light ones more (kickReferenceMass, kickMaxSpeedBoost).
Older games work again after the Seasons 6.6.2 work. Angry Birds Seasons 6.6.2 is now recognised by three scripts (EventManager.lua, subsystemsapi.lua and themes/theme51.lua), so Classic 2.2.0, the Hatchery and 8.0.3 iPhone packages are no longer taken for it (their starTable was nil). A save whose gameStarts is a table (Classic 1.0.0) is turned into a number like playtime is (the first copy is kept as .original).
Angry Birds Seasons 6.6.2: stream sheets and the common profile. Sprite sheets stored as .stream / .stream.7z (RGBA4444 records) are read and drawn, ../common/ load lists resolve, the level opens the groups the exe opens (ingame, ingameMasks, questItemsAndHats, the theme), and the createNonPhysical native exists.
Angry Birds 4.0 (PC) and Seasons 4.x: collisions follow the retail code. The block-against-block handler of the game (exe 0x42c980) no longer gives a score of its own: the points of a collision come only from the game's script, so a hit was counted twice. The blocks with ignoreGroundDamage (the wheels and parts of the Bad Piggies vehicles) take no damage from the ground or a static block, ignoreAllDamage blocks take none from anything (a bird too), and a block next to one with noCollisionDamage (the Black Bird's vials) takes none.
Seasons 4.1.0: portals work. An object that touches a portal (a block whose material is portal) and moves into it is teleported once it has crossed the portal's centre: it comes out of the other portal of the same kind at the same distance and angle (mirrored when the two portals face each other), with its speed turned the same way and raised to the material's portalMinSpeedOut; it stays hidden at the exit for portalDelay seconds. A bird fires birdTravellingThroughPortal, an object that has come out objectExitingThroughPortal, and one that leaves the portal before crossing objectTeleportationAborted. The particles and sounds of the block's effect list are not played yet.
Angry Birds Seasons 6.6.2: first natives of its iPhone exe (matched against the binary): setAngleRAD, setAngleDEG, setObjectColor / resetObjectColor (colorize, colorizeAdditive), useAdditiveBlendingForObject, doesFileExist, hasBody, getSystemTimeStamp, setPhysicsIterations, setPhysicsEnabledNative, setFilterGroup, resizeBox, resizePolygon (see docs/SCRIPTING.md). About 60 more still to add: the Flash animations, resizeBox / resizePolygon, the particle and sprite drawing variants, the spotlight and theme cross-fade.
Portals for every game, in Lua (extras/extra_scripts/12_portals.lua): the Seasons 4.1.0 portals written step by step from the exe (entry axis, hole point, mirrored or turned exit, minSpeedOut, the hidden delay, the three portal functions of the game), so Classic 1.6.2 / 1.6.3.1 and the other games can have them and the rules can be changed. portals.link("A", "B"), or portal = { target = "B" } in an object entry and portals.scan().
Angry Birds Seasons 6.6.2 (iPhone data): scripts can be read. The scripts of this version are encrypted with the Seasons key and then packed in an LZMA wrapper, and compiled with 4 byte numbers; the engine now unpacks the wrapper and loads those chunks. The scripts now start up: the game's own start-up code (episodes, assets, themes, blocks, achievements, menus, audio) runs through its first frames with the natives it expects from the exe (dynamic, native.TimeStamp, loadLoadList, createAudioFromLua, the payment, cloud and localization tables, the Flash animation calls as placeholders) in src/lua/seasons6_natives.lua. The sprite sheets of its loadlist.json load from images/<profile>, and the splash page (Viking ship and logo) is drawn from the game's own scripts; the game goes on to its main menu, which draws its sky, logo and buttons (dynamic.load and dynamic.release open and close load groups; the group names of config/loadgroups/loadgroups.json open the sheet groups they list, a cloud folder missing from the data is read from the profile's own folder, and the iPhone profile is used; the Flash animations answer with a length of 0 until they can be drawn). The game itself is not playable yet: drawing its Flash animations, its cloud packs and its layouts still has to be added.
Angry Birds 4.0 (PC) and Seasons 4.x: the glue of the plunger blocks (collider 10) works. As in the retail game (exe 0x42d744), a glue that touches a bird or an egg (that has no grabber yet) stops it, gives an egg its grabber and the plunger its grabbedEgg, sets gluedToBlock, and once the step is over destroys the joints of the touched object and welds it to the plunger (named by the glue's plungerName). No level of 4.0 uses it, a script can.
Angry Birds 4.0 (PC) and Seasons 4.x: a game that asks for a restricted aspect ratio (Red's Mighty Feathers Egg Defender) is drawn inside dark grey borders. The retail setOffsetedViewport(x, y) was an empty stub, so on a window wider than 4:3 the 4:3 picture was not moved to the middle, the borders were not black with the grey bird and pig stickers, and every click landed in the wrong place. The call now moves everything drawn afterwards by x, y (what is drawn before the next call keeps the old offset), the window outside the picture is cleared black, the game sees only the picture as its screen (screenWidth / screenHeight inside the border, so the world, the background layers and the camera fill the picture), and the cursor and touch positions the scripts read are moved by g_touchesOffsetX / g_touchesOffsetY as the exe does. A clip rectangle stays in window pixels (the scripts add the border to it themselves). The border behind the stickers is the retail dark grey (28, 28, 28), not black. The test program takes RT_W / RT_H for a window of another size and RT_CLICK="frame:x:y,..." for clicks. Screenshot: shots/classic40_egg_defender_borders.png.
Angry Birds 4.0 (PC) and Seasons 4.x: no more stop on pausing or at the menu with a table playtime. Version 4.5 turned a playtime table of a save into one number for every game that is not Space or Star Wars, but these two keep playtime and the other counters as one entry per device themselves (getLocalAmount reads settings.playtime[device]), so the pause ("gamePaused ... attempt to index field '?' (a number value)") and the achievement check ("bad argument #1 to 'pairs' (table expected, got number)") failed. Their saves are now left as they are, and a save that 4.5 already changed gets its playtime back as an empty table (the play time counts from zero; the table as it was is kept in settings.lua.original).
Angry Birds 4.0 (PC) and Seasons 4.x: forceX / forceY push like the retail game. The retail update of a block multiplies forceX and forceY by the block's mass (the balloons' lift is an acceleration), uses forceRelative instead of them when it is set (turning with the block, not scaled), and with a targetVelocity takes the force off an axis that already moves that fast the same way. The engine applied the raw numbers, so a heavy balloon hardly rose; the fans and rockets also got forceRelative added to a forceX / forceY the retail code never adds.
Social server: Angry Birds Friends finds the account that logged in last. A Friends game without a name in config.lua (socialPlayer) could never find an account, so "Log in with Facebook" always said "No Angry Birds Social account". The game now asks the server /classic/account without a name; the server answers with the account that logged in last (or the only account), and the game keeps that name for its coins.
Social server: a level of the day without poached-eggs.json. That file holds the game's own levels and is not shipped; without it the server found no level to give ("no level of the day yet"). It now starts with one small starter level and says where the 63 Poached Eggs levels go.
Angry Birds 4.0 (PC) and Seasons 4.x: the background layers that carry v drift. The clouds of Bad Piggies (bgLayers entries with v = -150 and v = -200) stood still, because only the foreground waves read v. A background layer now drifts by v pixels a second (counted like the foreground's, and scaled by the layer's parallax as the layer itself is), every frame. Checked by loading Bad Piggies 20-1 and comparing two frames two seconds apart: the clouds moved about 23 pixels to the left. Screenshot: shots/classic40_bad_piggies_clouds.png (the frame at 10.7 seconds above, the one at 12.7 seconds below).
Angry Birds 4.0 (PC): the "+" next to the power-ups opens the shop. The game's own isIapEnabled() also asks for iOS or Android, so on the PC the store the engine stands in for (4.5) was never "enabled", showPowerupPurchaseElements() stayed false and shop.openFromGame returned without doing anything. With the stand-in store started, isIapEnabled() now answers from iapEnabled alone. Checked by clicking through in Bad Piggies 20-1: the shop opens. Screenshot: shots/classic40_plus_opens_shop.png.
Angry Birds 4.0 (PC) and Seasons 4.x: particle_target of a particle file works. A particle file with particle_target = {targetX, targetY, killEarlyPercent} (the suction of the Egg Defender suckers, suctionAirFlow) is born with the speed that takes it from where it appears to the target in lifeTime / killEarlyPercent seconds; the engine ignored the table, so the emitter's speed (always to the right) was used. The script moves the target before every call, so it is read at each call. Checked with a speed test (target 200 to the left: speed -130 with 0.65, the same for a target above) and by flying a ring of particles to a point in Bad Piggies 20-1. Screenshot: shots/classic40_particle_target.png.