[Update 3.04] Neutronium, loadouts in the report and via JSON, feminine gender, home page layouts and lots of improvements
Hi everyone!
Here comes 3.04! A new chip, and above all a big quality-of-life update, largely built from your suggestions on the forum (there are a lot of "thanks to" in the changelog :)). The full list is here: https://leekwars.com/release/3.04
A new chip: Neutronium
- At level 262, Neutronium makes every entity in a circle of radius 3 Dense for one turn, the caster included if it stands inside. A Dense entity can no longer teleport or swap: Teleportation, Jump, Inversion, Repotting and Kemuridama are refused, and nobody can swap with it either. Walking, being pushed or pulled is still possible. Enough to trap an opponent who keeps running away… or to stop yourself from escaping :)
- 7 TP, range 2 to 7 with line of sight, 6-turn cooldown. On sale in the market.
LeekBench: AIs on their own against the bosses
- A new page, https://leekwars.com/leekbench: an AI model (Claude, GPT, DeepSeek, Qwen, GLM…) is dropped alone against the bosses, with an account, the documentation and 100 fights per boss. It has to write its leeks' AI, pick their loadout, and find on its own the puzzles that make the Fennel King and the Pumpkin vulnerable. The page shows each model's best run: fights, time, cost, AI size and a score. So far, none has beaten the Evil Pumpkin by the rules… up to you to do better than them :)
Loadouts, from the fight to the code
- The fight report has a new Loadouts panel: the weapons, chips, components and characteristics each leek really wore during the fight, including the loadout set by
setLoadout. In the player, a click on the icon next to the level opens the same card. A button copies the loadout as JSON, to import it back as a loadout: handy to borrow the build of an opponent who beat you.
- A loadout can now live among your AIs, in a
.json file: the editor shows its preview (and warns if there are too many weapons or chips for the level), and getLoadout('builds/tank.json') reads it from the code.
setLoadout accepts a loadout built in code (the getLoadout format), and getInventory() lists the items your leek can use, with the stats and alterations of components. So you can pick your build at the start of the fight, depending on the opponent.
fileRead('config.json') returns the text of a file from your AIs, read at compile time: with jsonDecode, your settings or data tables become objects.
- In the test window, each leek of a scenario (yours as well as your test leeks) can wear a saved loadout or a JSON file from the start of the fight, and "Apply a loadout" gives a test leek all the weapons, chips and characteristics of a loadout at once.
- All of this also works in JavaScript, TypeScript and Python (
System.fileRead, System.getLoadout, me.setLoadout, me.getInventory()).
Masculine or feminine
- Each farmer picks their grammatical gender on their profile, and each leek's in "Customize the leek". Fights, notifications, emails and ranks agree with it, in the languages that have grammatical gender (French, Spanish, Italian, Portuguese, Polish, Russian, German, Dutch). Thanks to MaréchalMaraîcher for the idea!
The home page and "Live"
- The home page can have several named layouts, switched with one click from the header: one for the garden, one for coding, one for the chat… Each device remembers its own.
- A new Connected farmers widget, with their avatars (thanks to fujiwar).
- "Live" announces the Imperator of the day at each triple (solo, farmer and team tournaments won the same day), boss fights that enter the top 10 of a boss ranking (and a first place in the chat too), and forum replies.
The editor
- Replace in all files, from the global search, with regex groups like
$1 as in VS Code (thanks to Amal).
- Also: "Duplicate" an AI, "Copy path" for an
include, "Download (ZIP)" a folder or all your AIs, touch selection on mobile, an option to wrap long lines or not, beforeFight and afterFight colored like annotations, and the names of unsaved AIs when you leave the editor.
- The test window shows cell numbers, lets you place both teams' starting cells anywhere, gives a test leek the level of your choice and shows the capital its characteristics cost.
Rankings, trophies, fight player
- The boss ranking has an All bosses tab, with each farmer's wins against each boss, and each boss has its own "Most wins" ranking (thanks to MaxDuKart).
- A new fun ranking: fastest to level 301. Trophies get a search, a rarity filter, and six more trophies have a progress bar.
- The player's progress bar was redone video-style: thin and laid over the map, it grows when the mouse gets close, and it can finally be grabbed with a finger on mobile (thanks to CultureBio).
- The table view of the history shows the resources won in each fight, the Fast Garden can show its batches as a table too, an arrow marks the leek that gained a level during the fight, and the fight log now shows moves (“Show moves” setting of the player).
Halloween, the chat and the rest
- Halloween is over, but two recipes remain: the spectre potion, which turns your leek into a bluish ghost, and the candy bag, which opens on a random candy (Habs, fights, doubled loot or XP… a cursed candied fennel, and very rarely the Pumpkin's eye with an exclusive witch hat). Their schemes are in the market with the Haunted trophy: the webs and souls you kept are still useful.
- Fennel & Pumpkin gives twice as much loot, and its wins now count for the Fennel King's and the Pumpkin's trophies.
- The Fennel King's knights and squires now all carry the same set of chips, in his fight as in Fennel & Pumpkin: Flame, Remission, Fortress, Elevation and Protein for the knights; Spark, Wall, Protein, Rampart and Motivation for the squires.
- Chat:
bold, italic, __underline__ and ~~strikethrough~~ (thanks to dulph), links to a trophy, an item, an encyclopedia page or the docs show their name (thanks to Tabary), and the (lwplus) smiley.
- Also: selling items by batch in the market, a button to challenge from a leek's or farmer's tooltip, color and hat of your choice for a new leek, "Create a team" on the teams page, team compositions visible to visitors, an altered component usable in a workshop recipe, an ingredient's recipes in its tooltip, and corner brackets to mark the selection in the v3 theme.
- LW+ paid in crystals now follows the rate of the biggest pack: 559 crystals a month instead of 399 (prices in euros don't change).
For programmers
- New functions:
sendNotification(title, message) (a notification from a fight, 50 a day), getComponents() and the COMPONENT_* constants, getPlantTriggers(plant), getAIPath(), getDeadAlliesCount(), setPutAll, mapKeySet, arrayRotate, getSourceLine() and getSourceFile(), the CHIP_NEUTRONIUM and CHIP_GRAIL_PROTECTION constants, and the STATE_DENSE state: on a Dense entity, useChip returns USE_INVALID_STATE for a teleportation or a swap, without consuming anything.
- New RAM rule: a RAM point gives 16 MB (2 million slots) instead of 64 MB, but RAM now counts what is really used. Compiled code costs 2 bytes per bytecode byte, shared between the leeks running the same AI (instead of 80 bytes per Java character). Empty containers are no longer free (88 bytes for
[], 120 for [:], 144 for ` and {}, 72 for an instance), and in LeekScript 1 to 3 an array counts 48 bytes plus 96 per element. In JavaScript, TypeScript and Python, the cap is now the same as in LeekScript (it was about 14 times lower!) and System.usedRAM` finally measures something (thanks to Lamafia).
- What may change the behavior of an existing AI:
setLoadout('name') gives each leek its own copy of each item: in team fights, what your other leeks already wear is removed (with a warning), in the order of the beforeFight calls;
rand(): each AI has its own sequence, four leeks with the same AI no longer draw the same numbers (a fight replayed with an old seed no longer gets the same draws);
- a turret killed then resurrected stays Static, and an aftereffect no longer hurts an Invincible leek;
listen() in a bulb's AI reads its own messages, and the list is cleared even after a turn that ended in an error;
- an entity's mailbox keeps 200 ally and 200 enemy messages per turn (an opponent can no longer drown the team's), and
sendTo returns false when it is full;
- a Set in an operation no longer crashes the AI:
s + x treats the Set like an array, and m += m2 costs 1 + n operations, like mapPutAll.
- Fixes: nested ternaries compile in an instant, a few AIs that failed to compile now pass, a JS, TS or Python leek no longer loses its turn on an internal error, an unclosed array is reported where it's missing, and a hit that stacks on an existing effect finally counts for trophies.
Thanks!
Thanks to everyone who suggested or reported something: Amal, Nyaleph, dulph, fujiwar, Sycareus, Smartiz, FdHP, MaréchalMaraîcher, MaxDuKart, Tabary, CultureBio, Lamafia, LaLongueTerre, goban, Raph3304, DemonDeLaplace, Losarou, EstebanC, tagadagain, Gandhictature, PaladragonVert, pakalatak, PapaPingouin, KavaliovSepties, Ewenator, PoireauSaisonnier, VlentGamer, LucasOFrancês, Bux420, nytope, Iroh, Papuche, dulph5, BrocoliCosmique, Marcellus, djy and Entity :)
See you in the garden!
Pilow