Skip to content
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

Variable startup resources #1862

Closed
bunnybot opened this issue Sep 9, 2019 · 33 comments · Fixed by #3689
Closed

Variable startup resources #1862

bunnybot opened this issue Sep 9, 2019 · 33 comments · Fixed by #3689
Labels
balancing & gameplay Tribes' statistics & mechanics enhancement New feature or request
Milestone

Comments

@bunnybot
Copy link

bunnybot commented Sep 9, 2019

This is not a bug but a feature suggestion.

In Settlers 1 it was possible to adjust the amount of wares available in the headquarter before starting a new game. I think this can be interesting for both new players and experienced ones. The newbies can make it a bit more easy for themselves while learning the game. The experienced player can choose to play with low ressources against a computer player with a high ressource level. I'd suggest only some fixed levels for wares and maybe for workers. Low, medium and high for example.


Imported from Launchpad using lp2gh.

@bunnybot bunnybot added Confirmed balancing & gameplay Tribes' statistics & mechanics labels Sep 9, 2019
@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by hjd)
Sounds cool.
The easiest things would be to create three resource-"profiles":
medium = based on the default resources used today.
easy = 2x resources of medium
hard = 1/2 the resources of medium (though tweaked so you have at least one of the most important workers to get started).

I'm a bit unsure about setting the resource level for AI players though, as taking on an aggressive AI who had barely had resources to build up something would be easier than one who had. Then again I don't know, perhaps someone has an idea how to handle this.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by nha)
It should be possible to do this relatively easily with the "starting conditions" feature that already exists. See the scripting subdirectories of the tribe directories to get an idea of the possibilities.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by sirver)
you can try this out right now:

$ cp tribes/barbarians/scripting/sc00_headquarters_medium.lua tribes/barbarians/scripting/sc02_headquarters_low.lua
$ edit tribes/barbarians/scripting/sc02_headquarters_low.lua

the hardest thing is to come up with good starting wares. Some are already terrible low (for example the stuff to get marble for empire is quite to the point where you cannot reduce this any further while you have a great many builders and geologists in all tribes). Feel free to provide new starting conditions, I'd love to add them.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by fuchur77)
Thank you, I'll try that and play a bit with the values. Unfortunately I don't have much time at the moment, so it will take some time. Also I mostly play the barbarians and don't have much experience with the other tribes.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by hjd)
This was surprisingly easy. Over roughly two hours effective time (including testing) I have created the attached starting condition. It is basically the barbarians, cut down to the bare minimum you need to establish yourself. Thus the name hardcore (comparable to other games with either hardcore or ironman mode)

  • You only have enough resources to build one lumberjack's hut, nothing else.
  • You have the required workers to establish and supply metalworks, which will produce everything else you need.
  • You have one soldier in case there is no iron nearby and you need to expand.

If you want to test it just place the attached file in tribes/barbarians/scripting. I will be impressed if anyone actually get anywhere with this against normal enemies. I doubt this should be included in the game, but may be an example of how easy it is to get started just by copying and modifying one of the existing starting conditions.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by wolfsteinmetz)
I just come from playing the Hardcore starting condition!
It works, and it's great fun playing this. Thanks a lot HJD!
It is also very helpful for newcomers to get a grasp on the interdependencies of the game.
I very much wished, they would include it into a distribution!
Even better - make a introductory tutorial scenario from this.
The AI is of course not up the challenge; it tries to built everything at once, scatters its wares and fails from the start.

I have three comments that came from the experience:

  1. In situation like this you really wished for a better control over the sequence and amount of tools that are produced!
    I know, a lot speaks against it, but some way of priorizing badly needed tools for production, really would be fine.

  2. I never noticed and I am not sure even now, but it seems that the routine in the conf file (i.e. metalworks in this case)
    has a time penalty for "because economy not needs xxx" condition. The worker seems to go to sleep/take a break instead of immediately making the next tool. If that is really so, it should be amended IMO.

  3. I would like to see the worker and his tool in the background of the productionsite and the contruction site window displayed along with his workshop. This would be a great help for understanding the game, especially for newcomers.
    Maybe I should make an official feature suggestion from this idea?

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by wolfsteinmetz)
Hans Joachim,
do you think you can create the same for the other tribes. Pretty please :)
It is sooo educational, we should make that mandatory as a last test after in the tutorial.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by hjd)
(Uhm, this got a lot longer than I had expected)

