You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose a create default function that loads a empty.aoe2scenario and returns this. @Tshin120 and I found it is a bit handy to have when trying to make maps from scratch. The downside is that then a .aoe2scenario file is a dependency in the library, which might need to be updated between version (not sure how much these change). If you like the idea, lmk and either me or @Tshin120 can make a pull request
The text was updated successfully, but these errors were encountered:
Hey!
Funnily enough, this was a feature a while back (AoE2Scenario.from_default()). It was done through the version JSON file, every "retriever" having a default value and using that to construct the scenario, so no actual file was necessary.
The problem back then was that it was hard to maintain as scenarios changed a lot more than they do these days, and I didn't have the setup and tooling that is included in ASP now.
It also wasn't used much or at all as far as I could tell. That's the main reason why I haven't re-introduced it.
There are two ways of solving this:
The first would be like you proposed, placing a scenario file inside the library. This would be quite simple, and technically speaking not too difficult to maintain. It could also be the smallest size possible 1P (80) for example, which would make the file even smaller in size.
The second would be how it was done a while ago. Updating the default values of all retrievers to generate a scenario from that.
From a code-base perspective I'd prefer this over having a binary file in there, but it also is more work.
In that case, there'd probably need to be a _debug_x tooling function on the scenario file, which could be used after reading a scenario.
It'd read its own JSON version file and update every retriever default in it according to the values that were read. And afterwards, write the updated values back to the JSON version file.
Both options require opening the game for a scenario, so maintainability is almost equal. And I do agree this should be a feature again as you don't always have a scenario file at the ready.
AoE2ScenarioParser/AoE2ScenarioParser/scenarios/aoe2_de_scenario.py
Line 54 in 5bfe3e0
I'd like to propose a create default function that loads a empty.aoe2scenario and returns this. @Tshin120 and I found it is a bit handy to have when trying to make maps from scratch. The downside is that then a .aoe2scenario file is a dependency in the library, which might need to be updated between version (not sure how much these change). If you like the idea, lmk and either me or @Tshin120 can make a pull request
The text was updated successfully, but these errors were encountered: