So... Deliverator's new Nexus Buddy allows to replace multiple models in a single gr2; which probably enables the possibility of custom city-styles at least when talking of specifically model barriers.
With that in mind, I have decided to attempt adding an ArtStyleType and all that fuss. There's good and bad news.
To add a new Artstyle ID one simply does this:
("testean" as in, from test ) So, I assigned this to a civilization; and then I used Lua to check the ArtStyleType ID said civilization was used (normally, the last ID is 6, being the ruined city style)... And, amazingly, the ID of the player's ArtStyleType ID was 7! That means, one can add ArtStyleTypes with mods.
Interestingly, the new type defaulted all art to European (which is odd too, given that European isn't the id 0 or anything) (also,when an unexistant ArtStyleType is assigned, it also defaults the art to European, but its ID through lua returns -1 ; so I know this one was rightly assigned)... So, that part is good .
--
Part 2 of my test was, using Polynesia's kind of file to see if I can change the gr2 files or something. After all my tests, not even setting a file with the same name ("Civ5ArtDefines_CityBuildings_Polynesia.xml") with VFS=True works, so one has to edit the file directly... Editing the file directly I managed to make ArtStyleType Polynesia to use Mediterranean modern buildings in ancient times! :
So... the file is functional... making custom citystyles would require Polynesia DLC, but that's not a huge problem.
Next part of the test was to change the Culture name = "Polynesian"... I was assuming there was an automatic naming thing like with Music... so Culture name = "Polynesian" links automatically to ARTSTYLE_POLYNESIAN ; but I was terribly wrong... First because that's not how it works for Mediterranean (Culture name = "Mediterranean" , but ARTSTYLE_GRECO_ROMAN)... So creating a Culture name = "Testean" didn't work at all...
So... I then changed Polynesian to whatever (to Culture name = "Polychromatic" just for fun)... Ingame it defaulted to Native American citystyle (this one's more explainable, American is the first style being defined in BuildingArtInfos it seems)... Which means that somehow there's a mysterious way ARTSTYLE manages to connect with a specific Culture name...
Therefore... the next step forward would be finding whatever on earth links a specific Culture name with a specific ArtStyleType... It definitively isn't automatic like music... so there's some other background linking (probably DLL?)
TLDR: We can create an ArtStyleType ID... and we can create a Culture name... we just can't seem to link them both to have a working custom City Style. (yet)
Anyone knows where should I look for that? A schema? A hidden table column? or something? Anyone can find that?
As you can notice, I'm not particularly focused on compatibility here, so any answer will do really
EDIT: Also found this on CvEnums.h (no idea what it is)
After finding that DLL .h thing I made another test... Changed the ArtStyleType from ARTSTYLE_ASIA to whatever... and it kept its relationship to Asia, so Asian buildings ingame! ... this means that the mysterious link is somehow related to ID number.
So... possibly the enumeration on the DLL is somehow linked to the ID and thus to the Culture name... However, where are CultureTypes linked to Culture names on BuildingArtInfos... without wanting it I already tested the first letters... (when I changed the culture name of Polynesia it was to Polychromatic ; and the CultureType is CULTURE_POLY, they still share the same letters... so no luck)
With that in mind, I have decided to attempt adding an ArtStyleType and all that fuss. There's good and bad news.
To add a new Artstyle ID one simply does this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<GameData>
<ArtStyleTypes>
<Row>
<Type>ARTSTYLE_TESTEAN</Type>
</Row>
</ArtStyleTypes>
</GameData>
("testean" as in, from test ) So, I assigned this to a civilization; and then I used Lua to check the ArtStyleType ID said civilization was used (normally, the last ID is 6, being the ruined city style)... And, amazingly, the ID of the player's ArtStyleType ID was 7! That means, one can add ArtStyleTypes with mods.
Interestingly, the new type defaulted all art to European (which is odd too, given that European isn't the id 0 or anything) (also,when an unexistant ArtStyleType is assigned, it also defaults the art to European, but its ID through lua returns -1 ; so I know this one was rightly assigned)... So, that part is good .
--
Part 2 of my test was, using Polynesia's kind of file to see if I can change the gr2 files or something. After all my tests, not even setting a file with the same name ("Civ5ArtDefines_CityBuildings_Polynesia.xml") with VFS=True works, so one has to edit the file directly... Editing the file directly I managed to make ArtStyleType Polynesia to use Mediterranean modern buildings in ancient times! :
Code:
<?xml version="1.0" encoding="utf-8"?>
<BuildingArtInfos>
<!-- Polynesian ************************************************************ -->
<Culture name="Polynesian" lighting="Asia">
<Era name="Ancient">
<PopulationBuildings>
<Granny>Medit_Mod_City.gr2</Granny>
</PopulationBuildings>
</Era>
<Era name="Rennaisance">
<PopulationBuildings>
<Granny>Poly_Ren_City.gr2</Granny>
</PopulationBuildings>
</Era>
<Era name="Industrial">
<PopulationBuildings>
<Granny>Poly_Ind_City.gr2</Granny>
</PopulationBuildings>
</Era>
<Era name="Modern">
<PopulationBuildings>
<Granny>Poly_Mod_City.gr2</Granny>
</PopulationBuildings>
</Era>
</Culture>
<!-- Polynesian
</BuildingArtInfos>
So... the file is functional... making custom citystyles would require Polynesia DLC, but that's not a huge problem.
Next part of the test was to change the Culture name = "Polynesian"... I was assuming there was an automatic naming thing like with Music... so Culture name = "Polynesian" links automatically to ARTSTYLE_POLYNESIAN ; but I was terribly wrong... First because that's not how it works for Mediterranean (Culture name = "Mediterranean" , but ARTSTYLE_GRECO_ROMAN)... So creating a Culture name = "Testean" didn't work at all...
So... I then changed Polynesian to whatever (to Culture name = "Polychromatic" just for fun)... Ingame it defaulted to Native American citystyle (this one's more explainable, American is the first style being defined in BuildingArtInfos it seems)... Which means that somehow there's a mysterious way ARTSTYLE manages to connect with a specific Culture name...
Therefore... the next step forward would be finding whatever on earth links a specific Culture name with a specific ArtStyleType... It definitively isn't automatic like music... so there's some other background linking (probably DLL?)
TLDR: We can create an ArtStyleType ID... and we can create a Culture name... we just can't seem to link them both to have a working custom City Style. (yet)
Anyone knows where should I look for that? A schema? A hidden table column? or something? Anyone can find that?
As you can notice, I'm not particularly focused on compatibility here, so any answer will do really
EDIT: Also found this on CvEnums.h (no idea what it is)
Code:
enum CultureTypes
{
NULL_CULTURE = -1,
CULTURE_AMERICA,
CULTURE_ASIA,
CULTURE_AFRICA,
CULTURE_EUROPE,
CULTURE_MED,
CULTURE_POLY,
CULTURE_NONE,
CULTURE_MAX,
};
After finding that DLL .h thing I made another test... Changed the ArtStyleType from ARTSTYLE_ASIA to whatever... and it kept its relationship to Asia, so Asian buildings ingame! ... this means that the mysterious link is somehow related to ID number.
So... possibly the enumeration on the DLL is somehow linked to the ID and thus to the Culture name... However, where are CultureTypes linked to Culture names on BuildingArtInfos... without wanting it I already tested the first letters... (when I changed the culture name of Polynesia it was to Polychromatic ; and the CultureType is CULTURE_POLY, they still share the same letters... so no luck)