First of all, Astuur: thanks for your kind words. :) I'm not sure how good it would fit for newcomers, I rather see it as something experienced/veteran players can use to sharpen their skills. Throwing it at people who have only completed a couple of tutorials will probably be too tough. It is interesting though, because it forces you to reconsider your build order and get a better grasp on how things are connected. I even picked up a few details I had missed earlier doing this.

That said I would be against including them in the game at this stage. The AI will clearly have trouble playing with the starting conditions, and playing Hardcore against AI starting with normal HQ is probably impossible. (Though please prove me wrong, and attach a replay :p) I don't mind it if games are hard, but it should be fair and the player should have an actual chance. Presently, I doubt Hardcore is fair compared to the other starting conditions.

Somewhat off-topic, but I actually wonder how this could be used to tweak the AI to make it better at dealing with limited resources. From time to time it keeps building military buildings which are never finished which indicates some problems with supply of certain wares or priorities. Though I guess the AI coders know this better than me (any comments?). Might be worth a consideration.

As for basing a tutorial on it, I don't know. In the current state it might be a bit too strict and limiting (if you mess up the intended build order, you are basically stuck). So it should probably be tweaked to be a bit less unforgiving. Secondly, I mainly prefer tutorials where the relevant buildings are made available as they are needed. Though I'll be open to any ideas people have.

Due to popular demand, I have now created similar starting conditions for Empire and Atlanteans. Initial comments from testing: Empire needs a LOT of marble. I mainly tested on the map Impact since the HQ is placed close to both coal and iron, and I exhausted both of the two nearest stone quarries and was into the third by the time I got a working toolsmithy. I think the Atlanteans take even more time, as I was overrun and my HQ destroyed after I had produced a couple of new tools.

I have pushed the Hardcore starting conditions to a branch I will attach to this bug. The branch is owned by widelands-dev if anyone wants to do something with it or develop it further. Should be easy enough to browse the code and get the files from tribes/[tribename]/scripting/sc02_hardcore.lua . Those who compile Widelands themselves can merge the changes via bzr merge.

I mainly created the first starting condition to demonstrate how easy it is. Like SirVer says in comment #3, just copy one of the existing starting conditions, rename it and start editing. Some of the lines, I'm not exactly sure what they do, but the important thing is the lists of workers and wares. They should be pretty easy to edit and get started, even for non-programmers.

As for the comments in #6:

  1. I think you can sort of do this with the configure economy, but that might not be the best tool for the job. Also note that these starting conditions have cleaned out the HQ, so you will need to produce a lot of things which you normally have.
  2. I have noticed this before, but I can unfortunately not answer your question.
  3. Yes, just report it and I (or someone else) will mark it Wishlist.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by wolfsteinmetz)
Ahh,, thanks a lot... Hope I can find this......
Now let's see:

HJD>I'm not sure how good it would fit for newcomers, I rather see it as something experienced/veteran players can use to sharpen their skills. Throwing it at people who have only completed a couple of tutorials will probably be too tough.

As I said, after the completion of a tutorial, as a final test from the mentor.
If they fail, it does not matter much. I don't think people will get frustrated because your mistakes are clearly
presented and most people will like the challenge. Might be different for small kids, I admit.

HJD>The AI will clearly have trouble playing with the starting conditions, and playing Hardcore against AI starting with normal HQ is probably impossible. (Though please prove me wrong, and attach a replay :p)

I tried with "crater", No chance. You will need a large map that gives you enough time to catch up.
Then, it should be perfectly doable.

HJD:> ... but I actually wonder how this could be used to tweak the AI to make it better at dealing with limited resources. From time to time it keeps building military buildings which are never finished which indicates some problems with supply of certain wares or priorities.

I have no knowlege in this field (as you surely know :) )

HJD:>As for basing a tutorial on it, I don't know. In the current state it might be a bit too strict and limiting (if you mess up the intended build order, you are basically stuck). So it should probably be tweaked to be a bit less unforgiving. Secondly, I mainly prefer tutorials where the relevant buildings are made available as they are needed. Though I'll be open to any ideas people have.

Not knowing LUA, I could imagine that you could catch a candidate's mistakes in the build order and throw in some
educational texts as to why this is not a good idea as the next building.....

HJD:>Due to popular demand, I have now created similar starting conditions for Empire and Atlanteans. Initial comments from testing: Empire needs a LOT of marble.

Many thanks!
I have always know this and have a few times criticized how much the empire depends on marble (and so on the map location) The Empire also needs a lot more space.

