Jump to content

New Faction - Not showing up in the unit list


LordStark
 Share

Recommended Posts

I am trying to make a new faction called the 13th Legion. I am using Delenda Est.

I copied the imp file in "civ" and renamed it "legion" and changed the code to "legion"

I then copied the imp file in special/players and renamed it "legion". I then opened it and changed the <civ> to <civ>legion</civ>

I also changed the GenericName to "The 13th Legion"

I then copied the imp civil centre and pasted it a "legion" template folder. I opened the file and changed civ to "legion".

I still can't find my new faction in the drop down list when I start the game.

Any assistance would be appreciated.

Link to comment
Share on other sites

I' a little nervous about using Github. I am not so good with computers and I don't fully understand what it is and why everyone is using it. But I can put the files here:

In 0ad_delenda_est_a25\simulation\data\civs:

Spoiler

{
    "Code": "legion",
    "Culture":[ "italian", "roman" ],
    "Region":[ "mediterranean", "europe", "italy" ],
    "Music": [
        {
            "File": "Calm_Before_the_Storm.ogg",
            "Type": "peace"
        },
        {
            "File": "Elysian_Fields.ogg",
            "Type": "peace"
        },
        {
            "File": "The_Governor.ogg",
            "Type": "peace"
        }
    ],
    "CivBonuses":
    [
        {
            "Name": "Testudo Formation",
            "History": "The Romans commonly used the Testudo or 'turtle' formation for defense: Legionaries were formed into hollow squares with twelve men on each side, standing so close together that their shields overlapped like fish scales.",
            "Description": "Roman infantry can form a Testudo."
        },
        {
            "Name": "Centurio",
            "History": ".",
            "Description": "Roman Legionary Swordsmen gain an extra 4th rank, that of Centurion, with champion-level stats and abilities."
        }
    ],
    "CivChoices":
    [
        "civ_choices/imp/augustus",
        "civ_choices/imp/titus",
        "civ_choices/imp/trajan",
        "civ_choices/imp/marcus_aurelius",
        "civ_choices/imp/aurelian"
    ],
    "WallSets":
    [
        "structures/imp/wallset_siege",
        "structures/imp/wallset_stone"
    ],
    "StartEntities":
    [
        {
            "Template": "structures/imp/civil_centre"
        },
        {
            "Template": "units/imp/support_citizen",
            "Count": 4
        },
        {
            "Template": "units/imp/infantry_swordsman_b",
            "Count": 2
        },
        {
            "Template": "units/imp/infantry_swordsman_centurion",
            "Count": 1
        },
        {
            "Template": "units/imp/infantry_javelineer_e",
            "Count": 2
        },
        {
            "Template": "units/imp/cavalry_scout"
        }
    ],
    "AINames":
    [
        "Agrippina",
        "Faustina",
        "Lucilla",
        "Tiberius",
        "Claudius",
        "Nero",
        "Galba",
        "Gela",
        "Vespasian",
        "Domitian",
        "Hadrian",
        "Commodus",
        "Decimus Meridias Maximus",
        "Lucius Verus",
        "Septimius Severus",
        "Caracalla",
        "Titus Pullo",
        "Lucius Vorennus",
        "Tacitus",
        "Pliny the Elder",
        "Pliny the Younger",
        "Agricola",
        "Josephus",
        "Pescennius Niger",
        "Cassius Dio",
        "Pertinax"
    ],
    "SkirmishReplacements":
    {
        "skirmish/units/default_hero_1": "units/imp/hero_augustus",
        "skirmish/units/default_hero_2": "units/imp/hero_titus",
        "skirmish/units/default_hero_3": "units/imp/hero_trajan",
        "skirmish/units/default_hero_4": "units/imp/hero_marcus_aurelius",
        "skirmish/units/default_hero_5": "units/imp/hero_aurelian",
        "skirmish/units/default_champion_infantry_1": "units/imp/champion_infantry",
        "skirmish/units/default_champion_infantry_2": "units/imp/champion_infantry",
        "skirmish/units/default_champion_infantry_3": "units/imp/champion_infantry",
        "skirmish/units/default_champion_infantry_4": "",
        "skirmish/units/default_champion_cavalry_1": "units/imp/champion_cavalry",
        "skirmish/units/default_champion_cavalry_2": "units/imp/champion_cavalry",
        "skirmish/units/default_infantry_ranged_b": "units/imp/infantry_javelineer_e",
        "skirmish/units/default_infantry_melee_b": "units/imp/infantry_swordsman_b",
        "skirmish/units/special_starting_unit": "units/imp/infantry_swordsman_centurion",
        "skirmish/structures/default_house_10" : "structures/{civ}/house",
        "skirmish/structures/special_starting_structure": "structures/imp/temple_vesta",
        "skirmish/structures/default_defense_tower": "structures/{civ}/defense_tower"
    },
    "SelectableInGameSetup": true
}
 

In 0ad_delenda_est_a25\simulation\templates\special\player:

Spoiler

<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_player">
  <Auras datatype="tokens">
    teambonuses/rome_player_teambonus
  </Auras>
  <Identity>
    <Civ>legion</Civ>
    <GenericName>The 13th Legion</GenericName>
    <History>The Imperial, or Principate, Romans have a strong army, divided between Legions and Auxiliaries. They have a large technology tree and their wonder, the Flavian Aphitheater, aka The Colosseum, grants a large territory bonus while in the Empire phase. They have access to the Army Camp and Siege Walls, which can be built in enemy territory. They also receive a free Temple of Vesta at the start of a match, which increases capture resistance of nearby buildings, and the Triumphal Arch, which boosts their soldiers. Lastly, their navy is weak, but their siege weapons are very strong.</History>
    <Icon>emblems/emblem_principates.png</Icon>
  </Identity>
  <Player>
    <Formations datatype="tokens">
      special/formations/testudo
    </Formations>
  </Player>
