Oh, must have glossed over it. probably because I didn't know the current version, and it didn't match the known ID.
Anyhow, still massive data corruption:
The default bubble enemy, upon loading the base quest template with this patch.
qst.cpp
Spoiler: show
zq_class.cpp
Spoiler: show
IDK if you want to try to debug a binary, or do a build.
http://www.zoriarpg.com/zc/LoE_Userbar.png http://zoriarpg.com/zc/EiyuuUserbar.png
http://www.zoriarpg.com/zc/CIS_Original.pnghttp://www.zoriarpg.com/zc/CIS_II_Userbar.png
Latest ZC 2.53 (Win32) | (Technical Specification | Changelog)
Latest ZC 2.55(Win32) | 2.55 Modules | (Techical Specification | Changelog)
ZC Source Code | ZClaunch Source Code
Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
ZScript & ZC-Related Pastebin | ZC Dev & Builds | ARCHIVED ZC Dev & Builds | YouTube Channel | Quests and ZScript Repository
All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable.
Something that I did made it worse... Looks as if there is now corruption even with those two disabled.
The odd thing, is that I didn't touch anything related to those, but I made a slight modification of the item editor. Saving the quest, and reopening it somehow scrambled the data. I'm not sure how, at this point. As soon as the quest is saved, the data is corrupted, so I'm, rolling back again to beta 30.
(The beta 30 sources are stable.)
---------------
I rolled it back to 30, which still compiled and ran with no issues (packfile saving of the new array is disabled).
I tried reintroducing your changes, this time moving the loading sequence a bit farther down the line. No difference.
You should probably see the result for yourself.
Here's Beta 33, which has your suggested changes implemented:
http://timelord.insomnia247.nl/zc/zc...ile_Issues.zip
Last edited by ZoriaRPG; 12-18-2016 at 12:26 PM.
http://www.zoriarpg.com/zc/LoE_Userbar.png http://zoriarpg.com/zc/EiyuuUserbar.png
http://www.zoriarpg.com/zc/CIS_Original.pnghttp://www.zoriarpg.com/zc/CIS_II_Userbar.png
Latest ZC 2.53 (Win32) | (Technical Specification | Changelog)
Latest ZC 2.55(Win32) | 2.55 Modules | (Techical Specification | Changelog)
ZC Source Code | ZClaunch Source Code
Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
ZScript & ZC-Related Pastebin | ZC Dev & Builds | ARCHIVED ZC Dev & Builds | YouTube Channel | Quests and ZScript Repository
All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable.
Can you take a fresh working version and add in a single simple write and read to get the hang of binary file IO?
For example: Write out an array of 10000 values "[] = { 0,1,2,3,4,5,6,7,8,9, ... }" , then read it back in and print it out. If you don't feel like using a debugger properly then you simply /have/ to generate some output that can help you find out what you are doing wrong.
This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.
I may have found my answer without changing to VS... I'm not sync'd with the tables n defdata.cpp. It felt as if there was a third element to this, and there surely is. Thus might account for values shifting like this; eh? From what I can tell, the new data insertion is offsetting te vales by 10, resulting in reading the defaults from the wrong locations.
What would be the right way to insert the new array into this table?
I suppose I could just revert to a larger size for Defense instead now, though.
Didn't change much. Until I set up the other laptop, this may need to wait, unless someone else on the team wants to muck with it.Code:// flags flags2 tile width, height s_tile s_width s_height etile e_width e_height hp family cset anim e_anim, frate e_frate dp wdp weapon rate hrate step homing grumble item_set misc1 misc2 misc3 misc4 m5 m6 m7 m8 m9 m10 m11 m12 m13 m14 m15 bgsfx bosspal extend { 0x00000001, 0x00000000, 85, 1, 0, 0, 0, 0, 85, 1, 1, 2, eeGUY, 8, aNONE, aNONE, 0, 0, 1, 1, wNone, 0, 0, 0, 0, 0, isNONE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, 0, WAV_EDEAD, },
Is there any other file in which this type of thing is set? Perhaps somewhere in the quest header definitions?
Last edited by ZoriaRPG; 12-18-2016 at 10:58 PM.
http://www.zoriarpg.com/zc/LoE_Userbar.png http://zoriarpg.com/zc/EiyuuUserbar.png
http://www.zoriarpg.com/zc/CIS_Original.pnghttp://www.zoriarpg.com/zc/CIS_II_Userbar.png
Latest ZC 2.53 (Win32) | (Technical Specification | Changelog)
Latest ZC 2.55(Win32) | 2.55 Modules | (Techical Specification | Changelog)
ZC Source Code | ZClaunch Source Code
Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
ZScript & ZC-Related Pastebin | ZC Dev & Builds | ARCHIVED ZC Dev & Builds | YouTube Channel | Quests and ZScript Repository
All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable.
The tables have nothing to do with corrupted data though.
Have a look at some specs for the c language aggregate initialization rules: https://msdn.microsoft.com/en-us/library/81k8cwsz.aspx
The scriptdefense array at the end will be zero initialized.
[edit] Also, I have to ask it, (sorry if it seems obvious to you, just trying to help) not trying to sound like a ass or anything: Without properly reading the version correctly you'll never be able to read/write a quest file without it becoming corrupted. This is because without it you introduce a "chicken and egg" logic bug regardless. The only way around this is to compile two versions, one for saving and one for loading.
Last edited by Gleeok; 12-19-2016 at 01:48 AM.
This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.
No, that's something that I need to know. Could you expand on that, and specify: By version, do you mean the defined ZC version, V_GUYS, or something else? Have I done this somewhere, that you have observed?
Tell me this though: Why is expanding the enum with defLAST alone enough to corrupt this, when everything that thie packfile and editor generation code does relies on s size read fro this entry's placement?
If I add defs to the enum before edefLAST, and compile, with no other changes, the corruption still occurs. Is there anything with an explicit size that I missed? i simply fail to believe that the code can't resize itself around this, unless it's because it is shifting the values and the code isn't adaptive enough to comply. Even so, if it shifts the values, I'd expect it to mismatch when reading another quest, not the quest in memory, which is what led me to believe that the default values from defdata were involved.
Also, you said that the latest guyversion is 24, but in zdefs, it was 24 without my intervention.
Last edited by ZoriaRPG; 12-19-2016 at 02:48 AM.
http://www.zoriarpg.com/zc/LoE_Userbar.png http://zoriarpg.com/zc/EiyuuUserbar.png
http://www.zoriarpg.com/zc/CIS_Original.pnghttp://www.zoriarpg.com/zc/CIS_II_Userbar.png
Latest ZC 2.53 (Win32) | (Technical Specification | Changelog)
Latest ZC 2.55(Win32) | 2.55 Modules | (Techical Specification | Changelog)
ZC Source Code | ZClaunch Source Code
Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
ZScript & ZC-Related Pastebin | ZC Dev & Builds | ARCHIVED ZC Dev & Builds | YouTube Channel | Quests and ZScript Repository
All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable.
Sure. You add an extra 10 byte array and read an older quest-> guy 0 gets loaded fine, guy 1 gets offset 10 bytes and is garbage, guy 2 gets offset 20 bytes and is garbage, guy 3 gets offset 30 bytes and is garbage. The old quest file here is the chicken, and the new format is the egg. You have to be able to load the chicken into the egg here. Without knowing that the quest file is a chicken you're just shoving an egg up the chicken's ass and turning a chicken into an egg by unnatural means, and then hilarity ensues as you have a messed up looking chicken that's bleeding all over your couch screaming in pain. You then beat it to death with a bat and try to figure out what's wrong with the chicken, but you can't. Make sense? :)
Moral of the story: Don't @#$% your chickens before they hatch.
Last edited by Gleeok; 12-19-2016 at 03:42 AM.
This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.
http://www.zoriarpg.com/zc/LoE_Userbar.png http://zoriarpg.com/zc/EiyuuUserbar.png
http://www.zoriarpg.com/zc/CIS_Original.pnghttp://www.zoriarpg.com/zc/CIS_II_Userbar.png
Latest ZC 2.53 (Win32) | (Technical Specification | Changelog)
Latest ZC 2.55(Win32) | 2.55 Modules | (Techical Specification | Changelog)
ZC Source Code | ZClaunch Source Code
Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
ZScript & ZC-Related Pastebin | ZC Dev & Builds | ARCHIVED ZC Dev & Builds | YouTube Channel | Quests and ZScript Repository
All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable.
There are currently 1 users browsing this thread. (0 members and 1 guests)