Jump to content

Component Schemas -> Classes. Necessary to edit/add-to?


Recommended Posts

In simulation/components/identity.js, the schema outlines the classes and visible classes.

Quote

    "<optional>" +
        "<element name='Classes' a:help='Optional list of space-separated classes applying to this entity. Choices include: AfricanElephant, AmunGuard, Animal, ApedemakGuard, Ashoka, Barter, CitizenSoldier, CivCentre, CivSpecific, ConquestCritical, Domestic, DropsiteFood, DropsiteMetal, DropsiteStone, DropsiteWood, FastMoving, FemaleCitizen, Foundation, GarrisonFortress, Human, IndianElephant, Juggernaut, KushTrireme, MercenaryCamp, Organic, Player, PtolemyIV, SeaCreature, Spy, Structure, Unit, WallLong, WallMedium, WallShort, WallTower.'>" +
            "<attribute name='datatype'>" +
                "<value>tokens</value>" +
            "</attribute>" +
            "<text/>" +
        "</element>" +
    "</optional>" +
    "<optional>" +
        "<element name='VisibleClasses' a:help='Optional list of space-separated classes applying to this entity. These classes will also be visible in various GUI elements. If the classes need spaces, underscores will be replaced with spaces. Choices include: Amphitheater, Archer, ArmyCamp, Arsenal, ArtilleryTower, Axeman, Barracks, Bireme, BoltShooter, BoltTower, Bribable, Builder, Camel, Cavalry, Champion, Chariot, Citizen, City, Civic, CivilCentre, Colony, Corral, Council, Crossbowman, Defensive, Dock, Dog, Economic, Elephant, ElephantStable, Embassy, Farmstead, Field, Fireship, FishingBoat, Forge, Fortress, Gate, Gladiator, Gymnasium, Hall, Healer, Hero, House, Immortal, Infantry, Javelineer, Library, Lighthouse, Maceman, Melee, Market, Mercenary, Military, Monument, Naval, Outpost, Palace, Palisade, Pikeman, Pillar, Pyramid, Quinquereme, Ram, Range, Ranged, Relic, Resource, RotaryMill, SentryTower, Ship, Shipyard, Siege, SiegeTower, SiegeWall, Slave, Slinger, Soldier, Spearman, Stable, Stoa, StoneThrower, StoneTower, Storehouse, Support, Swordsman, Syssiton, Temple, TempleOfAmun, TempleOfApedemak, TempleOfMars, TempleOfVesta, Theater, Tower, Town, Trade, Trader, Trireme, TriumphalArch, Village, Wall, Warship, Wonder, Worker.'>" +
            "<attribute name='datatype'>" +
                "<value>tokens</value>" +
            "</attribute>" +
            "<text/>" +
        "</element>" +
    "</optional>" +

They include gigantic lists of possible classes. In a mod which adds new classes to its entities, is it necessary to mod the identity.js schema to include the new classes?

  • Like 1
Link to comment
Share on other sites

Not necessarily, in that there is no gameplay impact. You can put any word as Class without touching Identity.js and there would be no problem. The ones in the schema are just guidelines on which classes are already in use in base game, therefore have impacts.

It is recommended to add the new class you made into Identity.js, so other people who'd like to understand the mod or want to fork/pull request can know if certain words have been used as a class name without having to check on every template file.

  • Thanks 2
Link to comment
Share on other sites

2 hours ago, m7600 said:

But ideally, it would be nice if the mod could have a JavaScript file that allows you to override identity.js. For example, myfile.js would append new classes to identity.js, or it would disable some of them. Maybe this has already been implemented, I don't know.

This is indeed possible. The file should just be like this: identity_delendaest.js with the lines I'd want to change in it. 

Link to comment
Share on other sites

3 hours ago, wowgetoffyourcellphone said:

This is indeed possible. The file should just be like this: identity_delendaest.js with the lines I'd want to change in it. 

You can already do that... Just name it Identity_Delenda.js

You don't need to change the classes. a:help is just a comment.

Link to comment
Share on other sites

5 hours ago, wraitii said:

I have a plan to change these into JSOn files to add some more detail, such as a description, but as Stan said, it's just a helper atm.

I think this is a great plan. Perhaps include sub-class and icons as well, so information window can be more organized. 

Link to comment
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.

 Share

×
×
  • Create New...