Jump to content
Sign in to follow this  
sphyrth

[ANSWERED] Need More Info About Unit and Building Classes

Recommended Posts

I'm confused as to the differences in each of the classes, more on the units than the buildings.

For example:
Worker and Citizen - How are they different?

Since I don't know how to dig through the source code, can anyone give me the link to find the info about these things?

Edited by sphyrth
  • Like 1

Share this post


Link to post
Share on other sites
26 minutes ago, sphyrth said:

I'm confused as to the differences in each of the classes, more on the units than the buildings.

For example:
Worker and Citizen - How are they different?

Since I don't know how to dig through the source code, can anyone give me the link to find the info about these things?

Worker affects only units with the `Worker` class and Citizen affects only units with the `Citizen` class; both are visible classes. Then there are also the non-visible `CitizenSoldier` and `FemaleCitizen` classes.

Different unit types can have different classes, e.g.:

  • `template_unit_cavalry.xml`: CitizenSoldier; Citizen
  • `template_unit_infantry.xml`: CitizenSoldier; Citizen, Worker
  • `template_unit_support_female_citizen.xml`: FemaleCitizen; Citizen, Worker
  • `template_unit_support_slave.xml`: Slave, Worker
  • Like 1

Share this post


Link to post
Share on other sites

Let's just take apart the Citizen and Worker classes for now.

This was my thought process when I first read the Classes for Women. "Citizen? Okay, what does this one do? Eat, sleep, and work?. But then I read Worker. "Okay, so it's a Citizen who works". Support, "Sure. I know this one, she supports using her aura." But there's a nagging thought that having both Citizen and Worker seems redundant. Of course, that's coming from me - a specific player's personal view.

Now, from the side that players don't usually see. What specific instances these differences play a part in the game? I mean, what if a Woman doesn't have the Citizen class, but only the Worker class (and vice versa). How does that affect them?

Share this post


Link to post
Share on other sites
7 minutes ago, sphyrth said:

Let's just take apart the Citizen and Worker classes for now.

This was my thought process when I first read the Classes for Women. "Citizen? Okay, what does this one do? Eat, sleep, and work?. But then I read Worker. "Okay, so it's a Citizen who works". Support, "Sure. I know this one, she supports using her aura." But there's a nagging thought that having both Citizen and Worker seems redundant. Of course, that's coming from me - a specific player's personal view.

Now, from the side that players don't usually see. What specific instances these differences play a part in the game? I mean, what if a Woman doesn't have the Citizen class, but only the Worker class (and vice versa). How does that affect them?

Classes are used for many purposes. For example, technologies or auras apply to specific classes.

There are also non visible classes (which are not displayed in the tooltips) which are used internally (for the AI for example).

EDIT: Note that some words are "abstractions" or have an extended meaning. For example a class "Vehicle" could perhaps be attributed to a "cavalry unit" but not to a "car wreckage".

Edited by fatherbushido
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

So far, I only understood about the visible and non-visible classes. Perhaps this is me not playing the game for a long time, but will it be a valid suggestion for me that Worker (for example) should be non-visible?

I should be able to grasp them after a few reviews on how each Factions work. But for now, I'm going with that knee-jerk comment.

Share this post


Link to post
Share on other sites

It will probably be easier for people to give you the answers you are looking for if you describe a bit more what it is you are trying to get out of it/for what purpose. Do you want to create a mod? Do you want to understand what the classes means in gameplay? Etc. Otherwise there is a bit of a risk that you will get answers which are correct, but which doesn't help you in the specific area you are interested in.

Share this post


Link to post
Share on other sites
27 minutes ago, sphyrth said:

Perhaps this is me not playing the game for a long time, but will it be a valid suggestion for me that Worker (for example) should be non-visible?

If a class is (for example) used by a technology like "All units of the class *Worker* gain 10hp" then it's better to have it visible in the gui.

 

Share this post


Link to post
Share on other sites

@feneur
Sorry for being vague. I only realized it after reviewing the thread. For some context, I have this thinking of "If the UI needs improvement, one of them is to remove some clutter." and I have this assumption that seeing two seemingly redundant classes (Worker and Citizen) is part of that clutter, and one of them needs to go (or at least become non-visible).

Now, I'm asking why Worker and Citizen should exist as separate classes. The answers I got is "From the standpoint of devs/modmakers, it's a great distinction.". And I can see why. But from the player's standpoint, "Why?", and @fatherbushido is giving me hints.

===========================

