Implement a casern for soldier recruting

Bug #1075562 reported by Nasenbaer
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Widelands media development
Fix Released
High
Unassigned
widelands
Fix Released
Wishlist
Unassigned

Bug Description

Related branches

Nasenbaer (nasenbaer)
description: updated
Changed in widelands:
status: New → Incomplete
milestone: none → build18-rc1
Nicolai Hähnle (nha)
Changed in widelands:
importance: Undecided → Wishlist
Revision history for this message
SirVer (sirver) wrote :

I still think this is a good idea - it would mean to build soldiers like wares. You can no longer stockpile axes and get a surge of soldiers when you are attacked and this would mean that the soldier statistics represent your true strength more.

Revision history for this message
SirVer (sirver) wrote :

no opinions? I will totally implement this for b19 if noone complains :)'

Changed in widelands:
milestone: build18-rc1 → build19-rc1
Revision history for this message
Nathan Tuggy (tuggyne) wrote :

Yeah, I think this is a good idea. Soldiers are treated differently enough from regular workers already that it seems needless to preserve the same means of producing them.

Incidentally, a good name in English for this building might be Muster, especially for barbarians.

Revision history for this message
Teppo Mäenpää (kxq) wrote :

In empire, same weapons are used for recruiting and training. Caserns would allow empire players to choose between small but powerful army (the weapons go mostly to trainingsites) or larger untrained army (those weapons go primarily to caserns).

Should the recruitment centers show the military in a glorious fashion -> impressive buildings with, fine tapestry and gold, free beer for the interested parties.. The player should initially have resources to make at least one, but additional ones would require some effort. I am not sure whether this would be the way to go, but worth considering anyway.

Revision history for this message
Teppo Mäenpää (kxq) wrote :
Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

SirVer (sirver)
Changed in widelands:
status: Incomplete → Confirmed
Revision history for this message
Chuck Wilder (chuckw20) wrote :

Alright, folks. Now that recruiting centers/caserns will be added to the game, I have some questions from a graphics view.
1) What do you think they should look like? Are we talking just a recruiting office? Another training center?
2) What size building will it be? A small office? A Barracks? An Academy? (I jest.) :)
3) Will it be considered a military building and subject to attack?
4) What potential will it have for animation of a "working" mode? (i.e. practice fields, musters, etc.)

If you can point me to any photos or other graphics which can be used for reference, that would be of help.

Changed in widelands-media:
status: New → Incomplete
Chuck Wilder (chuckw20)
tags: added: graphic
Revision history for this message
GunChleoc (gunchleoc) wrote :

1) I am thinking a sqarish building with accommodations and a courtyard. I have attached a badly drawn concept.

2) At least medium size

3) It wasn't in Settlers

4) Soldiers practising something

If you search for "Mideval barracks", you will get tons of pictures from other computer games.

http://en.wikipedia.org/wiki/Barracks

Revision history for this message
Chuck Wilder (chuckw20) wrote :

Your sketch has a great similarity to one of my old design ideas for the barbarian donjon which I archived in in the media branch.
The tower could be removed and some rescaling, this model may be a good starting point for that tribe.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Sounds good. Maybe the tower could be moved to one of the corners?

Revision history for this message
Chuck Wilder (chuckw20) wrote :

A definite possibility. We'll explore some options. :)

Revision history for this message
Teppo Mäenpää (kxq) wrote :

I had the idea that Barbarian training centers would be small, cheap to build, but require light beer.

The other ones would be impressive, golden clothing and all that sort, but would not have similar running costs. The building cost of one center would be added to the collection of starting wares.

The reason behind this would be that

- Both methods have been used in the history

- Currently, the barbarians have no use for light beer at the beginning, but still need it. This would fit in nicely, and might be compatible with the rest of the barbarian story.

- This would keep the tribes differentiated, or at least Barbarians different from the rest without changing the balance much.

- The casern should be slow (imho); it would still be easier for Barbarians to build many of these (smaller slot, cheaply built), in order to grow the head count of its army rapidly.

=====

I would guess that "be part of the glorious army" building looks different from a "Free beer! Sign here, pal. By the way, you are now a soldier!" approach conscription.

This idea is, however, not compatible with Chuck's sketches above.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I like your idea. The Barbarians could have their training in front of their building, and the sketches above could still be used for Empire + Atlanteans with your suggestion. The question is do we go medium - big, or small-medium?

