Icewind Dale 2 - so I wonder

Discussion in 'Icewind Dale Total Conversion' started by anatoliy, Aug 24, 2021.

Remove all ads!
  1. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    Yesterday we had awesome talk with @Sitra Achara in Discord. Sitra explained me a lot, and was very helpful and cheerful. Thank you very much my friend!! :)

    We found issue with Dialog Line, it was a problem with missing {} tokens. Now it works very well.

    As for other topics:
    1. Deities and Domains should be configurable in Temple+. I do think it's time to do it))
    2. NPC CR could be mapped almost one to one (except that IWD2 does not have 1/3 CR) with combat_vars.mes/Experience multiplier set to 0.5
    3. There is possibility to generate SVBs (sector visibility blocking) but I have to research that file format. Sitra suggested looking into Open Temple. I wonder if there are ready to use code. @DarkStorm ?
    I also researched IWD2 Point Buy.

    Essentially they start from all abilities set to 10 with 16 points or 28 if from 8. But spending progression is linear meaning 1 point per increase, not 2 from 14 and 3 from 17.

    Although I would rather have Temple Plus setting for that, for now it roughly corresponds to point buy 38.
     
  2. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    Oh! So you didn't fancy hacking the Deities Domains and Favoured Weapons into Temple.dll in HexEdit? You missed out on all those hours of fun... :p
     
    anatoliy likes this.
  3. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    It is unrelated to first heartbeat or anything like that. As usual, it's something stupid - when you have a very long word it just breaks the rendering from that point on.
    In your case you were printing stuff like "Palisade_Iron_blah_blah_blah_blah = 2 ..." and the long variable name counts as one long word.

    That is of course a bug but for now please avoid using very long words ;)
     
    anatoliy likes this.
  4. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    Thank you Sitra!!! :)

    Status - working on Wall Polygons to SVB research
    WallPolygons1.jpg
     
  5. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    By the way, I wanted to ask - wouldn't it make more sense to convert these polygons to DAG clippers? Since the view is orthographic you could convert them to surfaces with constant height and I think they would work the same as true 3d clippers. It would be more visually appealing as well I think.
     
    anatoliy likes this.
  6. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    Oh, I would love to have ability to draw polygons into DAG directly. But we don't have any library for that, don't we?
     
  7. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
  8. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    Allright, had to read about meshes, and particularly Face-vertex meshes in Wikipedia. Sigh, but yes, it's possible. We have 2D polygons data from background IWD2 map image. So conversion to FV meshes would be called triangulation (triangulate_polygon).

    But even so, result will be like some sort of flat roof over NPCs (and hopefully not enlarged)). Now it will work fine for real roofs (although I will need to calculate adjustment to south due to 3D shift up from z-height value).

    But I'm not sure about front walls.
    Take a look onto bottom left building on the map pic above. It could be a problem.
     
  9. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    You are quite right. Come to think of it, they're called wall polygons, after all.
    I took a peek inside the gemRB code and it looks like it only occludes you if youre above the "baseline" (i think that's determined by the first edge of the polygon). Assuming that, then it basically behaves like a wall, with one edge lying at z=0. I guess they have to do sthg like that since IE doesn't have true 3D character models. Not 100% sure though, can you see how it works out ingame? (Iin IE that is)
     
  10. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    Here is the relevant link to gemRB:
    https://github.com/gemrb/gemrb/blob...emrb/plugins/WEDImporter/WEDImporter.cpp#L314

    I was wondering how it dealt with wall polygons that aren't touch the floor - it looks like this is set by the flag WF_HOVER, which specifies that the first two vertices are not part of the actual polygon and are just used to define the baseline.
    For converting to a 3d mesh, this basically sets the ground reference.

    BTW, I get the feeling that it'd be easier to just combine parts of gemRB into Temple+ than convert all the formats...
     
    anatoliy likes this.
  11. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    I hope it's not some kind of harsh joke ))

    Allright, let me give you additional arguments, why native support in Temple+ of 2D format of IE is GRAND IDEA:

    Background Tiles (TIS)
    TIS file holds lot's of background tiles, similar to what ToEE has (although not sure what tile size is). It would be nice to simply specify WED file, (not even parsed by me yet) which holds list of overlays, door polygons and wall polygons.

    wed1.jpg

    So painting native IE background tiles would ease map conversion for sure. Not critical.

    I scanned overlays in IWD2 and IWD1 - there are no overlay with other index than 0. Which is huge, as I thought they use such for covering broken bridge for example. I thought I would have to create some sort of tile-scenery to display such.

    Doors
    IE does not have real doors. It's simply region with polygons for highlight and closed door tiles. Essentially background tiles display image where all doors are opened. But when door object has flag CLOSED then some specific tiles on background would paint different tile images.

    door_opened.jpg door_closed.jpg

    Also
    ar1002_containsers_hi.jpg ar1002_containsers_hi_closed.jpg

    Containers
    It's a pain as well. Containers are also regions with polygons. See pic above. I was thinking to emulate 2D by creating 3D mesh which would end up visually into these polygons. Containers do not have CLOSED picture tiles.

    Info Triggers
    Also regions. Clicking on which would show nice information text.
    ar1100_regions.jpg

    =============

    I dare to say, but all of these would be more logically to implement in some way in the TemplePlus. Without it there will be a lot of pain, huge amount of development time and possibly poor result.

    Another point is that that would ease up other IE game conversion immensely.

    Also, it's a way to open way to create other modules using IE toolset. Plus ability to create traps.

    Please consider it. Thanks!!! :)
     
  12. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    No joke, I am very much in favor. The best part is that the code is basically written, you just have to integrate it into Temple+ (which is not trivial, but better than doing from scratch at least).
    I'm just constrained with time unfortunately...
     
    anatoliy likes this.
  13. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    So it's ie_mod for TemplePlus essentially. Got to do new thread for this.
     
    Allyx likes this.
  14. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    To those who are wondering what's going on - the progress is stalled a bit, due to various reasons, but most important one is my normal life work overload. It's mostly Azure plumbing work, but still lot's to do.

    Currently I'm slowly working on libtemple project. I already did backgrounds split and assemble from - to tiles; sector files save / load (except objects).

    The reason for directing my attention to libtemple is following - I need this function:
    • grounds_loc_to_inches(x, y, top_left_grounds_anchor_loc)
    Inches coordinates plane is what ToEE / Temple+ is actually using at the bottom of different other coordinate systems. Which are Sector coordinates plane, plus Sector subtiles and Grounds coordinates plane.

    I need it to map Actors, Doors, Containers, Regions, Entrances etc from IWD2 to ToEE coordinates. So far I was using somewhat imprecise homebrew unsatisfactory method. Also for SVB generation, just in case if DAG implementation will be unsuccessful.

    After that there could be discussion of ie_mod for TemplePlus.
     
    Marcelo Abner and Allyx like this.
  15. Oleg Ben Loleg

    Oleg Ben Loleg Established Member Supporter

    Joined:
    Jan 9, 2010
    Messages:
    306
    Likes Received:
    20
    Although I don't understand most of the details I'm always glad when I see you made some progress.
     
    Kriegdoom likes this.
Our Host!