Hi Androrc, Hi everyone,
Sorry if I have not replied earlier!
A few years ago, I did a lot of work on this. My files from that time are now gone, but I was then able to implement activating/deactivating professions through technology.
Great! That's what I've been wanting to implement
The technical issues that had to be solved were minor (the only technical issue that I didn't solve was the DefaultProfession one, which made soldiers appear at the docks with PROFESSION_COLONIST,
Oh! Rally that was the only technical issue? Actually I had more or less 4 or 5 issues (when I tried to adapt Kailric's inventor modcomp).
The soldier problem was one. But there were other problems especially with the
training units in a native village feature. However, from a technical point of view this was related to the unlock/lock
units feature and not the unlock/lock
profession part.
but that too can be solved easily by making DefaultProfession an array, and have the game use the first available profession of the array when creating the unit as the unit's default profession). I'm not entirely sure about performance issues, but I don't recall seeing a significant effect.
Wow! I'm quite impressed!
I never even thought of that...
All this time I've been thinking things the wrong way... I've trind figuring a way to set new default professions during time, but my solution didn't seem interesting after all...
You're solution is brilliant. I must check, but I don't see any problem from a technical point of view...
If we simply put a profession that is never unlocked (e.g. PROFESSION_COLONIST) we will never have a CTD from the specific function "change profession"...
That's your trick. Well done !
So, I don't think the technical issues are that problematic. The more important issues with such a feature I'd say are:
1) Design - design-wise, do we want to have professions unlocked by technology? I think it is a good idea, but if many team members think it is a bad idea for design reasons, then we shouldn't do it.
2) Effort - although the effort to make that professions unlocked by technology work properly wouldn't be extreme, it would still be considerable (because there are only a few technical issues to solve in this regard, but they do exist, IIRC). Is the effort worth it?
3) Graphics - it is unlikely that we can find graphics for these professions for all civilizations. There is also the further problem that we need both normal and veteran graphics for European civilizations. This would probably be surmountable if we didn't use specific graphics for every civilization, but although that wouldn't be a big deal for me, I understand that others may want to maintain the standard of every unit graphic being civilization-specific.
I agree! In my opinion this would be quite interesting, and would add some fun. This isn't easy, but it is worth it...
For now not all members were OK with it (If I'm correct, you Androrc, Orlanth and me ar rather in favor, however Ray and Schmiddie don't seem to like it or are reluctant). Let's wait and see.
At least we've found a way to do it logically
Seriously, let us forget about the professions.
You don't imagine in how many problems we could run. This could cause us CTD after CTD !
(AI logic, default professions, special cases where no profession available, ...)
Sorry. We do not need to decide not. This feature might never be part of our mod, this isn't the issue in my opinion. However, I think Andorc has found a solution to many problems.
I may be wrong but I don't see any AI logic problem anymore. In my idea, with military units (and this feature is
strongly related to military units), we would still have few profession available, and new professions would be stronger than old ones, so AI would automatically change to new ones (we could even try to convert all existing units to the new profession
).
And last but not least the cas were no profession is available would be avoided by systematically adding PROFESSION_COLONIST in the default profession array...
Anyway, whatever we do, I must say your solution Androrc from a technical point of view is great. I'm quite ashamed I never thought about it