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

#editor

pegperegogaucho
Romans ~~in~~ on Uranus
pegperegogaucho
:buttthink:
pegperegogaucho
@adrientd alright adrien, i guess its time to tinker around with le Service de collision :LeBaguetteStealer: could you tell me what you know about it so far? :PauseChamp:
adrientd
As much as you can see in the files
pegperegogaucho
:Weirdga:
pegperegogaucho
alright
pegperegogaucho
i guess i will take "huh" and "numwhat" as a starting point :OkayChamp:
pegperegogaucho
@adrientd is there a way to get a KPostponedRef of an object just like kobjref(object); ?
adrientd
Why would you want to create KPostponedRef? 🤔
pegperegogaucho
bruh i forgot i can just access the reference with .ref :facepalm:
pegperegogaucho
@adrientd Could it be that **kenv.createObject(-1)** is broken? :PauseChamp: when i insert a new chunk using my method (copy hex of last chunk, add 4 bytes for pointer, then paste the chunk i want to insert. Finally edit the amount of objects in the level and then edit the newly made pointer) it works completely fine, no crashes, but when i use that function and do the same in code it crashes upon loading :WeirdChamp:
pegperegogaucho
``` if (selectedHook->isSubclassOf()) { auto nwczone = kenv.createObject(-1); auto oczone = selectedHook->cast(); nwczone->next = kenv.levelObjects.getClassType().objects[3]->cast()->next; kenv.levelObjects.getClassType().objects[3]->cast()->next = nwczone; nwczone->unk1 = oczone->unk1; nwczone->life = oczone->life; nwczone->node = oczone->node; nwczone->czSndDict = oczone->czSndDict; nwczone->czGround = oczone->czGround; nwczone->czNode1 = oczone->czNode1; nwczone->czNode2 = oczone->czNode2 nwczone->czObb = oczone->czObb; nwczone->czProjectileScrap = oczone->czProjectileScrap; nwczone->czParticleNode = oczone->czParticleNode; nwczone->czUnk7 = oczone->czUnk7; nwczone->czUnk8 = oczone->czUnk8; nwczone->czEvtSeqMaybe = oczone->czEvtSeqMaybe; nwczone->czEvtSeq2 = oczone->czEvtSeq2; } ``` basically what i normally do (like above but in c++) but this doesn't work :WeirdChamp:
adrientd
Never had a problem with a createObject, so it's probably something else.
pegperegogaucho
ah yeah i found it out now, i changed some value in a class and forgot to change the serialization/deserialization :PauseChamp:
pegperegogaucho
some class had a value unk1 and the class it inherited had unk1 too :hmmKay:
pegperegogaucho
@adrientd Is it possible that the editor currently cant decode references to sector objects?
adrientd
Yes it can, but you need to precise from which sector the object comes when decoding it (see the optional _sector_ argument in KEnv::readObjRef) By default, if _sector_ is -1, it will try to decode as an object from the currently loading STR, but if the reference is in the LVL, then it can only reference an object in the LVL)
pegperegogaucho
Yeah because I was some experiencing some issues earlier where if I would get the CKObject from a reference it will return a nullptr
pegperegogaucho
But I will look into that method :FeelsOkayMan:
pegperegogaucho
Download LeSpineEditor.mp4: