• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

lua

  1. yatyfornetreg

    (WIP) Introducing SharpForge: a C# to Lua Toolchain

    Hi Hive, I want to introduce a work-in-progress project I have been building: SharpForge, a C# scripting toolchain for Warcraft III: Reforged map development. The goal is not to replace the World Editor, JASS/Lua knowledge, or the existing Warcraft III scripting ecosystem. SharpForge is...
  2. lunarstK224

    [Trigger] [Lua] I don't know the cause of the desync.

    sorry for the rough English. Desync occur when area-of-effect skills attack multiple NPCs (typically 30 or more zombies) simultaneously. Also, even when using single-target skills or buff skills, desync occurs a considerable time later. This is consistently reproducible within approximately 5...
  3. IronBladeClan

    Is there a Lua to Jass converter?

    I've found plenty of talk about converting Jass to Lua, but what about the other way around? I guess I'm specifically looking for something that spits out Jass I can paste into the World Editor. I want to use YDWE PK, but it seems like it doesn't really support Lua. On the other hand, I'm...
  4. Cyganostra

    [Solved] [Solved]How to destroy top borders ui?

    The bottom can be changed in the options, but the top must be changed via Lua or Interference. So how do I do that? What is the path? I want it to be invisible or not to exist.
  5. darkravenbest

    Get the lehgth of intersection between a segment and FINITE 3d cylinder. (lua)

    Hello, im struggling with this problem right now. Scoured the internet and didnt find any proper guide for this case, and dont know where to go with this question, and i remembered that usually on this site i can find help. In my case i try to create function which give me a length of segment...
  6. HerlySQR

    Warning for all the people that used my Lua Save Load System about the "%" character fix

    Hello, if someone used my Lua version of the Codeless Save and Load (Multiplayer) - v3.0.1, that I shared in thread like this: [Script] - A Lua save/load system similar to TriggerHappy's GUI-friendly system, I have to say that I never made a prevention about the "%" character that had issues...
  7. Woodenplank

    [Lua] Delayed actions and MUI management in LUA

    Recently getting into lua (after just getting into JASS...) and while the use of local variables makes a lot of MUI easier, I'm not certain how to deal with delayed/repeating actions for multiple instances. The spell I'm making is fairly straight forward. Mark a target area and continually deal...
  8. Tomotz

    [lua] [VScode] wc3 jassdoc access

    I created a VSCode extension that allows you to navigate to the jassdoc definition of a function from lua code. jassdoc - GitHub - lep/jassdoc: Document the WarCraft 3 API is a project that adds documentation for the wc3 natives. To install just go to the Extension tab in VSCode, and search for...
  9. PurgeandFire

    [GUI] Local Variables in GUI

    Local Variables in GUI Since the dawn of Warcraft 3, one of GUI's biggest drawbacks was its lack of local variable support. Variables defined in GUI are always considered global—which means they are defined once and can be accessed anywhere in your map's code. This is convenient, but once you...
  10. Luashine

    Lua dump of common.j / blizzard.j / common.ai

    Do the impossible, see the invisible xxx, xxx, xxxxx xxx xxxxx! To whom it may concern: I dumped the transpiled Lua files from memory. In hindsight I wonder, why nobody has thought of this before? v2.0.2.22796 This could be useful for the rare stacktrace leading through...
  11. darkravenbest

    1.31 lua Empty Error report

    Hello, friends! Recently tried to switch to lua, to use its tables, but got some issue with "debugging" as when i make a mistake in the custom code, using lua jass helper return empty window without error description and line reference as he does with jass. How to handle this problem for...
  12. Tteodori Usemap

    Help!! Custom Worker, Entangled Gold Mine Error, and Batrider Animation

    When I try to place a custom worker unit in a custom entangled gold mine (right-click on the custom entangled gold mine after selecting a custom worker), an error message and sound are output. Is there a way to fix this? Of course, there is no problem with the placement itself or operation...
  13. moddiemads

    TIL The Length Operator (#) can cause a time-bomb desync.

    Basically the title. I've been helping the CoE map by modernizing its implementation and translating it to LUA, and this gnarly desync started happening after 30min or more of game time. It turns out that, after a lot of bug hunting, the # operator in LUA does not behave consistently across...
  14. KW~

    A strange error in Lua script

    Add a line with a meaningless comment in the code, and the program crashes after running the check. --length % scale Does anyone know why?
  15. GeorgesZebit

    ABILITY_SLF_SPELL_LIST not work?

    I wanted to dynamically modify spell list of spellbook with BlzSetAbilityStringLevelField, but it just do nothing with ABILITY_SLF_SPELL_LIST field. code is like this, A003 is spellbook. local a = BlzGetUnitAbility(u, FourCC('A003')) print(BlzGetAbilityStringLevelField(a, ABILITY_SLF_SPELL_LIST...
  16. sur5al

    [Trigger] Need help to make trigger

    So... i get many search hits on the net for "convert jass to lua", but i need the opposite thing! Which i cant figure out. I am super low level in jass. Use it only when need things outside gui possibilities (local variable, damage detection system, etc.). All my jass triggers in my maps are...
  17. Luashine

    [Mapping] Explaining Warcraft's lockstep architecture for mapping (avoid desyncs)

    I haven't seen Warcraft 3's concepts explained anywhere in a condensed manner, let me try it here. Who is this tutorial for? The beggin beginners in War3 modding, though the explanation will probably require some prior programming knowledge or a little experience with World Editor. Lockstep...
  18. Bloodheaven_

    [Lua] Does this desync?

    Hi there, I'm trying to implement my UI while also fiddling with GetLocalPlayer(), I wonder if this method of doing it causes any desync. Is it unnecessary to do it like that, can I just use "BlzFrameSetTexture(backdrop, s, 0, true)" in the GetLocalPlayer() block? How do I test if any...
  19. Bloodheaven_

    [Lua] Reforged UI Designer doesn't work In-Game

    Hi there, I created my UI in the Reforged UI Designer and exported the UI to Lua. Then I pasted it in the Map Custom Script Code only to find out it doesn't show up, the JASS version of that UI doesnt have that Problem at all, do I need to call the UI somehow? Here is the snippet: The JASS...
  20. Bloodheaven_

    [Lua] How to convert GetUnitGoldCost to LUA?

    Hi there, I'm trying to convert this native to a LUA Function but I'm failing miserably. Jass Function converted to LUA Function //Jass native GetUnitGoldCost takes integer unitid returns integer //-->LUA<-- function GetUnitGoldCost(unitid) end Function Call Custom script...
  21. MangaPwnz

    [Solved] [LUA] Change ability field for ALL abilities with abilCode

    Hello :) I'm trying to make a custom spell system and need help with a specific part of it. Goal: I want to be able to create custom spells while touching the object editor as little as possible. I want to be to fill in as many as possible of the fields - the most important are cooldown, mana...
  22. HerlySQR

    [Lua] Time result cannot be represented in this installation

    Hello, in my save load system I included save the date when the save was made, to the players can keep track of them but for some reason in this line to show the date: BlzFrameSetText(TooltipDate, os.date("\x25c", os.time(data.date))) Sometimes happens this error: To let you know, the value...
  23. HerlySQR

    Lua W3 handles instantiation

    Hello, while I wanted to translate the Zwiebelchen's Threat System to Lua, during the Debug Board it checkes the handles that are existing in the map and to asign them an integer does an operation that involves creating 50 locations, get their handle ids and finally removing all of them every...
  24. Arvin.Ma

    [Crash] [HELP] internal error in the LUA transpiler

    i have a bug, it's make me confuse long time, my script is write by lua. (have not one line jass code). but when i use RestartGame() API to restart game, sometimes, it will random crashing. (About 1 in 10 probability) 。 below is the war3 error log. can someone guys help me ? 5/8...
  25. Insanity_AI

    [Lua] Task Processor

    Inspired by Chopinski's Relativistic Missile System way of processing missiles, I've come up with an idea of mimicking OS's process scheduling inside Lua's runtime for the purpose of eliminating "processing" lag by sacrificing the fact that the code will always execute immediately upon call. At...
  26. fllwr9141

    [General] Questions on Reforged for a old newbie

    1. What are the constraints and best practice for FourCC allocation? (except for H*** for heroes) 2. Is it possible to place same ability on different UI button positions depending on unit type? (non-hero) 3. Does Leak matters in Reforged, given sufficient memory? (In other words, will incur...
  27. Killparadise

    [Solved] Lua Modulo Weird Behavior

    Hello! I'm writing out some scripts but it seems like when I try to run a modulo I get some weird behavior, for example: a % b - Causes a syntax error a % n - Crashes the world editor a % 1 - Saves fine Are we not able to use variables with the mod functionality? Full Example that gives a...
  28. Uncle

    [Lua] [solved] Lua Grid System - Need help with OOP design

    I don't know what I'm doing, help me! -- This creates a 2d, 3d, etc. array (table). It needs to be above the variable creation function newAutotable(dim) local MT = {}; for i=1, dim do MT[i] = {__index = function(t, k) if i < dim then t[k] =...
  29. HerlySQR

    [Lua] How can I increase the performance of this system?

    Hello, I was creating a map with a guy, and we were testing, I made this system for spawning creeps, but the map lags a lot and it get worse, but just for me and not for his or another person, I know the problem is this system because the memory starts too increase a lot when is running, and I...
  30. HerlySQR

    [Lua] Metatable method is not received when I'm calling it

    Hello, I'm again trying to translate the Codeless Save Load System to Lua, but for some reason I'm not receiving the method of the metatable when I'm calling it, this is weird because I though if a table doesn't have a field, it will check to its metatable, basically I did this: ---@return...
  31. HerlySQR

    Creep spawn system lags after a while when spawn a unit

    Hello, I made a creep spawn system, it worked fine, but for some reason from a certain point when creates the first creep, eventually the game lags a lot, and I don't know why, I can't just erase things until I don't get the problem, because almost everything is important to the system works, I...
  32. Luashine

    How to contribute to jassdoc for dummies

    What is jassdoc? Jassdoc (lep's explanation, source & viewer; moyack's) is the community's collaborative attempt to do something a multi-billion (or smol million?) corporation couldn't afford a budget for: documentation for the part of the game, the part that made it live on for almost a decade...
  33. MindWorX

    [Miscellanous / Other] Warcraft III: Community Edition

    What is Warcraft III: Community Edition? Warcraft III: Community Edition is a launcher designed specifically for Warcraft III, version 1.29.2.9231, nothing more, nothing less. You can grab your own copy of 1.29.2 here, under the Game Files tab. But .. why is Warcraft III: Community Edition? I...
  34. Lamer

    [Script] Hero/unit info panel

    Hello everyone! I'm a GUI custom map maker and to make Resource Bars I need to learn Jass or Lua. I just started reading tutorials but this upgrade I need on my map asap :thumbs_up: Let me know if it's even possible do this way. So the example pannel gonna look like this: From upper left: 1st...
  35. HerlySQR

    [Lua] Control the order of the scripts

    Hello, I create this thread to discuss a thing that bothers me a lot, you know that all the custom scripts are placed in a unique file war3map.lua, the problem is, we can't control the order in where they will be placed, and this matters since we have libraries that requires other libraries are...
  36. HerlySQR

    Lua GetStackTrace

    I don't know if this was actually found, but there is a way to get the stack trace in W3 Lua, just using the error function, because is the unique function that can tell us what function called it and the function that called this and so on, so I did something like this: function GetStackTrace()...
  37. HerlySQR

    [Crash] Error with the Lua transpiler?

    Ok, this error never happened to me, and I don't have idea what tries to tell me, I need an explanation, only I know is just for having this trigger: Jijimon House Enter Leave Events Map initialization Conditions Actions Set VariableSet TP_EnterRect = JijimonsHouse...
  38. T

    [Lua] How to use SelectUnitSingle()

    Short question: the first code snippet (in JASS) works, but the second one (Lua) does not. function selectPriest takes nothing returns nothing call SelectUnitSingle( gg_unit_hmpr_0000 ) endfunction function selectPriest() SelectUnitSingle( gg_unit_hmpr_0000 ) end Why?
  39. Luashine

    [Lua] Process memory leaking at high GC pressure

    Disclaimer: This is not something you would ever encounter under normal circumstances. TLDR: At very high GC pressure processes' memory will grow. If the GC catches up, the memory will not be released to OS. I'm currently attempting to debug a memory leak in a big trigger-heavy map I'm porting...
  40. Luashine

    [JASS] Performance analysis of 'leaking' Jass strings & Lua

    Common knowledge has it Jass strings leak!!!1 and are bad!!!1 Let's benchmark by generating A TON of strings. Test code & setup The code below takes your chat message, like "-10" and generates ONE 10-char long string (1=10/10). That's equivalent to generating 10 distinct unique strings in Jass...
  41. Luashine

    Blizzard's hidden jass2lua transpiler

    A few threads here have made me curious: "...then I found the automatic JASS to LUA converter." - Macadamia found by mistake that WorldEdit can transpile all Jass code to Lua. Nobody knows how exactly "Lua, embedded jass" - Tasyen found out, that Lua maps can have Jass code, automatically...
  42. Luashine

    Reforged's luahelper.lua and broken FourCC

    I won't just feed you, I will teach you how to fish 1. How to extract luahelper.lua 2. luahelper.lua ...Then let's print the file starting at these positions (start at byte 37392400 | only readable text | max 50 lines): user$ tail --bytes +37392400 "Warcraft III.exe" | strings -n 1 | head -n 80...
  43. The Nightmare Book

    [Lua] Problem with spell

    Hey guys, I have next spell that does alot of things depending on targets global group (animals, humans, etc). But right now I don't know why it doesn't work - my spell simply doesn't call and I don't know why. I tried different approaches but currently I don't found the answer. Init 10 Spells...
  44. HerlySQR

    [Lua] What is bad with this code?

    I getting tired with the WE, I tried to improve the Lua version of my Unit Transmission system, but the game displays error when I wanna run the map, so what is wrong with this code? do -- version 1.1.0 --[[ Also requires the Lua Timer Utils...
  45. HerlySQR

    [Lua] World editor closes when I save the map because of this code.

    I tried to update the Lua pure code version of my Bounty Controller but every time I saved it the editor closes and I don't know why, I wrote it in the VSCode with pluggins and never displayed me a syntax error or something like that, to see what is happening here is the code: --The pure Lua...
  46. KnockFace

    Lua endblock error

    I have a Lua script which I wanna import in my map, but when I'm trying to save the map it says "endblock error at line 547" while the test map has 546 lines I'm a noob at Lua, I know zero Also I noticed that if I delete everything and leave a single function it starts giving me another error...
  47. HerlySQR

    [Lua] Trigger variable event is not working

    For some reason the variable event for a system I did in Jass and worked in that is not working in Lua, basically the triggers with that event doesn't run, why?
  48. 0x4b

    [Solved] Issues using Lua extension with ObjectMerger

    Hello, I am following the Lua Object Generation guide posted by PurgeandFire and trying to get it working but triggers in Lua aren't working at all for some reason. I am able to use the normal ObjectMerger syntax just fine to create objects, but the Lua extension isn't working. I'm using this...
  49. HerlySQR

    [Lua] Text macro in Lua?

    I searched if there is a way to do this but I didn't find anything, so I'm here to ask you.
  50. ScrewTheTrees

    1.32 The LUA GC is seemingly disabled.

    This is just a heads up for whoever uses Lua / TypescriptToLua or similar frameworks for their warcraft 3 maps. The Lua GC is seemingly disabled. Over in the hiveworkshop discord we did quite a bit of experimentation on this issue after i realised my map was leaking 0.6MB/s, but the leaks made...
Back
Top