Jump to content

DE Alpha 24


wowgetoffyourcellphone
 Share

Recommended Posts

  • 3 weeks later...
  Quote

ERROR: JavaScript error: gui/session/selection_panels.js line 722 TypeError: reqs is not iterable g_SelectionPanels.Research.setupButton@gui/session/selection_panels.js:722:14 setupUnitPanel@gui/session/unit_commands.js:95:8 updateUnitCommands@gui/session/unit_commands.js:147:4 updateSelectionDetails@gui/session/selection_details.js:471:2 updateGUIObjects@gui/session/session.js:933:2 onTick@gui/session/session.js:803:3 __eventhandler0 (tick)@session tick:0:1

ERROR: JavaScript error: gui/session/selection_panels.js line 722 TypeError: reqs is not iterable g_SelectionPanels.Research.setupButton@gui/session/selection_panels.js:722:14 setupUnitPanel@gui/session/unit_commands.js:95:8 updateUnitCommands@gui/session/unit_commands.js:147:4 updateSelectionDetails@gui/session/selection_details.js:471:2 updateGUIObjects@gui/session/session.js:933:2 onSimulationUpdate@gui/session/session.js:864:2 __eventhandler2 (simulationupdate)@session simulationupdate:0:1

Expand  

I have narrowed it down to these techs for the Imperial Romans (because if I delete pair_city_cohorts from the production queue there is no error). Any ideas?

 

romans_imperial/pair_city_cohorts:

{
	"genericName": "Urban Cohorts vs. City Watch Corps",
	"top": "romans_imperial/unlock_urban_cohort",
	"bottom": "romans_imperial/health_regen_structures"
}

 

 

romans_imperial/unlock_urban_cohort:

