Asterix Gaming Guild Logo GeneralXXLXXL 2XXL 3XXXLOlympic GamesXXL EditorToolsOff-TopicXXL RomasteredXXL 2 RemasteredOther GamesModsCaesar's ChallengeUnfair XXLPatchesFan ArtPersonal ArtSpeedrunningMediaRandomizerBETA RomeHSKALPresence AdrienPresence SPQRSupport Bot Helpdesk

#editor

deathhound246
I'll need to make a note of this somewhere :Obelul:
deathhound246
release build still works fine so i've probably screwed something up :Obelul:
deathhound246
This doesn't appear to work for the bytes mentioned yesterday Using the same statements in the KEnv func, it's not returning any correct numbers
deathhound246
Also in the LE format from PC build
deathhound246
got this fixed; i was stupid and had the addFactory calls for CAnimationManager and CSectorAnimation commented out :KEKW:
deathhound246
Yea, loading into a level with CMaterial registered, it crashes in this file line 919 (assert clid is not higher than objects list size)
pegperegogaucho
That's not good :Obelul:
deathhound246
surely theres classes already registered for Alice that go through this function? which means that this is probably not a kobjref in this game?
deathhound246
it does seem to be a "pointer" or reference of some kind though, but the bits at least arent right for this
adrientd
The big problem especially with CMaterial is that the format changes for almost every game, so the CMaterial class in the editor needs to be adapted.
deathhound246
could that also be the reason theres just big chunks of red and green floor for Alice in the main editor? cus they aren't that colour in game lmao
adrientd
Probably the crash is that it was trying to read a pointer from the file even though it got something else, as the format changes.
adrientd
My guess is that the game uses vertex colors as a way to perform multitexturing: the level model has some faces that are assigned to at most 4 textures, and the vertex color selects which one to render: red=first texture, green=second texture, ... and you can combine colors to blend between textures.
adrientd
The editor doesn't support multitexturing yet, so that's why it just presents the model as if they had regular vertex colors and one texture.
deathhound246
ahhhh
deathhound246
I actually think I've just figured part of this out The bytes `00 8A 00 00` are for the first instance of CGeometry Just for the byte `8A`, it's bits are `10001010` The first 2 bits `10` equal int 2 (class ID), the remaining bits `001010` equal 10 (class group) Same for CParticleGeometry, bytes are `00 4A 00 00` Bits are `01001010` First 2 bits `01` equal 1 (class ID), remaining bits are the same as CGeometry, `001010`, equal 10 (class Group)
deathhound246
Still need to find the obj number bits, but i reckon it'll be somewhere in the last byte since it's the only one that changes
pegperegogaucho
Sounds good!
pegperegogaucho
Something that I just realized: the first byte could be something else, and the next 4 bytes are a reference
pegperegogaucho
Example: (00) 4A 00 02 -> 2004A category: 10 class id: 1 obj #: 1