Unit Replacements

Ajidica

High Quality Person
Joined
Nov 29, 2006
Messages
22,204
I am trying to create a new unit to replace horse archers for European Civs. It is showing up in pedia fine, except the name is TXT_KEY_UNIT_PUERI. I dont know how to fix this. i am also going to be replacing vassals for the other civs. any ideas for names? I also need stats for both. If you want the list on how i divvied the units up, i will post them. Any comments or questions?
 
When i added an entry almost all units went to TXT_KEY names and loading said there was something wrong with the encoding. whatever that means.

It says the source for the failure is:
<?xml version= "1.0" encoding= "UTF-8"?>
i have no clue what it means. even when i deleted the pueri section it still doest work.
All units whoes names are added appear as TXT_KEY, i dont have any spelling mistakes in the file, and it says it is redirected to civics_religion file. HELP!!
 
Could someone when they look at the bad xml file please add an entery for Feudal Horse? I can add the rest of the stuff.
All names except ones from core game, structures, tech names, pedia entries, and leader names appear as TXT_KEY..... Can someone please help? The game works fine.
 
nope. its all in english.
I replaced the modified medievaltextinfos.xml file with an un modded one. now everything is fine and only pueri is TXT_KEY. i dont want to go into that xml file again, so could someone be as kind to post a modified xml file with Pueri (European Horsearcher) and Noble Cavalry ( Eastern Vassals). if they could, i would be most grateful.
 
I got every thing fixed except for the TXT_KEY problem for pueri and noble cavalry. to restrict certiant units the only xml file i have to edit it civilizationinfos.xml?
When i try to edit the civilizatoninfos file to dissalow certiant units with this for dissalow:
<UnitClassType>UNITCLASS_PUERI</UnitClassType>
<UnitType>NONE</UnitType>
And to allow the opposite way. i coppied it from how you dissalow cogs/medieval galleys and longships/lateen galley. When i load it up, i get the wonder error message saying that encoding for civinfos is bad and is using unitinfos to load. so of course i get no civs to choose from because the file theyre using is dissalowed by encoding. Unless i get some help here, it looks like this project is off.
 
Pueri is french for light cavalry if my book is corect. and most european civs that get it acknowledged frankish dominion. You had to know something about the encoding crap when you added your religios unit for .65.
 
I got every thing fixed except for the TXT_KEY problem for pueri and noble cavalry. to restrict certiant units the only xml file i have to edit it civilizationinfos.xml?
When i try to edit the civilizatoninfos file to dissalow certiant units with this for dissalow:
<UnitClassType>UNITCLASS_PUERI</UnitClassType>
<UnitType>NONE</UnitType>
And to allow the opposite way. i coppied it from how you dissalow cogs/medieval galleys and longships/lateen galley. When i load it up, i get the wonder error message saying that encoding for civinfos is bad and is using unitinfos to load. so of course i get no civs to choose from because the file theyre using is dissalowed by encoding. Unless i get some help here, it looks like this project is off.

Yes, you will need the CivilizationInfos in order to decide which civilizations can use the units.
 
I looked at the file...I can't see what could have been done incorrectly in such a short inserted text. It looks like any of the others.

Truly, I'm not that familiar with the xml... especially regarding graphics. I did my units simply by copying existing units (swordsman, crusader and horse archer), and duplicating the entries in every file I could find where they came up... making certain to rename everything to the new units in the process.

Anyhow, the file you uploaded appears to be ok.

Which files did you alter... did you create Unitclass_Pueri in the unitclassinfos file? Did it work ok before you began disallowing it? If you upload all the files you altered, perhaps I could trace the entries to see if anything was missed.
 
Everything works fine, including graphics. my two problems are that i cant get the names to quit being TXT_KEY_(name) and when i try to dissalow them in civilizationinfos, i get an encoding error when loading the game and all civs dissapear.i dont think i have any spelling errors because it says the location of the error in both sources is 1,1. or the encoding line. i have never had this problem in any other source.
 
to clarify things, when i modify the medievaltextinfos.xml file it uses civicreligion.xml file instead and when i modify the civilizationinfos file it uses unitinfos instead. and for both arrors it says the source of the error is the exact same place, the encoding line. has this ever happened to you before?
 
I fixed the TXT_KEY problem by in description putting the normal names there and not having a description entry. so now i dont think it will work in different languages though.
 
That's weird. Has never happened when I did modifications like that.

Try disallowing another unit for a civ, for example, knight, just to see what happens... if you get no error, then something is definetly strange with the pueri.

Perhaps it has something to do with Pueri being a replacement unit. How did you set that up? Is it set as a replacement for horse archer, or is it a seperate unit, with horse archer being disallowed for civs that have it. Or are you treating it as a UU. For the whole Cog/etc. the units, I believe, are not set up as UUs but simply disallowed. Maybe you need to have an entry disallowing horse archer at the same time you allow Peuri. This all depends how you've set up the unit.

I don't know how UUs work or how to create one, but I suspect that the units shouldn't be set up as UUs but as ordinary units, then disallowed and allowed in the civinfos file. If they are UUs, then disallowing horse archer while allowing a UU, Pueri, may screw things up.

However, I'm just guessing.
 
it is its own unit, its not just a horse archer replacement. Right now i have it as dissalow horse archers, dissalow noble cavalry (eastern vassal). ill wait until headsef says something because i dont think it is any spelling or other error because it says something is up with the encoding. if you can tell me how to take a screenshot, ill try and get it. ill try your knight idea, but im gone tomorrow so i cant let you know untill monday at earliest.
 
Top Bottom