Unique unit not showing - icons problem

Mikecro

Chieftain
Joined
Aug 16, 2022
Messages
13
Hello, i have managed to nearly fully build Huscarls from Vikings scenario however there is (i hope) only 1 problem left: Unit is invisible, anyways here are logs:
Code:
[3237230.833] [Localization]: StartupErrorMessages.xml
[3237230.847] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database
[3237238.722] [Localization]: Validating Foreign Key Constraints...
[3237238.722] [Localization]: Passed Validation.
[3237239.042] [Configuration]: Validating Foreign Key Constraints...
[3237239.043] [Configuration]: Passed Validation.
[3237244.366] [FullTextSearch]: Initializing FullTextSearch
[3237253.732] [Gameplay]: Validating Foreign Key Constraints...
[3237253.749] [Gameplay]: Passed Validation.
[3237255.965] [Configuration] ERROR: no such table: IconTextureAtlases
[3237258.775] [Configuration]: Validating Foreign Key Constraints...
[3237258.776] [Configuration]: Passed Validation.
[3237259.212] [Database] ERROR: FOREIGN KEY constraint failed
[3237259.212] [Database] ERROR: FOREIGN KEY constraint failed
[3237263.536] [HallofFame]: Database found. Checking versions...
[3237263.557] [HallofFame]: Database is up-to-date!
[3237297.393] [FullTextSearch]: FTS - Creating Context
[3237333.464] [Configuration] ERROR: no such table: IconTextureAtlases
[3237334.528] [Configuration]: Validating Foreign Key Constraints...
[3237334.529] [Configuration]: Passed Validation.
[3237337.368] [Database] ERROR: FOREIGN KEY constraint failed
[3237337.368] [Database] ERROR: FOREIGN KEY constraint failed
[3237366.208] [Gameplay]: Validating Foreign Key Constraints...
[3237366.238] [Gameplay]: Passed Validation.
[3237370.028] [Database] ERROR: FOREIGN KEY constraint failed
[3237370.029] [Database] ERROR: FOREIGN KEY constraint failed
[3237442.016] [FullTextSearch]: FTS - Creating Context
[3237442.017] [FullTextSearch]: FTS - Creating Context
[3237445.260] [FullTextSearch]: FTS - Creating Context
[3237445.970] [FullTextSearch]: FTS - Creating Context
[3237452.219] [FullTextSearch]: FTS - Creating Context
[3239135.603] [Configuration] ERROR: no such table: IconTextureAtlases
[3239140.914] [Configuration]: Validating Foreign Key Constraints...
[3239140.915] [Configuration]: Passed Validation.
[3239141.831] [Database] ERROR: FOREIGN KEY constraint failed
[3239141.831] [Database] ERROR: FOREIGN KEY constraint failed
[3239149.615] [FullTextSearch]: FTS - Creating Context
[3239157.924] [FullTextSearch]: FTS - Creating Context
[3239167.710] [FullTextSearch]: FullTextSearch - Shutting down
Database.log

Code:
[3237252.052] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_22.dds
[3237252.052] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_22.tex
[3237252.052] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_256.dds
[3237252.052] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_256.tex
[3237252.052] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_32.dds
[3237252.053] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_32.tex
[3237252.053] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_38.dds
[3237252.053] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_38.tex
[3237252.053] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_50.dds
[3237252.053] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_50.tex
[3237252.054] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_80.dds
[3237252.054] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_icon_80.tex
[3237252.055] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_200.dds
[3237252.055] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_200.tex
[3237252.056] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_256.dds
[3237252.056] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_256.tex
[3237252.056] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_38.dds
[3237252.056] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_38.tex
[3237252.057] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_50.dds
[3237252.057] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_50.tex
[3237252.057] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_70.dds
[3237252.058] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_70.tex
[3237252.058] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_95.dds
[3237252.058] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Textures/Huscarls_Portrait_95.tex
Modding.log

