Radial menu selection for spells

Discussion in 'General Modification' started by marc1967, Apr 4, 2015.

Remove all ads!
  1. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    Does anyone know how the connection is made between a spell and its radial menu selection found in spells_radial_menu_options.mes? For example, if I go to cast Summon Monster III, the radial menus comes up with a list of protos based on entry 1100:

    ; summon monster 2
    {1100} {4} ; number of monsters to select from in this spell
    {1101} {14393}
    {1102} {14406}
    {1103} {14398}
    {1104} {14401}​

    These can be changed within the spell itself, but what exactly tells Summon Monster III to use {1100} as it's sub menu? So if someone wanted to add a spell with it's own menu in the next available slot, which would currently be 2900, where is that change made?

    Thanks.
     
  2. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    From what I've seen it's hardcoded - I recently saw this for Summon Nature's Ally, there's just a hardcoded table in the DLL and a hardcoded function that accesses it.
     
  3. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    Ahh. So when the Summon spells of level VI, VII, VII, and IX were added, those must have already existed internally for use, and were already linked to their respective slot in spell_radial_menu_options.mes. So no dice on adding new ones without altering the dll.

    I notice though, that there's an available one at "{1900}" between where the nine summon monster spells end (1000 - 1800), and where nature's ally begins (2000+). I wonder what spell, if any, would link to that?
     
  4. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Actually that table only went to 2400 and was expanded to 2800 by SpellSlinger's DLL hack, so it didn't originally support those. So I don't think there's any particular spell for that.
     
  5. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    I've just overhauled this for Temple+, it will now read from the rules\spells entries. The specification is done via a new field "choices: ", which indicates which lines from spell_radial_menu_options to use. e.g. the spell specification for Command (067 - command.txt) now looks like this
    Code:
    School: Enchantment
    Subschool: Charm
    Descriptor: Mind-Affecting
    Descriptor: Language-Dependent
    Level: Clr 1
    Component: V
    Casting Time: 1 action
    Range: Close
    Saving Throw: Willpower
    Spell Resistance: Yes
    Projectile: No
    flags_Target: Range
    inc_flags_Target: Other
    exc_flags_Target: Self
    exc_flags_Target: Dead
    exc_flags_Target: Non-critter
    mode_Target: Single
    min_Target: 1
    max_Target: 1
    radius_Target: 0
    ai_type: ai_action_offensive
    choices: 211 212 213 214
    Similarly for the summon spells, except the proto numbers will just be directly listed via "proto choices: ". E.g. for Summon Nature's Ally IX
    Code:
    School: Conjuration
    Subschool: Summoning
    Level: Animal 9
    Level: Drd 9
    Component: V
    Component: S
    Casting Time: Full Round
    Range: Close
    Saving Throw: None
    Spell Resistance: No
    Projectile: No
    flags_Target: Range
    exc_flags_Target: Self
    exc_flags_Target: Other
    exc_flags_Target: Dead
    exc_flags_Target: Non-critter
    mode_Target: Area
    radius_Target: 1
    ai_type: ai_action_summon
    proto choices: 14516 14517 14518 14519
     
  6. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    How about specifying new Domains for spells?
     
  7. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    That would require quite a bit more work, including some UI replacements. Not a priority right now.
     
  8. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    So does this mean any spell at all can now be given a radial dial option by including the "choices" option in its rules file, and then just adding a new entry to spells_radial_menu_options.mes?

    This would be great for spells like Delayed Blast Fireball.
     
  9. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Yep :)
     
Our Host!