Scripting GOD obj_set_int(...,...) func

Discussion in 'General Modification' started by XVicious, Oct 6, 2014.

Remove all ads!
  1. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    427
    Likes Received:
    8
    EDIT ANY PROTO's TAB FIELD DURING GAME USING
    PYTHON 2 SCRIPT COMMANDS


    example: TURN YOUR CHARACTER INTO AN OWL BEAR
    code:


    game.party[0].obj_set_int( obj_f_base_anim , 1000)
    game.party[0].obj_set_int( obj_f_base_mesh , 1000)
    game.party[0].obj_set_int( obj_f_animation_handle, 0)

    you can turn your character into any model you want that is
    available in meshes.mes
    located \art\meshes

    example 2: Change your characters portrait
    game.party[0].obj_set_int( obj_f_critter_portrait , 3541)


    from portrait.mes
    located \art\interface\PORTRAITS



    functions:

    obj_get_int ( OBJ_TARGET) : returns integer, number,variable
    obj_set_int ( OBJ_TARGET, INT) : returns nothing




    WARNING : AVOID FIELDS FOR SET OR GET
    avoid OBJ_TARGET = 0 or = 1
    avoid _pad_
    avoid obj_f_prototype_handle

    some fields in list accesses will cause the game to crash

    Setting an animation for a model that does not match the BONES listed in the
    SKA will cause the game to crash after the obj_f_animation_handle is reset to
    zero




    available TAB field enums
    for OBJ_TARGET parmeter

    Code:
    
    obj_f_max
    obj_f_prototype_handle
    obj_f_type
    
    obj_f_transient_end 
    obj_f_grapple_state 
    obj_f_animation_handle  
    obj_f_find_node 
    obj_f_internal_flags    
    obj_f_overlay_light_handles 
    obj_f_light_handle  
    obj_f_temp_id   
    obj_f_render_flags  
    obj_f_colors    
    obj_f_color 
    obj_f_palette   
    obj_f_render_height 
    obj_f_render_width  
    obj_f_render_y 
    obj_f_render_x  
    obj_f_render_alpha  
    obj_f_render_scale  
    obj_f_render_palette    
    obj_f_render_colors 
    obj_f_render_color  
    obj_f_transient_begin  
    obj_f_total_normal  
    
    
    obj_f_trap_end  
    obj_f_trap_pad_i64as_1  
    obj_f_trap_pad_ias_1    
    obj_f_trap_pad_i_2  
    obj_f_trap_difficulty   
    obj_f_trap_flags    
    obj_f_trap_begin    
    obj_f_npc_end   
    obj_f_npc_pad_i64as_5   
    obj_f_npc_pad_i64as_4   
    obj_f_npc_pad_i64as_3  
    obj_f_npc_pad_i64as_2   
    obj_f_npc_standpoints   
    obj_f_npc_pad_ias_5 
    obj_f_npc_pad_ias_4 
    obj_f_npc_pad_ias_3 
    obj_f_npc_ai_list_type_idx  
    obj_f_npc_hitdice_idx   
    obj_f_npc_pad_i64_5 
    obj_f_npc_pad_i64_4 
    obj_f_npc_pad_i64_3 
    obj_f_npc_pad_i64_2 
    obj_f_npc_ai_flags64    
    obj_f_npc_pad_i_5   
    obj_f_npc_pad_i_4   
    obj_f_npc_pad_i_3   
    obj_f_npc_waypoint_anim 
    obj_f_npc_add_mesh  
    obj_f_npc_ac_bonus  
    obj_f_npc_save_willpower_bonus  
    obj_f_npc_save_fortitude_bonus  
    obj_f_npc_save_reflexes_bonus   
    obj_f_npc_ai_list_idx   
    obj_f_npc_generator_data    
    obj_f_npc_reaction_time_idx 
    obj_f_npc_reaction_level_idx    
    obj_f_npc_reaction_pc_idx   
    obj_f_npc_challenge_rating  
    obj_f_npc_reaction_base 
    obj_f_npc_substitute_inventory  
    obj_f_npc_retail_price_multiplier   
    obj_f_npc_faction  
    obj_f_npc_standpoint_night_INTERNAL_DO_NOT_USE  obj_f_npc_standpoint_day_INTERNAL_DO_NOT_USE    
    obj_f_npc_waypoint_current  
    obj_f_npc_waypoints_idx 
    obj_f_npc_who_hit_me_last   
    obj_f_npc_combat_focus  
    obj_f_npc_ai_data   
    obj_f_npc_leader    
    obj_f_npc_flags 
    obj_f_npc_begin 
    
    obj_f_pc_end    
    obj_f_pc_pad_i64as_1    
    obj_f_pc_pad_ias_2  
    obj_f_pc_weaponslots_idx    
    obj_f_pc_pad_i_2    
    obj_f_pc_roll_count 
    obj_f_pc_voice_idx  
    obj_f_pc_global_variables   
    obj_f_pc_global_flags   
    obj_f_pc_player_name    
    obj_f_pc_pad_i64as_0    
    obj_f_pc_pad_ias_0  
    obj_f_pc_flags  
    obj_f_pc_begin  
    
    obj_f_critter_end   
    obj_f_critter_pad_i64as_5   obj_f_critter_pad_i64as_4   obj_f_critter_pad_i64as_3   obj_f_critter_pad_i64as_2   
    obj_f_critter_seen_maplist  
    obj_f_critter_attacks_idx   
    obj_f_critter_damage_idx    
    obj_f_critter_pad_i64_5 obj_f_critter_pad_i64_4 obj_f_critter_pad_i64_3 obj_f_critter_pad_i64_2 
    obj_f_critter_monster_category
    obj_f_critter_pad_i_3   
    obj_f_critter_strategy  
    obj_f_critter_hair_style    
    obj_f_critter_sequence  
    obj_f_critter_pad_i_5   obj_f_critter_pad_i_4   
    obj_f_critter_subdual_damage    
    obj_f_critter_reach 
    obj_f_critter_skill_idx 
    obj_f_critter_death_time    
    obj_f_critter_teleport_map  
    obj_f_critter_teleport_dest 
    obj_f_critter_follower_idx  
    obj_f_critter_description_unknown   
    obj_f_critter_inventory_source  
    obj_f_critter_inventory_list_idx    
    obj_f_critter_inventory_num 
    obj_f_critter_money_idx 
    obj_f_critter_portrait 
    obj_f_critter_fleeing_from  
    obj_f_critter_feat_count_idx    
    obj_f_critter_feat_idx  
    obj_f_critter_spells_cast_idx   
    obj_f_critter_spells_memorized_idx  
    obj_f_critter_spells_known_idx  
    obj_f_critter_school_specialization 
    obj_f_critter_alignment_choice  
    obj_f_critter_domain_2  
    obj_f_critter_domain_1  
    obj_f_critter_deity 
    obj_f_critter_alignment 
    obj_f_critter_pad_i_1   
    obj_f_critter_experience   
     obj_f_critter_weight    
    obj_f_critter_height    
    obj_f_critter_age  
     obj_f_critter_gender    
    obj_f_critter_race  
    obj_f_critter_level_idx 
    obj_f_critter_abilities_idx 
    obj_f_critter_flags2    
    obj_f_critter_flags 
    obj_f_critter_begin 
    
    obj_f_generic_end   
    obj_f_generic_pad_i64as_1   obj_f_generic_pad_ias_1 
    obj_f_generic_usage_count_remaining 
    obj_f_generic_usage_bonus   
    obj_f_generic_flags 
    obj_f_generic_begin 
    
    obj_f_bag_end   
    obj_f_bag_size  
    obj_f_bag_flags 
    obj_f_bag_begin 
    obj_f_written_end   
    obj_f_written_pad_i64as_1   obj_f_written_pad_ias_1 obj_f_written_pad_i_2   obj_f_written_pad_i_1   obj_f_written_text_end_line 
    obj_f_written_text_start_line   
    obj_f_written_subtype   
    obj_f_written_flags 
    obj_f_written_begin 
    obj_f_key_end  
     obj_f_key_pad_i64as_1   obj_f_key_pad_ias_1 obj_f_key_pad_i_2   obj_f_key_pad_i_1   
    obj_f_key_key_id    
    obj_f_key_begin
     obj_f_scroll_end   
     obj_f_scroll_pad_i64as_1    obj_f_scroll_pad_ias_1  obj_f_scroll_pad_i_2    obj_f_scroll_pad_i_1    obj_f_scroll_flags  obj_f_scroll_begin  obj_f_food_end  obj_f_food_pad_i64as_1  obj_f_food_pad_ias_1    obj_f_food_pad_i_2  obj_f_food_pad_i_1  obj_f_food_flags    
    obj_f_food_begin    
    obj_f_money_end 
    obj_f_money_pad_i64as_1 obj_f_money_pad_ias_1   obj_f_money_pad_i_5 obj_f_money_pad_i_4 obj_f_money_pad_i_3 obj_f_money_pad_i_2 obj_f_money_pad_i_1 obj_f_money_type    obj_f_money_quantity    
    obj_f_money_flags   
    obj_f_money_begin   
    obj_f_armor_end obj_f_armor_pad_i64as_1 obj_f_armor_pad_ias_1   obj_f_armor_pad_i_1 obj_f_armor_armor_check_penalty 
    obj_f_armor_arcane_spell_failure    
    obj_f_armor_max_dex_bonus   
    obj_f_armor_ac_adj  
    obj_f_armor_flags   
    obj_f_armor_begin   
    obj_f_ammo_end  
    obj_f_ammo_pad_i64as_1  obj_f_ammo_pad_ias_1    obj_f_ammo_pad_obj_1    obj_f_ammo_pad_i_2  obj_f_ammo_pad_i_1  obj_f_ammo_type obj_f_ammo_quantity obj_f_ammo_flags    
    obj_f_ammo_begin   
     obj_f_weapon_end    obj_f_weapon_pad_i64as_1    obj_f_weapon_pad_ias_1  obj_f_weapon_pad_obj_5  obj_f_weapon_pad_obj_4  obj_f_weapon_pad_obj_3  obj_f_weapon_pad_obj_2  obj_f_weapon_pad_obj_1  obj_f_weapon_pad_i_2    obj_f_weapon_pad_i_1    obj_f_weapon_crit_range obj_f_weapon_type   obj_f_weapon_animtype   
    obj_f_weapon_damage_dice    
    obj_f_weapon_attacktype 
    obj_f_weapon_crit_hit_chart 
    obj_f_weapon_missile_aid    
    obj_f_weapon_ammo_consumption   
    obj_f_weapon_ammo_type  
    obj_f_weapon_range  
    obj_f_weapon_flags  
    obj_f_weapon_begin  
    obj_f_item_end  
    obj_f_item_pad_objas_2  obj_f_item_pad_objas_1  obj_f_item_pad_i64as_2  obj_f_item_pad_i64as1  
    obj_f_item_pad_wielder_argument_array   
    obj_f_item_pad_wielder_condition_array  
    obj_f_item_pad_obj_5    obj_f_item_pad_obj_4    obj_f_item_pad_obj_3    obj_f_item_pad_obj_2    obj_f_item_pad_obj_1    obj_f_item_pad_i_6  obj_f_item_pad_i_5  obj_f_item_pad_i_4  obj_f_item_pad_i_3  obj_f_item_pad_i_2  obj_f_item_pad_i_1  
    obj_f_item_quantity 
    obj_f_item_material_slot   
    obj_f_item_wear_flags   
    obj_f_item_ai_action    
    obj_f_item_spell_charges_idx    
    obj_f_item_spell_idx_flags  
    obj_f_item_spell_idx    
    obj_f_item_description_effects  
    obj_f_item_description_unknown  
    obj_f_item_ground_anim  
    obj_f_item_ground_mesh  
    obj_f_item_inv_location 
    obj_f_item_inv_aid  
    obj_f_item_worth    
    obj_f_item_weight   
    obj_f_item_parent   
    obj_f_item_flags    
    obj_f_item_begin    
    obj_f_projectile_end    obj_f_projectile_pad_objas_1    obj_f_projectile_pad_i64as_1    obj_f_projectile_pad_ias_1  obj_f_projectile_pad_obj_3  obj_f_projectile_pad_obj_2  obj_f_projectile_pad_obj_1  obj_f_projectile_pad_i_4    
    obj_f_projectile_acceleration_z 
    obj_f_projectile_acceleration_y 
    obj_f_projectile_acceleration_x 
    obj_f_projectile_part_sys_id    
    obj_f_projectile_parent_ammo    
    obj_f_projectile_parent_weapon  
    obj_f_projectile_flags_combat_damage    
    obj_f_projectile_flags_combat   
    obj_f_projectile_begin  
    obj_f_scenery_end   
    obj_f_scenery_pad_i64as_1   obj_f_scenery_pad_ias_1 obj_f_scenery_pad_obj_1 obj_f_scenery_pad_i_5   obj_f_scenery_pad_i_4   
    obj_f_scenery_teleport_to   
    obj_f_scenery_pad_i_1   obj_f_scenery_pad_i_0  
    obj_f_scenery_respawn_delay 
    obj_f_scenery_pad_obj_0 obj_f_scenery_flags 
    obj_f_scenery_begin 
    obj_f_container_end 
    obj_f_container_pad_objas_1 obj_f_container_pad_i64as_1 obj_f_container_pad_ias_1   obj_f_container_pad_obj_2   obj_f_container_pad_obj_1   obj_f_container_pad_i_5 obj_f_container_pad_i_4 obj_f_container_pad_i_3 obj_f_container_pad_i_2 obj_f_container_pad_i_1 obj_f_container_notify_npc  
    obj_f_container_inventory_source   
    obj_f_container_inventory_list_idx  
    obj_f_container_inventory_num   
    obj_f_container_key_id  
    obj_f_container_lock_dc obj_f_container_flags   
    obj_f_container_begin   
    obj_f_portal_end   
     obj_f_portal_pad_i64as_1    obj_f_portal_pad_ias_1  obj_f_portal_pad_obj_1  obj_f_portal_pad_i_5    obj_f_portal_pad_i_4    obj_f_portal_pad_i_3    obj_f_portal_pad_i_2    obj_f_portal_pad_i_1    
    obj_f_portal_notify_npc 
    obj_f_portal_key_id 
    obj_f_portal_lock_dc    
    obj_f_portal_flags  
    obj_f_portal_begin  
    obj_f_end   
    obj_f_pad_objas_2   obj_f_pad_objas_1   obj_f_pad_objas_0   obj_f_pad_i64as_4   obj_f_pad_i64as_3   obj_f_pad_i64as_2   obj_f_pad_i64as_1   obj_f_pad_i64as_0   obj_f_pad_ias_4 obj_f_strategy_state    
    obj_f_attack_bonus_idx  
    obj_f_attack_types_idx  
    obj_f_permanent_mod_data
    obj_f_pad_obj_4 obj_f_pad_obj_3 obj_f_pad_obj_2 obj_f_pad_obj_1 
    obj_f_last_hit_by   
    obj_f_pad_i64_4 obj_f_pad_i64_3 obj_f_pad_i64_2 obj_f_pad_i64_1 obj_f_pad_i64_0 obj_f_pad_f_0   obj_f_pad_f_9   obj_f_pad_f_8   obj_f_pad_f_7   obj_f_pad_f_6   obj_f_pad_f_5   obj_f_pad_f_4   obj_f_pad_f_3   
    
    obj_f_rotation_pitch    
    obj_f_offset_z  
    
    
    
    obj_f_pad_i_0   obj_f_pad_i_9   obj_f_pad_i_8   obj_f_pad_i_7   
    
    obj_f_secretdoor_dc 
    obj_f_secretdoor_effectname 
    obj_f_secretdoor_flags  
    obj_f_subinitiative 
    obj_f_dispatcher    
    obj_f_initiative    
    obj_f_permanent_mods    
    obj_f_condition_arg0    
    obj_f_conditions    
    
    obj_f_3d_render_height  
    obj_f_radius    
    
    obj_f_base_anim 
    obj_f_base_mesh 
    obj_f_speed_run 
    obj_f_speed_walk    
    obj_f_rotation  
    obj_f_category  
    obj_f_sound_effect  
    obj_f_scripts_idx   
    obj_f_material  
    obj_f_hp_damage 
    obj_f_hp_adj    
    obj_f_hp_pts    
    obj_f_size  
    obj_f_destroyed_aid 
    obj_f_aid  
    obj_f_description  
    obj_f_name  
    obj_f_blocking_mask 
    obj_f_spell_flags   
    obj_f_flags 
    obj_f_overlay_light_color   
    obj_f_overlay_light_aid 
    obj_f_overlay_light_flags   
    obj_f_light_color   
    obj_f_light_aid 
    obj_f_light_flags   
    
    obj_f_scale 
    obj_f_blit_alpha    
    obj_f_blit_color    
    obj_f_blit_flags    
    obj_f_underlay  
    obj_f_overlay_back  
    obj_f_overlay_fore  
    obj_f_shadow    
    
    obj_f_offset_y  
    obj_f_offset_x  
    obj_f_location  
    
    obj_f_current_aid   
    obj_f_begin 
    
    obj_t_bag   
    obj_t_trap  
    obj_t_npc   
    obj_t_pc    
    obj_t_generic   
    obj_t_written   
    obj_t_key   
    obj_t_scroll    
    obj_t_food  
    obj_t_money 
    obj_t_armor 
    obj_t_ammo  
    obj_t_weapon    
    obj_t_projectile    
    obj_t_scenery  
    obj_t_container 
    obj_t_portal 
    
    

    THESE ENUM FIELDS WERE FOUND IN THE TEMPLE.DLL
    AS WERE THE 2 FUNCTIONS FOUND THERE ALSO

    I FOUND THESE FUNCTIONS WHILE FISHING FOR SCRIPTS USING
    GREP FILE SEARCH TOOL IN THE SCR PYTHON SCRIPTING FOLDER.



    still working
     
    Last edited: Oct 8, 2014
    marc1967 likes this.
  2. edmortimer

    edmortimer Occupy Wall Street

    Joined:
    Jan 16, 2014
    Messages:
    97
    Likes Received:
    0
    Oooo! So . . . we can use this to make a real Reincarnation spell? Among other things, of course.
     
  3. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    427
    Likes Received:
    8
    Yes of course,

    you could also do the Druid wild shape and not be just a TREE, you could be anything.

    Or you could change the animation to ELMO for walking drunk like so

    game.leader.obj_set_int(obj_f_base_anim, 503)
    game.leader.obj_set_int(obj_f_animation_handle, 0)



    or you could change female/males characters appearances during the game via script
    based on stats like strength

    making them appear fatter, or stronger or a pregnent female.

    Many things are possible, even customizing the models.

    YOU could also change the scale of the model by using

    Code:
    game.leader.obj_set_int(8, 200)
    
    that will increase the size of the model by 200%



    example python script for SAN USE for changing model
    and example function

    Code:
    from utilities import *
    
    from toee import *
    
    
    def san_use( attachee, triggerer ):
    	ChangeModel(triggerer,  1099)
    	return RUN_DEFAULT
    
    
    def ChangeModel(object_owner, mesh):
    	object_owner.obj_set_int(obj_f_base_mesh, mesh)
    	object_owner.obj_set_int(obj_f_base_anim, mesh)
    	object_owner.obj_set_int(obj_f_animation_handle, 0)
    	return	
    
    
    
    this python script changes the user into a gargoyle
    from meshes.mes
    {1099}{monsters\Gargoyle\Gargoyle}
     
    Last edited: Oct 8, 2014
  4. edmortimer

    edmortimer Occupy Wall Street

    Joined:
    Jan 16, 2014
    Messages:
    97
    Likes Received:
    0
    Wow! That adds an entire dimension to the game that can be used to greatly round out the replay experience!
     
  5. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    427
    Likes Received:
    8
    OK I GOT THIS VERSION TOO WORK
    FOR RECARNATION


    HERE IS A LIST FOR RECARNATION RULING


    D% dice 1-100
    Code:
    1            bugbear
    2-13       dwarf
    14-25     elf
    26          knoll
    27-38     gnome
    39-42     goblin
    43-52     Half-elf
    53-62     Half-Orc
    63-74     Halfling
    75-89     Human
    90-93     Kobold
    94          Lizardfolk
    95-98     Orc
    99          Troglodyte
    100        No Racial Change or OTHER DM-choice
    
    these also have stat changes that go along with them, maybe I will add them later

    these would need to be CODED into Python script and added into the
    recarnation spell Effects event

    I will work on em right here

    //from PY SPELL RECARNATION
    Code:
    from utilities import *
    
    from toee import *
    
    
    
    def OnBeginSpellCast( spell ):
    	print "Reincarnation OnBeginSpellCast"
    	print "spell.target_list=", spell.target_list
    	print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
    	game.particles( "sp-transmutation-conjure", spell.caster )
    
    def	OnSpellEffect( spell ):
    	print "Reincarnation OnSpellEffect"
    
    	spell.duration = 0
    	target_item = spell.target_list[0]
    
    	g = target_item.obj.obj_get_int(obj_f_critter_gender)
    	n = game.random_range(1,100)
    	mesh_id = 0
    
    	if(n == 1):
    		mesh_id = 1077
    	if(n > 1 and n <= 13):
    		mesh_id = 103 - g
    	if(n > 13 and n <= 25):
    		mesh_id =  101 - g
    	if(n == 26):
    		mesh_id = 1014
    	if(n > 26 and n <= 38):
    		mesh_id = 101 - g
    	if(n > 38 and n <= 42):
    		mesh_id =  1056
    	if(n > 42 and n <= 52):
    		mesh_id = 101 - g
    	if(n > 52 and n <= 62):
    		mesh_id = 105 - g
    	if(n > 62 and n <= 74):
    		mesh_id = 101 - g
    	if(n > 74 and n <= 89):
    		mesh_id = 101 - g
    	if(n > 89 and n <= 93):
    		mesh_id = 1018
    	if(n == 94):
    		mesh_id = 1018
    	if(n > 94 and n <= 98):
    		mesh_id = 105 - g
    	if(n == 99):
    		mesh_id = 1018
    	
    	if(mesh_id > 0):
    		ChangeModel(target_item.obj, mesh_id)
    	
    	target_item.obj.condition_add_with_args( 'sp-Raise Dead', spell.id, spell.duration, 0 )
    	#target_item.partsys_id = game.particles( 'sp-Raise Dead', target_item.obj )
    
    
    
    	spell.spell_end( spell.id )
    
    def OnBeginRound( spell ):
    	print "Reincarnation OnBeginRound"
    
    def OnEndSpellCast( spell ):
    	print "Reincarnation OnEndSpellCast"
    
    def ChangeModel(object_owner, mesh):
    	object_owner.obj_set_int(obj_f_base_mesh, mesh)
    	object_owner.obj_set_int(obj_f_base_anim, mesh)
    	object_owner.obj_set_int(obj_f_animation_handle, 0)
    	return
    
    
    
    
    

    note: that the Race type name in profile is not changed and the stats for base racial trates does not change either, but I might update this again


    *any edits are for syntax checks, spelling, formatting or appearances
     

    Attached Files:

    Last edited: Oct 8, 2014
  6. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    Hi, XV. Do you know how to override a specific animation inside the .SKA file using .PY script? For example, I want my PC to do the 'worship or kneel' animation instead of standing.

    If this is possible, can we change the unarmed critical hit to flurry animation, found in the .SKA file? That would be cool. Anyway, how about a true WORG model?

    Yeah, being preggy is cool too, if there is a dialogue script for 'make baby.' Then happily forever script.
     
  7. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    427
    Likes Received:
    8
    yes ZOLTEC I think its possible to mke babies

    just create an object next to chick _play an Bik animation of BIRTH

    set scale of child to say 50% done-r!


    about animation, I am not sure at the moment about changing the sequance animation selection,

    I have been out of this for awhile but I say it might be possible, but not sure without looking into it.

    here is the code I had left off with

    hope that helps you.

    It might have something to do with the action as a FLAG being set
    and having the correct animation base selected for the correct base mesh of
    course.

    like bones in SKA have to match the bones in the base mesh
    base_anim has to match base_mesh


    Proof in this working

    you can change your HUMAN PC into an ORC or DWARF or MAKE IT male or female

    you can change the gender mesh of the model your playing
    the only thing would be updating the gender stat or race stat



    Code:
    obj_f_max
    obj_f_prototype_handle
    obj_f_type
    
    obj_f_transient_end 
    obj_f_grapple_state 
    obj_f_animation_handle  
    obj_f_find_node 
    obj_f_internal_flags    
    obj_f_overlay_light_handles 
    obj_f_light_handle  
    obj_f_temp_id   
    obj_f_render_flags  
    obj_f_colors    
    obj_f_color 
    obj_f_palette   
    obj_f_render_height 
    obj_f_render_width  
    obj_f_render_y 
    obj_f_render_x  
    obj_f_render_alpha  
    obj_f_render_scale  
    obj_f_render_palette    
    obj_f_render_colors 
    obj_f_render_color  
    obj_f_transient_begin  
    obj_f_total_normal  
    
    
    obj_f_trap_end  
    obj_f_trap_pad_i64as_1  
    obj_f_trap_pad_ias_1    
    obj_f_trap_pad_i_2  
    obj_f_trap_difficulty   
    obj_f_trap_flags    
    obj_f_trap_begin    
    obj_f_npc_end   
    obj_f_npc_pad_i64as_5   
    obj_f_npc_pad_i64as_4   
    obj_f_npc_pad_i64as_3  
    obj_f_npc_pad_i64as_2   
    obj_f_npc_standpoints   
    obj_f_npc_pad_ias_5 
    obj_f_npc_pad_ias_4 
    obj_f_npc_pad_ias_3 
    obj_f_npc_ai_list_type_idx  
    obj_f_npc_hitdice_idx   
    obj_f_npc_pad_i64_5 
    obj_f_npc_pad_i64_4 
    obj_f_npc_pad_i64_3 
    obj_f_npc_pad_i64_2 
    obj_f_npc_ai_flags64    
    obj_f_npc_pad_i_5   
    obj_f_npc_pad_i_4   
    obj_f_npc_pad_i_3   
    obj_f_npc_waypoint_anim 
    obj_f_npc_add_mesh  
    obj_f_npc_ac_bonus  
    obj_f_npc_save_willpower_bonus  
    obj_f_npc_save_fortitude_bonus  
    obj_f_npc_save_reflexes_bonus   
    obj_f_npc_ai_list_idx   
    obj_f_npc_generator_data    
    obj_f_npc_reaction_time_idx 
    obj_f_npc_reaction_level_idx    
    obj_f_npc_reaction_pc_idx   
    obj_f_npc_challenge_rating  
    obj_f_npc_reaction_base 
    obj_f_npc_substitute_inventory  
    obj_f_npc_retail_price_multiplier   
    obj_f_npc_faction  
    obj_f_npc_standpoint_night_INTERNAL_DO_NOT_USE  obj_f_npc_standpoint_day_INTERNAL_DO_NOT_USE    
    obj_f_npc_waypoint_current  
    obj_f_npc_waypoints_idx 
    obj_f_npc_who_hit_me_last   
    obj_f_npc_combat_focus  
    obj_f_npc_ai_data   
    obj_f_npc_leader    
    obj_f_npc_flags 
    obj_f_npc_begin 
    
    obj_f_pc_end    
    obj_f_pc_pad_i64as_1    
    obj_f_pc_pad_ias_2  
    obj_f_pc_weaponslots_idx    
    obj_f_pc_pad_i_2    
    obj_f_pc_roll_count 
    obj_f_pc_voice_idx  
    obj_f_pc_global_variables   
    obj_f_pc_global_flags   
    obj_f_pc_player_name    
    obj_f_pc_pad_i64as_0    
    obj_f_pc_pad_ias_0  
    obj_f_pc_flags  
    obj_f_pc_begin  
    
    obj_f_critter_end   
    obj_f_critter_pad_i64as_5   obj_f_critter_pad_i64as_4   obj_f_critter_pad_i64as_3   obj_f_critter_pad_i64as_2   
    obj_f_critter_seen_maplist  
    obj_f_critter_attacks_idx   
    obj_f_critter_damage_idx    
    obj_f_critter_pad_i64_5 obj_f_critter_pad_i64_4 obj_f_critter_pad_i64_3 obj_f_critter_pad_i64_2 
    obj_f_critter_monster_category
    obj_f_critter_pad_i_3   
    obj_f_critter_strategy  
    obj_f_critter_hair_style    
    obj_f_critter_sequence  
    obj_f_critter_pad_i_5   obj_f_critter_pad_i_4   
    obj_f_critter_subdual_damage    
    obj_f_critter_reach 
    obj_f_critter_skill_idx 
    obj_f_critter_death_time    
    obj_f_critter_teleport_map  
    obj_f_critter_teleport_dest 
    obj_f_critter_follower_idx  
    obj_f_critter_description_unknown   
    obj_f_critter_inventory_source  
    obj_f_critter_inventory_list_idx    
    obj_f_critter_inventory_num 
    obj_f_critter_money_idx 
    obj_f_critter_portrait 
    obj_f_critter_fleeing_from  
    obj_f_critter_feat_count_idx    
    obj_f_critter_feat_idx  
    obj_f_critter_spells_cast_idx   
    obj_f_critter_spells_memorized_idx  
    obj_f_critter_spells_known_idx  
    obj_f_critter_school_specialization 
    obj_f_critter_alignment_choice  
    obj_f_critter_domain_2  
    obj_f_critter_domain_1  
    obj_f_critter_deity 
    obj_f_critter_alignment 
    obj_f_critter_pad_i_1   
    obj_f_critter_experience   
     obj_f_critter_weight    
    obj_f_critter_height    
    obj_f_critter_age  
     obj_f_critter_gender    
    obj_f_critter_race  
    obj_f_critter_level_idx 
    obj_f_critter_abilities_idx 
    obj_f_critter_flags2    
    obj_f_critter_flags 
    obj_f_critter_begin 
    
    obj_f_generic_end   
    obj_f_generic_pad_i64as_1   obj_f_generic_pad_ias_1 
    obj_f_generic_usage_count_remaining 
    obj_f_generic_usage_bonus   
    obj_f_generic_flags 
    obj_f_generic_begin 
    
    obj_f_bag_end   
    obj_f_bag_size  
    obj_f_bag_flags 
    obj_f_bag_begin 
    obj_f_written_end   
    obj_f_written_pad_i64as_1   obj_f_written_pad_ias_1 obj_f_written_pad_i_2   obj_f_written_pad_i_1   obj_f_written_text_end_line 
    obj_f_written_text_start_line   
    obj_f_written_subtype   
    obj_f_written_flags 
    obj_f_written_begin 
    obj_f_key_end  
     obj_f_key_pad_i64as_1   obj_f_key_pad_ias_1 obj_f_key_pad_i_2   obj_f_key_pad_i_1   
    obj_f_key_key_id    
    obj_f_key_begin
     obj_f_scroll_end   
     obj_f_scroll_pad_i64as_1    obj_f_scroll_pad_ias_1  obj_f_scroll_pad_i_2    obj_f_scroll_pad_i_1    obj_f_scroll_flags  obj_f_scroll_begin  obj_f_food_end  obj_f_food_pad_i64as_1  obj_f_food_pad_ias_1    obj_f_food_pad_i_2  obj_f_food_pad_i_1  obj_f_food_flags    
    obj_f_food_begin    
    obj_f_money_end 
    obj_f_money_pad_i64as_1 obj_f_money_pad_ias_1   obj_f_money_pad_i_5 obj_f_money_pad_i_4 obj_f_money_pad_i_3 obj_f_money_pad_i_2 obj_f_money_pad_i_1 obj_f_money_type    obj_f_money_quantity    
    obj_f_money_flags   
    obj_f_money_begin   
    obj_f_armor_end obj_f_armor_pad_i64as_1 obj_f_armor_pad_ias_1   obj_f_armor_pad_i_1 obj_f_armor_armor_check_penalty 
    obj_f_armor_arcane_spell_failure    
    obj_f_armor_max_dex_bonus   
    obj_f_armor_ac_adj  
    obj_f_armor_flags   
    obj_f_armor_begin   
    obj_f_ammo_end  
    obj_f_ammo_pad_i64as_1  obj_f_ammo_pad_ias_1    obj_f_ammo_pad_obj_1    obj_f_ammo_pad_i_2  obj_f_ammo_pad_i_1  obj_f_ammo_type obj_f_ammo_quantity obj_f_ammo_flags    
    obj_f_ammo_begin   
     obj_f_weapon_end    obj_f_weapon_pad_i64as_1    obj_f_weapon_pad_ias_1  obj_f_weapon_pad_obj_5  obj_f_weapon_pad_obj_4  obj_f_weapon_pad_obj_3  obj_f_weapon_pad_obj_2  obj_f_weapon_pad_obj_1  obj_f_weapon_pad_i_2    obj_f_weapon_pad_i_1    obj_f_weapon_crit_range obj_f_weapon_type   obj_f_weapon_animtype   
    obj_f_weapon_damage_dice    
    obj_f_weapon_attacktype 
    obj_f_weapon_crit_hit_chart 
    obj_f_weapon_missile_aid    
    obj_f_weapon_ammo_consumption   
    obj_f_weapon_ammo_type  
    obj_f_weapon_range  
    obj_f_weapon_flags  
    obj_f_weapon_begin  
    obj_f_item_end  
    obj_f_item_pad_objas_2  obj_f_item_pad_objas_1  obj_f_item_pad_i64as_2  obj_f_item_pad_i64as1  
    obj_f_item_pad_wielder_argument_array   
    obj_f_item_pad_wielder_condition_array  
    obj_f_item_pad_obj_5    obj_f_item_pad_obj_4    obj_f_item_pad_obj_3    obj_f_item_pad_obj_2    obj_f_item_pad_obj_1    obj_f_item_pad_i_6  obj_f_item_pad_i_5  obj_f_item_pad_i_4  obj_f_item_pad_i_3  obj_f_item_pad_i_2  obj_f_item_pad_i_1  
    obj_f_item_quantity 
    obj_f_item_material_slot   
    obj_f_item_wear_flags   
    obj_f_item_ai_action    
    obj_f_item_spell_charges_idx    
    obj_f_item_spell_idx_flags  
    obj_f_item_spell_idx    
    obj_f_item_description_effects  
    obj_f_item_description_unknown  
    obj_f_item_ground_anim  
    obj_f_item_ground_mesh  
    obj_f_item_inv_location 
    obj_f_item_inv_aid  
    obj_f_item_worth    
    obj_f_item_weight   
    obj_f_item_parent   
    obj_f_item_flags    
    obj_f_item_begin    
    obj_f_projectile_end    obj_f_projectile_pad_objas_1    obj_f_projectile_pad_i64as_1    obj_f_projectile_pad_ias_1  obj_f_projectile_pad_obj_3  obj_f_projectile_pad_obj_2  obj_f_projectile_pad_obj_1  obj_f_projectile_pad_i_4    
    obj_f_projectile_acceleration_z 
    obj_f_projectile_acceleration_y 
    obj_f_projectile_acceleration_x 
    obj_f_projectile_part_sys_id    
    obj_f_projectile_parent_ammo    
    obj_f_projectile_parent_weapon  
    obj_f_projectile_flags_combat_damage    
    obj_f_projectile_flags_combat   
    obj_f_projectile_begin  
    obj_f_scenery_end   
    obj_f_scenery_pad_i64as_1   obj_f_scenery_pad_ias_1 obj_f_scenery_pad_obj_1 obj_f_scenery_pad_i_5   obj_f_scenery_pad_i_4   
    obj_f_scenery_teleport_to   
    obj_f_scenery_pad_i_1   obj_f_scenery_pad_i_0  
    obj_f_scenery_respawn_delay 
    obj_f_scenery_pad_obj_0 obj_f_scenery_flags 
    obj_f_scenery_begin 
    obj_f_container_end 
    obj_f_container_pad_objas_1 obj_f_container_pad_i64as_1 obj_f_container_pad_ias_1   obj_f_container_pad_obj_2   obj_f_container_pad_obj_1   obj_f_container_pad_i_5 obj_f_container_pad_i_4 obj_f_container_pad_i_3 obj_f_container_pad_i_2 obj_f_container_pad_i_1 obj_f_container_notify_npc  
    obj_f_container_inventory_source   
    obj_f_container_inventory_list_idx  
    obj_f_container_inventory_num   
    obj_f_container_key_id  
    obj_f_container_lock_dc obj_f_container_flags   
    obj_f_container_begin   
    obj_f_portal_end   
     obj_f_portal_pad_i64as_1    obj_f_portal_pad_ias_1  obj_f_portal_pad_obj_1  obj_f_portal_pad_i_5    obj_f_portal_pad_i_4    obj_f_portal_pad_i_3    obj_f_portal_pad_i_2    obj_f_portal_pad_i_1    
    obj_f_portal_notify_npc 
    obj_f_portal_key_id 
    obj_f_portal_lock_dc    
    obj_f_portal_flags  
    obj_f_portal_begin  
    obj_f_end   
    obj_f_pad_objas_2   obj_f_pad_objas_1   obj_f_pad_objas_0   obj_f_pad_i64as_4   obj_f_pad_i64as_3   obj_f_pad_i64as_2   obj_f_pad_i64as_1   obj_f_pad_i64as_0   obj_f_pad_ias_4 obj_f_strategy_state    
    obj_f_attack_bonus_idx  
    obj_f_attack_types_idx  
    obj_f_permanent_mod_data
    obj_f_pad_obj_4 obj_f_pad_obj_3 obj_f_pad_obj_2 obj_f_pad_obj_1 
    obj_f_last_hit_by   
    obj_f_pad_i64_4 obj_f_pad_i64_3 obj_f_pad_i64_2 obj_f_pad_i64_1 obj_f_pad_i64_0 obj_f_pad_f_0   obj_f_pad_f_9   obj_f_pad_f_8   obj_f_pad_f_7   obj_f_pad_f_6   obj_f_pad_f_5   obj_f_pad_f_4   obj_f_pad_f_3   
    
    obj_f_rotation_pitch    
    obj_f_offset_z  
    
    
    
    obj_f_pad_i_0   obj_f_pad_i_9   obj_f_pad_i_8   obj_f_pad_i_7   
    
    obj_f_secretdoor_dc 
    obj_f_secretdoor_effectname 
    obj_f_secretdoor_flags  
    obj_f_subinitiative 
    obj_f_dispatcher    
    obj_f_initiative    
    obj_f_permanent_mods    
    obj_f_condition_arg0    
    obj_f_conditions    
    
    obj_f_3d_render_height  
    obj_f_radius    
    
    obj_f_base_anim 
    obj_f_base_mesh 
    obj_f_speed_run 
    obj_f_speed_walk    
    obj_f_rotation  
    obj_f_category  
    obj_f_sound_effect  
    obj_f_scripts_idx   
    obj_f_material  
    obj_f_hp_damage 
    obj_f_hp_adj    
    obj_f_hp_pts    
    obj_f_size  
    obj_f_destroyed_aid 
    obj_f_aid  
    obj_f_description  
    obj_f_name  
    obj_f_blocking_mask 
    obj_f_spell_flags   
    obj_f_flags 
    obj_f_overlay_light_color   
    obj_f_overlay_light_aid 
    obj_f_overlay_light_flags   
    obj_f_light_color   
    obj_f_light_aid 
    obj_f_light_flags   
    
    obj_f_scale 
    obj_f_blit_alpha    
    obj_f_blit_color    
    obj_f_blit_flags    
    obj_f_underlay  
    obj_f_overlay_back  
    obj_f_overlay_fore  
    obj_f_shadow    
    
    obj_f_offset_y  
    obj_f_offset_x  
    obj_f_location  
    
    obj_f_current_aid   
    obj_f_begin 
    
    obj_t_bag   
    obj_t_trap  
    obj_t_npc   
    obj_t_pc    
    obj_t_generic   
    obj_t_written   
    obj_t_key   
    obj_t_scroll    
    obj_t_food  
    obj_t_money 
    obj_t_armor 
    obj_t_ammo  
    obj_t_weapon    
    obj_t_projectile    
    obj_t_scenery  
    obj_t_container 
    obj_t_portal 
    
    
     
  8. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    706
    Likes Received:
    112
    Thanks for writing this thread, I'm making great use of all this stuff, and no way in hell I would have ever figured any of it out on my own.

    There's a slight change I needed to make to the ChangeModel function. It appears that the skin color of the model won't change until you update obj_f_critter_race too. Interestingly, the appearance of the mesh is linked to the race setting.

    Humans, Half-Elves, and Halflings have an average skin tone.
    Elves are noticeably pale.
    Dwarves and Gnomes are earth brown.
    Half-Orcs are a greenish brown.

    So if you are reincarnating into an Elf, for example, you'd need to call npc.obj_set_int(race_elf) somewhere before calling obj_set_int(obj_f_animation_handle, 0). Not just for the sake of changing the race for the game rules, but for the skin color.
     
  9. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    427
    Likes Received:
    8
    Your are Welcome,

    with the wealth of knowledge on the TOEE engine library,
    I am glad to be of help, even when I am poken around in a DLL that other people
    have looked at 1000 times.

    So if I can clearify a given function, that some others may or may not have missed,
    then Hezzah!

    helps the community here as a whole.


    If you found anything that would expand this functions understanding,
    I would hope that you post them in the future so that we all can grasp the
    potentials of it not given in this thread.
     
Our Host!