Changing the Prerequisite for Rifling

Graceheart the Leopard

Resident Amur leopard
Joined
Sep 24, 2007
Messages
3,476
For some reason, I'm incapable of changing Rifling's prerequisite to Military Tradition without getting this weird error:

MSF6Paq.jpg


There's also no interface and the unit art from VD doesn't work. How can I fix this?
 
What is the "unit art from VD"?

Anyway, the problem comes from a unit linked to a Tech.

With Python errors, usually the last line is revealing the source of the problem.

Look for the code yourself in the file CvTechChooser.py in the Python/Screens folder of RevDCM. It starts at "def addIconsToTechPanel", section "# Unlockable units...". It might give you a clue why it can't display it properly.

After that Python error, probably the rest of Python is not loaded => no interface, etc.
 
What is the "unit art from VD"?

Anyway, the problem comes from a unit linked to a Tech.

With Python errors, usually the last line is revealing the source of the problem.

Look for the code yourself in the file CvTechChooser.py in the Python/Screens folder of RevDCM. It starts at "def addIconsToTechPanel", section "# Unlockable units...". It might give you a clue why it can't display it properly.

After that Python error, probably the rest of Python is not loaded => no interface, etc.

Here's the code:

Code:
					screen.addDDSGFCAt( szUnitButton, szTechRecord, gc.getPlayer(gc.getGame().getActivePlayer()).getUnitButton(eLoopUnit), iX + fX, iY + Y_ROW, TEXTURE_SIZE, TEXTURE_SIZE, WidgetTypes.WIDGET_PEDIA_JUMP_TO_UNIT, eLoopUnit, 1, True )
					fX += X_INCREMENT

I don't know what this has to do with anything. :dunno: Also, this now seems to pop up whenever I try and play a game. :sad:
 
Still: What is the "unit art from VD"?

Think of the Techs for which you have changed the Prereq tag. There is a Unit "unlocked" by that/these Tech(s) that cannot be displayed in the box of the Tech (in other words a Unit that has that Tech as a Prereq). At least that's what it seems to me.

Did you also add a new Unit?
 
True that the code looks for "if (gc.getUnitInfo(eLoopUnit).getPrereqAndTech() == i):"...
 
Still: What is the "unit art from VD"?

Varietas Delectat, a mod that adds different Unit Art styles for every civ. It's modular, and until I got this error I got it to work.

Think of the Techs for which you have changed the Prereq tag. There is a Unit "unlocked" by that/these Tech(s) that cannot be displayed in the box of the Tech (in other words a Unit that has that Tech as a Prereq). At least that's what it seems to me.

There's the Rifleman, as well as Redcoats, Cavalry, Cossacks, Marines, Navy SEALS, and Mechanised Infantry. I moved Tanks to requiring Combustion and Artillery, which I renamed Ballistics.

Did you also add a new Unit?

No.
 
Varietas Delectat is probably using Python which is not loaded properly due to that error.

I don't know, post your TechInfos and UnitInfos file. Maybe a loop in the Techs prereq or too many prereqs according to GlobalDefines...
 
Varietas Delectat is probably using Python which is not loaded properly due to that error.

It's not. However, I have a feeling that the Python error is screwing with the WOC module system (the mod is based on Evolution).

I don't know, post your TechInfos and UnitInfos file. Maybe a loop in the Techs prereq or too many prereqs according to GlobalDefines...

Here:
 

Attachments

Hey! I just replaced the Tech Chooser file and it's all back to normal! :goodjob:
 
Hey! I just replaced the Tech Chooser file and it's all back to normal! :goodjob:

I'm glad to hear that! :)

It beats me but, oh well, as long as it works...
:scan:
By the way, you do know that your Maya Holkan has a "iDCMBombAccuracy" of 25, right?
 
Actually, I discovered that Is till get the error, but frequently copying the file just stops it temporarily. :( Is there any way to stop this error permanently?

Also, the Holkan thing was intentional.
 
did you try ? : (techinfos -> rifling)

Code:
			<OrPreReqs>
				<PrereqTech>TECH_MILITARY_TRADITION</PrereqTech>
			</OrPreReqs>
			<AndPreReqs>
				<PrereqTech>TECH_GUNPOWDER</PrereqTech>
			</AndPreReqs>

to

Code:
			<OrPreReqs/>
			<AndPreReqs>
				<PrereqTech>TECH_GUNPOWDER</PrereqTech>
				<PrereqTech>TECH_MILITARY_TRADITION</PrereqTech>
			</AndPreReqs>
 
It only stops it about half the time. :(
 
I played with your 2 files more than 100 turns in RevDCM without a problem. The Tech Tree was fine. No Python error.

However, I had to make the following adjustments to your files to make them work with standard RevDCM:

Techs/units: deleted all Afforess/Stolenrays tags.

Units only: deleted tag bDCMAirBomb6 (I guess it's an addition because it's not in the RevDCM Schema file)

Replaced Art Def ARABIAN_GHAZI by standard Camel Archer (because I don't have the art)

Deleted Unit Atomic for same reason

Changed back UNITAI_GREAT_SPY to UNITAI_MERCHANT (from K-Mod)

So, either the culprit is in these above changes (which I doubt) or another file is the problem or there is something wrong with the configuration of your mod which makes it unstable.

In the end, I tried to replace the TechChooser.py file with the one from BtS. I had to go through like 30 Python errors about the file but it worked. I wanted to tell you to try your game like that but of course the errors are annoying in the loading phase. Just as a test maybe...

Edit: can you zip your CIV4UnitClassInfos.xml file perhaps (unless the UNITCLASS_ATOMIC is the only addition/modification of importance)?

Edit2: you don't have things in your "My Documents" folder or something that could interfere with the loading process?
 
Saw that you were playing Evolution so Test 2:

Same result, played 100 turns without problems, Tech Tree fine, no Python error.

Note: just had to make 2 changes to Units file:

Replaced Art Def ARABIAN_GHAZI by standard Camel Archer (because I don't have the art)

Deleted Unit Atomic for same reason.
 
Saw that you were playing Evolution so Test 2:

Same result, played 100 turns without problems, Tech Tree fine, no Python error.

Note: just had to make 2 changes to Units file:

Replaced Art Def ARABIAN_GHAZI by standard Camel Archer (because I don't have the art)

Deleted Unit Atomic for same reason.

Whenever I try and play the mod multiple times without loading, the error happens. I think this may be because of something else. Mind if I actually upload the mod?
 
OK, I might have time to look at it over the weekend.
 
Back
Top Bottom