SiegeEngineers / aoe2map

a website to share and find Age of Empires II Random Map Scripts
https://aoe2map.net
GNU General Public License v3.0
12 stars 3 forks source link

Offer "make this map custom regicide / sudden death" feature #3

Open HSZemi opened 6 years ago

HSZemi commented 6 years ago

We could check for a guard_state command in the rms and if none is found, we could add the corresponding block of commands in the <PLAYER_SETUP> section and offer the modified version for download.

We could also offer a "Regicidify"/"Suddendeathify" page: Drag&Drop rms in, get regicide or sudden death version out

HenkDeSuperNerd commented 6 years ago

sounds cool! And then update the map as a new version?

HSZemi commented 6 years ago

I thought of it more as multiple download options:

So the basic map script would not change, and the customised versions would get "updated" alongside it when you upload a new version

abductedPlatypus commented 6 years ago

Could we have this feature for Grid/NoGrid versions of ZR maps as well? So people can play the ones they like, rather the one the host likes. (No more mixed grid/no grid maps)

Explained here: https://www.aoezone.net/threads/ecl-map-design-contest.138831/page-5#post-583050 and actually implemented for ECL here: https://www.aoezone.net/threads/ecl-map-pack.140745/#post-589800

If you need help with JavaScript ZR packing @mention me.

HSZemi commented 6 years ago

So we would need to extract each slp file from the ZR map, check whether we know that exact file, check whether it is the version with or without grid markers, and replace it with the other version from our stash if need be?

abductedPlatypus commented 6 years ago

That could be an option.

I was thinking about reading all files and apply a grid. I did something similar with reading all icons and writing the hotkey read from the hotkey file to it. This approach would also allow custom textures and doesn't require uploading.

I'm assuming that something like https://github.com/goto-bus-stop/genie-slp / https://github.com/goto-bus-stop/genie-drs would work client side without much work though for this approach to work that way.

HSZemi commented 6 years ago

So if I understood that correctly, the creator would upload a gridless version, and the client could select to "download" a version with grid, whereupon the browser would download the file, extract the slp files, paint a grid on them and stuff them back, before finally "downloading" the file / displaying the file save dialog?

abductedPlatypus commented 6 years ago

That would work - but it depends on how you would want the flow to be. I'm not great at python, so if you'd prefer to do it server-side, I wouldn't be a great help (if needed - of course). :(

abductedPlatypus commented 6 years ago

Actually. Remember when you asked for some JS api for maps? And I told you I have one. I'm actually using it to combine maps. (- I think and now hope it was you)

You ask "Arabia with a golden hill": One RMS like arabia, with a golden hill in the center coming up. (Well, that is the plan, it doesn't check for used terrains yet, so the gold would be scattered everywhere, but you get the idea I think).

Anyways, the Regicidify like options would be easy to add for that as well. In practice I convert two RMS files to JSON, filter the relevant parts of each and combine them. So regicide/SD should be easy to do. I guess a check to whether the map already has the game mode is required too.

Also, I automatically check for starting resources, which might be an interesting statistic for aoe2map as well. And I'm sure you can come up with some cool stats as well.

It might be a BBC solution for an Xbow problem though. So let me know if you're interested, so I can distill it from the rest of the code. It's written in nodejs, but 99% should be easily portable to web.

HSZemi commented 5 years ago

252fb21b1888e267d6ab0b5f0a7ede7b1029640f added the options to automatically generate Sudden Death or Exploding Villagers versions for a map