Yes the 5 is the code for worker. If you look in the Civ4UnitInfos.xml file: Lion is the first entry -- its code is 0
Worker is the 6th entry so its code is 5. There is a function that will get the code for you if you put in the name, but it's a lot of typing, so I looked it up in the PythonAPI.
I don't have a link for it, but all the codes for unit,building,route,etc. types are in the PythonAPI file I got from somewhere. Search for PythonAPI and you can probably find it. I would attach it but it is slightly too big.
Worker is the 6th entry so its code is 5. There is a function that will get the code for you if you put in the name, but it's a lot of typing, so I looked it up in the PythonAPI.
I don't have a link for it, but all the codes for unit,building,route,etc. types are in the PythonAPI file I got from somewhere. Search for PythonAPI and you can probably find it. I would attach it but it is slightly too big.
Comment