|
Maybe your tool is marketed more toward people who don't really make maps much, or have never really made a map before, or who are making a completely new map. If so, I'll back off a bit. But if you want established mapmakers to use this, it needs to be able to work with the things that people have already done.
If the triggers are already written for a map, you certainly don't need any tools for that any more. However, when any one, including you, starts any new map from scratch...
I understand. I come from a programming background where we're drilled that "the compiler knows better" from day 1, it's like a mantra (and it's mostly true given a decent enough compiler, which mine most likely ain't yet).
A good compiler for a sufficiently complex program, certainly. The issue is more that UMS map makers are used to writing all their stuff in assembler, and they don't want to rewrite any code that ain't broken ;D Also, there is the issue that when memory is very limited (not just data memory but also the memory the program itself takes up, in this case meaning there is a trigger limit to a map), assembler might just be the best choice... So to run with the analogy, you should probably include the option for the super-geeks to use some inline assembler...
|
On April 27 2017 21:57 integral wrote: Maybe your tool is marketed more toward people who don't really make maps much, or have never really made a map before, or who are making a completely new map. If so, I'll back off a bit. But if you want established mapmakers to use this, it needs to be able to work with the things that people have already done. But established mapmakers make completely new maps all the time?
Having the compiler use available unused memory by default is obviously the way to go. You just have to make sure there are advanced options for people that want to manage that themselves.
|
I've pushed a new version with a much cleaned-up internal code representation with hopefully way less codegen bugs. If something didn't work as it should before, hopefully it works now.
An example of the new rnd256() function.
#define LUCKY_NUMBER 90
countdown(Exactly, 0) => { set_countdown(2 + rnd256() / 80); if (rnd256() >= LUCKY_NUMBER) { print("lucky you"); spawn(TerranMarine, Player1, 1 + rnd256() / 40, "TestLocation"); order(TerranMarine, Player1, Attack, "TestLocation", "TestLocation2"); } else { print("try again next time"); spawn(TerranMarine, Player2, 1 + rnd256() / 40, "TestLocation2"); order(TerranMarine, Player2, Attack, "TestLocation2", "TestLocation"); } }
fn main() { while(true) { poll_events(); } }
Also template functions:
fn spawn_units<T>(T, qty) { talking_portrait(T, 5); spawn(T, Player1, qty, "TestLocation"); order(T, Player1, Move, "TestLocation", "TestLocation2"); }
fn main() { spawn_units(TerranMarine, 5); }
|
Just wanna chime in and say it's really really cool what you're doing here. I've never made any detailed maps before, but as a programmer knowing I can make cool advanced maps using code instead of having to learn about the trigger system and manipulating death counters is really enticing. I'm going to take a look at this soon!
|
On April 28 2017 02:38 Freakling wrote:Show nested quote +Maybe your tool is marketed more toward people who don't really make maps much, or have never really made a map before, or who are making a completely new map. If so, I'll back off a bit. But if you want established mapmakers to use this, it needs to be able to work with the things that people have already done. If the triggers are already written for a map, you certainly don't need any tools for that any more. However, when any one, including you, starts any new map from scratch...
On April 28 2017 03:34 KhaosKreator wrote: But established mapmakers make completely new maps all the time?
What? Even for maps I've already completed, I still use tools to update and edit it... Even if I didn't, this isn't actually relevant to what I was saying, because even in new maps I still copy and paste from what I've done in the past. The whole point of a program like this is to save time.
|
The last big limitation is now lifted. You no longer need a reserved player at all. The "unused" unit death counters for all players are mapped by default. This gives us 416 memory locations to work with which should be more than enough for the default configuration. You can still pass a registers file with --reg to override it.
I still need a list of the names of all AI scripts if anyone has such a thing. Otherwise I'll just export a map from scmdraft 2 and extract them manually but it'd be nice to not have to.
|
Good stuff. I think asking on TL for specific things like AI scripts won't be as likely to get a response as asking on staredit.net.
|
On April 29 2017 01:07 integral wrote: Good stuff. I think asking on TL for specific things like AI scripts won't be as likely to get a response as asking on staredit.net.
I'd love to join that community but the website is really really slow for me for some reason (10-20 secs to load a page). I had to clone the wiki locally so I can work without waiting forever.
|
On April 29 2017 01:15 nlight wrote:Show nested quote +On April 29 2017 01:07 integral wrote: Good stuff. I think asking on TL for specific things like AI scripts won't be as likely to get a response as asking on staredit.net. I'd love to join that community but the website is really really slow for me for some reason (10-20 secs to load a page). I had to clone the wiki locally so I can work without waiting forever.
Yeah. It's a long-running joke how slow it is.
|
TMCu - TerranCustomLevel ZMCu - ZergCustomLevel PMCu - ProtossCustomLevel TMCx - TerranExpansionCustomLevel ZMCx - ZergExpansionCustomLevel PMCx - ProtossExpansionCustomLevel TLOf - TerranCampaignEasy TMED - TerranCampaignMedium THIf - TerranCampaignDifficult TSUP - TerranCampaignInsane TARE - TerranCampaignAreaTown ZLOf - ZergCampaignEasy ZMED - ZergCampaignMedium ZHIf - ZergCampaignDifficult ZSUP - ZergCampaignInsane ZARE - ZergCampaignAreaTown PLOf - ProtossCampaignEasy PMED - ProtossCampaignMedium PHIf - ProtossCampaignDifficult PSUP - ProtossCampaignInsane PARE - ProtossCampaignAreaTown TLOx - ExpansionTerranCampaignEasy TMEx - ExpansionTerranCampaignMedium THIx - ExpansionTerranCampaignDifficult TSUx - ExpansionTerranCampaignInsane TARx - ExpansionTerranCampaignAreaTown ZLOx - ExpansionZergCampaignEasy ZMEx - ExpansionZergCampaignMedium ZHIx - ExpansionZergCampaignDifficult ZSUx - ExpansionZergCampaignInsane ZARx - ExpansionZergCampaignAreaTown PLOx - ExpansionProtossCampaignEasy PMEx - ExpansionProtossCampaignMedium PHIx - ExpansionProtossCampaignDifficult PSUx - ExpansionProtossCampaignInsane PARx - ExpansionProtossCampaignAreaTown Enmy - SetPlayerToEnemy Ally - SetPlayerToAlly VluA - ValueThisAreaHigher EnBk - EnterClosestBunker EnTr - EnterTransport ExTr - ExitTransport
I made a list of all AI script names if anyone is interested in it for whatever reason.
|
There is now a way to spawn units with properties. I think it is more flexible (?) than scmdraft or staredit as you can reuse CUWP slots for different unit types and they're quite scarce at 64 max. More info in the README here - https://github.com/AlexanderDzhoganov/langums#spawning-units-with-properties
Example:
unit LurkerType1 { Health = 10, Burrowed = true }
fn main() { spawn(ZergLurker, Player1, 1, "TestLocation", LurkerType1); }
|
Just pushed an update to my vscode extension which adds in code completion on intrinsics, and gets up to date with the mammoth pile of new functionality in langums.
Some future features I might be looking at are filling in intellisense when working with intrinsic functions, and scanning the .scx file for locations and exposing those to autocomplete (if I figure out a friendly cross-platform way of distributing libmpq, might poke around asm.js).
Btw, you're a monster nlight, it's taking a pretty big chunk of my post-work free time just to keep up with your language updates
|
On April 29 2017 14:04 Glenstorm wrote:Just pushed an update to my vscode extension which adds in code completion on intrinsics, and gets up to date with the mammoth pile of new functionality in langums. Some future features I might be looking at are filling in intellisense when working with intrinsic functions, and scanning the .scx file for locations and exposing those to autocomplete (if I figure out a friendly cross-platform way of distributing libmpq). Btw, you're a monster nlight, it's taking a pretty big chunk of my post-work free time just to keep up with your language updates You might be interested in: https://github.com/neivv/bw-chk
Probably doesn't get you all the way there (it's missing a lot of the stuff that'd probably be useful for you to auto-complete), but gets you much closer without using any native code, and is open for contributions if you'd like to add things
|
|
On April 29 2017 02:40 nlight wrote:+ Show Spoiler +TMCu - TerranCustomLevel ZMCu - ZergCustomLevel PMCu - ProtossCustomLevel TMCx - TerranExpansionCustomLevel ZMCx - ZergExpansionCustomLevel PMCx - ProtossExpansionCustomLevel TLOf - TerranCampaignEasy TMED - TerranCampaignMedium THIf - TerranCampaignDifficult TSUP - TerranCampaignInsane TARE - TerranCampaignAreaTown ZLOf - ZergCampaignEasy ZMED - ZergCampaignMedium ZHIf - ZergCampaignDifficult ZSUP - ZergCampaignInsane ZARE - ZergCampaignAreaTown PLOf - ProtossCampaignEasy PMED - ProtossCampaignMedium PHIf - ProtossCampaignDifficult PSUP - ProtossCampaignInsane PARE - ProtossCampaignAreaTown TLOx - ExpansionTerranCampaignEasy TMEx - ExpansionTerranCampaignMedium THIx - ExpansionTerranCampaignDifficult TSUx - ExpansionTerranCampaignInsane TARx - ExpansionTerranCampaignAreaTown ZLOx - ExpansionZergCampaignEasy ZMEx - ExpansionZergCampaignMedium ZHIx - ExpansionZergCampaignDifficult ZSUx - ExpansionZergCampaignInsane ZARx - ExpansionZergCampaignAreaTown PLOx - ExpansionProtossCampaignEasy PMEx - ExpansionProtossCampaignMedium PHIx - ExpansionProtossCampaignDifficult PSUx - ExpansionProtossCampaignInsane PARx - ExpansionProtossCampaignAreaTown Enmy - SetPlayerToEnemy Ally - SetPlayerToAlly VluA - ValueThisAreaHigher EnBk - EnterClosestBunker EnTr - EnterTransport ExTr - ExitTransport
I made a list of all AI script names if anyone is interested in it for whatever reason. You are still missing a lot of them. Those are just the standard StarEdit accessible ones. There are also all the Campaign scripts some spell scripts (recall/Dweb/nuke here, load nuclear silo), scripts that handle some unit spawns in some of the campaign missions, the all-so-important junkyard dog script (makes any unit move around like a critter), the vision scripts, and you even seem to have missed the suicide mission scripts. Basically, have a look in SCMDraft, it can access all of them, to get the full list.
|
On April 29 2017 01:59 integral wrote:Show nested quote +On April 29 2017 01:15 nlight wrote:On April 29 2017 01:07 integral wrote: Good stuff. I think asking on TL for specific things like AI scripts won't be as likely to get a response as asking on staredit.net. I'd love to join that community but the website is really really slow for me for some reason (10-20 secs to load a page). I had to clone the wiki locally so I can work without waiting forever. Yeah. It's a long-running joke how slow it is.
Besides not really being a UMS mapmaker, this is one of the reasons I try to stay away from Staredit.net lol. But for me it's like 1-2 mins to load a page. My god it is horrible. So frustrating lol.
However I find it funny that some of the smartest guys in BW use such a slow website.
|
You are still missing a lot of them. Those are just the standard StarEdit accessible ones. There are also all the Campaign scripts some spell scripts (recall/Dweb/nuke here, load nuclear silo), scripts that handle some unit spawns in some of the campaign missions, the all-so-important junkyard dog script (makes any unit move around like a critter), the vision scripts, and you even seem to have missed the suicide mission scripts. Basically, have a look in SCMDraft, it can access all of them, to get the full list.
I dumped these from scmdraft by using the Classic Triggers editor. Maybe they're not all listed there? Give me some hints where to look.
code completion on intrinsics, and gets up to date with the mammoth pile of new functionality in langums.
Awesome!
Btw, you're a monster nlight, it's taking a pretty big chunk of my post-work free time just to keep up with your language updates
Don't worry this won't be for too long, I'm almost done with the core features
|
You guys are total beasts :O
|
What's the strategy for handling multi-condition events? I was working on some demo code where I found myself wanting to do the trigger equivalent of "Player 1 brings 1 civ to location and has >=100 minerals" and I haven't seen anything setup like that in the tests. Some syntaxes I imagined where nested lambdas, using one condition as an if inside the other, or some weird bring(...) && accumulate(...) => { } setup.
I've been poking around with snippets and in all likelihood I have to make the event snippets a bit less aggressive at setting up syntax for you, if they're viable in stuff like if statements.
|
On April 29 2017 22:29 Glenstorm wrote: What's the strategy for handling multi-condition events? I was working on some demo code where I found myself wanting to do the trigger equivalent of "Player 1 brings 1 civ to location and has >=100 minerals" and I haven't seen anything setup like that in the tests.
You can specify more than one condition per event handler separated by commas (up to 63 total), it's actually in the examples in the README. I will add some to the tests as well. For your case it would look like:
bring(Player1, AtLeast, 1, TerranCivilian, BuyMarines), accumulate(Player1, AtLeast, 100, Minerals) => { take_resource(Player1, Minerals, 100); }
That code completion gif is really cool, nice job.
On a sidenote, LangUMS now supports 100% of the built-in trigger conditions & actions in the game. Now I'm starting to expand into new territory. The first addition is the is_present(Player) function which tells you if a player (or players) is currently present in the game.
if (is_present(Player3)) { print("Player 3 is in the game."); }
You can also use it to get the number of players in-game at the moment like this:
var playerCount = is_present();
Everyone who is actively trying out, testing, using, doing whatever with the tool please join the discord here - https://discord.gg/TNehfve so we can talk in real time.
|
|
|
|