ToEEZWB - pet project

Discussion in 'Tech Guides and Help Threads' started by anatoliy, Nov 8, 2017.

Remove all ads!
  1. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    255
  2. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    @Sitra Achara, I really miss that you didn't expanded this section :D

    Code:
    BOOL LegacySectorSystem::SectorLoad(SectorLoc secLoc, Sector* sect)
    {
        return (*addresses.SectorLoadFunc)(secLoc, sect);
    }
    
    Kind of tired of rewriting this bin sector format deserializer. At least structs can be borrowed from Temple+ ))
     
  3. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Maybe the decompiled DLL file would be of use to you, here you go:

    https://we.tl/xOen2VF9r7

    The relevant function is MapSectorLoadNormal (or MapSectorLoadEditor ;) )
    If you have IDA I can also send you the database.
     
  4. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    Thank you @Sitra Achara !
    I just generated temple.idb using IDA 5.0 free. Is your file different? If so, please share :)
     
  5. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    PM'd!

    If you're interested, ToEE itself has a hidden "editor mode" which causes many of the system to initialize in "editor mode". With some effort these could be re-enabled and extended to provide a modern in-game editor. I think that would be a cool project ;)
     
  6. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    Yes, thanks again for PM conversation.

    And yes, as soon as I've seen WorldEd, which required temple.dll I assumed some editing routine could be in dll rather than in editor itself. And although I believe creating WorldEd2 would be overkill, using temple.dll as sub-routine in .net libraries would be interesting at least.

    Personally I'm more creator than decipher \ crossword lover. And from looking at such:
    Code:
    if ( tio_fread(v3 + 16, 8, 1, (TioFile *)a1) != 1 || tio_fread(v3 + 18, 36, 1, (TioFile *)a1) != 1 )
    
    I receive only headache))

    But I agree that it's kind of interesting))

    Thank you again @Sitra Achara :)
     
  7. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Press Y to assign type, press N to rename ;)

    But yeah, going through the DLL is quite a lot of work as well. @DarkStorm and I spent many hours on that...
     
  8. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    In ToEEWB (old) found errors in SectorLights parsing:
    * Flags and Type were swapped;
    * NightLight part was messed;
    * Algorithm first read 64 bytes. Then if flags & 0x10 or flags & 0x40 then read 8 bytes of partSys hash int 32 and handle int32. Then if flags & 0x40 were present then more bytes up to 108.
    That is why ToEEWB cannot read some sector lights. Sometimes size was 64, sometimes 72 and sometimes 108. ToEEWB always read 108.
     
  9. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,627
    Likes Received:
    538
    Little followup on this...

    I recently added ingame pathnode editing, and while on a roll, did some prototyping for ingame editing of sector tile flags (visibility etc.)

    SectorTileEdit.jpg

    As I see it, the added value over WorldEd (and ToEEZWB?) is instant feedback and problem solving.

    This is facilitated by the fact that ToEE itself shares many of the functions from WorldEd, including these tile overlay renderers, and it also retains the same save to file functions so it should be easy to export the changes. The UI part from WorldEd is completely absent however and would have to be redone from scratch, so that's most of the remaining effort.

    The question is, would this be in demand, or are the current tools good enough?
     
    _doug_ and anatoliy like this.
  10. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    WOW, it looks really cool! :)

    Obviously, it is nice to have more editors))

    For me the most important thing would be a possibility to add 3d walls. Even transparent ones. I would create pre-rendered background and would LOVE to have ability to set up easily walls around ready picture.
     
Our Host!