{
	"pair": "romans_imperial/pair_city_cohorts",
	"genericName": "Urban Cohorts",
	"specificName": {
		"imp": "Cohortes Urbanae"
	},
	"description": "The cohortes urbanae (Latin, meaning urban cohorts) of ancient Rome were created by Augustus to counterbalance the enormous power of the Praetorian Guard in the city of Rome and serve as a police force. They were led by the urban prefect.",
	"cost": {
		"food": 300,
		"glory": 300
	},
	"requirements": {
		"all": [{
			"tech": "phase_city"
		}, {
			"civ": "imp"
		}]
	},
	"requirementsTooltip": "Unlocked in City Phase.",
	"icon": "armor_cuirass_empire.png",
	"researchTime": 30,
	"tooltip": "Unlock the ability to train Roman Legionaries at the Civic Center.",
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

 

 

romans_imperial/health_regen_structures:

{
	"pair": "romans_imperial/pair_city_cohorts",
	"genericName": "City Watch Corps",
	"specificName": {
		"imp": "Cohortes Vigilum"
	},
	"description": "The Cohortes Vigilum were the night watchmen, fire fighters, and police force in ancient Rome and in other large Roman cities.",
	"cost": {
		"food": 300,
		"wood": 200
	},
	"requirements": {
		"all": [{
			"tech": "phase_city"
		}, {
			"civ": "imp"
		}]
	},
	"requirementsTooltip": "Unlocked in City Phase.",
	"icon": "sentries.png",
	"researchTime": 40,
	"tooltip": "Structures +1 health regeneration per second when damaged.",
	"modifications": [{
		"value": "Health/RegenRate",
		"add": 1
	}],
	"affects": ["Structure"],
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

 

 

 

Link to comment
Share on other sites

  On 11/08/2019 at 6:58 AM, wowgetoffyourcellphone said:

Any ideas?

Expand  

Does it happens in the version in your github repo?

edit: ok I checked the repo is up to date.

edit: Unrelated but I think you can remove the genericName entry in the pair tech.

edit: I will test it on Fork AD

edit: @wowgetoffyourcellphone I got it, your files are ok, you won't get the error if you play with imp.

Edited by fatherbushido
Link to comment
Share on other sites

  On 11/08/2019 at 6:46 PM, Basshunter said:

@wowgetoffyourcellphone Are Persian walls fixed in this version?

I got an error about missing texture every time I try to create walls with Persians in A23. Walls appear in player color with no texture applied.

 

Expand  

An screenshot because I haven't this problem. But I havent this in A24.

image.thumb.png.5dbb648ba1b543f60abe02ca9f817229.png

Edited by Lion.Kanzen
Link to comment
Share on other sites

  On 11/08/2019 at 6:46 PM, Basshunter said:

@wowgetoffyourcellphone Are Persian walls fixed in this version?

I got an error about missing texture every time I try to create walls with Persians in A23. Walls appear in player color with no texture applied.

 

Expand  

I never got that error, but yeah, A24 should be good. I would suggest that you also install the SVN version of the game, that way you can play the latest Delenda Est from here:

Github: Delenda Est

Link to comment
Share on other sites

  On 11/08/2019 at 3:56 PM, fatherbushido said:

edit: @wowgetoffyourcellphone I got it, your files are ok, you won't get the error if you play with imp.

Expand  

Right, the files are okay, but if I'm playing as another civ and I capture an IMP civic center, then I get that reqs iterative error. It's very very strange and I'm stumped.

Edited by wowgetoffyourcellphone
  • Like 1
Link to comment
Share on other sites

Untitled-1.thumb.jpg.eb9b0f00e1bd7481510bacb50c4f1431.jpg

  On 11/08/2019 at 7:03 PM, Lion.Kanzen said:
Expand  

I don't think it's an art issue, though it's possible they can have some non-art insight into things. It's definitely a tech/sim issue. So... @elexis @Freagarach

Edited by wowgetoffyourcellphone
  • Like 1
Link to comment
Share on other sites

  On 11/08/2019 at 6:59 PM, wowgetoffyourcellphone said:

Right, the files are okay, but if I'm playing as another civ and I capture an IMP civic center, then I get that reqs iterative error. It's very very strange and I'm stumped.

Expand  

What, you don't want to only do imperials vs imperials game? :-D

Edited by fatherbushido
  • Haha 1
Link to comment
Share on other sites

  On 11/08/2019 at 7:47 PM, fatherbushido said:

What, you don't want to only do imperials vs imperials game? :-D

Expand  

Well I figured out the issue. As a temp workaround you can probably add just the civ requirement in the pair tech (which is close to what nescio suggested above).

Edited by fatherbushido
  • Like 1
Link to comment
Share on other sites

  On 11/08/2019 at 10:42 PM, fatherbushido said:

I remember that we already discussed about that now.

So:

{
	"genericName": "Urban Cohorts vs. City Watch Corps",
	"top": "romans_imperial/unlock_urban_cohort",
	"bottom": "romans_imperial/health_regen_structures",
	"requirements": { "civ": "imp" }
}
Expand  

Sheezus, this was the problem. Thank you!

The error message was not very helpful. 

  • Like 1
Link to comment
Share on other sites

  On 11/08/2019 at 7:07 PM, wowgetoffyourcellphone said:
Expand  

Since (not only because) you pinged me, I checked.

The error can be reproduced by running with

-mod=public -mod=delenda_est -autostart="random/new_rms_test" -autostart-seed=-1 -autostart-players=2 -autostart-civ=1:brit -autostart-civ=2:imp -autostart-player=1

alt+d reveal map, select imp CC, "wololo" cheat.

It seems to be a classic, as it appeared in rP18653 also.

The error happens because GuiInterfaceCall("CheckTechnologyRequirements") says that requirements are not met (accurately, since the two pair techs have the civ requriement unmet), but then it wants to display template.reqs in the tooltip, expecting that to be an array.  But template.reqs = DeriveTechnologyRequirements(...) = InterpretTechRequirements(...) = false if the civ requirement.

So after a less superficial look the superficial solution (code.wildfiregames.com/D2171) still seems to be the right one, to add a "if (reqs)" just before the "for (let req of reqs)" in selection_panels.js.

This way if someone captures a structure that has a pair tech where the parent has no civ requirement but the child techs do, then it will show these buttons grayed out instead of erroring out (and without a "you need to change your civ to research this" tooltip). As suggested by fatherbushido, the civ requirement should also be added to the paired tech, so that the icon disappears completely to the capturing players of other civs.

Also I got some other errors in DE in case you are interested:

  Reveal hidden contents

 

  • Like 1
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...