@fatherbushido
That is IF there's an instance that does that. I won't badger you into finding one. Even I can do a work as minimal as that (like I said, I haven't been playing in a long time - so I need to brush up on my knowledge about the game). I'm sure the mods (which I'm currently checking out) put that distinction to use.

I'm marking this thread as [ANSWERED], because it already is. It just took my slow mind *some time to grasp it all. Thanks for the help!

Edited by sphyrth
  • Like 1

Share this post


Link to post
Share on other sites

Your thoughts are interesting and you in fact pointed out some issues.

Worker is used in more than 20 technology and auras so it should be visible.
Citizen is in fact not so used in things that should be communicated to the player. (we could use it more).
Some specific classes like FemaleCitizen, CitizenSoldier are used in the gui but are not visible. They should (or they shouldn't be used). Note that you can also do operation on classes sometimes (like interesection or union).
Support seems not so used in things that should be communicated to the play.

So for example:

The starting cavalry unit is: Citizen, not Worker, not Support. It is not affected by the basket economic technology. It is affected by the female aura.

The starting infantry unit is: Citizen, Worker, not Support. It is affected by the basket economic technology. It is affected by the female aura.

Edited by fatherbushido
  • Thanks 1

Share this post


Link to post
Share on other sites

Economic auras and technologies typically affect the Worker class and others affect the CitizenSoldier class. This ought to be reflected in the aura descriptions and technology tooltips.

Basically, the current situation seems to be:

  • Workers are units that can build and gather all resources (hence not cavalry)
  • CitizenSoldiers are soldiers that are neither champions nor heroes

I just did a `grep -r 'Citizen"'` in the simulation folder and it turns out the Citizen isn't actually used (except for one aura where it should have been CitizenSoldier [EDIT]: D2200). I suppose the Citizen class simply exists as a visible counterpart to CitizenSoldier and FemaleCitizen.

A more logical approach would be to:

  • remove the Citizen class from the female citizen
  • replace the CitizenSoldier class with the Citizen class
  • split the Worker class into Builder and Gatherer visible classes; e.g. the worker elephant can build but not gather, and units that can gather but not build are not inconceivable either.

[EDIT]: That would involve carefully going through the AI files, though.

Edited by Nescio
D2200; ce
  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, Nescio said:

A more logical approach would be to:

  • remove the Citizen class from the female citizen
  • replace the CitizenSoldier class with the Citizen class

No!

Share this post


Link to post
Share on other sites
15 minutes ago, Nescio said:

Why not?

Because it won't be more logical. Those things were stacked, where people use things with their own interpretation. We could flatten the whole thing and then decided what is a logical organization. It would be "change many things for little benefit". (And then someone else will think something else is more logical).
 
--
Let's look at the CitizenSoldier class. I permit myself to quote your recent proposal:
Quote
Summary

Currently all auras and technologies use the CitizenSoldier class when referring to non-Champion non-Hero Soldiers, except for the Brasidas aura, which uses the Citizen class instead.
This patch corrects that (CitizenCitizenSoldier) for consistency and to avoid future confusion.

Test Plan

Ought to be unproblematic.

 

The argument "all auras and technologies use the CitizenSoldier class when referring to non-Champion non-Hero Soldiers" is not an argument. It proofs that about ten entries using that were wrong (probably committed by me too).

Or you move CitizenSoldier to VisibleClasses (then it should be translated) or you use things like "Citizen Soldier" in those techs/auras.

--

Then back to my "no", there are as you exactly mentioned the AI to check but also the gui (yes classes are used here) and possibly the lobby!

--

(I don't want to be right or criticize or proof anything (sorry by advance if electronic communication let that feeling).)

  • Like 1

Share this post


Link to post
Share on other sites
12 minutes ago, fatherbushido said:

Because it won't be more logical. Those things were stacked, where people use things with their own interpretation. We could flatten the whole thing and then decided what is a logical organization. It would be "change many things for little benefit". (And then someone else will think something else is more logical).

Currently we have a visible "Citizen" class that isn't really used. The non-visible "CitizenSoldier" class is used, but all entities that have it also have the "Citizen" (and "Soldier") class. To me it seems we have two classes for the same thing, which seems superfluous and likely to add to confusion.

19 minutes ago, fatherbushido said:
Let's look at the CitizenSoldier class. I permit myself to quote your recent proposal:

The argument "all auras and technologies use the CitizenSoldier class when referring to non-Champion non-Hero Soldiers" is not an argument. It proofs that about ten entries using that were wrong (probably committed by me too).

Or you move CitizenSoldier to VisibleClasses (then it should be translated) or you use things like "Citizen Soldier" in those techs/auras.

Yes, I agree CitizenSoldier→Citizen would be better, but that would involve checking and changing more files; instead D2200 (Citizen→CitizenSoldier) is intended to be a quick fix, removing the one exception for consistency. CitizenSoldier→Citizen could be done later.

14 minutes ago, fatherbushido said:

Then back to my "no", there are as you exactly mentioned the AI to check but also the gui (yes classes are used here) and possibly the lobby!

Yes, in gui/session/sessions.js line 185:

var g_WorkerTypes = ["FemaleCitizen", "Trader", "FishingBoat", "CitizenSoldier"];

I didn't find other occurrences with grep in the gui/ folder.

20 minutes ago, fatherbushido said:

(I don't want to be right or criticize or proof anything (sorry by advance if electronic communication let that feeling).)

Don't worry, I appreciate your feedback!

  • Like 1

Share this post


Link to post
Share on other sites
23 hours ago, Nescio said:
On 8/20/2019 at 12:44 PM, fatherbushido said:
Let's look at the CitizenSoldier class. I permit myself to quote your recent proposal:

The argument "all auras and technologies use the CitizenSoldier class when referring to non-Champion non-Hero Soldiers" is not an argument. It proofs that about ten entries using that were wrong (probably committed by me too).

Or you move CitizenSoldier to VisibleClasses (then it should be translated) or you use things like "Citizen Soldier" in those techs/auras.

Yes, I agree CitizenSoldier→Citizen would be better, but that would involve checking and changing more files; instead D2200 (Citizen→CitizenSoldier) is intended to be a quick fix, removing the one exception for consistency. CitizenSoldier→Citizen could be done later.

On second thought the `CitizenSoldier` → `Citizen` correction is not a lot of work (only five auras and four technologies) and is indeed preferable; I've updated D2200 accordingly. Re-reading your posts convinced me, @fatherbushido. :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...