Results 1 to 13 of 13

Thread: Debug me: New Unit problems

Hybrid View

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

    Icon5 Debug me: New Unit problems

    I can no longer see the wood for the trees and would appreciate fresh eyes on the problem. I've got a cookie for whoever can tell me what im doing wrong.

    The mod essentially adds two new units to the game (both are functionally clones of the two varieties of demigryph knights. I dislike the model, but they're too good not to use...).

    A replacement mount entity has been created with the demigryph mount stats (modified a bit to fit the requirements of now being a horse) and assigned a new variant mesh (which is currently a renamed reiksguard knight, it'll receive aesthetic improvements once i've got the nuts and bolts working).

    The unit appears in game (currently only custom, again deliberate - adding it to campaign is simple enough) but attempting to bring it into battle causes a crash to desktop.

    .pack file: http://www.filedropper.com/demigryphalt

  2. #2

    Default Re: Debug me: New Unit problems

    If I don't miss something, you added in the unit_variants table variants which are not in the game, e.g. your custom Emp_Knights_Griffon. Either create a new one as you did for the mounts or link to an existing one.

  3. #3

    Default Re: Debug me: New Unit problems

    Yep, that squashed it! Got ahead of myself with that element of the mod and forgot about it. Thank you!

    (Your cookie, as promised)

  4. #4

    Default Re: Debug me: New Unit problems

    I have a feeling you're correct. That should be calling the demigryph rider variants. Let me see if that fixes that.

  5. #5

    Default Re: Debug me: New Unit problems

    Now to figure out why the new variant mount is invisible.

  6. #6

    Default Re: Debug me: New Unit problems

    I'm not sure if it matters, but your folder structure is a bit off. Normally it is variantmeshes -> variantmeshdefinitions -> your variant.
    Yours is just variantmeshdefinitions -> your variant

  7. #7

    Default Re: Debug me: New Unit problems

    You're right. And it fixed the invisibility issue too.

    I have run out of cookies, will cake be acceptable?

  8. #8

    Default Re: Debug me: New Unit problems

    Cake will be fine

  9. #9

    Default Re: Debug me: New Unit problems

    Okay I concede defeat. I had this working perfectly an hour and half ago. Units appear correctly, had their own tooltips, short text, long text, unit cards etc etc etc. Recruitable in campaign and custom battle.

    I come back 20m later, its crashing to desktop on game launch (interim has been spent trying to figure out what the hell changed in the interim).

    After a full day spent on this, battling unannounced schema updates that borked tables and the total inability of PFM to restructure a file system without demolishing everything and rebuilding it from scratch and i'm just done.

    If anyone fancies debugging this I have nothing but appreciation and my delirious, enraged tears to offer you.

    Pack file

  10. #10

    Default Re: Debug me: New Unit problems

    I can see why you're frustrated. So far I found some minor things that could be problematic, but non of it is gamebreaking.
    Do you remember what exactly it is you changed before it stopped working?

  11. #11

    Default Re: Debug me: New Unit problems

    I came back to it with bloody-mindedness this morning and after three hours of searching for game-breakers (I know its messy, I tidy before I publish usually...if i'm not dead from exhaustion from the process).

    Turns out the unit_buildings_allowed table somehow got borked. Deleting it and then creating it with the EXACT SAME VALUES as before fixed the problem. Must've become corrupted somehow.

  12. #12

    Default Re: Debug me: New Unit problems

    I'm happy for you that it's working again. I noticed that you wrote the name of the units in the building_unit_allowed table all in small letters, but it didn't appear to be case sensitive cause it wasn't working after I changed it. Well, but as I said, good that you made it work.
    Aside from that you should untick the checkbox "in_encyclopedia" in the main_units table.

  13. #13

    Default Re: Debug me: New Unit problems

    Yeah nothing in the pack files is case sensitive, I usually put things in proper capitalisation because its easier to read that way but its an ease of use thing.

    Hmm, I never noticed that checkbox before. Probably should've looked it up in Dave but I wasn't changing it so didn't bother.

Posting Permissions

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