Code:
<FrontEndActions>
    <UpdateDatabase id="Gameplay">
      <File>NewIcons.sql</File>
      <File>Huscarls_Config_Data.xml</File>
    </UpdateDatabase>
    <UpdateText id="Text">
      <File>Huscarls_Localisation.sql</File>
    </UpdateText>
    <ImportFiles id="Textures">
      <File>Textures/Huscarls_icon_22.dds</File>
      <File>Textures/Huscarls_icon_22.tex</File>
      <File>Textures/Huscarls_icon_256.dds</File>
      <File>Textures/Huscarls_icon_256.tex</File>
      <File>Textures/Huscarls_icon_32.dds</File>
      <File>Textures/Huscarls_icon_32.tex</File>
      <File>Textures/Huscarls_icon_38.dds</File>
      <File>Textures/Huscarls_icon_38.tex</File>
      <File>Textures/Huscarls_icon_50.dds</File>
      <File>Textures/Huscarls_icon_50.tex</File>
      <File>Textures/Huscarls_icon_80.dds</File>
      <File>Textures/Huscarls_icon_80.tex</File>
    </ImportFiles>
    <UpdateArt id="Art">
      <File>Huscarls.dep</File>
    </UpdateArt>
    <UpdateIcons id="NewAction">
      <File>NewIcons.sql</File>
    </UpdateIcons>
  </FrontEndActions>
  <InGameActions>
    <UpdateArt id="Art">
      <File>Huscarls.dep</File>
    </UpdateArt>
    <UpdateDatabase id="Gameplay">
      <File>Huscarls_Gameplay.sql</File>
    </UpdateDatabase>
    <UpdateIcons id="Icons">
      <File>NewIcons.sql</File>
    </UpdateIcons>
    <UpdateText id="Text">
      <File>Huscarls_Localisation.sql</File>
    </UpdateText>
    <ImportFiles id="Textures">
      <File>Textures/Huscarls_Portrait_200.dds</File>
      <File>Textures/Huscarls_Portrait_200.tex</File>
      <File>Textures/Huscarls_Portrait_256.dds</File>
      <File>Textures/Huscarls_Portrait_256.tex</File>
      <File>Textures/Huscarls_Portrait_38.dds</File>
      <File>Textures/Huscarls_Portrait_38.tex</File>
      <File>Textures/Huscarls_Portrait_50.dds</File>
      <File>Textures/Huscarls_Portrait_50.tex</File>
      <File>Textures/Huscarls_Portrait_70.dds</File>
      <File>Textures/Huscarls_Portrait_70.tex</File>
      <File>Textures/Huscarls_Portrait_95.dds</File>
      <File>Textures/Huscarls_Portrait_95.tex</File>
    </ImportFiles>
  </InGameActions>
  <Files>
    <File>ArtDefs/Huscarls.artdef</File>
    <File>Huscarls.dep</File>
    <File>Huscarls_Config_Data.xml</File>
    <File>Huscarls_Gameplay.sql</File>
    <File>Huscarls_Localisation.sql</File>
    <File>NewIcons.sql</File>
    <File>Platforms/MacOS/BLPs/UI/Icons.blp</File>
    <File>Platforms/Windows/BLPs/UI/Icons.blp</File>
  </Files>

and .modinfo. I know that textures' files arent in files section, but do i have to manually edit .modinfo and add entries or is there any other option within ModBuddy? I did import files in both FrontEnd and InGame actions so i am confused why dont those files appear. Maybe i have to add xlp/blp in? Or is this only problem? Here is also icons file, done thanks to Macconolly's template.

Code:
INSERT INTO IconTextureAtlases   
        (Name,                                        IconSize,    IconsPerRow,    IconsPerColumn,        Filename                    )
VALUES    ('ICON_ATLAS_UNIT_HUSCARL',                        256,        1,                1,                    'Huscarls_Icon_256.dds'        ),
        ('ICON_ATLAS_UNIT_HUSCARL',                        80,            1,                1,                    'Huscarls_Icon_80.dds'        ),
        ('ICON_ATLAS_UNIT_HUSCARL',                        50,            1,                1,                    'Huscarls_Icon_50.dds'        ),
        ('ICON_ATLAS_UNIT_HUSCARL',                        38,            1,                1,                    'Huscarls_Icon_38.dds'        ),
        ('ICON_ATLAS_UNIT_HUSCARL',                        32,            1,                1,                    'Huscarls_Icon_32.dds'        ),
        ('ICON_ATLAS_UNIT_HUSCARL',                        22,            1,                1,                    'Huscarls_Icon_22.dds'        ),

        ('ICON_ATLAS_HUSCARL_PORTRAITS',            256,        1,                1,                    'Huscarls_Portrait_256.dds'    ),
        ('ICON_ATLAS_HUSCARL_PORTRAITS',            200,        1,                1,                    'Huscarls_Portrait_200.dds'    ),
        ('ICON_ATLAS_HUSCARL_PORTRAITS',            95,            1,                1,                    'Huscarls_Portrait_95.dds'    ),
        ('ICON_ATLAS_HUSCARL_PORTRAITS',            70,            1,                1,                    'Huscarls_Portrait_70.dds'    ),
        ('ICON_ATLAS_HUSCARL_PORTRAITS',            50,            1,                1,                    'Huscarls_Portrait_50.dds'    ),
        ('ICON_ATLAS_HUSCARL_PORTRAITS',            38,            1,                1,                    'Huscarls_Portrait_38.dds'    );
    