</Entity>

In 0ad_delenda_est_a25\simulation\templates\structures\legion\civil_centre:

Spoiler

<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_civic_civil_centre">
  <Auras datatype="tokens">
    teambonuses/imp_player_teambonus
  </Auras>
  <Footprint>
    <Square width="40.0" depth="40.0"/>
    <Height>8.0</Height>
  </Footprint>
  <Health>
    <SpawnEntityOnDeath>decay|rubble/rubble_rome_cc</SpawnEntityOnDeath>
  </Health>
  <Identity>
    <Civ>legion</Civ>
    <SpecificName>Basilica</SpecificName>
  </Identity>
  <Obstruction>
    <Static width="37.0" depth="37.0"/>
  </Obstruction>
  <Researcher>
    <Technologies datatype="tokens">
      romans_imperial/pair_city_cohorts
      health_units_01
      health_units_02
      health_units_03
      health_units_04
      health_units_05
      health_units_06
      pair_structures_01
      pair_structures_02
      pair_structures_03
      pair_structures_04
      romans/health_structures_concrete
      successors/health_heroes
    </Technologies>
  </Researcher>
  <Trainer>
    <Entities datatype="tokens">
      units/{civ}/infantry_swordsman_urban
    </Entities>
  </Trainer>
  <Upgrade disable=""/>
  <VisualActor>
    <Actor>structures/romans_imperial/civic_centre.xml</Actor>
    <FoundationActor>structures/fndn_9x9.xml</FoundationActor>
  </VisualActor>
</Entity>

And here is the error report:

Spoiler

ERROR: JavaScript error: globalscripts/Templates.js line 21 simulation/data/civs/legion.json doesn't contain Name loadCivFiles@globalscripts/Templates.js:21:11 loadCivData@gui/common/functions_utility.js:37:28 @gui/gamesetup/gamesetup.js:13:30 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: JavaScript error: gui/gamesetup/gamesetup_DE.js line 31 can't access lexical declaration 'g_CivData' before initialization g_RandomCivGroups<@gui/gamesetup/gamesetup_DE.js:31:7 @gui/gamesetup/gamesetup_DE.js:1:49 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: JavaScript error: gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Sliders/RelicCount.js line 51 can't access lexical declaration 'g_CivData' before initialization @gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Sliders/RelicCount.js:51:1 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: JavaScript error: globalscripts/Templates.js line 21 simulation/data/civs/legion.json doesn't contain Name loadCivFiles@globalscripts/Templates.js:21:11 loadCivData@gui/common/functions_utility.js:37:28 init@gui/gamesettings/GameSettings.js:24:13 SetupWindow@gui/gamesetup/SetupWindow.js:29:39 init@gui/gamesetup/gamesetup.js:47:18 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: GUI page 'page_gamesetup.xml': Failed to call init() function

Engine exited successfully on 2022-07-01 at 23:19:30 with 469 message(s), 5 error(s) and 0 warning(s).

 

Link to comment
Share on other sites

That's the issue. ERROR: JavaScript error: globalscripts/Templates.js line 21 simulation/data/civs/legion.json doesn't contain Name

You need to add a "Name" property to your civ.json :)

Github is a platform that allows you to share update and store your mods. It is built around the git command line too, which is used to version (ie keep track of changes) all the files.

See https://learngitbranching.js.org/?locale=fr_FR

Link to comment
Share on other sites

I added a name and I now get these errors:

Spoiler

ERROR: JavaScript error: globalscripts/Templates.js line 21 simulation/data/civs/legion.json doesn't contain History loadCivFiles@globalscripts/Templates.js:21:11 loadCivData@gui/common/functions_utility.js:37:28 @gui/gamesetup/gamesetup.js:13:30 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: JavaScript error: gui/gamesetup/gamesetup_DE.js line 31 can't access lexical declaration 'g_CivData' before initialization g_RandomCivGroups<@gui/gamesetup/gamesetup_DE.js:31:7 @gui/gamesetup/gamesetup_DE.js:1:49 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: JavaScript error: gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Sliders/RelicCount.js line 51 can't access lexical declaration 'g_CivData' before initialization @gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Sliders/RelicCount.js:51:1 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: JavaScript error: globalscripts/Templates.js line 21 simulation/data/civs/legion.json doesn't contain History loadCivFiles@globalscripts/Templates.js:21:11 loadCivData@gui/common/functions_utility.js:37:28 init@gui/gamesettings/GameSettings.js:24:13 SetupWindow@gui/gamesetup/SetupWindow.js:29:39 init@gui/gamesetup/gamesetup.js:47:18 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: GUI page 'page_gamesetup.xml': Failed to call init() function

Can I end up in legal trouble if I put something on Github that is not freeware? For example I borrow a lot of stuff from Millenium AD and also random textures off the internet (like a picture of Lord Stark from Game of Thrones). As the mod is private I know it is no big deal.

I am still a little unsure whether Millenium AD can claim copyright on their models even though the 0AD game is freeware.

Link to comment
Share on other sites

ERROR: JavaScript error: globalscripts/Templates.js line 21 simulation/data/civs/legion.json doesn't contain History

History now :)

15 minutes ago, LordStark said:

Can I end up in legal trouble if I put something on Github that is not freeware? Fo

Depends but it's usually discouraged if you can find creative commons sources instead

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...