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!
They do for me, but I tested with quick "place a bunch of units in empty field and have them fight for my amusement" map. Maybe something breaks if the AI is forced to actually gather resources, build the base, pick units, and stuff like dat.
I was trying to use this function in our shiny new Lua script.
Lua:
print(BlzGetAbilityTooltip('AHfs', 1))
It gave no output and crashed the rest of the calling function.
I found these lines in the common.j file. The AbilityId function always gives 0, whatever the input.
vJASS:
// Not currently working correctly...
constant native AbilityId takes string abilityIdString returns integer
constant native AbilityId2String takes integer abilityId returns string
So I decided to do it myself. I thought this would work, but it just gives me "Tooltip missing!"
Lua:
function GetAbilityID (code)
local length = #code
if length == 4 then
local id = 0
for i = 1, length do
id = id + (256 ^ (length - i)) * code:byte(i)
end
return id | 0
else
return 0, 'Error: ' .. code .. ' is not an ability!'
end
end
print(BlzGetAbilityTooltip(GetAbilityID('AHfs'), 1))
After some debugging, I found the issue. In the standalone Lua interpreter, the function call gives the expected value 1095263859. But in game, it gives 1095263744.
Lua:
print(GetAbilityID('AHfs'))
I suspect the error is related to the floating point numbers. It is. The following version works correctly.
Lua:
function GetAbilityID (code)
local length = #code
if length == 4 then
local id = 0
for i = 1, length do
-- Must convert floats to integers, or there will be severe rounding errors
id = id + (256 ^ (length - i) | 0) * code:byte(i)
end
return id
else
return 0, 'Error: ' .. code .. ' is not an ability!'
end
end
My conclusion:
Automatic conversion from ability ID string to integer does not work in Lua scripts
There are some subtle bugs in the new Lua VM related to floating point numbers
Integer and Real types are not indistinguishable even in Lua scripts
Neveralice, indeed your implementation somehow ends up using real numbers instead of integers and causing loss due to FP precision. Please use this function for now. It will be built-in in the next patch:
Code:
function FourCC(id)
return string.unpack(">I4", id)
end
As @Sieben AI heroes indeed do not use spells in melee games (attached replay).
Also, a tome of strength remnant bug:
Basically, the tome models aren't removed but they are shrunk.
EDIT: attached another one on Emerald Gardens without warpten and greedisgood (only whosyourdaddy and iseedeadpeople), this time with insane AI.
EDIT2: did a LAN test too (attached). The same happens. Also tested on both x64 and x86. I'd like a /timer command to see the elapsed game time.
What's this Bonjour crap so I can run LAN? @Sieben I think it might be because the AI needs rehashing due to the newly changed and added spells/items.
There has always been remnant tomes after they were picked up. Bribe even created a system to delete them: Item Cleanup 1.3
It would be a good idea to remove that strange feature though, it's small but noticeable and it uses computer resources, even if it's not significant.
While i think that people should always create something like a cleanup setup for used tomes, i would not suggest removing this bug/feature. If you think about it, tomes and all other powerups indirectly create unclickable, unpickable items, that can still be get by triggers and moved around. Im not currently aware of anything that uses these properties, but removing this would, as far as i know the community abusing any oddities, break stuff in some maps.
While i think that people should always create something like a cleanup setup for used tomes, i would not suggest removing this bug/feature. If you think about it, tomes and all other powerups indirectly create unclickable, unpickable items, that can still be get by triggers and moved around. Im not currently aware of anything that uses these properties, but removing this would, as far as i know the community abusing any oddities, break stuff in some maps.
The only reason they added it was so that when someone in a competitive game acquired a tome and the enemy later revealed the fog where it was at, they would see the death animation and know that there had been a tome used.
Don't ask me how I remember this much detail. I used to be a huge fan of this game. Why else would I still be into it 18 years later (longer than some of you have been alive)?
The only reason they added it was so that when someone in a competitive game acquired a tome and the enemy later revealed the fog where it was at, they would see the death animation and know that there had been a tome used.
Sadly there are quite a few buggy models. Tomes not disappearing completely, or River Rushes being unshadowed, or some models (like Viny Plant) having death animation that actually doesn't do anything.
Yeah with the new JASS natives. You also have to work with FrameDef files (.fdf) to define the elements. The game uses these files internally so you can search the CASC/MPQ for .fdf files and see how various UI elements work in the game.
EDIT: I wrote the above screenshot with Lua, but you can use JASS as well.
OMG! Whaaatttt!!!!
How can we do that? Is there a simple palette or does it require some modeling and transparent textures and stuff like that?
Thank you TriggerHappy
Lua offers a lot of technical processing that JASS lacks, such as strings, data structures and trimming of visible code. However, like TH said, the natives are accessible in JASS.
Right now it seems you can't even use Lua in an existing map, you have to do it by creating a new map. But even then, you have to disable JassHelper in the new map and use //! beginusercode commands to differentiate the Lua script.
TriggerHappy made a new JassHelper mod that allows integration of Lua and vJass. I'll check it out at some point to see the pros and if there are any unresolved issues. Hopefully the final World Editor release allows existing maps to switch the trigger language with the same amount of ease.
Any news about the Campaign Editor? Could they possibly have made it so multiple maps share some of the code so you don't have to copy paste the entire trigger library to every map?
Sweet Lotus, that's doable already?! I've waited for 15 years for this! In Azkaban!
Is amount of action buttons limited in any way? Do default hotkeys, like Attack still work even if they ain't visible?
Do all those items count as equipped? How does that work with Inventory ability only allowing 6 items? How does that interact with "Item in inventory slot X" GUI variable?
Any news about the Campaign Editor? Could they possibly have made it so multiple maps share some of the code so you don't have to copy paste the entire trigger library to every map?
Sweet Lotus, that's doable already?! I've waited for 15 years for this! In Azkaban!
Is amount of action buttons limited in any way? Do default hotkeys, like Attack still work even if they ain't visible?
Do all those items count as equipped? How does that work with Inventory ability only allowing 6 items? How does that interact with "Item in inventory slot X" GUI variable?
Those hotkeys no longer work once the command card is hidden. As far as I know there is no limit on how many frames/buttons you can create.
In my system I am going to completely custom code the inventory system to where I store the objects in code rather than letting the game handle it. However, you can expand the default inventory ability to have more than 6 slots (shift click), but getting it to reflect properly in the UI is a bit harder apparently. You can see @Retera has been trying to expand the default inventory. He made some good progress but there were some issues. I think the extra 3 slots were faked in the UI, or something.
It doesn't necessarily require any modelling or texturing. You can use the files that come with the game as well as custom ones. I explained a bit more about how it's done with JASS/.fdf files in the previous post.
Please give a native for "Unit - Set unit build style (race)", also please make metamorphosis duration follow the levels (on the same unit) or alternatively, give transformation abilities option to make them temporary (with timed life). Also, if possible, fix the native "Unit - Cancel unit timed life", it kills the unit.
EDIT: On the build style, never mind, you can change it by disabling and enabling the build abilities by rawID.
Please give a native for "Unit - Set unit build style (race)", also please make metamorphosis duration follow the levels (on the same unit) or alternatively, give transformation abilities option to make them temporary (with timed life). Also, if possible, fix the native "Unit - Cancel unit timed life", it kills the unit.
Those hotkeys no longer work once the command card is hidden. As far as I know there is no limit on how many frames/buttons you can create.
In my system I am going to completely custom code the inventory system to where I store the objects in code rather than letting the game handle it. However, you can expand the default inventory ability to have more than 6 slots (shift click), but getting it to reflect properly in the UI is a bit harder apparently. You can see @Retera has been trying to expand the default inventory. He made some good progress but there were some issues. I think the extra 3 slots were faked in the UI, or something.
It doesn't necessarily require any modelling or texturing. You can use the files that come with the game as well as custom ones. I explained a bit more about how it's done with JASS/.fdf files in the previous post.
For anyone interested. Here is a demo map showing a more full implementation for location garbage collection.
It demonstrates a typical GUI unit slide trigger written by someone who does not know about leaks. Press Esc to see location metrics. In my case when the locations registered hit around 10,000 the aggressively set garbage collector runs and removes them. One can verify that the memory used by Warcraft III then after does not substantially increase thanks to continuous automatic removal of the locations.
Note that if you exit the game to the OS using the menu, eg Alt+F4, the map will cause a crash error. This does not appear to happen when exiting back to the main menu, only when exiting to the OS by quitting the game entirely.
Is there a document of .fdf files about basic types (e.g. "FRAME", "TEXT", "GLUEBUTTON"...) and fields (e.g. UseActiveContext, DecorateFileNames, Text...)?
Is there a way in scripts to aquire framehandle of an inner/local frame defined in .fdf?
Is there a document of .fdf files about basic types (e.g. "FRAME", "TEXT", "GLUEBUTTON"...) and fields (e.g. UseActiveContext, DecorateFileNames, Text...)?
Is there a way in scripts to aquire framehandle of an inner/local frame defined in .fdf?
I don't know of any documentation. There may be some in the future.
If you want to acquire a child frame you can call BlzGetFrameByName right after you create the parent frame. It seems to always return the last one created, because there can be duplicates.
Is there a document of .fdf files about basic types (e.g. "FRAME", "TEXT", "GLUEBUTTON"...) and fields (e.g. UseActiveContext, DecorateFileNames, Text...)?
Judging from the fact something as complex as the Galaxy Editor never received thorough documentation, I doubt we can expect it for any of Warcraft III's features, especially at such a late point in time. As it seems it's simply not a priority. We'll just have to test things ourselves and hope a diligent fellow will kindly document them in WarCraft III Tutorials, as we've done for the past two decades.
Documentation? Hah.
I went over to MMO-Champ to see if there are any new icons from PTR, randomly looked at a couple threads and saw someone point out that even WoW patches don't get adequate patchnotes.
If WoW doesn't get enough documentation, no way a Classic game will.
Documentation? Hah.
I went over to MMO-Champ to see if there are any new icons from PTR, randomly looked at a couple threads and saw someone point out that even WoW patches don't get adequate patchnotes.
If WoW doesn't get enough documentation, no way a Classic game will.
Then again, with such enthusiastic community, I doubt anything will go unnoticed - that of course only applies to visible changes, but then again the community quickly noticed that Blizzard changed some minor thing and this then caused something and so forth. I think that its also in Blizzard's interest to keep track of even the minor thing they change - but then again, having it public, probably not.
A good example is the now increased tooltip description character limit - not mentioned in the patch notes, but alas it is instantly noted by the community.
A good example is the now increased tooltip description character limit - not mentioned in the patch notes, but alas it is instantly noted by the community.
If you want to acquire a child frame you can call BlzGetFrameByName right after you create the parent frame. It seems to always return the last one created, because there can be duplicates.
If you have 20+ maps and map-specific triggers mixed with campaign-scoped triggers, it's a very tedious process. Not mentioning every time you make minor changes.
That's all well and good if you only have to do it once, but there could be numerous times triggers and scripts change over the course of developing a campaign, meaning a ton of extra work to update them in each map. I don't think it would be that hard to add a trigger editor to the campaign editor just like the object editor.
That's all well and good if you only have to do it once, but there could be numerous times triggers and scripts change over the course of developing a campaign, meaning a ton of extra work to update them in each map. I don't think it would be that hard to add a trigger editor to the campaign editor just like the object editor.
I mean if you dump all campaign maps into same folder, so they all import same stuff, and that functionality can handle object/trigger data, it should be super easy, barely an inconvenience.
If I want a dialog display for a specific player, I have DialogDisplay(player ,dialog ,boolean).
But for frames, I only have BlzFrameSetVisible(framehandle , boolean ).
To make my goal, can I use GetTriggerPlayer() in a frameevent?
I mean if you dump all campaign maps into same folder, so they all import same stuff, and that functionality can handle object/trigger data, it should be super easy, barely an inconvenience.
Now that we can easily hook any native with lua, do you think it would be cool to implement recycling along with garbage collection? Maybe the cost of creating and destroying an agent is bigger than just recycling and calling MoveLocation to reuse a Location object. Not sure about Groups and Forces though.
Now that we can easily hook any native with lua, do you think it would be cool to implement recycling along with garbage collection? Maybe the cost of creating and destroying an agent is bigger than just recycling and calling MoveLocation
to reuse a Location object. Not sure about Groups and Forces though.
Cost of recycling has always been higher. Ultimately the game recycles the storage used by the object except at native level. It was only ever really useful for units because units had a game engine level leak associated with them. Maybe people did it for groups and such due to handle leaks, but Lua does not suffer from those. It was also useful for timers before people realized they could pause them before destroying to prevent that final execution.
I wonder if 'Cast Time' Object Data fields above Level 1 will get cached properly in 1.31, or if we will need to use the natives to apply the new levels' cast.
For all those concerned with Unholy Frenzy and Orb of Fire changes, it's kept in different ability. Bad luck for everything else as they add fields like Critical Strike in 1.29 did. There's also a new Spiked Barricade (%) in the research option.
@Kam
Shadow Meld (item) disappeared and the new Orb of Fire is there instead.
EDIT:
It's now in unit directory instead of item directory.
The game keeps increasing in memory usage even while the game is paused. This was a map with only the start position placed and the melee victory/defeat conditions, AI, and melee time of day functions disabled IIRC. I left it paused for an hour or so and it increased from ~210,000 K to over 850,000 K.
This should be the x64 version, running under Windows 7.
The game keeps increasing in memory usage even while the game is paused. This was a map with only the start position placed and the melee victory/defeat conditions, AI, and melee time of day functions disabled IIRC. I left it paused for an hour or so and it increased from ~210,000 K to over 850,000 K.
Melee AI was disabled. It was whatever mode the default is. I just opened a new map, placed a start point and disabled the time of day, AI, and victory/defeat conditions in the Melee Initialization trigger.
For these natives, the string prefix parameter accepts anything other than null as a value. Otherwise, they do not appear to work. (This was tested in LAN with 2 players).
For a valid user, BlzSendSyncData does what it says. However, for an empty slot, BlzSendSyncData will not work as intended, and will probably have something to do with the Host's local string data.
It is possible to remove timed life from units by using Phoenix ability to prevent the unit from dying. You just catch the "phoenixmorph" order and remove the ability on that event, to prevent the actual morphing. This trick has always worked even in the oldest patches.
But now that Blizzard is actively developing the game, and adding many new features for mapmakers, I suppose it's time to stop improvising things and request that they implement as much as possible natively.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.