Revision history for this message
SirVer (sirver) wrote :

I like the ideas in #12, just some thoughts: Having the building being super cheap and small for barbarians will make them very strong in the early game though. This would need to be compensated to make the recruiting much slower than for the other tribes so that many conscription centers are needed.

I think the trainings building should be medium - cheap for barbarians, medium - medium expensive for Empire (which already have a bunch of big buildings) and big - medium expensive for Atlanteans. Maybe empire should have medium speed and atlanteans rather fast - the idea being that altanteans will never have weapons on stash, all will be turned into soldiers quickly while barbarians need to work hard to get all their weapons into soldiers.

Revision history for this message
Chuck Wilder (chuckw20) wrote :

@#12 - Teppo wrote "This idea is, however, not compatible with Chuck's sketches above."

Don't worry about the sketches. :) The form should follow the function. If it's supposed to be a petrol station, you don't design a castle. ;)

There will be plenty of opportunity to review and refine any designs for the buildings once their role in the game has been determined.

Revision history for this message
Teppo Mäenpää (kxq) wrote :

Currently, barbarians are strong in quick plays, and less so in large maps.

#13: I would not be too worried. Barbarians would still need the weapons (cheaper, but still a limitation) in addition to the light beer. mines, taverns, farms, wells breweries -- it would still take some effort.

In my mind, barbarians are good at making a swarm of cheap soldiers, and have real trouble when the mine-upgrade cycle starts, while the other are better off with trained soldiers; with that strategy, the cost of many caserns would not be that large issue.

=====

Does the recruiter need a tool of some kind? What should he/she be called? Is "casern" the right word for the building itself? Maybe GunChleoc could educate me here.

Revision history for this message
Teppo Mäenpää (kxq) wrote :

#16: intended to refer to #14 instead of #13.

Revision history for this message
GunChleoc (gunchleoc) wrote :

#16 The correct term is "Barracks", which translated to something similar to "Casern" in most European languages. While the word "Casern" does exists in the English language, it is really obscure. We will have to rename the Imperial "Barracks" to "Blockhouse" as a side effect.

As a tool, maybe the same as for a soldier or trainer?

Revision history for this message
Teppo Mäenpää (kxq) wrote :

A different tool would imply that one cannot build more of these without a toolsmith first.

Revision history for this message
Teppo Mäenpää (kxq) wrote :

Should the casern be a productionsite? If yes, are here any drawbacks if all the productionsites are modified to be able to stock and produce worker types in addition to ware types? After quick reading, stocking carriers did not seem to be possible in present code.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I guess this is something that we will need to add to the code. We already have it on the output side for oxen/donkeys/horses, so it should be possible to steal some code from the warehouses to make this work on the input side as well.

GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → In Progress
Revision history for this message
Jens Beyer (qcumber-some) wrote :

I guess the "better stealing source" would be a trainingsite, wouldn't it? It already has a stock for soldiers.

Regarding the soldiers recruiting, I am thinking about a different way:

We are breaking savegame compatibility anyway, so let's define the minimum levels for a real soldier for attack, defend, evade, hp to be 1. Then, let's define a soldier with those levels all set to 0. Call this soldier recruit, make him cost nothing. Have him run through standard training sites, where he gets his "tools", where applicable.

This would cost:
- All tribes need to have soldier levels adapted. No problem there.
- We need to prevent soldiers to participate in something else than training when they are still recruits (at least one level at 0). This would be a minimal implementation in soldier code (is_recruit()), and everywhere where this would be useful/needed.

Things to think about:
- It would be logical to use partially trained (but not totally untrained) soldiers as last resort when defending. But do we really want to create a new "Volkssturm"? I guess not, although that idea would probably fit the Barbarian lore quite well...

Result would be:
- Everywhere, reduced throughput for soldier creation and promotion, making the game slower.
- Compatible to the light beer idea from #12.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Regarding wherer this will be a trainingsite or a productionsite, we have to decide how we wish to handle the carriers in the user interface first.

- Do we want an extra panel like for the soldiers in the training sites?

- Or do we want an extra input like for wares?

We will need an engine change in any case, so we need to decide on the user interface first.

Having recruits in training sites would mean that you need to build an expensive, big building in order to get any new soldiers at all. This would make expansion in early game more difficult.

Revision history for this message
GunChleoc (gunchleoc) wrote :

P.S. Sratch the last part of my comment, we could of course have a new, cheaper training site building.

Revision history for this message
Jens Beyer (qcumber-some) wrote :

Ok so let's create a new smaller building, which does only the first-level training (a.k.a. basic trainingcamp) which can be upgraded to the real trainingcamp which does first-level training plus the regular training? :-)

Revision history for this message
GunChleoc (gunchleoc) wrote :

I think the idea of having recruits is quite attractive. We should think about the consequences for game complexity though - will new player understand that there are soldiers that can't man militarysites? It adds a new concept to the game, and there is already much to learn for the beginner.

I think we need to think about what we want the user interface to be and how players will handle it in a game and what is looks like. Implementation details will follow from there.

So, if we still want the carrier cost, a carrier will need to be requested and walk to the casern from a headquarters/warehouse. The equipment could either be picked up ad the warehouse (recruit concept), or given to the carrier at the casern.

How will the player control how many carriers there are in the casern? For Widelands as a game, it doesn't matter - we could just stock some and use the quantity only for balancing -, but for making the engine moddable, it will.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Screenshot with new graphics by DragonAtma.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Nwe Atlantean barracks

Revision history for this message
GunChleoc (gunchleoc) wrote :

New Atlantean barracks

Revision history for this message
GunChleoc (gunchleoc) wrote :

Gateway concept

Revision history for this message
GunChleoc (gunchleoc) wrote :

New screenshot of Atlantean Barracks

Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
GunChleoc (gunchleoc) wrote :

Version 7

GunChleoc (gunchleoc)
Changed in widelands:
milestone: build19-rc1 → none
Revision history for this message
3plus4i (tobi-heinz) wrote :

Can I just say that I would so, so, so much like this to be integrated? It would make recruitment so much easier to handle than it is now.

About the concerns for the learning curve: It's already way to steep now in my experience. That's what requires a good and extensive tutorial/campaign to teach new players. Getting a step or two more into this shouldn't be a problem in my opinion. It's way more important that the function itself is logical, trust me with that.

I still wouldn't make it more complex than necessary. Having a different soldier type for recruits doesn't sound very appealing to me. I also don't really understand how it's supposed to work. Just make it a production site that consumes equipment and probably a carrier.

Building size should be medium at max. It's just for recruitment so why would it need so much space? Training sites are doing more and therefore should stay bigger than the new building.

Whether to put carriers in a separate tab like soldiers or not, I'm not sure. An own tab seems pretty useless because there aren't different training levels to be shown like with soldiers. On the other hand, putting them as "wares" together with the equipment seems strange, too ...

Revision history for this message
Notabilis (notabilis27) wrote :

I implemented a first version of a worker-queue based on the linked branch (no, not in the past two hours ;) ). Production buildings can now receive workers as inputs which can be consumed, similar to wares. The implementation is following the "carrier + weapon in building" approach, there is no new recruit-type.

What works:
- Data files for buildings can contain worker-names as inputs and in the consume-action of production programs
- The window of the building contains new tabs, one for each worker-input. The tabs look like the tabs for soldiers in training sites
- Input-workers can be kicked and the queue-size can be changed
- For workers with experience (miners, etc) the experience is shown when hovering the cursor over the symbol of the worker
- When the building is built the workers go from a warehouse to the production building and end up in the queue
- The production program consumes the workers and new ones come from the warehouse
- The data files for the barracks have been extended to use the worker queue for simple carriers
- Soldiers can no longer be created in warehouses
- Barbarian soldiers now require an axe and beer (all blame to the last paragraph of #12)

Still to do:
- Check the code. I modified existing code to accept wares and workers as inputs, someone should read over it. I am also not quite sure how to remove workers (from game and memory)
- Lua support for filling the queues similar to ware-queues
- Probably merge them with the soldier-queues, not sure

Singleplayer and (localhost) multiplayer seems to work, at least I encountered no more bugs which I can trace to the barracks.

If anyone want to try it out or look over it:
https://code.launchpad.net/~notabilis27/widelands/casern

Revision history for this message
GunChleoc (gunchleoc) wrote :

This looks great :)

I'm travelling right now, so it will take a month until I can test this.

We originally did want this in Build19, but we have postponed it for now. Otherwise, we will never get Build19 out. This will definitely be in Build20 now though!

I agree that barracks should be medium-sized buildings.

GunChleoc (gunchleoc)
Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
milestone: none → build20-rc1
GunChleoc (gunchleoc)
tags: added: graphics
removed: graphic soldiers
tags: added: animations icons
removed: graphics
tags: added: animation
removed: animations
GunChleoc (gunchleoc)
tags: added: artwork
removed: animation icons
GunChleoc (gunchleoc)
tags: added: animation images
removed: artwork
Revision history for this message
GunChleoc (gunchleoc) wrote :

User interface mockups

Revision history for this message
GunChleoc (gunchleoc) wrote :

Another mockup

Revision history for this message
Notabilis (notabilis27) wrote :

Further Mockup

Revision history for this message
Teppo Mäenpää (kxq) wrote :

Hi,

When the caserns can make new soldiers, then warehouse should no longer make them, as current trunk code does.

I suggest that in Economy::create_requested_worker routine,
replace the block inside if (upcast(const SoldierDescr, s_desc, &w_desc))
{} to a plain return, and remove some no-longer needed code nearby.

I could do that myself, too. Is there a branch related to the ongoing work? I would not like to mess up if with the on-going work, if somebody is working on this.

Revision history for this message
kaputtnik (franku) wrote :

Hi Teppo,

when reading the open merge proposal there is already a statement regarding soldiers:

> - Soldiers can no longer be created in warehouses.

What is unclear to me is the creating of Trainers: As i understand they are anyway created in Headquarter/Warehouses. To get a trainer for Empire tribe one needs a helmet and a wooden spear. When a barrack is there, all helmets and wooden spears are carried into the barracks, until a limit. This means a trainer is only build if one
- reduces the limits of wares in the barrack
- creates much more helmets and wooden spears as the barrack could contain
- there is no need for soldiers and the barrack is full of helmets and wooden spears (so this wares are transported to a warehouse)

In short words: A trainer could only be build, if a helmet and wooden spear is in a warehouse. But this will likely not happen, as long as soldiers are requested. So i think we have the same problem with trainers as we had before: They will not be build without micromanaging, even if we prioritize building trainers over soldiers.

Revision history for this message
GunChleoc (gunchleoc) wrote :

We used to have a "buildable" property in the conf files which I removed with the one_tribe change, because it was redundant at the time. We could resurrect it and set soldiers to buildable=false.

I see Notablis is still working on the branch, so we need to revisit this again once the branch is merged. We might lower the Trainer costs to 1 ware only if we're still having problems.

Revision history for this message
Teppo Mäenpää (kxq) wrote :

kaputtnik, #41:

I did not playtest this, but how severe is the problem? I guess that the consumption of helmets and spears is quite small, until the casern is working.

Revision history for this message
kaputtnik (franku) wrote :

> We could resurrect it and set soldiers to buildable=false.

Don't know what effect this setting has in game...

> I guess that the consumption of helmets and spears is quite small, until the casern is working.

If you build the casern as one the first buildings all helmets and wooden spears are transported to the casern and it will immediately start building soldiers. So there is no ware left for getting a trainer for another building.

I usually build the Trainingscenter only when i found gold ore. But mostly i need more soldiers before i found gold ore. So i have to build the casern before the trainingscenter. Which means, i get no trainer for the trainingscenter. Maybe i have to adapt my strategy for the casern :-D

Revision history for this message
Teppo Mäenpää (kxq) wrote :

>> We could resurrect it and set soldiers to buildable=false.
>Don't know what effect this setting has in game...

Sounds like a lot of work for small cause.

Revision history for this message
Notabilis (notabilis27) wrote :

The casern-branch now contains an economy limit for soldiers (currently at 10). So while the barracks will store up to 8 weapons after building it will not consume them until most of the initial soldiers have been used.

Revision history for this message
kaputtnik (franku) wrote :

A Limit for soldiers does not help if a trainer is missing, imho. The reason are the starting conditions:

For Empire: 5 wooden spear, 4 helmets (normal headquarter)

If the casern is build, the warehouse has no wares left for building a trainer, because a casern stores up to 8 wares.

What about building a trainer also in the casern instead of building him in the warehouse? This would implementing something like 'if trainer is requested, build a trainer, otherwise build a soldier' much easier. We may have to give one trainer into the starting conditions then (currently 0).

Revision history for this message
Teppo Mäenpää (kxq) wrote :

One can build the trainingsite first, or stop the casern for a while -> not a deadlock.

Revision history for this message
SirVer (sirver) wrote :

