Jump to content

Ugh, okay, help


wowgetoffyourcellphone
 Share

Recommended Posts

http://trac.wildfiregames.com/changeset/19120

 

Okay, guy, cool update. Fixes strcutree requirements.  So, I have to go into DE and fix my phase techs and others. I follow the example, but I get this when I select the civic center or any building with technology queue:

 

 

ERROR: JavaScript error: gui/session/selection_panels.js line 834 TypeError: reqs is undefined g_SelectionPanels.Research.setupButton@gui/session/selection_panels.js:834:1 setupUnitPanel@gui/session/unit_commands.js:96:8 updateUnitCommands@gui/session/unit_commands.js:147:4 updateSelectionDetails@gui/session/selection_details.js:472:2 updateGUIObjects@gui/session/session.js:770:2 onSimulationUpdate@gui/session/session.js:713:2 __eventhandler60 (simulationupdate)@sn simulationupdate:0:1

 

What can I be missing? Do the new changes work with tech pairs correctly?

Link to comment
Share on other sites

I feel like this may be issue that if one tech is parsing badly, it screws the whole rendering when selecting anything.

 

for example, here is requirement for one of my blacksmith tech:

 


	"requirements": { "all": [{ "tech": "phase_imperial" }, { "any": [{ "tech": "techs_blacksmith_cost" }, { "tech": "techs_blacksmith_speed" }] }] },

 

Okay, so I think I need to go through all of my tech and look for the class requiremet and make sure I've insert "entity": etc. and then get back to you. Sound like a plan? I mean, that could be the problem right? 1 or more tech do have have the etntity requirement correct, so screw up everything? I've seen this kind of thing before.

Link to comment
Share on other sites

This should work, right? Thanks.

 

{
	"genericName": "Tantric Fertility Festival",
	"description": "A festival attended by women-only, to celebrate female fertility.",
	"cost": {"food": 100, "wood": 0, "stone": 0, "glory": 100},
	"requirements": {"all": [
		{"entity": {"class": "Female", "number": 10}},
		{"tech": "phase_village"},
		{"civ": "maur"}
	]},
	"requirementsTooltip": "Requires 10 or more Women to be trained from the Civic Center first.",
	"icon": "hindu_kali.png",
	"researchTime": 60,
	"tooltip": "Unlock the ability to train women from houses.",
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

 

Link to comment
Share on other sites

And as another example of what I mean when I say if one tech is messed up it messes up everything. These 4 tech can be research from Chanakya unit. None of these have weird requirements.
 

{
	"genericName": "A Wise and Virtuous Kingship",
	"specificName": {
		"maur": "Rajarshi"
	},
	"description": ".",
	"cost": {"food": 0, "wood": 0, "stone": 200, "glory": 100},
	"requirements": {"tech": "phase_city"},
	"requirementsTooltip": "Unlocked in City Phase.",
	"icon": "political_face.png",
	"researchTime": 60,
	"tooltip": "Heroes +10% health.",
	"modifications": [{"value": "Health/Max", "multiply": 1.1}],
	"affects": ["Hero"],
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}
{
	"genericName": "A Maintenance of Law and Order",
	"specificName": {
		"maur": "Dandaniti"
	},
	"description": ".",
	"cost": {"food": 0, "wood": 200, "stone": 0, "glory": 100},
	"requirements": {"tech": "phase_city"},
	"requirementsTooltip": "Unlocked in City Phase.",
	"icon": "friendship.png",
	"researchTime": 60,
	"tooltip": "Support units -10% train time.",
	"modifications": [{"value": "Cost/BuildTime", "multiply": 0.9}],
	"affects": ["Support"],
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}
{
	"genericName": "A Compassion for Animals",
	"specificName": {
		"maur": "Ahinsā"
	},
	"description": ".",
	"cost": {"food": 200, "glory": 100},
	"requirements": {"tech": "phase_city"},
	"requirementsTooltip": "Unlocked in City Phase.",
	"icon": "horse.png",
	"researchTime": 60,
	"tooltip": "Domestic animals, cavalry, and elephants +10% health.",
	"modifications": [{"value": "Health/Max", "multiply": 1.1}],
	"affects": ["Animal", "Elephant", "Cavalry"],
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}
{
	"genericName": "A Sound Economy",
	"specificName": {
		"maur": "Artha"
	},
	"description": ".",
	"cost": {"food": 0, "wood": 0, "glory": 100, "metal": 200},
	"requirements": {"tech": "phase_city"},
	"requirementsTooltip": "Unlocked in City Phase.",
	"icon": "taxes.png",
	"researchTime": 60,
	"tooltip": "The Market building gives the player a trickle of 20 of each resource per minute.",
	"modifications": [
		{"value": "ResourceTrickle/Rates/food", "add": 2},
		{"value": "ResourceTrickle/Rates/wood", "add": 2},
		{"value": "ResourceTrickle/Rates/stone", "add": 2},
		{"value": "ResourceTrickle/Rates/metal", "add": 2}
	],
	"affects": ["Market"],
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

 

 

but yet selecting chanakya gives the error codes.

 

Here is City phase:

 

{
	"genericName": "City Phase",
	"specificName": {
		"hele": "Megalopolis",
		"mace": "Megalopolis",
		"spart": "Megalopolis",
		"athen": "Megalopolis",
		"epir": "Megalopolis",
		"theb": "Megalopolis"
	},
	"supersedes": "phase_town",
	"description": "Advances from a bustling town to a veritable metropolis, full of the wonders of modern technology.",
	"cost": {"food": 0, "wood": 0, "stone": 1000, "metal": 1000},
	"requirements": {"all": [{"entity": {"class": "NotField", "number": 15 }}, {"notciv": "athen"}, {"notciv": "imp"}]},
	"requirementsTooltip": "Requires 15 total Structures (except Walls and Fields).",
	"icon": "city_phase.png",
	"researchTime": 30,
	"tooltip": "Advance to City Phase, which unlocks more structures and units. Territory radius for Civic Centers and vision range for units increased by another +25%.",
	"modifications": [
		{"value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "Citizen"}
	],
	"soundComplete": "interface/alarm/alarm_phase.xml"
}

 

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

2 hours ago, wowgetoffyourcellphone said:

This should work, right?

 

Yes, it should!

Quote

And as another example of what I mean when I say if one tech is messed up it messes up everything

Sure, the structure tree load all techs.

Quote

but yet selecting chanakya gives the error codes.

I m not sure that technology searched at unit is yet correctly handled by structure tree.

Quote

Here is City phase:

Should be ok, we explicitely tested that case.

 

Perhaps, it's related to 'glory' cost?

Link to comment
Share on other sites

4 hours ago, fatherbushido said:

Perhaps, it's related to 'glory' cost?

Maybe, but error code specific to "reqs":

 

ERROR: JavaScript error: gui/session/selection_panels.js line 834 TypeError: reqs is undefined 

 

Unless reqs also refer to cost. If that the case, do all resource need to be in the tech, even if 0? Didn't have to before.

 

EDIT: I look at selection_panels.js and that line does refer to class counts. Maybe need autobuild since template changes to source were made?

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

11 hours ago, fatherbushido said:

Uhm that's strange. It appears in structure tree also or only in construction/training panel ?

Imo, that's not needed as only js changed.

structtree does not load at all. Blank screens with error messages.

 

Also, about autobuild, I meant from this source change http://trac.wildfiregames.com/changeset/19119, but it probably does not have to do with it.

Link to comment
Share on other sites

I get this when I load structree.

 

WARNING: JavaScript warning: gui/structree/helper.js line 111 reference to undefined property g_ParsedData.phaseList[0]

WARNING: imp : phase_town_roma

WARNING: JavaScript warning: gui/structree/helper.js line 84 reference to undefined property g_ParsedData.techs[g_SelectedCiv][techName]

ERROR: JavaScript error: gui/structree/helper.js line 84 TypeError: g_ParsedData.techs[g_SelectedCiv][techName] is undefined GetPhaseOfTechnology@gui/structree/helper.js:84:6 selectCiv@gui/structree/structree.js:198:16 __eventhandler216 (selectionchange)@civSelection selectionchange:0:1 init@gui/structree/structree.js:35:27 openStrucTree@gui/session/menu.js:795:1 __eventhandler193 (press)@civIconOverlay press:0:1

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

Link to comment
Share on other sites

The tech first loads the starting units (4 men 4 woman 1 cavalry) and then recursively all units that they can train, all buildings that they can build. So if phase_town_roma isn't found, that should indicate that the phase can't be researched at those entities, does that make sense anyhow?

 @s0600204 is the author of the tech tree and the most recent requirements rewrite, so might want to ask him.

 

Link to comment
Share on other sites

 @wowgetoffyourcellphone:

did you fix your specific phase techs?

for example in your file phase_town_roma.json
 

"requirements": {"all": [{"class": "Vesta", "number": 1 }, {"civ": "imp"}]}, 

should be replaced by

"requirements": { "all": [{ "entity": { "class": "Vesta", "number": 1 } }, { "civ": "imp" }] },

Here is the list (in your a21 version) of the techs to edit

phase_city_britons.json
phase_city_athen.json
phase_imperial_athen.json
phase_town.json
phase_imperial_roma.json
phase_imperial_celt.json
phase_imperial.json
phase_town_athen.json
mauryans/unlock_females_house.json
phase_town_roma.json
phase_city_gauls.json
phase_city_roma.json
phase_city.json

 

Link to comment
Share on other sites

10 hours ago, niektb said:

Do you maybe need to set 'phase_village' as requirement to that tech?

That didn't work, thoughn I had hope. 

 

4 hours ago, fatherbushido said:

 @wowgetoffyourcellphone:

did you fix your specific phase techs?

for example in your file phase_town_roma.json
 


"requirements": {"all": [{"class": "Vesta", "number": 1 }, {"civ": "imp"}]}, 

should be replaced by


"requirements": { "all": [{ "entity": { "class": "Vesta", "number": 1 } }, { "civ": "imp" }] },

Here is the list (in your a21 version) of the techs to edit


phase_city_britons.json
phase_city_athen.json
phase_imperial_athen.json
phase_town.json
phase_imperial_roma.json
phase_imperial_celt.json
phase_imperial.json
phase_town_athen.json
mauryans/unlock_females_house.json
phase_town_roma.json
phase_city_gauls.json
phase_city_roma.json
phase_city.json

 


Here are all my class-base tech. I deleted the celtic ones.

Spoiler

 


{
	"genericName": "Empire Phase",
	"specificName": {
		"hele": "Autokratoría",
		"mace": "Autokratoría",
		"spart": "Autokratoría",
		"athen": "Autokratoría",
		"theb": "Autokratoría",
		"epir": "Autokratoría",
		"sele": "Arkhe Seleúkeia",
		"ptol": "Ptolemaïke Basileía",
		"rome": "Imperium Romanum"
	},
	"description": "Moves your civilization from urbanism to imperialism, unlocking powerful technologies and abilities not available in earlier phases of expansion.",
	"cost": {"food": 0, "wood": 0, "stone": 0, "metal": 0},
	"requirements": {"all": [{"entity": {"class": "Wonder", "number": 1}}, {"notciv": "athen"}, {"notciv": "imp"}]},
	"requirementsTooltip": "Requires 1 Wonder to be built.",
	"supersedes": "phase_city",
	"icon": "imperial_phase.png",
	"researchTime": 0,
	"tooltip": "Advance to Empire Phase, which unlocks powerful technologies and abilities. Territory radius for Civic Centers and vision range for units increased by a final +25%.",
	"modifications": [
		{"value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "Unit"}
	],
	"soundComplete": "interface/alarm/alarm_phase.xml"
}

{
	"genericName": "Empire Phase",
	"specificName": {
		"athen": "Autokratoría"
	},
	"description": "Moves your civilization from urbanism to imperialism, unlocking powerful technologies and abilities not available in earlier phases of expansion. This is the Athenian imperial phase, where metal gathering rates are boosted because of the Silver Owls bonus.",
	"cost": {"food": 0, "wood": 0, "stone": 0, "metal": 0},
	"requirements": {"all": [{"entity": {"class": "Wonder", "number": 1}}, {"civ": "athen"}]},
	"requirementsTooltip": "Requires 1 Wonder to be built.",
	"supersedes": "phase_city_athen",
	"replaces": ["phase_imperial"],
	"icon": "imperial_phase.png",
	"researchTime": 0,
	"tooltip": "Advance to Empire Phase, which unlocks powerful technologies and abilities. Territory radius for Civic Centers and vision range for units increased by a final +25%. 'Silver Owls' bonus gives +10% metal gathering rates.",
	"modifications": [
		{"value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "Unit"},
		{"value": "ResourceGatherer/Rates/metal.ore", "multiply": 1.1, "affects": "Gatherer"}
	],
	"soundComplete": "interface/alarm/alarm_phase.xml"
}

{
	"genericName": "Empire Phase",
	"specificName": {
		"imp": "Imperium Romanum"
	},
	"description": "Moves your civilization from urbanism to imperialism, unlocking powerful technologies and abilities not available in earlier phases of expansion.",
	"cost": {"food": 0, "wood": 0, "stone": 0, "metal": 0},
	"requirements": {"all": [{"entity": {"class": "Wonder", "number": 1 }}, {"civ": "imp"}]},
	"requirementsTooltip": "Requires 1 Wonder to be built.",
	"supersedes": "phase_city_roma",
	"replaces": ["phase_imperial"],
	"icon": "imperial_phase.png",
	"researchTime": 0,
	"tooltip": "Advance to Empire Phase, which unlocks powerful technologies and abilities. Territory radius for Civic Centers increased by a final +50% (Imperium Romanum civ bonus) and vision range for Citizen and Legionary units increased by a final +25%.",
	"modifications": [
		{"value": "TerritoryInfluence/Radius", "multiply": 1.50, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "Unit"}
	],
	"soundComplete": "interface/alarm/alarm_phase.xml"
}

{
	"genericName": "Town Phase",
	"specificName": {
		"athen": "Komópolis",
		"hele": "Komópolis",
		"mace": "Komópolis",
		"spart": "Komópolis",
		"theb": "Komópolis",
		"epir": "Komópolis"
	},
	"description": "Advances from a small village to a bustling town, ready to expand rapidly.",
	"cost": { "food": 1000, "wood": 500, "stone": 0, "metal": 0 },
	"requirements": {"all": [{"entity": {"class": "NotField", "number": 5 }}, {"notciv": "athen"}, {"notciv": "imp"}]},
	"requirementsTooltip": "Requires 5 total Buildings (except Fields).",
	"supersedes": "phase_village",
	"icon": "town_phase.png",
	"researchTime": 60,
	"tooltip": "Advance to Town Phase, which unlocks more structures and units. Territory radius for Civic Centers and vision range for units increased by +25%.",
	"modifications": [
		{"value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "Citizen"}
	],
	"soundComplete": "interface/alarm/alarm_phase.xml"
}

{
	"genericName": "Town Phase",
	"specificName": {
		"athen": "Komópolis"
	},
	"description": "Advances from a quiet village to a large town. This is the Athenian town phase, where metal gathering rates are boosted because of the Silver Owls bonus.",
	"cost": { "food": 1000, "wood": 0, "stone": 500, "metal": 0 },
	"requirements": { "all": [{ "entity": { "class": "Village", "number": 5 } }, { "civ": "athen" }] },
	"requirementsTooltip": "Requires 5 total Buildings (except Fields).",
	"supersedes": "phase_village",
	"replaces": ["phase_town"],
	"icon": "town_phase.png",
	"researchTime": 60,
	"tooltip": "Advance to Town Phase, which unlocks more structures and units. Territory radius for Civic Centers and vision range for units increased by +25%. 'Silver Owls' bonus gives +10% metal gathering rates.",
	"modifications": [
		{"value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "Citizen"},
		{"value": "ResourceGatherer/Rates/metal.ore", "multiply": 1.1, "affects": "Gatherer"}
	],
	"soundComplete": "interface/alarm/alarm_phase.xml"
}

{
	"genericName": "Town Phase",
	"description": "Advances from a quiet village to a large town.",
	"cost": { "food": 0, "wood": 0, "stone": 0, "metal": 0, "glory": 0 },
	"requirements": {"all": [{"entity": {"class": "Vesta", "number": 1 }}, {"civ": "imp"}]},
	"requirementsTooltip": "Requires 1 Temple of Vesta to be built.",
	"supersedes": "phase_village",
	"replaces": ["phase_town"],
	"icon": "town_phase.png",
	"researchTime": 0,
	"tooltip": "Advance to Town Phase, which unlocks more structures and units. Territory radius for Civic Centers and vision range for Citizen and Legionairy units increased by +25%.",
	"modifications": [
		{"value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "Citizen"}
	],
	"soundComplete": "interface/alarm/alarm_phase.xml"
}

{
	"genericName": "City Phase",
	"specificName": {
		"hele": "Megalopolis",
		"mace": "Megalopolis",
		"spart": "Megalopolis",
		"athen": "Megalopolis",
		"epir": "Megalopolis",
		"theb": "Megalopolis"
	},
	"supersedes": "phase_town",
	"description": "Advances from a bustling town to a veritable metropolis, full of the wonders of modern technology.",
	"cost": {"food": 0, "wood": 0, "stone": 1000, "metal": 1000},
	"requirements": {"all": [{"entity": {"class": "NotField", "number": 15 }}, {"notciv": "athen"}, {"notciv": "imp"}]},
	"requirementsTooltip": "Requires 15 total Buildings (except Walls and Fields).",
	"icon": "city_phase.png",
	"researchTime": 30,
	"tooltip": "Advance to City Phase, which unlocks more structures and units. Territory radius for Civic Centers and vision range for units increased by another +25%.",
	"modifications": [
		{"value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "Citizen"}
	],
	"soundComplete": "interface/alarm/alarm_phase.xml"
}

{
	"genericName": "City Phase",
	"specificName": {
		"hele": "Megalopolis",
		"mace": "Megalopolis",
		"spart": "Megalopolis",
		"athen": "Megalopolis"
	},
	"supersedes": "phase_town_athen",
	"replaces": ["phase_city"],
	"description": "Advances from a bustling town to a veritable metropolis, full of the wonders of modern technology. This is the Athenian city phase, where metal gathering rates are boosted because of the Silver Owls bonus.",
	"cost": {"food": 0, "wood": 0, "stone": 1000, "metal": 1000},
	"requirements": {"all": [{"entity": {"class": "NotField", "number": 15 }}, {"civ": "athen"}]},
	"requirementsTooltip": "Requires 15 total Buildings (except Walls and Fields).",
	"icon": "city_phase.png",
	"researchTime": 30,
	"tooltip": "Advance to City Phase, which unlocks more structures and units. Territory radius for Civic Centers and vision range for units increased by another +25%. 'Silver Owls' bonus gives +10% metal gathering rates.",
	"modifications": [
		{"value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "Citizen"},
		{"value": "ResourceGatherer/Rates/metal.ore", "multiply": 1.1, "affects": "Gatherer"}
	],
	"soundComplete": "interface/alarm/alarm_phase.xml"
}

{
	"genericName": "City Phase",
	"supersedes": "phase_town_roma",
	"replaces": ["phase_city"],
	"description": "Advances from a bustling town to a veritable metropolis, full of the wonders of modern technology.",
	"cost": {"food": 0, "wood": 0, "stone": 0, "metal": 0},
	"requirements": {"all": [{"entity": {"class": "Arch", "number": 1 }}, {"civ": "imp"}]},
	"requirementsTooltip": "Requires 1 Triumphal Arch to be built.",
	"icon": "city_phase.png",
	"researchTime": 0,
	"tooltip": "Advance to City Phase, which unlocks more structures and units. Territory radius for Civic Centers and vision range for Citizen and Legionairy units increased by another +25%.",
	"modifications": [
		{"value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "Citizen"}
	],
	"soundComplete": "interface/alarm/alarm_phase.xml"
}

{
	"genericName": "Tantric Fertility Festival",
	"description": "A festival attended by women-only, to celebrate female fertility.",
	"cost": {"food": 100, "wood": 0, "stone": 0, "glory": 100},
	"requirements": {"all": [
		{"entity": {"class": "Female", "number": 10}},
		{"tech": "phase_village"},
		{"civ": "maur"}
	]},
	"requirementsTooltip": "Requires 10 or more Women to be alive.",
	"icon": "hindu_kali.png",
	"researchTime": 60,
	"tooltip": "Unlock the ability to train women from houses.",
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

 

 

 

 

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

Oh in your tech requirements, use 'phase_town' instead of 'phase_town_roma' as it's replaced (same for all such things).

Be also carefull with things like "phase_town_expansionism" and "bottom": "phase_town_defensive"

It seems that one is problematic?

{
    "genericName": "Empire Phase",
    "specificName": {
        "imp": "Imperium Romanum"
    },
    "description": "Moves your civilization from urbanism to imperialism, unlocking powerful technologies and abilities not available in earlier phases of expansion.",
    "cost": {"food": 0, "wood": 0, "stone": 0, "metal": 0},
    "requirements": {"all": [{"class": "Wonder", "number": 1 }, {"civ": "imp"}]},
    "requirementsTooltip": "Requires 1 Wonder to be built.",
    "supersedes": "phase_city_roma",
    "replaces": ["phase_imperial"],
    "icon": "imperial_phase.png",
    "researchTime": 0,
    "tooltip": "Advance to Empire Phase, which unlocks powerful technologies and abilities. Territory radius for Civic Centers increased by a final +50% (Imperium Romanum civ bonus) and vision range for Citizen and Legionary units increased by a final +25%.",
    "modifications": [
        {"value": "TerritoryInfluence/Radius", "multiply": 1.50, "affects": "CivCentre"},
        {"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
        {"value": "Vision/Range", "multiply": 1.25, "affects": "Unit"}
    ],
    "soundComplete": "interface/alarm/alarm_phase.xml"
}

 

Link to comment
Share on other sites

Okay, been looking into this. The below is based on the code currently on the HEAD of the master branch of your GitHub repo. I've assumed you've modified all the relevant requirements' to take into account the modified entity requirement. I've also only looked at the structree (for now).

Anyhow:

  • The biggest problem is that your repo's copy of the globalscripts/Templates.js file is out of date. Don't remove it, instead replace with a copy from 0AD core, as...
  • In your new copy, replace line 370 with
    ret.cost[type] = template.cost && template.cost[type] ? +template.cost[type] : 0;

    so as to prevent errors about your glory resource not being mentioned in your techs' cost requirement

Other problems that cause errors:

  • The `athen_champion_marine` unit requires a technology (`mercenaries/athen_reforms`) that can only be researched by the `merc_camp_egyptian` structure, which cannot be built by any Athenian unit. The structree doesn't like this.
  • The mauryan (indian) shipyard (not dock) has the ability to research the `celts/health_warship_oceanic_transports` tech. Or, it would, except that this tech requires the `celt/unlock_warships` tech which cannot be researched at or by any entity trainable/buildable by the Indians. Again, the structree doesn't like this.

There are a couple of things that you do, that core doesn't, namely:

  • Instead of putting requirements of a pair tech in the `pair_{foo}.json` file of that pair, you put them inside the techs of that pair, which is a little repetitive.
  • You've added the production component to every unit, causing the structree to think that every unit can either train a unit or research a technology.

Right. Now to have look around in-game.

Edit: After playing around a bit in-game, yeah it seems like it was most likely the out-of-date globalscript file as I didn't get any error messages. That said, the structree makes a few assumptions it shouldn't, so ticket.

Edited by s0600204
Add futher comment
  • Like 2
Link to comment
Share on other sites

3 hours ago, s0600204 said:

The biggest problem is that your repo's copy of the globalscripts/Templates.js file is out of date. Don't remove it, instead replace with a copy from 0AD core, as...

 

Why would a balancing (and art, and maps) mod need to ship that, or components for that matter? Then again I'm not sure why it claims to have no dependencies, when it quite obviously depends on public.

Link to comment
Share on other sites

@leper

Dependency = oversight

Components = My mod has a new resource among other things so don't fit into your preconceived categories.

 

@s0600204

Thnk you for looking into it. Some things are bugs (prod queue) and some things are intended (like Athenian marine tech in merc camp). I can't try it now but soon I will try your fix and report back.

Link to comment
Share on other sites

@s0600204

 

Your fix works for the game. :)

 

Acouple thing:

Quote

Instead of putting requirements of a pair tech in the `pair_{foo}.json` file of that pair, you put them inside the techs of that pair, which is a little repetitive.

I have a pair of tech that are paired, but are available in different phase. This is just a experiment, really. That's why I only put the requirement in the tech themselves and not the pair, plus the original techs I got from the gasme before I built my current tech tree just had the reqs in the techs -- there were not pairs in public game except the Seleucid reform pair. I am willing to not experiment with this if it screws things up, and it does seem to screw up the structtree, it shows nothing. ;)

 

Quote

You've added the production component to every unit, causing the structree to think that every unit can either train a unit or research a technology.

It was a quick hack at some point to solve something I can't even remember now. lol. I can change that if necessary I think.

 

Quote

The `athen_champion_marine` unit requires a technology (`mercenaries/athen_reforms`) that can only be researched by the `merc_camp_egyptian` structure, which cannot be built by any Athenian unit. The structree doesn't like this.

This isn't going to change. I want cool techs to show up in the merc camps, and one of them for the Athenians is the Iphicratean Reforms tech that unlocks the marines from the Athenian shipyard. Some things I am willing to live with annoying error codes.

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

11 hours ago, wowgetoffyourcellphone said:

Your fix works for the game. :)

Yay!

Quote

This isn't going to change. I want cool techs to show up in the merc camps, [...]

Okay, fair enough. If I may suggest then that you make that clear in the description of the unit in question, as otherwise players might wonder - if they've built everything they can build during the space of a game but never captured a merc camp - where the "Iphicratean Reforms" tech is.

While I'm on the subject of clearly marking technology requirements in the gui, are you aware of ticket #3670? I mention it because after playing a little of your mod, I think it may impact you to a greater extent than it would core 0ad, and I'd like to get it right.

Anyhow, back on topic (slightly), although the structree can be coded to work around every unit having a ProductionQueue component (but no actual entities listed within), I would think that there'd be a (admittedly tiny) performance hit in-game from such an approach. YMMV.

  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...

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