HJD:> As for the comments in #6: (enforce the production of specified tools)

  1. I think you can sort of do this with the configure economy, but that might not be the best tool for the job. Also note that these starting conditions have cleaned out the HQ, so you will need to produce a lot of things which you normally have.

I cannot see, how. You cannot set anythig to zero there, to enforce some other thing to be made. And with a condition of having "nothing" in stock (like with HardCore) the toolsmith will follow his sequence as discribed in the conf file.
You could edit that, of course, but that isn't really "in game".

HJD> (time penalty when a ware to be produced is not needed by the economy)
2) I have noticed this before, but I can unfortunately not answer your question.

I'll have close look myself and try to test that.

HJD> (worker and tool in construction site and production site's window background)
3) Yes, just report it and I (or someone else) will mark it Wishlist.

done!

Now ... where are these imperial and atlantean Hardcore starting conditions.... (runs off to find them)

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by wolfsteinmetz)
There is a problem with the atlantean (possibly also empire) Hardcore LUA script (I suppose).
After having downloaded them and placed inside their folder I get the following error message,
when I try to start a new game.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by wolfsteinmetz)
Hmm -- just realized that I probably made a mistake.
These .lua files differ totally from the format of the barbarian one, you did yesterday.
They are probbly not meant to be used in that way...

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by wolfsteinmetz)
Those were the "Changes" files with the same name.... grrhhh.
Sorry about the mess.:(

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by hjd)
You got things working now, right? What did you mean with the "Changes" files?

**

You will need a large map that gives you enough time to catch up. Then, it should be perfectly doable.

I doubt it as the AI will be so far ahead with 40 soldiers more than you plus enough resources to establish properly from the get go. But hey, I'm not going to stop you. :)

Not knowing LUA, I could imagine that you could catch a candidate's mistakes in the build order and throw in some
educational texts as to why this is not a good idea as the next building.....

It is possible, but won't you soon end up with press the right button to win (no, not that one!)? I'm not sure that's the best experience when playing a game. Compared to adding new buildings as you progress: if you have built a lumberjack and all that is available is a forester and a quarry it is much harder to do something wrong.

Oh and I just assumed you could set the amount to zero in configure economy without actually checking. Though I guess having one of each ware is reasonable, especially for starting conditions where you likely have fulfilled that requirement for most wares already.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by wolfsteinmetz)
Yes, thank you. I'm already playing :)
I downloaded:
http://bazaar.launchpad.net/~widelands-dev/widelands/hardcore-starting-conditions/revision/5918/tribes/empire/scripting/sc02_hardcore.lua#tribes/empire/scripting/sc02_hardcore.lua
by rightclick and "save target as" and what I got was
a html souce (I think) called sco2_hardcore.lua. :)

HJD:>I doubt it as the AI will be so far ahead with 40 soldiers more than you plus enough resources to establish properly from the get go. But hey, I'm not going to stop you. :)

I am already far ahead of the AI on a random map, and it will not dare to attack. But that is irregular, because the AI has problems obviously (although running at standard starting conditions) to establish an economy on this map/ starting location.
But I insist that it is quite possible. I may try with Finlakes may be, or the Far North. Never mind :)

At some point, we may start a discussion about Widelands users and what we know (or believe to know) about them.
This is not the right place to do so, but I cannot resist a short comment:

Yes, there are those, who need a success every 5 minutes to keep going, and those tend to ask questions in the forum, that do reflect a very superficial effort to grasp the game mechanics. But given the read/write relation in the forums, I would think that the majority does not need as much guidance as we are offering.
Rather than the "I take you by the hand and show you" approach, we should concentrate on a better in-game help to look things up. But while it may be fun to create a tutorial, writing a decent manual or help pages, is just goddam work.
And the main problem is to maintain that, given the frequent changes.
I think, many would love to explore the WL world by themselves, if all info was more readily available.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by sirver)
Time again to promote the lua docs: If you do not understand what a line does in any lua file, check out the docs: http://wl.widelands.org/docs/lua . Especially the reference is useful.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by sirver)
Setting to incomplete for bug sweeping.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by janitor)
[Expired for widelands because there has been no activity for 60 days.]

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by sirver)
This thread is interesting, but I am not sure what actionables we should take here. Including the hardcore condition into the game seems unwise as the AI cannot cope with it. How about coding it into one of the shipped map as a scenario?

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by janitor)
[Expired for widelands because there has been no activity for 60 days.]

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by sirver)
Retyring to kindle discussion here again: How about adding more starting conditions, i.e. headquarters low wares, medium, high and hardcore?

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by wl-zocker)
I think more starting conditions should be included. We could use the fortified village (maybe with some additional resources, I think there were some problems reported) as "easy", "medium" could be what we currently have (or some more wares [*]), "difficult" would be low resources (wares, workers, soldiers) and the hardcore condition mentioned above.
We could use the tooltip (which currently only says "starting condition") for some explanation, and we should have some kind of warning that the AI cannot play with hardcore (and maybe "difficult").

