Code Monkey home page Code Monkey logo

Comments (12)

drake127 avatar drake127 commented on September 24, 2024 1

I didn't try yet. I verified that .xml files don't differ and that NWN:EE doesn't complain (and NWN:EE parses NWN bic files well). Also GFF Editor and modified xml2gff got me exactly same results.

from xoreos-tools.

DrMcCoy avatar DrMcCoy commented on September 24, 2024

Hmm, we don't really dedup on structs. Or at least, we shouldn't.

Do you still have the original data before throwing it into xml2gff and try it with a recent xoreos-tools version (0.0.6 and/or the current master branch)? If you had used xml2gff from an earlier version (i.e. from a checkout between 0.0.5 and 0.0.6), I'm afraid a bug in the GFF3 writer created faulty files in some cases. I don't think the files are repairable then, unfortunately.

from xoreos-tools.

DrMcCoy avatar DrMcCoy commented on September 24, 2024

If it does still happen with xoreos-tools 0.0.6, can you attach an example file? Pre manipulation with the xoreos-toosl and post, ideally, so I can see what happens.

from xoreos-tools.

drake127 avatar drake127 commented on September 24, 2024

It happens with latest version and it's easily (always) reproducible.

I don't think these files are actually broken as GFF Editor (and old NWN) opens them just fine. XML files also look good, they are just not reconstructed properly for NWN:EE.

Not even basic character stats are recovered, so I assume that some basic check is failing. I am now trying to minimize XML file that still breaks the game to be able to fix in manually in hex editor.

broken-char.zip

Note that we are using cp1250.

from xoreos-tools.

drake127 avatar drake127 commented on September 24, 2024

Good news (somewhat): I believe that adding a <list> actually breaks the format with given error message.

Following file emits the error:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<gff3 type="BIC">
  <struct id="4294967295">
    <list label="ClassList">
      <struct id="2">
        <sint32 label="Class">0</sint32>
        <sint16 label="ClassLevel">1</sint16>
      </struct>
    </list>
  </struct>
</gff3>

from xoreos-tools.

drake127 avatar drake127 commented on September 24, 2024

I have created similar (hopefully same) file in GFF Editor and it works. There are some differences if you want to take a look:
minimal.zip

from xoreos-tools.

DrMcCoy avatar DrMcCoy commented on September 24, 2024

Thanks, I'll probably have a look in the evening

from xoreos-tools.

drake127 avatar drake127 commented on September 24, 2024

I now believe that structs inside a lists are not supposed to be in field list. They cannot have label either (because they are not in the field list). Structs which are part of other structs can and will be present in field list.

I am going to run some tests now.

from xoreos-tools.

drake127 avatar drake127 commented on September 24, 2024

I tested it on ~10k characters in our NWN servervault and it's really the case. I submitted example PR but feel free to implement it however you like, it's rather simple change.

from xoreos-tools.

DrMcCoy avatar DrMcCoy commented on September 24, 2024

Huh, nice, interesting, thanks! Original NWN itself still eats the files like that, yes?

from xoreos-tools.

DrMcCoy avatar DrMcCoy commented on September 24, 2024

And I Just tried a gff2xml -> xml2gff -> gff2xml roundtrip, both with and without the patch, results are identical. And old NWN seems to at least eat a localvault character without any issues. Nice :)

from xoreos-tools.

DrMcCoy avatar DrMcCoy commented on September 24, 2024

Merged #72, closing this issue, thanks! :)

from xoreos-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.