New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to the Lua map generator #993
base: master
Are you sure you want to change the base?
Conversation
9b623f9
to
829e700
Compare
Anyone have any idea why the latest commit doesn't work? There's two problems with it:
|
@CelticMinstrel you have changed the milestone to 1.14.1 but since it has changes that add new syntaxes/features this cannot be done during a stable release. We could eigher make it before 1.14 or at 1.15 . EDIT: since we already have some conability breaking changes in 1.13 with cave map generators i'd really prefer doiing this in 1.13 . If it's just the last commit that doesn't work we coudl alos merge the other commits already and postpone that one for 1.15 |
@gfgtdf – Ultimately I wanted to have a multiplayer cave map which basically shows off the new cave generator features, and I believe the road cost thing is basically needed for that. I think the patchy and disconnected aspect of the road is probably something about order of operations (as if the road is being added correctly, but then something else is overwriting it later). EDIT: Oh, the problem with using |
829e700
to
171b3e0
Compare
Okay... there are still some things I want to do (mainly adding user config option on the cave map), but I think this could be mergeable at this point. The road algorithm does seem like it could use some improvement, mind you - the road I'm getting is pretty patchy. Tweaks to the scenario WML for the cave map would also be welcome (maybe @sigurdfdragon would have some ideas on improving it?). |
I may be able to take a look at this on Thursday. |
@CelticMinstrel The things that may fix the patchiness are:
Also Ur^Ii & Ur need to have an entry at the bottom of the list of converting into themselves with a cost of 2
|
Thanks for the tips. I'll try applying these suggestions, probably tomorrow. |
171b3e0
to
8867c39
Compare
Those tips seem to have worked, thanks! I think this can now be merged; I do still want to extend it to allow up to 9 players (or at least 8; 9 might be a bit hard), and to allow some configuration of parameters, but aside from that it all seems to be fully-functional, and the map it generates doesn't seem to be too terribly boring either. At most it could use maybe a few tweaks, maybe making the lake bigger, adding a river, or something like that. |
...okay, I spoke a little too soon. There's this weird bug whereby the map (sometimes?) doesn't generate until you click "Regenerate". That is, at first you see nothing and it says the map is 0x0. Click "Regenerate", and it all works. |
please make the return value of the lua user_config optional. |
Okay, so basically all working now, I guess. There's still some room for improvement, mind you; if you make the lake large enough, you'll get villages dotted through it, for example. I also got twice as many castles as players, for some reason. |
In other words, unless @sigurdfdragon or others want to suggest some tweaks, this can be merged whenever. |
I'll be able to take another look at this on Wednesday. |
just to be sure, this doesn't change behaviour of the 2 mainline scneraios where the cave random map generator is used, right? |
It shouldn't, since it's only adding additional capabilities to the generator and using them in a brand-new MP scenario. Still, it wouldn't hurt to check, just to be sure... (That said, I'd argue that we should consider using some of these new capabilities in the two mainline scenarios. With these upgrades it could be possible to get rid of all those |
I found the following bugs:
Lake villages - A way of dealing with them could be to add a prestart event to convert villages surrounded by water into merfolk villages. |
The roads were intentionally wide, with |
Do you still have issues with the settings dialog? |
I should be able to check the settings issue post 86f0262 by the end of the week |
…, or relative to the map center Special credit to @virtualghetto for spotting an off-by-one error and a rounding error in the first draft of this commit.
(Also fixed a missing undef in the sample MP cave map)
(Who knows, maybe some language has its own standard way of displaying ratios!)
d803a55
to
5d8c72c
Compare
5d8c72c
to
1c23498
Compare
(This is the same API that World Conquest uses for its map generation.)
Every place it's called already passes a default-constructed config, so this won't affect any existing code. The removed assert is pointless when it'll be cleared by the call, and the two places that called that function also passed a default-constructed config already, so it was doing nothing.
1c23498
to
92ba421
Compare
- Detect obvious cases of inheritance loops - Don't try to keep track of tags with a super tag that exist within a conditional tag - When searching for a tag path, don't append the leaf to the full path
Updated todo list (copied from #993 (comment) and deleted completed tasks):
|
No description provided.