INSERT INTO IconDefinitions
        (Name,                                Atlas,                        'Index'                )
VALUES    ('ICON_UNIT_HUSCARL_PORTRAIT',        'ICON_ATLAS_HUSCARL',        0                    ),
        ('ICON_UNIT_HUSCARL',                'ICON_ATLAS_HUSCARL',        1                    );
 

maconnolly

Warlord
Joined
Jun 3, 2019
Messages
190
I'm at work so this is a very brief reply to pick up a couple of things I noticed quickly:

1. The NewIcons.sql file needs to be executed as part of an UpdateIcons action, not UpdateDatabase. That is the source of at least one error that you have in your log.

2. In the NewIcons.sql file itself, 'ICON_ATLAS_HUSCARL' should be 'ICON_ATLAS_UNIT_HUSCARL_PORTRAITS' and 'ICON_ATLAS_UNIT_HUSCARL' respectively (at the bottom of the file). The atlas you are referencing ('ICON_ATLAS_HUSCARL') doesn't exist.

Regarding the texture files being cited as 'missing' - I will reply back to you later, as it'll take a little longer to explain. I think I can see/tell what is going wrong here - but I will advise more later.
 

Mikecro

Chieftain
Joined
Aug 16, 2022
Messages
13
I'm at work so this is a very brief reply to pick up a couple of things I noticed quickly:

1. The NewIcons.sql file needs to be executed as part of an UpdateIcons action, not UpdateDatabase. That is the source of at least one error that you have in your log.

2. In the NewIcons.sql file itself, 'ICON_ATLAS_HUSCARL' should be 'ICON_ATLAS_UNIT_HUSCARL_PORTRAITS' and 'ICON_ATLAS_UNIT_HUSCARL' respectively (at the bottom of the file). The atlas you are referencing ('ICON_ATLAS_HUSCARL') doesn't exist.
Thanks a lot, it worked and now i no longer have any issues in database.log. Kinda embarrased i forgot to add UNIT to those entries in NewIcons.sql...oh well. Textures are still missing but i am trying to solve the problem.
 

Mikecro

Chieftain
Joined
Aug 16, 2022
Messages
13
View attachment 637610

Unit is now showing (fixed error between UnitMember Types bracket not being same as Units -> Members -> UnitMemberTypes bracket name). Here is fixed icon code along with xlp...hopefully someone may deduce whats wrong.

Code:
INSERT INTO IconTextureAtlases
        (Name,                                        IconSize,    IconsPerRow,    IconsPerColumn,        Filename                        )
VALUES    ('ICON_ATLAS_UNIT_HUSCARL',                        256,        1,                1,                    'Huscarls_icon_256.dds'        ),
        ('ICON_ATLAS_UNIT_HUSCARL',                        80,            1,                1,                    'Huscarls_icon_80.dds'        ),
        ('ICON_ATLAS_UNIT_HUSCARL',                        50,            1,                1,                    'Huscarls_icon_50.dds'        ),
        ('ICON_ATLAS_UNIT_HUSCARL',                        38,            1,                1,                    'Huscarls_icon_38.dds'        ),
        ('ICON_ATLAS_UNIT_HUSCARL',                        32,            1,                1,                    'Huscarls_icon_32.dds'        ),
        ('ICON_ATLAS_UNIT_HUSCARL',                        22,            1,                1,                    'Huscarls_icon_22.dds'        ),

        ('ICON_ATLAS_UNIT_HUSCARL_PORTRAITS',            256,        1,                1,                    'Huscarls_Portrait_256.dds'    ),
        ('ICON_ATLAS_UNIT_HUSCARL_PORTRAITS',            200,        1,                1,                    'Huscarls_Portrait_200.dds'    ),
        ('ICON_ATLAS_UNIT_HUSCARL_PORTRAITS',            95,            1,                1,                    'Huscarls_Portrait_95.dds'    ),
        ('ICON_ATLAS_UNIT_HUSCARL_PORTRAITS',            70,            1,                1,                    'Huscarls_Portrait_70.dds'    ),
        ('ICON_ATLAS_UNIT_HUSCARL_PORTRAITS',            50,            1,                1,                    'Huscarls_Portrait_50.dds'    ),
        ('ICON_ATLAS_UNIT_HUSCARL_PORTRAITS',            38,            1,                1,                    'Huscarls_Portrait_38.dds'    );
     
INSERT INTO IconDefinitions
        (Name,                                Atlas,                        'Index'                    )
VALUES    ('ICON_UNIT_HUSCARL_PORTRAIT',        'ICON_ATLAS_UNIT_HUSCARL',        1                    ),
        ('ICON_UNIT_HUSCARL',                'ICON_ATLAS_UNIT_HUSCARL',        1                    );
 
Top Bottom