FanaticModder Posted December 16, 2022 Share Posted December 16, 2022 (edited) For example, if you do the Union Quest to reform Italy, you do not get access to the Pavise Crossbowmen that are defined for Italy in kingdoms.csv. The bug is in the method Kingdom.ChangeNameAndCulture Although the csv_field is properly assigned the value of the new Kingdom, the parameter unitsSetCSVKey still holds the value from the old kingdom. Then the method LoadFromCSV is called with this old unitsSetCSVKey value rather than csv_field.key, resulting in no change to the units at all. Edited December 16, 2022 by FanaticModder Quote Link to comment Share on other sites More sharing options...
FanaticModder Posted December 16, 2022 Author Share Posted December 16, 2022 Well, that's at least part of the issue. The new special units still don't show up in the recruitment window, but at least the Kingdom's unit_types list is now updated properly. Quote Link to comment Share on other sites More sharing options...
FanaticModder Posted December 16, 2022 Author Share Posted December 16, 2022 After my proposed change, the new special units DO show up on reloading the game. So in addition to the change in the OP, I suspect that UpdateUnitSets also needs to be called for every Realm of the Kingdom in question. That should solve it all! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.