Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exportlegends: unknown identity_type (-1) #1578

Closed
doloresjane opened this issue May 26, 2020 · 25 comments · Fixed by DFHack/df-structures#400
Closed

exportlegends: unknown identity_type (-1) #1578

doloresjane opened this issue May 26, 2020 · 25 comments · Fixed by DFHack/df-structures#400
Labels

Comments

@doloresjane
Copy link

Hello, I am writing this in hopes that someone can get back to me, I have been exporting xml files and it says "unknown df.identity_type value encountered:-1. please report to DFhack team"
Not sure what the error is and I also had another a thing id like to ask, in the future could you include how to Report errors to you because when you read the readme it says we can help out by reporting errors but give no way to do so, i mean i figured it out but some other people might not be able to. just a thought, have a great day

@lethosor lethosor added the bug label May 27, 2020
@lethosor lethosor changed the title Bug exportlegends: unknown identity_type (-1) May 27, 2020
@lethosor
Copy link
Member

lethosor commented May 27, 2020

@doloresjane thanks for the report! I have a fairly good guess what the -1 is, but if you could upload the save somewhere so we can double-check, that would be appreciated (evidently we haven't seen that come up before).

Could you link to the readme you mentioned that suggests reporting issues but doesn't give links? I haven't found a page that fits that description yet, but we're trying to improve our docs and would like to know if something is missing.

@doloresjane
Copy link
Author

I dont know how to show you the files... I can only google so much

@lethosor
Copy link
Member

You said:

when you read the readme it says we can help out by reporting errors but give no way to do so

Can you give a link to the file you were looking at? Is it still in your browser history, maybe?

@doloresjane
Copy link
Author

I mean i dont know how to upload a save to show you

@lethosor
Copy link
Member

lethosor commented May 27, 2020

http://dffd.bay12games.com/ is one common site where DF-related files can be uploaded. There are also a bunch of other sites that would work - Google Drive, Box, Mediafire, Dropbox, etc. You would want to compress the specific folder (e.g. data/save/region1) containing your save and upload that.

Can you link to the readme you were looking at?

@doloresjane
Copy link
Author

@doloresjane
Copy link
Author

I hope I did it right, hopefully you can find something that will help your fix bugs, glad to help

@doloresjane
Copy link
Author

https://i.gyazo.com/e6ed47e3a3458d833fc4fa5a0ad5e52d.png this is the readme

@PatrikLundell
Copy link
Contributor

Weird. When I try to load the save (on Win64) DF crashes.

@doloresjane
Copy link
Author

I have the same problem but thats new... i have a copy but dont know if i lost everything

@doloresjane
Copy link
Author

I will see if i can get a working save tommorow not sure, sorry if i compressed wrong

@PatrikLundell
Copy link
Contributor

PatrikLundell commented May 28, 2020

Thanks. It's not particularly urgent.

@ab9rf
Copy link
Member

ab9rf commented May 28, 2020

Side note: the copyright date on the docs we stuff into published releases is 2015. We should probably update that, but I haven't found where that comes from yet.

@lethosor
Copy link
Member

lethosor commented May 28, 2020

I agree that the save isn't particularly urgent. Given that -1 in DF almost always represents None, I suspect that is the case here too. I'm just curious why we haven't run into it yet, and if there's something else going on with the identities that could cause other issues (e.g. the unit nickname logic elsewhere in DFHack).

Also, please avoid that kind of language here. I thought Patrik's advice was relevant, if unrelated to the issue itself, but ultimately we just want to resolve the issue here.

Side note: the copyright date on the docs we stuff into published releases is 2015. We should probably update that, but I haven't found where that comes from yet.

It's from here:

dfhack/conf.py

Line 225 in f204465

copyright = '2015, The DFHack Team'

I'm also curious why the page in the screenshot appears to be unstyled; it should look (roughly) the same as https://docs.dfhack.org/en/stable/Contributing.html. Maybe CSS isn't getting bundled properly or something, or whatever browser that is doesn't like serving CSS from the local filesystem?

@PatrikLundell
Copy link
Contributor

PatrikLundell commented May 28, 2020

I agree -1 is probably None, but it's puzzling that DF would add the structure only to invalidate it. A possible case might be that someone assumed a religious name and later was replaced on the position, but why keep the structure in that case? To contain the name assumed while marking it as obsolete, but how would DF then know what kind of an identity it was?

@DFHack DFHack deleted a comment from doloresjane May 29, 2020
@DFHack DFHack deleted a comment from PatrikLundell May 29, 2020
@ab9rf ab9rf reopened this May 29, 2020
@ab9rf
Copy link
Member

ab9rf commented May 29, 2020

I'm reopening this because there does seem to be a real issue here. I've also deleted some of the unnecessary discussion from this issue report.

I'm also curious why the page in the screenshot appears to be unstyled; it should look (roughly) the same as https://docs.dfhack.org/en/stable/Contributing.html. Maybe CSS isn't getting bundled properly or something, or whatever browser that is doesn't like serving CSS from the local filesystem?

The browser is that screenshot is clearly Edge. However, on my system the CSS works when loaded into Edge, so either that person has their Edge security turned way far up so as to block CSS loads from the local file system, or there's something wrong with either their copy of DFHack or of Edge. Don't think there's anything we can do about that.

@lethosor
Copy link
Member

lethosor commented May 29, 2020

I was able to reproduce the crash on load; I ran df-savecheck on all the .sav files and got this:

data/save/dfhack-1578/world.sav: chunk 12086 (start=19917936, length=5695): Compression error: unexpected EOF
data/save/dfhack-1578/world.sav: 10354445 bytes unread, 19923635 bytes read

so it appears that world.sav is corrupted, although I'm not sure if that happened when it was compressed/uploaded or if the original is also corrupt.

I'm not sure if we want to add identity_type::None without investigating the save; Units::setNickname() seems to handle unrecognized identity_type values cleanly, but exportlegends would require None to also have an id_tag attribute, which doesn't really make sense and would probably require some extra adjustments to the script.

Thanks for double-checking in Edge; I don't have easy access to that. Contributing.rst is on my list of docs to improve, so hopefully the documentation confusion will be addressed by the next release.

@PatrikLundell
Copy link
Contributor

I suspect it might be possible to get some clues out of the exported legends info set, if the OP would be willing to provide it, as there might be events related to that hist fig indicating what was going on.

@doloresjane
Copy link
Author

@doloresjane doloresjane reopened this May 29, 2020
@PatrikLundell
Copy link
Contributor

The legends_plus file might be useful on its own, but generally the whole set of basic files, typically zipped up, is better. The plus file contains only the additions added by DF, while the "ordinary" file contains the bulk of the history info.
The standard set of files is:

  • X-legends.xml
  • X-legends_plus.xml
  • X-world_history.txt
  • X-world_map.bmp
  • X-world_sites_and_pops.txt

This set would allow examination using third party tools, such as e.g. Legends Viewer.

@doloresjane
Copy link
Author

doloresjane commented May 29, 2020

https://www.mediafire.com/file/i9b1116t43uyies/Region_Of_13_Divines_-_Copy.zip/file hopefully this save is not corrupted, it works on my end (This was a older save i deleted but now the main on is corrupted, so thats why its different in history maybe)

@PatrikLundell
Copy link
Contributor

PatrikLundell commented May 29, 2020

Yes, that save is working, so there's no need for posting the additional exports files.

The curious entry is related to "In the early spring of 234 Ona assumed the identity Sebeca Coilblocks" for the character Ona Wealthsexits.

Edit: As far as I can see from exported legends (both XML files), Ona assumed an identity for no reason and it was the current identity at the time of the save. The character was known under that identity by one other HF (Giki Lanterncage) as a visual HF relationship.

Another curious detail about Ona is "Ona Wealthexits was a human born in 230. She was the youngest daughter of Lalgi Gripjuggled and Stasbo Unionsland. Although accounts vary, it is universally agreed that Ona was guided by forces unknown.".

Wait a minute: Ona's exported HF data says "adventurer", so it might be that adventurers might take on identities on a whim (and there were quite a few characters having that tag).

Anyway, when the identity_type is -1, the union field is the HF id, not the nemesis one.

@doloresjane
Copy link
Author

Thanks for helping this is my favorite save game with very interesting people ive found, thanks for being a good help patrik

@doloresjane
Copy link
Author

doloresjane commented May 29, 2020

Giki was a mummy I resurrected, the first I entered the tomb to set off the mummy then I body swap and do full heal then do flashstep to the highest Z level so the thing dies of fall damage, carrying the body to my fortress( i tried at the tomb, causes the mummy to turn invisible once leaving site if you do it at the tomb, bringing them to the fortresses seemed to bypass that) but yeah it was fun experimenting i must have broken something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants