Results 1 to 14 of 14

Thread: weird building level bug

  1. #1

    Default weird building level bug

    So in a modding I'm making I've added some new building trees, everything seems fine, I'm well under building trees limit (have only 81) and there aren't any errors in the log. What happens is this: if, in descr_strat, I add a building level above the base level it will show an wrong culture and the icon doesn't show up. In the building browser everything seems correct and the icon even shows up. If I upgrade in the game the culture is also correct, no problem. So apparently the issue is only if the building is added to the descr_strat and only if it's above the base level, if I add just the base level the culture is correct. All other buildings seems fine. When I had a similar thing happened was when I've gone above the building trees limit which is not the case. Any ideas on what could cause this? Thanks in advance.

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,123
    Blog Entries
    35

    Default Re: weird building level bug

    That is most likely related to the ownership of the settlement at the start of the game: buildings present at start are deemed to have been build by the owner. Unless I mix that up with the loyalty faction entry in descr_region (3rd line) - but it will be either of these reasons, a simple change in descr_regions to a faction with a different culture will confirm which one it is.










  3. #3
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: weird building level bug

    Your first answer I'd wager, Gigantus. e.g. If england is the region's faction_creator in descr_strat and england is not in the factions{} list of that building level then the building may not look or read as expected. The solution is to change that faction_creator or add the creator to the factions{} list or, if none of those suit, add a creator line to the building in descr_strat for a faction that is in the factions{} list...

    Code:
    	building
    	{
    		type elf_community elf_community
    		creator poland
    	}

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,123
    Blog Entries
    35

    Default Re: weird building level bug

    Thanks, I was wondering why 'creator' was bouncing around in my skull.










  5. #5

    Default Re: weird building level bug

    Forget about this, It's just all building levels besides the base one were restrict to cities and I added it to a castle -_-' As the mods I've made didn't had castles I completely forgot about that line, thanks for trying to help anyway

  6. #6

    Default Re: weird building level bug

    Well now I have a different issue related to this. The thing is now I've correct the lines for what I want but although the line for city is working (can't build the building in castles) the other way around doesn't work, the ones that should only be built in catles also show up in cities to build. I'm thinking this is maybe a bug related to the complex structure of this building tree.

    Level1 and level2 have no restrictions, but level2 has then 3 upgrade possibilities like for example in the government system of EBII. The possibilities are level 3, 4 and 5. Level3 has the "city" tag and works as intended but level4 and 5 have the "castle" tag however it's not working as they also appear in the city browser. Might it be that castle buildings get bugged if all other levels aren't set for castles only?

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,123
    Blog Entries
    35

    Default Re: weird building level bug

    It's a logic issue: each level requires the previous level to exist. Which means if a level 4 building that should only appear in castle has a level 3 city only building then it will obviously not happen.

    Your conclusion is therefore true: "Might it be that castle buildings get bugged if all other levels aren't set for castles only?"

    Edit: it should however work if there are no city\castle restrictions in the first three levels and castle restrictions from level four onward. That will enable the first three in castle and city and restrict the following levels to castle.
    Last edited by Gigantus; March 08, 2020 at 09:52 PM.










  8. #8

    Default Re: weird building level bug

    Well I was already thinking in adding hidden_resource to limit where the highest level buildings could be built so it will kinda fix this, but it would be good if we could have that option. I think it's just the engine is not prepared to have multiple choices in the building tree, it even seems confused when adding multiple choices and sometimes an error will be show in the log but is harmless apparently.

    Edit: on the other hand I'll also need to remove the conversion stuff to guarantee is a castle, although I was already thinking about this to keep things more historical.
    Last edited by MagusCaligula; March 09, 2020 at 08:07 AM.

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,123
    Blog Entries
    35

    Default Re: weird building level bug

    If you are not convinced that the EDB is a multi faced, multi limbed monster waiting to crash your mod then you should have a look at the EDB file of EBII. The govrome building tree is one of my all time favorites. It simply excels in the art of stupendous conditions, here is one for a unit's recruitment:
    Code:
    and hidden_resource celtic and hidden_resource gallic and not hidden_resource belgic and not hidden_resource eastcelt and not hidden_resource hr_river and hidden_resource hr_d or hidden_resource hr_j or hidden_resource teutonic_migration
    And how is this for upgrade choices? It effectively reduces a six level building tree to a base building with 5 upgrade choices for the final level 2 building.
    Code:
                upgrades
                {
                    civlib requires factions { f_rome, } and not hidden_resource italy
                    socit requires factions { f_rome, } and event_counter ecCamillanEra 1 or event_counter ecPolybianEra 1
                    provinc requires factions { f_rome, } and not hidden_resource italy
                    iuslat requires factions { f_rome, } and event_counter ecMarianEra 1
                    municip requires factions { f_rome, } and hidden_resource italy and hidden_resource hr_i    ;;; to allow reconstitute Rome anytime in case it is lost - always available here
                }










  10. #10

    Default Re: weird building level bug

    Quote Originally Posted by Gigantus View Post
    If you are not convinced that the EDB is a multi faced, multi limbed monster waiting to crash your mod then you should have a look at the EDB file of EBII. The govrome building tree is one of my all time favorites. It simply excels in the art of stupendous conditions, here is one for a unit's recruitment:
    Code:
    and hidden_resource celtic and hidden_resource gallic and not hidden_resource belgic and not hidden_resource eastcelt and not hidden_resource hr_river and hidden_resource hr_d or hidden_resource hr_j or hidden_resource teutonic_migration
    And how is this for upgrade choices? It effectively reduces a six level building tree to a base building with 5 upgrade choices for the final level 2 building.
    Code:
                upgrades
                {
                    civlib requires factions { f_rome, } and not hidden_resource italy
                    socit requires factions { f_rome, } and event_counter ecCamillanEra 1 or event_counter ecPolybianEra 1
                    provinc requires factions { f_rome, } and not hidden_resource italy
                    iuslat requires factions { f_rome, } and event_counter ecMarianEra 1
                    municip requires factions { f_rome, } and hidden_resource italy and hidden_resource hr_i    ;;; to allow reconstitute Rome anytime in case it is lost - always available here
                }
    Yeah but the problem is if you want to make the choices vary with city and castle restrictions as I'm trying. I think their building trees are either for cities or castles (camps), they don't have a tree with a mix of cities and castles.

  11. #11
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,123
    Blog Entries
    35

    Default Re: weird building level bug

    Well, you have a total of 128 building trees to play with - that should be enough to allow you to do castle\city options (with or without conversion option) like it is done in the default game.










  12. #12

    Default Re: weird building level bug

    Can someone kindly tell me what actually happens when you have more than 128 building chains in EDB? Is there a startup crash? If so, what is the nature of the crash? Error report with "max records exceeded..."?

  13. #13
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,123
    Blog Entries
    35

    Default Re: weird building level bug

    Possibly, but I have never heard of it being reported.










  14. #14

    Default Re: weird building level bug

    From what I can tell, the hard coded limit manifests itself as a CTD when the user attempts to open the building scroll (for recruitment or construction). The "unspecified error" message pops up and there is nothing useful in the log. Another thing I've noticed is that some of the over-128 buildings can replace sub-128 buildings in settlements. There doesn't appear to be any pattern for which buildings get replaced.

    This behavior suggests that the count of buildings in EDB is simply stored as a 16-bit word rather than using a comparison against an arbitrary value.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •