New language for making Maps

Here you can post about your scenario's, mods, custom maps and YouTube channels!
User avatar
France Rikikipu
Retired Contributor
Posts: 1679
Joined: Feb 27, 2015
ESO: p-of
Location: In your base

New language for making Maps

  • Quote

Post by Rikikipu »

Hello everyone,
I have been working on creating a compiler for making AOE3 maps with another language. My main motivation was that with the current one I had a really terrible developer experience with those points:

- Map code being wrong and crashes the game, so you need to create again a new lobby instead of just restarting the game.
- It is really hard to find what causes a map crash. Need to delete lines and bisect until you find the broken code.
- No documentation of functions
- I am always doing typo when using enums like "california/ground3"
- No autocompletion
- Bad code formatting like semicolon not added automatically on save (particularly frustrating cause it leads to map crash)
- Duplicated strings for objects creation actually get rid of all objects except one...

Basically now, you make maps in Javascript (syntax is super super close to the current RMS language) but all the pain points aforementioned are gone.

Here is a Youtube video for showing how to install and use it:


Github repository: https://github.com/PierreCapo/jsrms

cc @Durokan @Garja @dansil92 @mandosrex @vividlyplain I guess this can interest some of you
User avatar
Nauru Dolan
Ninja
Posts: 13064
Joined: Sep 17, 2015

Re: New language for making Maps

  • Quote

Post by Dolan »

So what does it do, does it transpile JS/TS to AOE3's XS? I suppose you're not building a JS interpreter into the AOE3 engine.
User avatar
France Rikikipu
Retired Contributor
Posts: 1679
Joined: Feb 27, 2015
ESO: p-of
Location: In your base

Re: New language for making Maps

Post by Rikikipu »

Dolan wrote:So what does it do, does it transpile JS/TS to AOE3's XS? I suppose you're not building a JS interpreter into the AOE3 engine.
Exactly!
The development flow is:
Typescript -> Javascript through the Typescript compiler to validate the code in terms of typings
Then Javascript -> XS through the compiler I wrote
User avatar
Canada dansil92
Retired Contributor
Posts: 2231
Joined: Nov 3, 2018
ESO: dansil92

Re: New language for making Maps

Post by dansil92 »

I actually quite like coding in RMS script lol

This is really intriguing though, how does it handle weird rms functions like rmPlaceObjectDefInRandomAreaOfClass or rmSetObjectDefGarrisonStartingUnits?
Image
User avatar
Canada vividlyplain
Lancer
Posts: 751
Joined: Feb 10, 2019
ESO: vividlyplain

Re: New language for making Maps

Post by vividlyplain »

@Rikikipu very cool! Couple questions:

1) Can i change output to "C:\...\Age Of Empires 3\bin\RM3"?

2) Does it work with observer ui?

3) Can I edit a map I've already made and want to edit?

4) probably some more nub questions I haven't come across.....
User avatar
France Rikikipu
Retired Contributor
Posts: 1679
Joined: Feb 27, 2015
ESO: p-of
Location: In your base

Re: New language for making Maps

Post by Rikikipu »

1. yes, there is a jrsmr.config.json in the project which allows you to change the path of the output
2. No, it doesn't work with observer UI, currently you need to add it manually
3. No, for now you need to manually do the conversion from XS to Typescript. Practically it takes around 5 minutes to do so, but I plan to release quickly an option in the command line to make that conversion automatic.
User avatar
Canada vividlyplain
Lancer
Posts: 751
Joined: Feb 10, 2019
ESO: vividlyplain

Re: New language for making Maps

Post by vividlyplain »

Rikikipu wrote:1. yes, there is a jrsmr.config.json in the project which allows you to change the path of the output
i tried this and it didn't work... could have done it incorrectly tho
User avatar
France Rikikipu
Retired Contributor
Posts: 1679
Joined: Feb 27, 2015
ESO: p-of
Location: In your base

Re: New language for making Maps

Post by Rikikipu »

vividlyplain wrote:
Rikikipu wrote:1. yes, there is a jrsmr.config.json in the project which allows you to change the path of the output
i tried this and it didn't work... could have done it incorrectly tho
Ah, I have an idea, did you try to duplicate the backslash ? like C:\\toto\\tata etc ? Cause backslash is also the escape character. My recommandation is to even use slash instead of backslash for folder delimitation which should work : "C:/Program\ Files/Steam/steamapps/" etc
User avatar
France Rikikipu
Retired Contributor
Posts: 1679
Joined: Feb 27, 2015
ESO: p-of
Location: In your base

Re: New language for making Maps

Post by Rikikipu »

dansil92 wrote:I actually quite like coding in RMS script lol

This is really intriguing though, how does it handle weird rms functions like rmPlaceObjectDefInRandomAreaOfClass or rmSetObjectDefGarrisonStartingUnits?
It will work exactly the same as on XS I would say. Those functions will be translated as rmPlaceObjectDefInRandomAreaOfClass and rmSetObjectDefGarrisonStartingUnits in a XS file. Maybe I'm missing something in your question

Who is online

Users browsing this forum: No registered users and 6 guests

Which top 10 players do you wish to see listed?

All-time

Active last two weeks

Active last month

Supremacy

Treaty

Official

ESOC Patch

Treaty Patch

1v1 Elo

2v2 Elo

3v3 Elo

Power Rating

Which streams do you wish to see listed?

Twitch

Age of Empires III

Age of Empires IV