[*] I think some scenarios use the headquarters and its wares/workers as starting conditions, so if we change this, we should keep this in mind.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by fuchur77)
I think it's a good idea to have one starting condition which provides more resources as sthe current standard one. This would help new players. I wouldn't change too much but at least have more wood at startup. At least I tend to run into a wood problem if I'm incautious.

Maybe just for fun there could be a starting condition "omnipotent" with a stock of all ressources of 10.000. Then one could run over a map, explore it quickly and flatten every enemy. If one likes to do so...

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by wl-zocker)

have more wood at startup
That's what I thought, too.

We could use the fortified village (maybe with some additional resources, I think there were some problems reported)
See https://bugs.launchpad.net/widelands/+bug/1226624/comments/3 which explains why we should have more logs (called trunks there).

starting condition "omnipotent"
But then everything that Widelands stands for is lost! I play Widelands to have fun playing a long game, not to rush my enemy. Maybe you should try http://blog.yjl.im/2011/02/cheating-on-widelands.html

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by fuchur77)
@#23:
Don't misunderstand me, I wouldn't consider "omnipotent" as a serious starting condition. I'm not that interested in the fight and like playing without enemies. Just to explore an unknown map. It came to my mind to have an easier way to cheat if someone wants to do it. The blog you linked is interesting for that but it says that you have to build widelands in debug mode.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by fuchur77)
It seems that it is possible to add more starting conditions on your own by simply copying an existing one in a new file and increase the number of the filename. So every user can have custom starting conditions. Maybe the total number is limited but the filename scxx_name.lua leads to the assumption that numbers from 00 to 99 are valid.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by hjd)

I play Widelands to have fun playing a long game, not to rush my enemy.
Offtopic: FWIW, it is already possible to rush the enemy at least on smaller maps. For instance, Crater can be won by building only military buildings and relentlessly attack the AI. ;)

I think more starting conditions would be a good idea, but we should discuss what we want to do to avoid getting too many which are more or less the same. The existing HQ and citadel village are rather distinct and different from each other, so new types should offer noticably different ways of starting out.

I still think hardcore would be a nice addition, but we need to get the AI into shape to deal with it as well (and perhaps reduce a bit of the strictness, make it slightly rounder in the corners). Actually hardcore would need some updates due to new building and worker names, but I wonder how the recently patched AI works with it now.

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by janitor)
[Expired for widelands because there has been no activity for 60 days.]

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by stdh)
I translated these hardcore starting conditions to the new names of wares & workers, and also made more minimal starting conditions in which you need to make more tools yourself. Forum thread: https://wl.widelands.org/forum/topic/2914

@bunnybot
Copy link
Author

bunnybot commented Sep 9, 2019

(by gunchleoc)
Let's have the new starting conditions, but leave this bug open. Can you make a merge request once you're happy?

@gunchleoc gunchleoc added enhancement New feature or request and removed Wishlist labels Sep 13, 2019
@gunchleoc
Copy link
Contributor

@hessenfarmer hessenfarmer added this to To Do in Issue triage via automation Jan 8, 2020
@hessenfarmer
Copy link
Contributor

as the Hardcore settings are lying around for ages now we should either implem,ent them togehter with a hint that they are not suitable for AI (and never will be) or just close this bug. I'd vote for including a them. maybe we could name this poor_village or poor_hamlet

@gunchleoc
Copy link
Contributor

+1 for hamlet

I have merged master.

@gunchleoc gunchleoc removed this from To Do in Issue triage Jan 10, 2020
@gunchleoc gunchleoc added this to the build21-rc1 milestone Jan 10, 2020
@hessenfarmer
Copy link
Contributor

wrong branch was linked
correct one is https://github.com/widelands/widelands/tree/minimal-startconditions
I will take care of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
balancing & gameplay Tribes' statistics & mechanics enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants