These are chat archives for Kuree/Sims4Tools

22nd
Nov 2014
Keyi Zhang
@Kuree
Nov 22 2014 00:14
finished SpandrelCatalogResource
@Snaitf any new resources?
otherwise I will work on shader
Snaitf
@Snaitf
Nov 22 2014 00:21
Nope, nothing new for now, thanks for finishing the Spandrels, I think I can manage to do that myself from now on.
Although, the A8F7B517 resource clone code still needs fixing, i think.
Keyi Zhang
@Kuree
Nov 22 2014 00:23
kk will look at it
if there is no grouping id
just leave it alone
the framework will handle that
Snaitf
@Snaitf
Nov 22 2014 00:24
ah, ok then, that's what i was unsure of, ty
Keyi Zhang
@Kuree
Nov 22 2014 00:24
np
I designed the clone engine to make sure it's easy for wrapper writer to use
Snaitf
@Snaitf
Nov 22 2014 00:25
ok, good
Keyi Zhang
@Kuree
Nov 22 2014 00:47
gur
need to rewriting the entire code for s4pe updating check
Snaitf
@Snaitf
Nov 22 2014 01:09
Would there be an easy way to make DataBlobs editable within the grid, so that others can easily change the values (without using a hex-editor) to see what effect they have in-game?
Keyi Zhang
@Kuree
Nov 22 2014 01:10
hmm it depends how you want to implement it
cmx is an expert on winform design
but he's kinda busy now
Snaitf
@Snaitf
Nov 22 2014 01:11
ok, well, maybe an idea for later. It would make figuring out what unknown values do much easier.
Keyi Zhang
@Kuree
Nov 22 2014 01:11
the hex preview is kinda helpful
Snaitf
@Snaitf
Nov 22 2014 01:15
true, but what i mean is, if you have a chunk of 14 bytes, that are almost all 0's except one byte (say, 80) in the middle, you don't know if it's a uint of 0x00000008, or a uint of 0x80000000, or any other combination there-in. So I wouldn't know how to set up the wrapper, except by using a DataBlob. And figuring out what that 0x80 is would be much simpler if the DataBlob could be edited via the grid, instead of using a hex-editor. So, I was just curious if that would be something that could easily be done, or if it would be an intense change.
Keyi Zhang
@Kuree
Nov 22 2014 01:15
You need to tell the property grid using a custom editor
then write your own hex editor for it
Snaitf
@Snaitf
Nov 22 2014 01:17
oic - I thought maybe there would be a way to allow all DataBlobs to be edited with a single chunk of code - either way, it's beyond me. Was just an idea, nvm then.
Keyi Zhang
@Kuree
Nov 22 2014 01:17
if the data chunk is small we can treat it as a byte array
which is fine
when it turns out to be more than 100 bytes it will be kinda slow
and disorganized
Snaitf
@Snaitf
Nov 22 2014 01:18
hmm, ok, so how would a byte array be coded in a wrapper?
Keyi Zhang
@Kuree
Nov 22 2014 01:18
hmm you use an array
I would not do that
I'd rather let cmx to do it
Snaitf
@Snaitf
Nov 22 2014 01:19
oh, ok then
i'll just use a datablob for now, then
Snaitf
@Snaitf
Nov 22 2014 03:41
just made another pull request, now :fork_and_knife:
Keyi Zhang
@Kuree
Nov 22 2014 03:48
kk
will look at it after I finish the regex for update checking
Keyi Zhang
@Kuree
Nov 22 2014 04:31
the latest build can check updates now
Snaitf
@Snaitf
Nov 22 2014 04:34
Nice, will it only update from official releases, or will it update everything that has been committed to master?
Keyi Zhang
@Kuree
Nov 22 2014 04:34
only official releases
Snaitf
@Snaitf
Nov 22 2014 04:34
that's what I figured
Keyi Zhang
@Kuree
Nov 22 2014 04:34
it reads the github api
Snaitf
@Snaitf
Nov 22 2014 04:34
ah, ok, cool beans
Keyi Zhang
@Kuree
Nov 22 2014 04:35
well I can make it reads commits, but it looks unnecessary
Snaitf
@Snaitf
Nov 22 2014 19:14
Just made another pull request for Tool, Product Style, and Fence wrappers.
You'll need to update the clone code on these.
Also, there is a problem with the Fence wrapper. It parses and unparses fine, both in the preview and when using the grid, however, when trying to add a new resource of this type, there is an object not set to an instance error, and I can't seem to figure out what is wrong, maybe you could have a look?
Keyi Zhang
@Kuree
Nov 22 2014 19:14
I'll look at it
Snaitf
@Snaitf
Nov 22 2014 19:14
Thanks
Keyi Zhang
@Kuree
Nov 22 2014 19:15
and there're several redundant codes
I will clean them up
Snaitf
@Snaitf
Nov 22 2014 19:15
ok then
Keyi Zhang
@Kuree
Nov 22 2014 19:25
I can't find your fence code
oops
forgot to pull
now it has tons of conflicts now
Snaitf
@Snaitf
Nov 22 2014 19:32
conflicts?
Keyi Zhang
@Kuree
Nov 22 2014 19:32
merge conflicts
I resolved now
Snaitf
@Snaitf
Nov 22 2014 19:32
oh, ok
Keyi Zhang
@Kuree
Nov 22 2014 19:32
*them
Keyi Zhang
@Kuree
Nov 22 2014 19:37
when initialize a new dependlist
you can't pass stream to it
Snaitf
@Snaitf
Nov 22 2014 19:38
hmm, which line#?
Keyi Zhang
@Kuree
Nov 22 2014 19:38
like in the tool
ln 63
Snaitf
@Snaitf
Nov 22 2014 19:39
but the tool wrapper works fine
Keyi Zhang
@Kuree
Nov 22 2014 19:40
even if create a new resource from scratch?
Snaitf
@Snaitf
Nov 22 2014 19:40
i'll check again
Keyi Zhang
@Kuree
Nov 22 2014 19:40
it will try to read the stream
which doesn't have list information
it will break the wrapper
Snaitf
@Snaitf
Nov 22 2014 19:41
nah, it works
Keyi Zhang
@Kuree
Nov 22 2014 19:41
:O
but the list does exit?
Snaitf
@Snaitf
Nov 22 2014 19:44
I created the UnknownList by copying your code from MatdEntryList
Keyi Zhang
@Kuree
Nov 22 2014 19:44
but when you initialize the empty
you shouldn't pass the stream
it should be
if (this.unknownList1 == null) this.unknownList1 = new UnknownList(OnResourceChanged);
rather than
if (this.unknownList1 == null) this.unknownList1 = new UnknownList(OnResourceChanged, s);
Snaitf
@Snaitf
Nov 22 2014 19:46
oic, the reason it works in tool, is probably because the ref flag is set to false by default, so it doesn't get called when makeing a new one
Keyi Zhang
@Kuree
Nov 22 2014 19:46
that's what I thought
Snaitf
@Snaitf
Nov 22 2014 19:47
but then, when I go into grid and change the ref flag to true, it does create an empty unknown list, with no errors
Keyi Zhang
@Kuree
Nov 22 2014 19:48
it should throw some errors in my understanding
Snaitf
@Snaitf
Nov 22 2014 19:50
here is a completely new tool - http://i.imgur.com/GR4fbcM.png - and here is that same tool with listflag set to true in the grid - http://i.imgur.com/djardIZ.png
Keyi Zhang
@Kuree
Nov 22 2014 19:51
that's really weird
but anyway I changed it back to the constructor without stream
just in case it will break the unparse function
Snaitf
@Snaitf
Nov 22 2014 19:52
kk
Keyi Zhang
@Kuree
Nov 22 2014 19:52
and I also clean up some redundant code
Snaitf
@Snaitf
Nov 22 2014 19:53
in fact, that is how you did it in the spandrel wrapper, too
if (this.modlEntryList1 == null) this.modlEntryList1 = new ModlEntryList(OnResourceChanged, s);
  • this.modlEntryList1.UnParse(s);
which is why i did it that way, too
Keyi Zhang
@Kuree
Nov 22 2014 19:54
uhh oops
I'm sorry that was a mistake
Snaitf
@Snaitf
Nov 22 2014 19:55
heh, ok, least i know why mine was wrong, too
Keyi Zhang
@Kuree
Nov 22 2014 19:58
okay need to do homework now..
Snaitf
@Snaitf
Nov 22 2014 19:58
alright, thx for help
Snaitf
@Snaitf
Nov 22 2014 20:14

hmm, there is still a problem with the fence wrapper. I think it is in the lines:

for (int i = 0; i < r.ReadUInt16(); i++) this.unknownList1.Add(r.ReadUInt32());

Won't that try to read another uint16 every time through the loop?
I tried changing it to:

int count = r.ReadUInt16();
for (int i = 0; i < count; i++) this.unknownList1.Add(r.ReadUInt32());

that makes it parse ok, but when i hit grid/commit, the file gets corrupted, i'm not sure what else is wrong

Snaitf
@Snaitf
Nov 22 2014 20:23
what does simple list use for a count when unparsing? It needs to be a ushort.
Keyi Zhang
@Kuree
Nov 22 2014 21:08
I'll check it
found the problem
fixed it
thank you for testing it
Snaitf
@Snaitf
Nov 22 2014 23:38
ah, ok, ty and yw
A
@andrewtavera
Nov 22 2014 23:39
Hey Kuree, are you here?