Page 7 of 30 FirstFirst 1234567891011121314151617 ... LastLast
Results 121 to 140 of 582

Thread: Bovine M2TW Checker

  1. #121

    Default Re: Bovine M2TW Checker

    Quote Originally Posted by Gigantus View Post
    While rare there's usually multiple, it's possible that a custom CAS file has multiple textures only a single texture.
    Fixed that for you.

    Turned out I couldn't reuse the way I read out the siege engines' textures. In those there were convenient markers in front of the place the textures were coming, such as "siegeenginelod0" or "characterlod0", but there were no such thing in the resource model cas files. That means I cannot reliably find the length marker for the texture reference.

    Instead, I figured I had to go for the different approach of searching out any instance of "texture". This is pretty brittle as possibly someone would have a texture file that doesn't include "texture" anywhere in its path? Then I expand left and right to encompass the whole file path. I use a regular expression to determine if each character is part of the file path, again prone to breaking as I don't know what weird characters people might include in their file names. Currently these characters are considered part of a file path, working for EB2 at least:

    abcdefghijklmnopqrstuvwxyz
    ABCDEFGHIJKLMNOPQRSTUVWXYZ
    0123456789
    #
    _
    /
    .
    \ (that is a backslash, really! The forum italics makes it look like a pipe instead)
    For additional fun, sometimes the texture path is directly followed by the length marker for the next segment in the cas file, which (dependent on the actual length of the next segment) occasionally translates to a character among these characters above, so after expanding to the full path, I cut off anything after ".texture" or ".tga". This is also brittle, as I imagine people can have other file extensions than those for textures? But it at least works right now .

    I'll be checking whether it also works for the other mods I have tested the checker with in the past (ROTK, TGC, 1648, bare geomod), but I thought I'd get some feedback sooner rather than later if someone sees a fatal flaw with how I do this and knows a better way to parse the cas files.

    Edit: Yeah, crashing for something with TGC at least. I'll investigate...
    Last edited by bovi; December 06, 2018 at 11:27 PM.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  2. #122

    Default Re: Bovine M2TW Checker

    Quote Originally Posted by Gigantus View Post
    Edit: just came across some false positives:

    1758: (Entry pope) Reference "models_strat/textures/mtw2_catholic_pope.tga" does not exist.
    1770: (Entry heretic) Reference "models_strat/textures/heretic_christian_rebels.tga" does not exist.
    1782: (Entry witch) Reference "models_strat/textures/witch.tga" does not exist.
    1794: (Entry inquisitor) Reference "models_strat/textures/inquisator_papal_states.tga" does not exist.

    These textures exist in vanilla only in TGA.DDS format and are used by the game, in the descr_model_strat file however they only have the TGA extension - needs to be added to the vanilla file list:

    models_strat/textures/mtw2_catholic_pope.tga
    models_strat/textures/heretic_christian_rebels.tga
    models_strat/textures/witch.tga
    models_strat/textures/inquisator_papal_states.tga
    Yeah, referring to files which aren't called exactly that but "close enough" is a bit of a stumbling block for me... Changed it so that when reading the vanilla files configuration file, I now add an additional entry to the list whenever the file ends in .tga.dds, for its .tga "counterpart". I already did similarly for any CMI files, adding another entry for the same filename but with CMI replaced with CAS extension.

    -------

    Even if my current approach for extracting the texture references stands, I'll wait before uploading a new version until I add parsing of descr_cultures and looking into fixing the rest of what your reported.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  3. #123
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

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

    Default Re: Bovine M2TW Checker

    The file extension is a bit of a gamble - we had several occasions in RotK (with the character models) where the file had no extension in the CAS listing. But never in the resource and settlement models.

    The texture subfolder path is always present, haven't come across any stratmodel CAS file that does not use it. DDS or TEXTURE is never used as extension in the CAS listing. So layman me would say to search for '\textures\' and then parse what comes after it until the first empty space?

    See examples, small window (caoren) lacking the extension, large window being a standard entry:



    Note: in case of the missing extension for the character model we actually had to provide a dummy file (zero byte, no extension) to avoid the 'out of video memory' error, the TGA file in the textures folder would be covered by it's entry in descr_model_strat, the added TGA.DDS file being a valid addition - all three of them thereby being valid files present in the textures sub folder.

    As I said: have yet to come across an issue like this with resource models.

    Thought for a check regarding TGA.DDS files: if exists [referenced name].TGA then [name].TGA.DDS valid - in other words: if a reference exists with the TGA extension (eg descr_model_strat) then a file with the same name and TGA.DDS file extension is a valid file.
    Last edited by Gigantus; December 06, 2018 at 11:38 PM.










  4. #124
    _Tartaros_'s Avatar "Harzschütze"
    Join Date
    Aug 2009
    Location
    kvet.lɪnˌbuʁk
    Posts
    4,492

    Default Re: Bovine M2TW Checker

    Quote Originally Posted by bovi View Post
    I'll be checking whether it also works for the other mods I have tested the checker with in the past (ROTK, TGC, 1648, bare geomod), but I thought I'd get some feedback sooner rather than later if someone sees a fatal flaw with how I do this and knows a better way to parse the cas files.

    Edit: Yeah, crashing for something with TGC at least. I'll investigate...
    it doesn´t crash the log - it just pops up and reminds me to remove these unused agents at some point
    regarding the scripted battlemodels - thats tricky to know for a tooli ignored this log lines, but didn´t think about giving you feedback.

  5. #125

    Default Re: Bovine M2TW Checker

    Quote Originally Posted by _Tartaros_ View Post
    it doesn´t crash the log - it just pops up and reminds me to remove these unused agents at some point
    You misunderstand. The tool as released does not crash on your mod, no. The tool as being developed by me to read the resources, is trying to interpret the textures referenced in your resource cas files, and was crashing on that. Since then I have changed the code to not crash and it successfully pulls out all your textures, although I am not positive that it will work for any cas file with any texture reference.

    I'm currently rewriting the crossreference function to be better able to identify files in the file system when additional extensions are there (.tga vs .tga.dds) or different extension (.cmi vs .cas) in the file system than what is actually referred to.

    Quote Originally Posted by _Tartaros_ View Post
    regarding the scripted battlemodels - thats tricky to know for a tooli ignored this log lines, but didn´t think about giving you feedback.
    This is a command that I just didn't know about. I'll change it to also read those commands. Please do report any false reports my tool makes, so I can fix it. There is nothing to gain by having false reports muddling up the correct ones, that only makes it harder to sift through and find the real problems.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  6. #126
    _Tartaros_'s Avatar "Harzschütze"
    Join Date
    Aug 2009
    Location
    kvet.lɪnˌbuʁk
    Posts
    4,492

    Default Re: Bovine M2TW Checker

    ahh - ok. thanks for clearing this up

    edit:
    i noticed that the tool marks declared counter "XY_example_accepted" as "is never used." but this counters are used in yes/no scripts.
    for example:
    Code:
            historic_event XY_example true 
            while I_EventCounter XY_example_accepted = 0
                and I_EventCounter XY_example_declined = 0
            end_while
            if I_EventCounter XY_example_accepted = 1
                add_money slave -1500
            end_if
    or is the declaration of the counter obsolete?
    Last edited by _Tartaros_; December 08, 2018 at 01:38 PM.

  7. #127

    Default Re: Bovine M2TW Checker

    What you posted is not a declared counter, but an event counter. I think you have a declared counter with the same name, which is then never used.

    So yes, the declaration is superfluous. Event counters are not supposed to be declared, they are a separate thing from declared counters.
    Last edited by bovi; December 09, 2018 at 02:21 PM.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  8. #128
    _Tartaros_'s Avatar "Harzschütze"
    Join Date
    Aug 2009
    Location
    kvet.lɪnˌbuʁk
    Posts
    4,492

    Default Re: Bovine M2TW Checker

    ok, thank you - i´m learning

  9. #129
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

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

    Default Re: Bovine M2TW Checker

    I have a new one, not sure what the issue is, but it could be multiple spaces in a file name. Mod is Titanium:












  10. #130

    Default Re: Bovine M2TW Checker

    Not so much multiple spaces as spaces in general, at first glance at least. It's decided the filename ended at the first space. I'll check it out.

    When you say Titanium, you mean the 0.9 found here?
    Last edited by bovi; December 12, 2018 at 11:02 AM.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  11. #131
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

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

    Default Re: Bovine M2TW Checker

    Mine has some development stuff but these files should be included in the 0.9 version.

    Ran a check on Stainless Steel as well (the base for titanium), came up with the error below. Thought it had to do with the dot in the folder name (SS6.3) but removing the dot didn't change the error:

    Last edited by Gigantus; December 12, 2018 at 07:58 PM.










  12. #132

    Default Re: Bovine M2TW Checker

    Right, I'll download and test run it on that as well then.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  13. #133

    Default Re: Bovine M2TW Checker

    Stainless Steel fails because there are a couple of TAB characters interspersed in the model DB. I've fixed the problem in the development version, it will now report any TAB characters encountered and interpret them as SPACE instead.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  14. #134

    Default Re: Bovine M2TW Checker

    I'm a bit at a loss to what I should do with Titanium. It fails because at line 8977 in the model DB, there is a faction name with the wrong length marker among the knights_templar attachment sets. I used to read line by line, but I cannot do that anymore because some mods have several segments in the same line. Because there are mods with spaces in their file names, I cannot simply take the next token after the length marker as the value, but must continue if the token does not fill the supposed length. Therefore I rely on the length marker to know how long to keep reading for the filename.

    Quote Originally Posted by Titanium model DB
    6 aragon
    70 unit_models/AttachmentSets/SS_Final Special Heads_templar_diff.texture
    70 unit_models/AttachmentSets/SS_Final Special Heads_templar_norm.texture 0
    6 spain
    70 unit_models/AttachmentSets/SS_Final Special Heads_templar_diff.texture
    70 unit_models/AttachmentSets/SS_Final Special Heads_templar_norm.texture 0
    In this case, the checker determines that the segment is 6 long, therefore the value must be "spain 70". I think the best I can do is trap the exception thrown when it does not find an integer length marker for the next segment, so that I can spit out a fatal error message about which line it's having trouble with.

    Checking Titanium also crashes on something to do with traits even when that model DB error is fixed, will look into that next.

    Edit: The checker will now output this error message for Titanium:

    Cannot handle the model DB syntax for this mod. Expecting an integer marking segment length, but instead got "unit_models/AttachmentSets/SS_Final". Check your syntax around line 8978!
    Last edited by bovi; December 15, 2018 at 07:16 AM.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  15. #135

    Default Re: Bovine M2TW Checker

    I am apparently blocked from posting a proper message by Cloudflare. Will try to obfuscate so it can pass the muster.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  16. #136

    Default Re: Bovine M2TW Checker

    Bah, I cannot for the life of me get the forum to accept any message containing a quote of the offending code in Titanium's EDCT. It's on line 23513.

    Once again, the checker expects correct syntax, and when the trait keyword is not followed by a trait name, it craps itself. I'll trap this exception as well, and point out the file and approximate line to look for the error.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  17. #137

    Default Re: Bovine M2TW Checker

    With those two syntax errors corrected, the checker successfully runs on Titanium as well. I'll try to upload a new version today, even though I haven't got to expand more than to the resources (not reading cultures or fixed any of the false repors you've reported lately).

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  18. #138
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

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

    Default Re: Bovine M2TW Checker

    How does the titanium modeldb not crash? I mean 'spain' is only a count of 5...

    EDCT: "and not HasAncType Academic" ?

    Edit: after correcting the line count number to 5 I get this error:



    The spelling (Caps) is from the texture file itself, and it is referenced in the modelDB file (in small caps). Is that an excess of length?
    Last edited by Gigantus; December 15, 2018 at 08:06 AM.










  19. #139

    Default Re: Bovine M2TW Checker

    It does no longer crash when the syntax error is fixed - IE you need to set the length marker to 5.

    You appear to have a different version of Titanium than me. I don't have the error you post here after correcting spain to 5, probably because I also have the changed version where it survives TAB characters like there was in SS (only a guess).

    The trigger in question is GreedyRuler_add_2 (please, forum, allow me to post this).
    Last edited by bovi; December 15, 2018 at 08:45 AM.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  20. #140
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

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

    Default Re: Bovine M2TW Checker

    Yup, cloud is having a bad day.

    This is in my version, the traits all exist:

    Last edited by Gigantus; December 15, 2018 at 08:59 AM.










Posting Permissions

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