wowgetoffyourcellphone Posted May 2, 2021 Report Share Posted May 2, 2021 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? 1 Quote Link to comment Share on other sites More sharing options...
azayrahmad Posted May 3, 2021 Report Share Posted May 3, 2021 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. 2 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted May 3, 2021 Author Report Share Posted May 3, 2021 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. Quote Link to comment Share on other sites More sharing options...
Stan` Posted May 3, 2021 Report Share Posted May 3, 2021 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. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted May 3, 2021 Author Report Share Posted May 3, 2021 29 minutes ago, Stan` said: You can already do that... Just name it Identity_Delenda.js Yeah, I was saying it's possible. 29 minutes ago, Stan` said: You don't need to change the classes. a:help is just a comment. Excellent. Thank you! Quote Link to comment Share on other sites More sharing options...
wraitii Posted May 3, 2021 Report Share Posted May 3, 2021 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. 1 Quote Link to comment Share on other sites More sharing options...
azayrahmad Posted May 3, 2021 Report Share Posted May 3, 2021 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. 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.