panther42 Posted June 26, 2017 Report Share Posted June 26, 2017 Where can you find all of the available entity classes in the game listed? I looked on trac.wildfiregames.com, but all links to entity documentation give a non-working page: entity documentation. Looking for where in the game entity is defined, such as "Worker", "Citizen Soldier", etc. for use in such things as templates. "affects": ["Worker"] Thank You Quote Link to comment Share on other sites More sharing options...
elexis Posted June 26, 2017 Report Share Posted June 26, 2017 Classes and VisibleClasses of binaries/data/mods/public/simulation/components/Identity.js used by the binaries/data/mods/public/simulation/templates/ Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 26, 2017 Report Share Posted June 26, 2017 Is hardcoded by identity.js? Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted June 26, 2017 Report Share Posted June 26, 2017 4 hours ago, panther42 said: I looked on trac.wildfiregames.com, but all links to entity documentation give a non-working page: entity documentation. See the attachement 0 A.D. entity XML documentation.html Quote Link to comment Share on other sites More sharing options...
elexis Posted June 26, 2017 Report Share Posted June 26, 2017 3 hours ago, wowgetoffyourcellphone said: Is hardcoded by identity.js? The schema entry is just to generate the documentation and ought to be complete for the public mod. 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 26, 2017 Report Share Posted June 26, 2017 8 hours ago, elexis said: The schema entry is just to generate the documentation and ought to be complete for the public mod. So mods don't have to edit identity.js to include new classes right? Quote Link to comment Share on other sites More sharing options...
panther42 Posted June 26, 2017 Author Report Share Posted June 26, 2017 (edited) 4 hours ago, wowgetoffyourcellphone said: So mods don't have to edit identity.js to include new classes right? I don't believe that is what the schema entry is for... more for template on how to make a template_unit or template_structure, etc. Main question is, can a MOD add a Class to Classes or VisibleClasses in the game, to be used for i.e. technologies, etc. Questions: Spoiler What is the difference between Classes and VisibleClasses, particularly when used by technologies. "affects": ["Worker"] health_females_01 uses FemaleCitizen(from Classes), whereas many use Worker(from VisibleClasses) Can a MOD expand the list of either Classes or VisibleClasses to include new? Example: MOD has a SuperHero class, which inherits from template_unit_hero MOD has technology for Kryptonite, which affects only SuperHero class. Do not want to affect all other units which inherit from template_unit_hero What is the difference between CivCentre(Classes), and CivilCentre(VisibleClasses)? CitizenSoldier(Classes) vs Citizen(VisibleClasses) + Soldier(VisibleClasses) Are there templates for Worker, Citizen, Support, etc? Where defined? Does inheritance build off of base entity, or replace for listed Classes/VisibleClasses in child, if written template_unit Classes: Unit ConquestCritical No VisibleClasses template_unit_support Classes: Human Organic (Does Unit and ConquestCritical apply to this entity) VisibleClasses: Support template_unit_support_female_citizen Classes: FemaleCitizen (Does Unit, ConquestCritical, Human, Organic apply to this entity) VisibleClasses: Citizen Worker (Does Support still apply) What had me thinking about this, is going through Delenda, and seeing technology affects applied to such entities as "Gatherer". I could not find "Gatherer" in main game. CultStatue is another. Does just adding it to VisibleClasses, add it to the game? Seems to answer some of above questions, if so. Spoiler <Identity> <Civ>gaia</Civ> <GenericName>Cult Statue</GenericName> <SpecificName>Mnimeíon</SpecificName> <Classes datatype="tokens">-ConquestCritical</Classes> <VisibleClasses datatype="tokens">-City Town CultStatue</VisibleClasses> <Tooltip>Build these to generate the Glory resource over time. Task units to pray at the statue to generate Glory even faster. Can only build 1 at a time, one after another.</Tooltip> <Icon>structures/statue.png</Icon> <RequiredTechnology>phase_town</RequiredTechnology> </Identity> Is there a command to query all Classes and VisibleClasses loaded? Edited June 26, 2017 by panther42 1 Quote Link to comment Share on other sites More sharing options...
leper Posted June 27, 2017 Report Share Posted June 27, 2017 (First let me curse about the forum software that managed to have an "autosave" feature that doesn't work, thus I'm writing this again... Now in a proper editor because @#$% WYSIWYG doesn't help with splitting quotes.) I don't believe that is what the schema entry is for... more for template on how to make a template_unit or template_structure, etc. As the schema should say that is just an example. More specifically an example of what is currently used in the public mod (though it might not be accurate and complete). Main question is, can a MOD add a Class to Classes or VisibleClasses in the game, to be used for i.e. technologies, etc. Yes, just add them to the respective token list under the Identity tag. What is the difference between Classes and VisibleClasses, particularly when used by technologies. "affects": ["Worker"] For the purpose of the game: None. Most of the games code doesn't even know that there are two different lists, that is an internal detail of the Identity component. The only difference is that VisibleClasses might end up being shown to the user in e.g. GUI tooltips (requirements tooltips, unit training tooltips) and are translated (if the mod has a translation). Can a MOD expand the list of either Classes or VisibleClasses to include new? Yes, just add them to the respective list. Done. What is the difference between CivCentre(Classes), and CivilCentre(VisibleClasses)? They aren't the same. They could as well be named A and B, apart from the detail that CivilCentre is displayed in the GUI. There is no meaning in a class which is just a bunch of characters, the only meaning comes from specifying the same string in a few places (e.g. technology requirements). Are there templates for Worker, Citizen, Support, etc? Where defined? If you mean entity templates that are used to reduce duplication when specifying those look for files named template_unit_support.xml. If you mean for classes (be that in Classes or VisibleClasses) then no, since those are just a bunch of characters without any intrinsic meaning. Does inheritance build off of base entity, or replace for listed Classes/VisibleClasses in child, if written template_unit: Classes: {Unit ConquestCritical} ; VisibleClasses: {} template_unit_support: Classes: {Human Organic} ; VisibleClasses: {Support} template_unit_support_female_citizen: Classes: {FemaleCitizen} ; VisibleClasses: {Citizen Worker} (Slighly modified, blame me being lazy after fighting with the forum.) This is related to how we handle template inheritance which is explained in some detail in the CParamNode documentation. I'll give a short overview of how token lists are handled (which is what both Classes and VisibleClasses are; notice the datatype="tokens" attribute). The token list elements of the parent (after the parent was already handled fully, taking care of inheritance) is enlarged by adding all tokens in the template. Except for those starting with a -, these remove the token from the list. Note that trying to remove tokens that are not present in the parent will result in a warning. So for your example we get template_unit: Classes: {Unit ConquestCritical} ; VisibleClasses: {} template_unit_support: Classes: {Unit ConquestCritical Human Organic} ; VisibleClasses: {Support} template_unit_support_female_citizen: Classes: {Unit ConquestCritical Human Organic FemaleCitizen} ; VisibleClasses: {Support Citizen Worker} CultStatue is another. Does just adding it to VisibleClasses, add it to the game? Seems to answer some of above questions, if so. Yes, that's all there is to it. Is there a command to query all Classes and VisibleClasses loaded? For a specific unit open the developer overlay (Alt+D) and toggle "Display selection state", you will see the Classes and VisibleClasses for that unit. If you mean all, then no. Some grepping of the templates should give you an idea, but since there is nothing to "load" it doesn't seem very interesting. You could however write a little code and use the Units Demo map that places all entities and get a full list if that is really what you want. 5 Quote Link to comment Share on other sites More sharing options...
panther42 Posted June 27, 2017 Author Report Share Posted June 27, 2017 Thank you to all! Very informative posts. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.