Results 1 to 5 of 5

Thread: Adding Unit Card to Units

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Adding Unit Card to Units

    I have a png file called rifle_unit.png. I have created a unit in main_units, land_units, and I am able to load him up into the game.

    My problem is that the unit card is not loading up in game for that unit - and crashes the game on start up when I add the unit_variant and variant tables to the mod pack (it works fine without these 2 tables added to the pack).

    The unit currently uses an existing unit card - the Thunders. So, I modified the variant tables, and it still does not display in game.

    Why is this, and how can I fix it?

    My first question: where do I put the png icon that I want to put on the unit?

    Below are the tables I have for adding a custom icon to a unit card.

    Tables:

    variants
    variant_name tech_folder variant_filename scale scale_variation low_poly_filename mount_scale
    wh_dwf_sentinels rifle_unit 0.95 0.05 //Some random Location 1

    unit_variants

    name faction unit variant unit_card
    wh_main_dwf_sentinels wh_main_dwf_sentinels wh_dwf_sentinels rifle_unit

    Notes on above:
    1) rifle_unit is the same of the png icon. That is, I have an image: rifle_unit.png

    2) wh_main_dwf_sentinels in the column `name` is the name of the unit_variant
    3) wh_main_dwf_sentinels in the column `unit` is the name of it in the `land_units` table.

    What am I doing wrong? Where should the icon be stored for it to recognise it? I assume the game is crashing because it cannot find `rifle_unit.png` somewhere.

  2. #2

    Default Re: Adding Unit Card to Units

    From what I can see, I think you're crashing the mod by using the faction column in unit_variants. Try clearing that cell out, you don't need it anyway unless you need factional reskins.

    As for the image, the path is ui/units/icons and ui/units/infopics (for the larger one with the ruined frame). I recommend doing an "add from pack" /data and picking two random vanilla cards for reference. Then you have the path ready for yours.

    P.S.: UI and variants NEVER crash the game, if something's wrong you will just not see them loaded. Only startpos and db entries can crash, afaik. So you know that when you have a crash, it's not because of an image.

  3. #3

    Default Re: Adding Unit Card to Units

    Quote Originally Posted by Cataph View Post
    From what I can see, I think you're crashing the mod by using the faction column in unit_variants. Try clearing that cell out, you don't need it anyway unless you need factional reskins.

    As for the image, the path is ui/units/icons and ui/units/infopics (for the larger one with the ruined frame). I recommend doing an "add from pack" /data and picking two random vanilla cards for reference. Then you have the path ready for yours.

    P.S.: UI and variants NEVER crash the game, if something's wrong you will just not see them loaded. Only startpos and db entries can crash, afaik. So you know that when you have a crash, it's not because of an image.
    I apologise for the poor formatting. The (slightly) better formatted table is below:

    variant
    name | faction | unit_variant | unit_card

    name = wh_main_dwf_sentinels | faction | unit_variant = wh_main_dwf_sentinels | unit_card = rifle_unit

    faction is empty.

    I did manage to get it working. But whenever I include a unit variant table it seems to crash (It crashes only in the BoB Assembly Kit, If that makes a difference).

  4. #4

    Default Re: Adding Unit Card to Units

    I'm not savvy about BoB crashes. Try using PFM all the way instead. I don't believe you can assign new images via Dave anyway.

  5. #5

    Default Re: Adding Unit Card to Units

    Quote Originally Posted by Cataph View Post
    I'm not savvy about BoB crashes. Try using PFM all the way instead. I don't believe you can assign new images via Dave anyway.
    I managed to solve my problem. It was not the mod its self, but other mods.

    When I used the BoB Assembly Kit, I checked the file it crashed on - It had crashed on Start Pos file.

    So, the problem there was that I had enabled other mods. By enabling other mods was crashing Warhammer, and preventing it from starting up.

    Before using BoB assembly Kit, I had to disable all mods, then use it again. After disabling all mods, it worked fine.

    It's now fixed my problem.

Posting Permissions

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