This is the second issue in a regular series of news posts about wurst and the wurstscript community. Unlike the previous issue, this one is short, and focused on this month's progress. We intend to use this format for all future posts.
What is wurst? Wurstscript is a programming language that compiles to JASS (the language used for scripting warcraft 3 custom games), and is developed alongside a suite of tools, which provide a coherent and modern modding development experience. It can even work alongside maps written in vJass. Wurstscript is designed to make hard problems easier and more elegant, and easy problems dead simple.
The theme of this issue is "wurstscript in practice", where we want to show how regular ordinary maps use wurstscript, instead of focusing on higher level language features.
Special thanks to @DD_legionTN and @HappyTauren for their testing and contribution efforts.
- The setup tool has been moved to a separate repository. It now checks for new versions of itself as well as silently checking for compiler and project dependency updates. To get these __critical__ new features, please do update your tool by downloading at the link above.
- Unit Tests now have map-wide read access to compiletime resources. This allows the author to unit-test some behaviors that were previously not possible.
- Added "hashtable mocks" for string data operations, which allows them to work at compiletime and in unit tests.
- Bug fixes:
- Fixed some edge cases where vscode autocomplete would misbehave.
- Fixed a bug which caused the `buildmap` command to emit an invalid mapfile in certain cases.
- Changing between files in vscode no longer causes an invalid buffer ("ambigious reference error").
- Standard library fixes, and new features.
- Fixed some rare cases of ascii-int parsing problems, which improves JASS compliance.
This month a number of us have been thinking about, and acting on, ways of improving unification between wurst's development and hive workshop.
One achievement on this front is the addition of the Wurst tag, now enabled for all code-related submissions. This includes:
- Spell submissions.
- Triggers & Scripts posts.
- JASS (code) submissions.
We were also excited to see multiple submissions before this was even announced!
You should expect further wurst-related activity in the near future as a number of community members are getting involved.
We're excited to see what you've done that might be fun or interesting but doesn't quite fit in the standard library - and even moreso interested to see what kind of magic you can work up in spell submissions. For code review feedback always feel free to tag @Frotty or @Cokemonkey11 .
As requested by our readers, we're going to include a code snippet example in our posts from now on. In line with this month's theme, here's a practical and simple example that shows how wurst can make an easy problem trivial:
Then when the wurst compiler is run, the above emits nicely readable Jass (see below). This is just one example of wurst providing zero-cost abstraction, since the inliner would ultimately inline e.g. getSpellTargetPos into 2 local definitions - a topic we will discuss more in future posts.Code (WurstScript):package SimpleSpell
// Augments the Warden blink ability to deal damage to units in the target
// area. Units with low enough health are instead slain.
constant ID_BLINK = 'A000'
constant BASE_DAMAGE = 100.
constant DAMAGE_RADIUS = 150.
constant SLAY_THRESHOLD = 200.
constant BLINK_RANGE = 1000.
constant EFFECT_POISON = Abilities.poisonStingTarget
constant EFFECT_SLAY = Objects.nightElfBloodArcher
let caster = GetTriggerUnit()
forUnitsInRange(getSpellTargetPos(), DAMAGE_RADIUS, (unit u) -> begin
if caster.getOwner().isEnemyOf(u.getOwner()) and u.isAlive()
if u.getHP() <= SLAY_THRESHOLD
caster.damageTarget(u, SLAY_THRESHOLD * 2.)
registerSpellEffectEvent(ID_BLINK, function onEffect)
Code (vJASS):function getSpellTargetPos takes nothing returns real
set getSpellTargetPos_return_x = GetSpellTargetX()
set getSpellTargetPos_return_y = GetSpellTargetY()
function forUnitsInRange takes real pos_x, real pos_y, real radius, integer c returns nothing
call GroupEnumUnitsInRange(Group_ENUM_GROUP, pos_x, pos_y, radius, ClosureForGroups_filter)
function onEffect takes nothing returns nothing
local unit caster_2 = GetTriggerUnit()
local real temp_x = getSpellTargetPos()
local real temp_y = getSpellTargetPos_return_y
local integer clVar = alloc_Closure_2()
set caster[clVar] = caster_2
call forUnitsInRange(temp_x, temp_y, 150., clVar)
set caster_2 = null
Next month we'll return to a more hardcore example, demonstrating `@compiletime function`s + expressions, and their uses.
We look forward to your comments! As usual, we chat all things wurst at the #inwc.de-maps IRC channel.
We need your help nominating resources for or next YouTube video. Post here now.Dismiss Notice
The winners of the 27th Texturing Contest have been announced. Congratulations to the winners!Dismiss Notice
The Terraining Mini Contest Reload #2 - Machinery has began! Create a scene centered around a piece of machinery. Get creative tinker boys and girls!Dismiss Notice
Join us on our next Custom Game Night, on Saturday, February the 24th at 7:00pm UTC! We'll see you all on our Discord and on Battle.net!Dismiss Notice
The Cinematic Contest #7 - Time has began! Create a cinematic about Time!Dismiss Notice
The Team Member Contest has ended! Check out Hive's created heroes and who could win the challenge here!Dismiss Notice
Page 3 of 14
Created by QuantumT
- Nov 28, 2017
Island Troll Tribes is a Survival PvP Arena game in which you and your tribe build up a base, hunt for meat and gather items to make gear. The ultimate goal is to fight with and defeat the opposing tribe(s).
We would like to invite everyone to our Island Troll Tribes Tournament.
Clan TwGB@USEast is hosting a 3v3 Round Robin Seeding Into Double Elimination Playoff. Total prize pool is 225$ + 25% of donations. You can choose your own team or be assigned a team at the start of the group stage.
2 Matches are assigned weekly and are scheduled for Saturdays and Sundays at 4 pm EST. However, this does not mean that you have to play your match on this day. If you are able to agree on another time with your opponent, you can change the match date. Each team will be assigned 10 matches total over the course of the group stage.
The group stage will consist of best of 3 matches. You will be awarded 1 point for each game win and 2 points for each match win (i.e. a 2-1 results in 4 points for the winning team, 1 for the losing team). The teams with the most points at the end of the group stage will be seeded highest into the playoff bracket. Format for playoffs will be announced towards the end of the group stage.
Modes will be as follows:
Keep an eye out there for all Island Troll Tribes News and join our Discord, we play daily and have multiple Hostbots.
Hope to see you guys there.
Island Troll Tribes Dev team.
Thanks to Quantum@USEast for this tutorial video.
Assigned moderator: @Naze
Created by Cokemonkey11
- Nov 15, 2017
Hello! This is the first issue in a regular series of news posts about wurst and the wurstscript community. Actual years have passed since we last summarised wurst-related content for hive workshop news, so keep in mind that this is a very sparse summary, whereas our future news posts will more densely discuss current events.
Background on wurst: wurstscript is a programming language that compiles to JASS, and is developed alongside a suite of tools for a coherent development experience. It can even work alongside maps written in vJass. A usual workflow looks like this:
- Design a terrain in a world editor (vanilla editor, WEX, or anything really)
- Define objects, either using the object editor, or using the wurst “objectediting” subsystem
- Write scripts, get instant feedback, and compile & build in the lightweight vscode editor
- Check in your code to version control
So, what’s changed recently?
The Wurstscript community has been steadily active with frequent and regular changes, not only in the Wurstscript language, but across the whole map editing toolchain.
Wurstscript has found its niche as the toolchain that aims to maximise productivity and consistency of the development experience, without sacrificing quality.
The maintainers of Wurstscript are typically programmers first, and mappers second. Sadly, time constraints mean that we’ve not spent much time publicizing our progress for the larger modding community. This is something we’re keen to change, with more frequent curated summaries of what’s going on in our bubble.
With that context in mind, we hope this will be the first of many “Best of the Wurst” recap posts, wherein we highlight major changes - certainly more frequently than once every three years. There are too many changes to count, so in this post we’ll discuss some of the changes made just this summer that we’re excited about.
GUI tool for compiler updates and map project setup
Probably the most major development this summer is a new tool for maintaining your installation of wurst, bootstrapping new map projects using a template and importing existing projects.
This tool maintains a global instance of the wurst compiler, automatically updates it, and can generate & update projects in a way that’s friendly for version control repositories as well as the vscode plugin.
The key point here is that we’ve done some refactoring of the wurstscript project structure to make wurst play more nicely and consistently with vscode. With the addition of dependency management and template projects, we envisage great strides in productivity as the project template (or templates!) progress.
New runmap/run-arguments design, with readonly terrain mapfile
Alongside great improvements to the JMPQ3 library, wurst now accesses your map project as a read-only archive file. Instead of overwriting it (as done traditionally), the compiler now writes built mapfiles out to a separate
- Map files can more safely be version controlled since they’re accessed read-only by the wurst compiler.
- In the extreme case, alongside native objediting, you can maintain your map end-to-end using your checked-in mapfile only for terraining purposes.
- Better integration with existing maps that have JASS/vJass, because wurst can reuse the existing map script without mutating the source file.
- Building and compiling wurst maps is now done independently in vscode by default - thus there is no need to use a custom editor (apart from for terraining) or even have warcraft3 installed at all.
The overall structure of a wurst map project has changed, and now comprises two new metadata files:
One advantage of using the
Another advantage is that the world editor is no longer needed for some metadata like the map's name, description, author, etc - that metadata is sourced from the build file and injected into the final map.
The setup tool also interacts with this metadata by importing the
New docs and website, at a new address
Documentation and tutorials for wurstscript now live at wurstscript.github.io - a new landing page which we believe provides a much more consistent and attractive experience for consuming wurst. We’re encouraging community-written tutorials, and indeed the Wurst for vJass Users is one such tutorial.
Take a look here as well for the wurst setup tool mentioned above!
As a lightning recap of the last few years, here’s more:
- Vscode plugin and workflow, which deprecates the Eclipse plugin and workflow.
- New Github organization - refeactoring work to split up repo; now using gradle for dependency management.
- Wurst standard library v2 now active and de facto standard.
- Improved JASS compliance in Jurst (the vjass-friendly wurst dialect).
- Compiler performance and RAM usage improved.
As usual, we chat all things wurst at the #inwc.de-maps IRC channel.
@Cokemonkey11, @Frotty, and @peq
WurstScript - Blog - Getting Started
Page 3 of 14