Adding 2 trainers into the start conditions also do not hurt anybody IMHO. In long games with further training buildings the extra trainer required might be an interesting extra challenge to scale up.

Revision history for this message
GunChleoc (gunchleoc) wrote :

#49 sounds good to me :)

Revision history for this message
Trimardio (trimardio) wrote :

So if I understand correctly, the only model that is lacking is the empire one?

Revision history for this message
GunChleoc (gunchleoc) wrote :

We need a model for the Barbarians too - what you wee right now is a quick franken off the png.

DragonAtma started working on a model for Empire in POV-Ray. I don't know if this can be imported into Blender - you'll have to ask him for the file.

https://wl.widelands.org/forum/topic/1909/

Revision history for this message
GunChleoc (gunchleoc) wrote :

We also need animations for the recruits - this should be based off the solder model I guess. Maybe remove the weapon, and remove the Tabard for the Atlanteans and the Helmet for the Empire, because that's the equipment that they receive at the barracks.

Changed in widelands-media:
status: Incomplete → Confirmed
Changed in widelands:
status: In Progress → Fix Committed
Changed in widelands-media:
importance: Undecided → High
Revision history for this message
Notabilis (notabilis27) wrote :

With regard to #49: When we add two trainers in the starting conditions, does that mean that two weapons+armor are removed to compensate for this? Or are we increasing the starting conditions?

More or less related: Now that the barracks are in trunk the player has to "pay" one weapon to create the trainer for it, resulting in one to-be-created soldier less than previously possible. I think we should increase the starting resources to compensate for that.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I think 3 trainers should do it - this way, we are covered for 1 Barracks and 2 training sites per player. Or 2 trainers and let trainers be created in the Barracks rather than the warehouses.

Revision history for this message
kaputtnik (franku) wrote :

Another one stumbled over the missing trainer problem: bug 1724146

I am in favor of adding 3 trainers in the starting conditions. This will make the game easier for beginners. Experienced players may build more trainingsites and then the challenge of a missing trainer becomes true.

We may should also increase the amount of weapon/armor to compensate the building cost of trainers, like Notabilis suggested in #54.

Maybe also a solution: Add trainers to the Configure economy menu. So a player can set the target quantity for trainers.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I think the changed starting conditions should do the trick, e.g. Barbarian headquarters has no initial trainers at all.

As an experiment, we could also allow the Barracks to produce additional trainers.

Revision history for this message
kaputtnik (franku) wrote :

> As an experiment, we could also allow the Barracks to produce additional trainers.

So one has to build a Barrack first, before building other trainingsites. For my usual gameplay this does not work, because i build a collosseum at first and build Barracks later.

Revision history for this message
Notabilis (notabilis27) wrote :

What I meant in #54 was actually the opposite: I wanted to reduce the amount of wares when we provides trainers from the start. Increasing the wares and also providing trainers is too much I think. Just giving 3 free trainers initially should probably be fine.

Setting trainers in the Configure economy menu will probably only solve the problem when we set a default value of, e.g., 3. In that case it would result in the same start as with 3 axes less but 3 trainers. It would probably make the later game easier, thought, since trainers for further training sites are already in the warehouse.

Personally, I am not that fond of creating trainers in the barracks. Currently I see trainers as normal workers and all other workers are "trained" in the warehouse (well, except donkeys). We could just try it, of course.
(On a partially related side note: At some time I was considering a "school" building where miners could be trained to master miners. (Was there also a discussion? Not sure.) We could add a building which is required to train all kinds of workers. Okay, quite likely a bad/useless idea.)

Revision history for this message
GunChleoc (gunchleoc) wrote :

-1 for training trainers in the Barracks then. Let's just add the additional trainers to Headquarters and Fortified Village.

GunChleoc (gunchleoc)
Changed in widelands:
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
kaputtnik (franku) wrote :

What is the state of the widelands media repo here?

Images for the barracks are added to each tribe in the game, but i can't find any related files in the media repo. So where do the implemented images come from? Are blend-files available? (or other file-types)?

Revision history for this message
GunChleoc (gunchleoc) wrote :

We have no models for any of them.

The Atlantean building was created by DragonAtma on the forum using POV Ray. The never uploaded the source because he was still working on it.

The others are quick and dirty crops off other buildings' idle png files that need cleaning up.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands-media:
status: Confirmed → Fix Released
Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.