Dialog/Python Commands

Discussion in 'Tech Guides and Help Threads' started by Phalzyr, Oct 7, 2003.

Remove all ads!
  1. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    First off which line number one starts at when speaking to an NPC is decided by their python file in the function san_dialog( attachee, triggerer ), and you are limited to showing 5 PC replies at a time.

    {NPC line #}{2}{3}{4}{5}{6}{7}
       2. Text for male
       3. Text for female
       5. Uneeded but they tend to restate line # here

    {PC line #}{2}{3}{4}{5}{6}{7}
       2. Text or Greeting Code
       3. Always blank
       4. Intelligence check. If negitive then Less than or equal to number.
          If positive then greater than or = number.
       5. Condition Code (See Below For Options)
       6. NPC Line # to go to IF selected.
       7. Execution Code ran IF choosen. (See Below For Options)

    In text Field the following can be used:

    @pcname@ = Player’s Name
    @npcname@ = NPC’s Name

    A: = Appreciation Response (Thank You)
    B: = Barter Response
    C: = Story state response
    E: = Exit Response
    F: = Forget it response
    G: = Greeting Response, NPC ONLY
    K: = More Questions Response
    N: = "No" Response
    Q: = Crash To Desktop When Displayed.
    R: = Any Rumors? Auto asks for money.
    S: = Sorry Response
    Y: = Yes Response

    Edting Greeting Codes: (gamedir/data/mes/)
    For B,C,E,F,K,N,S,Y edit gd_pc2m.mes and gd_pc2f.mes
    For A,R edit gd_cls_pc2m.mes and gd_cls_pc2f.mes
    Note: these are gender of whom you talk to not your PC.
     
    Last edited: Oct 10, 2003
  2. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    Conditionals/Variables: (Quick List See Below Post For More Detail)

    Note: obj means object and can be replaced by any object. (IE, triggerer, attachee, npc, pc, etc) # mean a number value, 1 means a 0 or 1 (false or true). Any == sign can be replaced by normal conditional codes (> < >= <= !=). Not all listed here some functions can be used as conditionals/variables.

    Conditional: Variables(With Common Comparison listed):

    anyone( pc.group_list(), "has_follower", # )
    anyone( pc.group_list(), "has_item", # )
    anyone( pc.group_list(), "item_find", # )
    anyone( pc.group_list(), "has_wielded", # )
    find_container_near(npc,#) != OBJ_HANDLE_NULL //must include utilities.py
    game.areas[#] == 1
    game.global_flags[#] == 1
    game.global_vars[#] == #
    game.party_npc_size() == #
    game.party_pc_size() == #
    game.quests[#].state == qs_unknown //qs_accepted, qs_mentioned, qs_botched, qs_completed
    game.story_state == #
    is_daytime() == 1
    npc.area == #
    npc.has_met(pc)
    npc.item_find(#) == OBJ_HANDLE_NULL
    npc.leader_get() == OBJ_HANDLE_NULL
    npc.map == #
    pc.d20_query(Q_IsFallenPaladin) == 1
    pc.follower_atmax()
    pc.has_feat(feat_slippery_mind)
    pc.has_wielded(#)
    pc.money_get() == #
    pc.skill_level_get(npc, skill_gather_information) == #
    pc.stat_level_get( stat_deity ) == #
    pc.stat_level_get( stat_gender ) == gender_male //gender_female
    pc.stat_level_get(stat_alignment) == LAWFUL_GOOD
    pc.stat_level_get(stat_level_paladin) == #
    pc.stat_level_get(stat_level_wizard) == #
    pc.stat_level_get(stat_race) == race_orc
    pc.stat_level_get(stat_strength) >= #
     
    Last edited: Oct 10, 2003
  3. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    Executive Functions: (Quick List See Below For More Detail)

    Note: obj means object and can be replaced by any object. (IE, triggerer, attachee, npc, pc, etc) # mean a number value, 1 means a 0 or 1 (false or true). Any == sign can be replaced by normal conditional codes ( > < >= <= != ). Not all listed here some functions can be used as conditionals.
    Procedures normally used: (Need Additional Python Code To Work)

    free_rep( npc, pc )
    all_run_off(npc,pc)
    argue(n pc,pc,# )
    make_hate( npc, pc )
    make_like( npc, pc )
    make_worry( npc, pc )
    party_transfer_to( npc, # )
    run_off(npc,pc)

    Actual Functions: Those with an * in front are known to work directly from dialog execute field. I will not restate variables shown in prior post.

    * create_item_in_inventory( #, obj ) //must include utilities.py
    critter_is_unconscious(obj) : //must include utilities.py
    find_npc_near( obj, name ) : //must include utilities.py OBJ_HANDLE_NULL
    find_container_near( obj, name ) : //must include utilities.py
    game.brawl( triggerer, attachee ) // when ending it runs def brawl_end

    game.char_ui_hide()
    game.combat_is_active()
    game.encounter_queue.append(#)
    game.fade(#,#,#,1) // 2nd usually 0, 3rd is used for movies
    * game.fade_and_teleport( time#, #, #, map#, x#, y# )
    game.leader.begin_dialog( attachee, line# )
    * game.map_flags( #, #, # )
    game.moviequeue_add( # )
    game.moviequeue_play_end_game()
    game.new_sid = #
    game.obj_create( #, loc )
    game.particles( "ef-MinoCloud", obj )
    game.party_alignment == NEUTRAL_EVIL
    game.party[0].prestige_class_add[#]
    game.party[0].reputation_add( # )
    game.party[0].reputation_has( # )
    game.party_pc_size() == #
    * game.quests[#].unbotch()
    game.random_range(#,#)
    game.sleep_status_update()
    game.timevent_add( function, ( obj, obj ), time#) //7200000 = 2 hours
    game.tutorial_is_active():
    game.tutorial_show_topic( TAG_TUT_MEMORIZE_SPELLS )
    game.tutorial_toggle()
    * game.worldmap_travel_by_dialog(#)
    group_average_level( obj ) : //must include utilities.py
    group_percent_hp( obj ) : //must include utilities.py
    is_safe_to_talk(speaker,listener): //must include utilities.py
    location_from_axis( x#, y# ) : //must include utilities.py
    location_to_axis( loc ) : //must include utilities.py
    obj.ai_shitlist_remove( pc )
    * obj.attack(obj)
    * obj.attacks(obj)
    obj.begin_dialog( obj, # ) //second is npc speaker
    * obj.cast_spell( spell_, obj )
    obj.concealed_set( 1 )
    obj.condition_add_with_args( "Invisible", #, # ) //Fallen_Paladin
    obj.critter_flags_set( OCF_MUTE )
    obj.damage(OBJ_HANDLE_NULL,D20DT_SUBDUAL,damage#,D20DAP_NORMAL)
    * obj.destroy()
    obj.distance_to(obj)
    obj.dominate( obj ) //first is dominated by second obj
    obj.float_line(360,triggerer)
    obj.float_mesfile_line( 'mes\\spell.mes', 30002 )
    obj.follower_add(obj)
    obj.follower_remove(obj)
    obj.get_deity()
    obj.has_follower(#)
    obj.has_met(obj)
    obj.has_los(obj)
    obj.has_wielded(#):
    obj.heal( OBJ_HANDLE_NULL, # )
    obj.healsubdual( OBJ_HANDLE_NULL, # )
    obj.is_category_type( mc_type_undead ):
    obj.is_friendly(obj)
    obj_is_item( obj ) : //must include utilities.py
    obj.item_find(#) != OBJ_HANDLE_NULL
    * obj.item_transfer_to(obj, #)
    * obj.item_transfer_to_by_proto(obj,#)
    obj.item_wield_best_all()
    obj.leader_get() != OBJ_HANDLE_NULL
    obj.location == loc
    obj.move( location_from_axis( 491, 541 ) )
    obj.money_get() == #
    obj.name == #
    * obj.object_flag_set(OF_OFF)
    obj.object_flag_unset(OF_OFF)
    obj_percent_hp( obj ) : //must include utilities.py
    * obj.reaction_adj( obj, #)
    obj.reaction_get( obj )
    obj.reaction_set( obj, # )
    obj.reflex_save_and_damage( trap.obj, 20, D20_Save_Reduction_Half, D20STD_F_SPELL_DESCRIPTOR_ACID, damage, damagetype, D20DAP_NORMAL )
    obj.reputation_has[#] == 1
    obj.resurrect( CRITTER_R_CUTHBERT_RESURRECT, 0 )
    obj.rotation == rot
    obj.runoff(obj.location-3)
    obj.saving_throw( 15, D20_Save_Fortitude, D20STD_F_POISON, trap.obj )
    * obj.spells_pending_to_memorized()
    obj.spell == spell_heal
    obj.spell_damage( spell.caster, D20DT_FORCE, damage, D20DAP_UNSPECIFIED, D20A_CAST_SPELL, spell.id )
    obj.standpoint_set( STANDPOINT_NIGHT, # )
    obj.standpoint_set( STANDPOINT_DAY, # )
    obj.steal_from(obj)
    obj.type == obj_t_pc
    obj.turn_towards(attachee)
    obj.unconceal()
    party_transfer_to( target, oname ) : //must include utilities.py
    * pc.barter(npc)
    * pc.follower_add(npc)
    * pc.follower_remove(npc)
    * pc.has_atoned()
    pc.item_get( item )
    * pc.money_adj(#)
    * pc.prestige_class_add[#]
    * pc.reputation_add( # )
    pc.reputation_remove( # )
    set_join_slides( attachee, triggerer ) : //must include utilities.py
    should_heal_hp_on( obj ) : //must include utilities.py
    should_heal_disease_on( obj ) : //must include utilities.py
    should_heal_poison_on( obj ) : //must include utilities.py
    should_resurrect_on( obj ) : //must include utilities.py

    some looping statement examples:
    for pc in game.party:
    for obj in game.obj_list_vicinity(attachee.location,OLC_PC):
    for obj in obj.group_list():
    while (attachee.item_find(#) != OBJ_HANDLE_NULL):
     
    Last edited: Oct 10, 2003
  4. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    Conditionals: (Detailed In Progress)

    Note: obj means object and can be replaced by any object. (IE, triggerer, attachee, npc, pc, etc):

    I will not explain things that are too obviuos.
    any == sign can be replaced by normal conditional codes (> < >= <= !=)

    anyone( pc.group_list(), "has_follower", # )
    # = The number of the follower from protos.tab

    anyone( pc.group_list(), "has_item", # )
    # = The number of the item from protos.tab

    anyone( pc.group_list(), "item_find", # )
    # = The number of the item from protos.tab

    anyone( pc.group_list(), "has_wielded",# )
    # = The number of the item from protos.tab

    find_container_near(npc,#) != OBJ_HANDLE_NULL
    # = ?

    game.areas[#] == ##
    # = the area number of world map
    ## = 0 if disabled, 1 if shown

    game.global_flags[#] == ##
    # = the flag you want to check
    ## = what it is compared to (0 is disabled, 1 is shown)

    game.global_vars[#] == ##
    # = the global variable you want to check
    ## = what it is compared to

    game.party_npc_size() >= 2

    game.party_pc_size() <= 1

    game.quests[#].state == qs_accepted
    # = The quest number from gamequest.mes
    Quest states: qs_accepted, qs_mentioned, qs_completed, and qs_botched

    game.story_state == 0

    is_daytime()

    npc.area == 3

    npc.has_met(pc)

    npc.item_find(#) != OBJ_HANDLE_NULL
    # = The number of the item from protos.tab

    npc.leader_get() == OBJ_HANDLE_NULL

    npc.map > 5019

    pc.d20_query(Q_IsFallenPaladin) == #
    # = 0 not fallen, 1 fallen

    pc.follower_atmax()

    pc.has_feat(FEAT)

    pc.has_wielded(#)
    # = The number of the item from protos.tab

    pc.money_get() == #
    Check to see how much money the PC has

    pc.skill_level_get(npc, skill_gather_information) >= #

    pc.stat_level_get( STAT ) == #
    Stats: stat_deity, stat_gender(gender_male, gender_female), stat_alignment(LAWFUL_GOOD), stat_level_paladin, stat_level_wizard, stat_level_cleric, stat_level_fighter, stat_level_bard, stat_race(race_orc), stat_strength, stat_intelligence, stat_wisdom, stat_charisma, stat_dexterity, stat_constitution, stat_hp_current, stat_subdual_damage
     
    Last edited: Oct 9, 2003
  5. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    Executive Functions: (Detailed In Progress)

    Note: obj means object and can be replaced by any object. (IE, triggerer, attachee, npc, pc, etc):

    The following require a corresponding function in the python file. I am only going to detail those that are commonly used(with a few exception) Then detail actual python code instead of function names.

    free_rep( npc, pc )
    This gives you the reputition of Freeing prisoners from the TOEE and is only present on one female prisoner. She has def free_rep( attachee, triggerer ): in her python with nothin after it.

    all_run_off(npc,pc)
    location-3 below usually means disappear for good.
    python code for common occurrence as follows:
    def all_run_off(npc, pc):
    &nbsp;&nbsp;for obj in game.obj_list_vicinity(npc.location,OLC_NPC):
    &nbsp;&nbsp;&nbsp;&nbsp;if (obj.leader_get() == OBJ_HANDLE_NULL):
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;obj.runoff(obj.location-3)


    argue(npc,pc,40)
    python code for common occurrence as follows:
    def argue( attachee, triggerer, line):
    &nbsp;&nbsp;npc = find_npc_near(attachee,8007)
    &nbsp;&nbsp;&nbsp;&nbsp;triggerer.begin_dialog(attachee,30)
    &nbsp;&nbsp;r = attachee.reaction_get( triggerer )
    &nbsp;&nbsp;if ( r > 20 ):
    &nbsp;&nbsp;&nbsp;&nbsp;n = 20 - r
    &nbsp;&nbsp;&nbsp;&nbsp;attachee.reaction_adj( triggerer, n)

    make_hate( npc, pc )
    &nbsp;&nbsp;if ( attachee.reaction_get( triggerer ) >= 20 ):
    &nbsp;&nbsp;&nbsp;&nbsp;attachee.reaction_set( triggerer, 20 )

    make_like( npc, pc )
    &nbsp;&nbsp;if ( attachee.reaction_get( triggerer ) <= 71 ):
    &nbsp;&nbsp;&nbsp;&nbsp;attachee.reaction_set( triggerer, 71 )

    make_worry( npc, pc )
    &nbsp;&nbsp;if ( attachee.reaction_get( triggerer ) >= 40 ):
    &nbsp;&nbsp;&nbsp;&nbsp;attachee.reaction_set( triggerer, 40 )

    party_transfer_to( npc, 5815 )
    def party_transfer_to( target, oname ):
    &nbsp;&nbsp;item = pc.item_find( oname )
    &nbsp;&nbsp;if item != OBJ_HANDLE_NULL:
    &nbsp;&nbsp;&nbsp;&nbsp;pc.item_transfer_to( target, oname )
    &nbsp;&nbsp;&nbsp;&nbsp;return item
    &nbsp;&nbsp;return OBJ_HANDLE_NULL

    run_off(npc,pc)
    def run_off( attachee, triggerer ):
    &nbsp;&nbsp;attachee.runoff(attachee.location-3)

    The following are python scripting command Those with an * in front are known to work directly from dialog execute field.

    * create_item_in_inventory( #, obj ) //must include utilities.py


    critter_is_unconscious(obj) : //must include utilities.py


    find_npc_near( obj, name ) : //must include utilities.py OBJ_HANDLE_NULL


    find_container_near( obj, name ) : //must include utilities.py


    game.brawl( triggerer, attachee ) // when ending it runs def brawl_end[/B]


    game.char_ui_hide()


    game.combat_is_active()


    game.encounter_queue.append(#)


    game.fade(#,#,#,1) // 2nd usually 0, 3rd is used for movies


    * game.fade_and_teleport( time#, #, #, map#, x#, y# )


    game.leader.begin_dialog( attachee, line# )


    * game.map_flags( #, #, # )


    game.moviequeue_add( # )


    game.moviequeue_play_end_game()


    game.new_sid = #


    game.obj_create( #, loc )


    game.particles( "ef-MinoCloud", obj )


    game.party_alignment == NEUTRAL_EVIL


    game.party[0].prestige_class_add[#]


    game.party[0].reputation_add( # )


    game.party[0].reputation_has( # )


    game.party_pc_size() == #


    * game.quests[#].unbotch()


    game.random_range(#,#)


    game.sleep_status_update()


    game.timevent_add( function, ( obj, obj ), time#) //7200000 = 2 hours


    game.tutorial_is_active():


    game.tutorial_show_topic( TAG_TUT_MEMORIZE_SPELLS )


    game.tutorial_toggle()


    * game.worldmap_travel_by_dialog(#)


    group_average_level( obj ) : //must include utilities.py


    group_percent_hp( obj ) : //must include utilities.py


    is_safe_to_talk(speaker,listener): //must include utilities.py


    location_from_axis( x#, y# ) : //must include utilities.py


    location_to_axis( loc ) : //must include utilities.py


    obj.ai_shitlist_remove( pc )


    * obj.attack(obj)


    * obj.attacks(obj)


    obj.begin_dialog( obj, # ) //second is npc speaker


    * obj.cast_spell( spell_, obj )


    obj.concealed_set( 1 )


    obj.condition_add_with_args( "Invisible", #, # ) //Fallen_Paladin


    obj.critter_flags_set( OCF_MUTE )


    obj.damage(OBJ_HANDLE_NULL,D20DT_DAMAGETYPE, damage#,D20DAP_ATTACKTYPE)
    Damage Types: ACID, COLD, ELECTRICITY, FIRE, FORCE, NEGATIVE_ENERGY, POISON, POSITIVE_ENERGY, SONIC, SUBDUAL, UNSPECIFIED
    Attack Types: NORMAL, NOT_APPLICABLE, UNSPECIFIED

    * obj.destroy()


    obj.distance_to(obj)


    obj.dominate( obj ) //first is dominated by second obj


    obj.float_line(360,triggerer)


    obj.float_mesfile_line( 'mes\\spell.mes', 30002 )


    obj.follower_add(obj)


    obj.follower_remove(obj)


    obj.get_deity()
    Deities: (DEITY_*) BOCCOB, CORELLON_LARETHIAN, EHLONNA, ERYTHNUL, FHARLANGHN, GARL_GLITTERGOLD, GRUUMSH, HEIRONEOUS, HEXTOR, KORD, MORADIN, NERULL, OBAD_HAI, OLIDAMMARA, PELOR, ST_CUTHBERT, VECNA, WEE_JAS, YONDALLA, OLD_FAITH, ZUGGTMOY, IUZ, LOLTH, PROCAN, NOREBO, PYREMIUS, RALISHAZ


    obj.has_follower(#)


    obj.has_met(obj)


    obj.has_los(obj)


    obj.has_wielded(#):


    obj.heal( OBJ_HANDLE_NULL, # )


    obj.healsubdual( OBJ_HANDLE_NULL, # )


    obj.is_category_type( mc_type_undead ):


    obj.is_friendly(obj)


    obj_is_item( obj ) : //must include utilities.py


    obj.item_find(#) != OBJ_HANDLE_NULL


    * obj.item_transfer_to(obj, #)


    * obj.item_transfer_to_by_proto(obj,#)


    obj.item_wield_best_all()


    obj.leader_get() != OBJ_HANDLE_NULL


    obj.location == loc


    obj.move( location_from_axis( 491, 541 ) )


    obj.money_get() == #


    obj.name == #


    * obj.object_flag_set(OF_OFF)


    obj.object_flag_unset(OF_OFF)


    obj_percent_hp( obj ) : //must include utilities.py


    * obj.reaction_adj( obj, #)


    obj.reaction_get( obj )


    obj.reaction_set( obj, # )


    obj.reflex_save_and_damage( trap.obj, 20, D20_Save_Reduction_Half, D20STD_F_SPELL_DESCRIPTOR_ACID, damage, damagetype, D20DAP_NORMAL )


    obj.reputation_has[#] == 1


    obj.resurrect( CRITTER_R_CUTHBERT_RESURRECT, 0 )


    obj.rotation == rot


    obj.runoff(obj.location-3)


    obj.saving_throw( 15, D20_Save_Fortitude, D20STD_F_POISON, trap.obj )


    * obj.spells_pending_to_memorized()


    obj.spell == spell_heal


    obj.spell_damage( spell.caster, D20DT_FORCE, damage, D20DAP_UNSPECIFIED, D20A_CAST_SPELL, spell.id )


    obj.standpoint_set( STANDPOINT_NIGHT, # )


    obj.standpoint_set( STANDPOINT_DAY, # )


    obj.steal_from(obj)


    obj.type == obj_t_pc


    obj.turn_towards(attachee)


    obj.unconceal()


    party_transfer_to( target, oname ) : //must include utilities.py


    * pc.barter(npc)


    * pc.follower_add(npc)


    * pc.follower_remove(npc)


    * pc.has_atoned()


    pc.item_get( item )


    * pc.money_adj(#)


    * pc.prestige_class_add[#]


    * pc.reputation_add( # )


    pc.reputation_remove( # )


    set_join_slides( attachee, triggerer ) : //must include utilities.py


    should_heal_hp_on( obj ) : //must include utilities.py


    should_heal_disease_on( obj ) : //must include utilities.py


    should_heal_poison_on( obj ) : //must include utilities.py


    should_resurrect_on( obj ) : //must include utilities.py


    Some looping statement examples:

    for pc in game.party:


    for obj in game.obj_list_vicinity(attachee.location,OLC_PC):


    for obj in obj.group_list():


    while (attachee.item_find(#) != OBJ_HANDLE_NULL):
     
    Last edited: Oct 10, 2003
  6. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    Feat List I found in a pc_start.py

    proto_table = {
    feat_exotic_weapon_proficiency_bastard_sword: 4015,
    feat_exotic_weapon_proficiency_dwarven_waraxe: 4063,
    feat_exotic_weapon_proficiency_gnome_hooked_hammer: 4075,
    feat_exotic_weapon_proficiency_orc_double_axe: 4062,
    feat_exotic_weapon_proficiency_spike_chain: 4209,
    feat_exotic_weapon_proficiency_shuriken: 4211,
    feat_improved_critical_dagger: 4060,
    feat_improved_critical_light_mace: 4071,
    feat_improved_critical_club: 4074,
    feat_improved_critical_halfspear: 4116,
    feat_improved_critical_heavy_mace: 4068,
    feat_improved_critical_morningstar: 4070,
    feat_improved_critical_quarterstaff: 4110,
    feat_improved_critical_shortspear: 4117,
    feat_improved_critical_light_crossbow: 4096,
    feat_improved_critical_dart: 4127,
    feat_improved_critical_sling: 4115,
    feat_improved_critical_heavy_crossbow: 4097,
    feat_improved_critical_javelin: 4123,
    feat_improved_critical_light_hammer: 4076,
    feat_improved_critical_handaxe: 4067,
    feat_improved_critical_short_sword: 4049,
    feat_improved_critical_battleaxe: 4114,
    feat_improved_critical_longsword: 4036,
    feat_improved_critical_heavy_pick: 4069,
    feat_improved_critical_rapier: 4009,
    feat_improved_critical_scimitar: 4045,
    feat_improved_critical_warhammer: 4077,
    feat_improved_critical_falchion: 4026,
    feat_improved_critical_heavy_flail: 4207,
    feat_improved_critical_glaive: 4118,
    feat_improved_critical_greataxe: 4064,
    feat_improved_critical_greatclub: 4066,
    feat_improved_critical_greatsword: 4010,
    feat_improved_critical_guisarme: 4113,
    feat_improved_critical_longspear: 4194,
    feat_improved_critical_ranseur: 4119,
    feat_improved_critical_scythe: 4072,
    feat_improved_critical_shortbow: 4201,
    feat_improved_critical_longbow: 4087,
    feat_improved_critical_bastard_sword: 4015,
    feat_improved_critical_dwarven_waraxe: 4063,
    feat_improved_critical_gnome_hooked_hammer: 4075,
    feat_improved_critical_orc_double_axe: 4062,
    feat_improved_critical_spike_chain: 4209,
    feat_improved_critical_shuriken: 4211,
    feat_martial_weapon_proficiency_light_hammer: 4076,
    feat_martial_weapon_proficiency_handaxe: 4067,
    feat_martial_weapon_proficiency_short_sword: 4049,
    feat_martial_weapon_proficiency_battleaxe: 4114,
    feat_martial_weapon_proficiency_longsword: 4036,
    feat_martial_weapon_proficiency_heavy_pick: 4069,
    feat_martial_weapon_proficiency_rapier: 4009,
    feat_martial_weapon_proficiency_scimitar: 4045,
    feat_martial_weapon_proficiency_warhammer: 4077,
    feat_martial_weapon_proficiency_falchion: 4026,
    feat_martial_weapon_proficiency_heavy_flail: 4207,
    feat_martial_weapon_proficiency_glaive: 4118,
    feat_martial_weapon_proficiency_greataxe: 4064,
    feat_martial_weapon_proficiency_greatclub: 4066,
    feat_martial_weapon_proficiency_greatsword: 4010,
    feat_martial_weapon_proficiency_guisarme: 4113,
    feat_martial_weapon_proficiency_longspear: 4194,
    feat_martial_weapon_proficiency_ranseur: 4119,
    feat_martial_weapon_proficiency_scythe: 4072,
    feat_martial_weapon_proficiency_shortbow: 4201,
    feat_martial_weapon_proficiency_longbow: 4087,
    feat_weapon_finesse_dagger: 4060,
    feat_weapon_finesse_light_mace: 4071,
    feat_weapon_finesse_club: 4074,
    feat_weapon_finesse_halfspear: 4116,
    feat_weapon_finesse_heavy_mace: 4068,
    feat_weapon_finesse_morningstar: 4070,
    feat_weapon_finesse_quarterstaff: 4110,
    feat_weapon_finesse_shortspear: 4117,
    feat_weapon_finesse_light_crossbow: 4096,
    feat_weapon_finesse_dart: 4127,
    feat_weapon_finesse_sling: 4115,
    feat_weapon_finesse_heavy_crossbow: 4097,
    feat_weapon_finesse_javelin: 4123,
    feat_weapon_finesse_light_hammer: 4076,
    feat_weapon_finesse_handaxe: 4067,
    feat_weapon_finesse_short_sword: 4049,
    feat_weapon_finesse_battleaxe: 4114,
    feat_weapon_finesse_longsword: 4036,
    feat_weapon_finesse_heavy_pick: 4069,
    feat_weapon_finesse_rapier: 4009,
    feat_weapon_finesse_scimitar: 4045,
    feat_weapon_finesse_warhammer: 4077,
    feat_weapon_finesse_falchion: 4026,
    feat_weapon_finesse_heavy_flail: 4207,
    feat_weapon_finesse_glaive: 4118,
    feat_weapon_finesse_greataxe: 4064,
    feat_weapon_finesse_greatclub: 4066,
    feat_weapon_finesse_greatsword: 4010,
    feat_weapon_finesse_guisarme: 4113,
    feat_weapon_finesse_longspear: 4194,
    feat_weapon_finesse_ranseur: 4119,
    feat_weapon_finesse_scythe: 4072,
    feat_weapon_finesse_shortbow: 4201,
    feat_weapon_finesse_longbow: 4087,
    feat_weapon_finesse_bastard_sword: 4015,
    feat_weapon_finesse_dwarven_waraxe: 4063,
    feat_weapon_finesse_gnome_hooked_hammer: 4075,
    feat_weapon_finesse_orc_double_axe: 4062,
    feat_weapon_finesse_spike_chain: 4209,
    feat_weapon_finesse_shuriken: 4211,
    feat_weapon_focus_dagger: 4060,
    feat_weapon_focus_light_mace: 4071,
    feat_weapon_focus_club: 4074,
    feat_weapon_focus_halfspear: 4116,
    feat_weapon_focus_heavy_mace: 4068,
    feat_weapon_focus_morningstar: 4070,
    feat_weapon_focus_quarterstaff: 4110,
    feat_weapon_focus_shortspear: 4117,
    feat_weapon_focus_light_crossbow: 4096,
    feat_weapon_focus_dart: 4127,
    feat_weapon_focus_sling: 4115,
    feat_weapon_focus_heavy_crossbow: 4097,
    feat_weapon_focus_javelin: 4123,
    feat_weapon_focus_light_hammer: 4076,
    feat_weapon_focus_handaxe: 4067,
    feat_weapon_focus_short_sword: 4049,
    feat_weapon_focus_battleaxe: 4114,
    feat_weapon_focus_longsword: 4036,
    feat_weapon_focus_heavy_pick: 4069,
    feat_weapon_focus_rapier: 4009,
    feat_weapon_focus_scimitar: 4045,
    feat_weapon_focus_warhammer: 4077,
    feat_weapon_focus_falchion: 4026,
    feat_weapon_focus_heavy_flail: 4207,
    feat_weapon_focus_glaive: 4118,
    feat_weapon_focus_greataxe: 4064,
    feat_weapon_focus_greatclub: 4066,
    feat_weapon_focus_greatsword: 4010,
    feat_weapon_focus_guisarme: 4113,
    feat_weapon_focus_longspear: 4194,
    feat_weapon_focus_ranseur: 4119,
    feat_weapon_focus_scythe: 4072,
    feat_weapon_focus_shortbow: 4201,
    feat_weapon_focus_longbow: 4087,
    feat_weapon_focus_bastard_sword: 4015,
    feat_weapon_focus_dwarven_waraxe: 4063,
    feat_weapon_focus_gnome_hooked_hammer: 4075,
    feat_weapon_focus_orc_double_axe: 4062,
    feat_weapon_focus_spike_chain: 4209,
    feat_weapon_focus_shuriken: 4211
    }
     
  7. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    Any Suggestion/Comments

    Any suggestion on how to format it are welcome also any insight to functions, that I don't have done yet are also welcome.
     
  8. Nomad_Wanderer

    Nomad_Wanderer Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    305
    Likes Received:
    0
    Being a Java Developer, I'm kinda partial to JavaDoc style api documentation.. :)

    Though what you have here isn't that bad.. I say leave it as is. (Spend more time to spruce up some method & arg descriptions, but for the most part leave it organized as is).
     
  9. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    :) API? Not familiar with that format can you send me an example or is it a web format? I could put this all in a program that is much more detailed since, space wouldn't be an issue. :D Also The current Python list is misleading, any function name can be used it really matters what is in it. I'm only going to flesh out the most common routines then maybe explain the actual python code that has been used itself, but I can foresee that getting to be a rather lonfg post ;)
     
  10. Aido

    Aido Member

    Joined:
    Sep 28, 2003
    Messages:
    10
    Likes Received:
    0
    Where does the game keep the PC responses for K:, F:, A:; things like that?

    I know the G: messages are mostly at the end of the *.dlg files, but that's not true for all dialogue files either.
     
  11. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    you can put them at the end yourself? cool. Ummm I'd have to guess they are hard coded in exe if not put in the dlg file. The dlg file overrides it then. I'll look and see if I can find a file or such that has them but... you wouldn't happen to know the numbering scheme for the dlg file for thos would you? I could parse each one but....
     
  12. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    I have to go to a client site today so not sure how much time tioday I'll have to work on this thread...
     
  13. Aido

    Aido Member

    Joined:
    Sep 28, 2003
    Messages:
    10
    Likes Received:
    0
    Just an example so you can see what I mean -

    If you look at the file 00009church serving woman.dlg, her dialogue starts at line 1, her dialogue is described as G: and the responses differ depending on whether you've already met her or not.

    These responses are listed at 10008, 10009, 10011 and 10012. There are also other NPC responses for barbarians, nekked people, animals, people with the blur spell (presumably) and invisibility I think. You probably have the ability to make dialogue for all classes, however I'm not sure how the game recognises that it should display this text.

    However, not every file uses the G: function, take 00002black jay.dlg for example.

    And given that the rest of those functions are MIA, it looks as though we're stuck with the sucky lines like 'I take my leave'.
     
  14. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    I can play around a bit with line numbers, and see what gets put in when, and then post finding here on first thread....... I'm still editing my do file to see what exec python functions are usuable that weren't in dialog directly...
     
  15. Phalzyr

    Phalzyr Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    193
    Likes Received:
    0
    :( I can't seem to get it to use my diaalog line at bottom for anything, must be hard coded somehow what line it uses and such or maybe I'm just not smart enough...

    Darn My refrig at work was set all the way up to its coldest setting... Well I at least know the answer to what happens if you leave pop cans in a freezer... :wtf:
     
Our Host!