Icewind Dale 2 - so I wonder

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

Remove all ads!
  1. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    Ok I may have missed a subtle point - you're saying the IE engine does it this way? I.e. that it gives wolves a natural attack item, and you're just reproducing this?
    If so, make sure it can't be looted / disarmed hehe.
     
  2. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    254
    This is what I did this with the Drow items in the Verbomod back in the day.
     
  3. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    Off course not, it would be inconsiderable and well quite primitive. My producer class will see such items and transform them into natural attack setup for an NPC.
     
    Sitra Achara likes this.
  4. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    Figured out how to setup scenery area sound dynamically. There are undocumented flags: OSCF_* which I think should be moved to constants.py in T+.

    Code:
    OSCF_NO_AUTO_ANIMATE  = 1
    OSCF_BUSTED  = 2
    OSCF_NOCTURNAL  = 4
    OSCF_MARKS_TOWNMAP  = 8
    OSCF_IS_FIRE  = 0x10
    OSCF_RESPAWNABLE  = 0x20
    OSCF_SOUND_SMALL  = 0x40
    OSCF_SOUND_MEDIUM  = 0x80
    OSCF_SOUND_EXTRA_LARGE  = 0x100
    OSCF_UNDER_ALL  = 0x200
    OSCF_RESPAWNING  = 0x400
    OSCF_TAGGED_SCENERY  = 0x800
    OSCF_USE_OPEN_WORLDMAP  = 0x1000
    
    cabb = toee.game.obj_create(2068, utils_obj.sec2loc(448, 493))
    cabb.obj_set_int(toee.obj_f_sound_effect, 4111)
    cabb.obj_set_int(toee.obj_f_scenery_flags, const_toee.OSCF_SOUND_SMALL)
    
    Overall, sounds in IWD2 is huge pain in the ass. Fighting with it for 3rd day now. Many thanks to @Allyx , who did initial research here.
     
  5. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    This is all amazing to watch, Anatoliy. And you're being shelled, you say?

    Since Sitra probably mods in similar circumstances, I suggest all the Co8 modders move to a warzone asap!

    Allyx - Bristol ho!
     
    anatoliy likes this.
  6. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    I reckon you get the same effect with drop bears
     
  7. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    Completed sounds. At least at some workable solution.

    I'm not using cabbage objects as sound source. The issue is that it will play in a loop from some origin. But IWD2 often has many more sounds for one origin.

    For example:
    Code:
            amb = ctrl_ambients.AmbientHanlder()
            loc = utils_obj.sec2loc(452, 483)
            amb.setup(name="Sail Flaps1", flags="Enabled, RandomOrder", frequency=5, frequency_variation=0, radius=300, loc=loc, schedule="ALL")
            amb.setup_sound(sound_id=4138, durationf=3.948345, volume=70, title="AR1000\Sail Flaps1 AM1000M1")
            amb.setup_sound(sound_id=4139, durationf=4.373333, volume=70, title="AR1000\Sail Flaps1 AM1000M2")
            amb.setup_sound(sound_id=4140, durationf=3.601678, volume=70, title="AR1000\Sail Flaps1 AM1000M3")
            amb.setup_sound(sound_id=4141, durationf=3.601678, volume=70, title="AR1000\Sail Flaps1 AM1000M4")
            amb.setup_sound(sound_id=4142, durationf=2.998367, volume=70, title="AR1000\Sail Flaps1 AM1000M5")
            self.ambients.append(amb)
    
    So I had to create some sort of handler code to pick sound at random and implement cooldown.

    The only issue is that I want new function in the Temple:
    game.sound_local_loc_ex(sound_id, loc, volume, loop_count = 0, sound_size_type = 2)

    So I could set volume and size type of 3 (extra large) or 1 (small). What do you say @Sitra Achara ?
     
  8. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    Do you mean you need a new c function? I assume you can handle epxanding the api.
     
    anatoliy likes this.
  9. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    At some level - yes.

    I will have to dive into Sound_1003BC90 from Sound_Local_Medium. And refactor into new function. Not an easy task I'd say.
    Btw I'm still amazed how did you came up with SoundStream structure in the code in 2016.
     
  10. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    Potion of Healing
    When wholly consumed, this potion restores 9 hit points to the person. The effect is instantaneous and the potion is destroyed in the process.

    STATISTICS:

    Heals 9 points of damage
    Weight: 1 lb.
    Price: 75 gp

    So do we create this, or use Potion of Cure Light Wounds (Price: 50 gp)?
    Thoughts?
     
  11. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    You get shit done when you're a single student, hehe.
     
    anatoliy and FDR4PREZ like this.
  12. Endarire

    Endarire Ronald Rynnwrathi

    Joined:
    Jan 7, 2004
    Messages:
    982
    Likes Received:
    120
    A simple solution is to use 3.0’s or 3.5’s item rules.
     
  13. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    If it specifically does that, I'd suggest new item, but Endarire has a point.
     
  14. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    201
    Status update.
    Created readme.md with steps to install for users and devs. https://github.com/anatoliy-savchak/toee.zmod.iwd2

    Created some items, via newly created ProtoBuilder class in produce scripts. Now it looks like that:
    Code:
    ProtoBuilderItem(producer_app).cfp(9000).ufi("10Vellum").sp(12711).sf(idx_obj_f_item_flags, "OIF_IS_MAGICAL OIF_NO_DECAY").save()
    It will find available proto slot for given obj_type range and produce tab and mes files with description and unidentified description automatically.

    What is more important, that script will automatically create and add inventory icon from png to tga (center it if necessary) and put it into inventory.mes.

    Now it's time to test and debug dialogs. It would be nice to already have your testing automation API @Sitra Achara ))
     
    Sitra Achara likes this.
  15. Endarire

    Endarire Ronald Rynnwrathi

    Joined:
    Jan 7, 2004
    Messages:
    982
    Likes Received:
    120
    @Shiningted
    I see your point and raise you double!
     
Our Host!