[2025-03-29 11:42:01] JS Error: fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:143: TypeError: Cannot read properties of undefined (reading 'x')
While executing JS fs://game/core/ui/context-manager/context-manager.js:165:38
[2025-03-29 11:42:01] JS Error (Line): line.setAttribute("x2", `${buttonPositions[j].x}`);
While executing JS fs://game/core/ui/context-manager/context-manager.js:165:38
[2025-03-29 11:42:01] JS Error (Stack): TypeError: Cannot read properties of undefined (reading 'x')
at GlobalRelationsPanel.setupLines (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:143:67)
at GlobalRelationsPanel.updatePolygonLayout (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:443:14)
at GlobalRelationsPanel.initializePolygonLayout (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:430:14)
at GlobalRelationsPanel.onAttach (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:90:14)
at c.doAttach (fs://game/core/ui/component-support.js:257:15)
at c.initialize (fs://game/core/ui/component-support.js:243:22)
at connectedCallback (fs://game/core/ui/component-support.js:292:22)
at ContextManagerSingleton.push (fs://game/core/ui/context-manager/context-manager.js:165:38)
at GlobalRelations_PanelSubsystemDock
Huh, odd. Maybe that recent update did something, will debug and get a fix upHi, I have issues with this mod.
- First one is a small localization issue
- The more annoying is I cannot see other civs' relationships : nothing happens when I mouseover them.
View attachment 727412
UI.log:
Code:[2025-03-29 11:42:01] JS Error: fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:143: TypeError: Cannot read properties of undefined (reading 'x') While executing JS fs://game/core/ui/context-manager/context-manager.js:165:38 [2025-03-29 11:42:01] JS Error (Line): line.setAttribute("x2", `${buttonPositions[j].x}`); While executing JS fs://game/core/ui/context-manager/context-manager.js:165:38 [2025-03-29 11:42:01] JS Error (Stack): TypeError: Cannot read properties of undefined (reading 'x') at GlobalRelationsPanel.setupLines (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:143:67) at GlobalRelationsPanel.updatePolygonLayout (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:443:14) at GlobalRelationsPanel.initializePolygonLayout (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:430:14) at GlobalRelationsPanel.onAttach (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:90:14) at c.doAttach (fs://game/core/ui/component-support.js:257:15) at c.initialize (fs://game/core/ui/component-support.js:243:22) at connectedCallback (fs://game/core/ui/component-support.js:292:22) at ContextManagerSingleton.push (fs://game/core/ui/context-manager/context-manager.js:165:38) at GlobalRelations_PanelSubsystemDock
Thanks
for (let i = 0; i < this.player_diplo.length; i++) {
[...]
buttonPositions[playerFromRibbon.id] = {x: xPercent, y: yPercent};
for (const i of Players.getAliveIds()) {
const first_player = Players.get(i);
if (!first_player.isMajor) {continue}
const playerDiplomacy = first_player.Diplomacy;
for (const j of Players.getAliveIds()) {
if (i===j) {continue}
const second_player = Players.get(j);
const backupDiplomacy = second_player.Diplomacy;
const relationshipType = playerDiplomacy.getRelationshipEnum(j)
if (!second_player.isMajor) {continue}
if (playerDiplomacy.hasMet(j) || backupDiplomacy.hasMet(i)) {
const line = document.createElementNS("http://www.w3.org/2000/svg", "line");
line.setAttribute("x1", `${buttonPositions[i].x}%`);
line.setAttribute("y1", `${buttonPositions[i].y}%`);
line.setAttribute("x2", `${buttonPositions[j].x}%`);
line.setAttribute("y2", `${buttonPositions[j].y}%`);
line.setAttribute("x2", `${buttonPositions[j].x}%`);
Hi, I have issues with this mod.
- First one is a small localization issue
- The more annoying is I cannot see other civs' relationships : nothing happens when I mouseover them.
View attachment 727412
UI.log:
Code:[2025-03-29 11:42:01] JS Error: fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:143: TypeError: Cannot read properties of undefined (reading 'x') While executing JS fs://game/core/ui/context-manager/context-manager.js:165:38 [2025-03-29 11:42:01] JS Error (Line): line.setAttribute("x2", `${buttonPositions[j].x}`); While executing JS fs://game/core/ui/context-manager/context-manager.js:165:38 [2025-03-29 11:42:01] JS Error (Stack): TypeError: Cannot read properties of undefined (reading 'x') at GlobalRelationsPanel.setupLines (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:143:67) at GlobalRelationsPanel.updatePolygonLayout (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:443:14) at GlobalRelationsPanel.initializePolygonLayout (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:430:14) at GlobalRelationsPanel.onAttach (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:90:14) at c.doAttach (fs://game/core/ui/component-support.js:257:15) at c.initialize (fs://game/core/ui/component-support.js:243:22) at connectedCallback (fs://game/core/ui/component-support.js:292:22) at ContextManagerSingleton.push (fs://game/core/ui/context-manager/context-manager.js:165:38) at GlobalRelations_PanelSubsystemDock
Thanks
Try my localization translations.Hello, I’ve prepared 12-language translations for your mod. If possible, please integrate them into your future updates.
FYI Now that I met more civs, more lines are drawnI have 13 players, but only 8 are displayed in the ribbon, could it be the issue?
[2025-03-29 14:29:53] JS Error (Stack): TypeError: Cannot read properties of undefined (reading 'x')
at GlobalRelationsPanel.setupLines (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:146:67)
at GlobalRelationsPanel.updatePolygonLayout (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:446:14)
at GlobalRelationsPanel.initializePolygonLayout (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:433:14)
at GlobalRelationsPanel.onAttach (fs://game/sloth-global-relations-panel/ui/global-relations-panel/global-relations-panel.js:90:14)
at c.doAttach (fs://game/core/ui/component-support.js:257:15)
at c.initialize (fs://game/core/ui/component-support.js:243:22)
at connectedCallback (fs://game/core/ui/component-support.js:292:22)
at ContextManagerSingleton.push (fs://game/core/ui/context-manager/context-manager.js:165:38)
at GlobalRelations_PanelSubsystemDock
Fixes the nasty bug that prevented line hovers and the strategics not working.
adds localisation for all 12 civ supported languages, provided by@v480615 , many thanks.
Yeah I’m aware of this. Part of the reason I kept it different than the original diplo banner is that the heads go above the hex frame, which obscures the connecting lines or strategics.Hi @Smayo
Thank you for the great mod.
Wanted to ask regarding one observation of leader icon placement.
Seems like on vanilla icons leader heads "appearing" inside hex frame (on load-save screen and diplo).
Spoiler vanilla :
In the mod they seem to be in front of the hex-frame.
Is this a planned design approach for the mod?
Spoiler mod :
Odd thing is, when I first got this months ago, it worked fine.Still worked fine for me on 1.3.1, haven't tested 1.3.2.I and 2 of my friends got this mod. It never works for any of us (solo or MP). All our other mods work fine, but when we click on this one, the entire game locks up so bad that only CTRL/Alt/Del and using the task manager will get us out of it.Odd thing is, when I first got this months ago, it worked fine.
That's crazy. It works for me in 1.3.2 as well.We all 3 uninstalled and reinstalled. Still does not work for any of us. Tried via solo and MP.
Update to deal with Firaxis changed imports. Also includes a small patch by truncated, who wanted an option to show or hide different relationships.
now up to parity with workshop
I suspect MutiliationWave was using the Workshop version. The CFC one was wildly out of date, as Firaxis made a patch to mess up imports. But that sort of thing is very rare. So I don't imagine this will need any updates anytime soon. But hopefully fixed nowI and 2 of my friends got this mod. It never works for any of us (solo or MP). All our other mods work fine, but when we click on this one, the entire game locks up so bad that only CTRL/Alt/Del and using the task manager will get us out of it.Odd thing is, when I first got this months ago, it worked fine.
You called it. I thought they were the same.I suspect MutiliationWave was using the Workshop version. The CFC one was wildly out of date, as Firaxis made a patch to mess up imports. But that sort of thing is very rare. So I don't imagine this will need any updates anytime soon. But hopefully fixed now