Version 1.150 - 1.151 - 1.152 - 1.153 released

Users who are viewing this thread

I'm pretty sure crouch is there just to support NW, I'm assuming it's up to us to improve it should we need it on a mod.
 
Vincenzo said:
you need animations for crouch, your not allowed to port them though, so add your own.
'twould make sense.
AOFI has OSP Animations (including crouch) that you could use guys (obviously not you Vince)
 
ou need animations for crouch, your not allowed to port them though, so add your own
That's not an acceptable answer. 

If you break Native features and things that have been working in other mods for ages, the people who broke it are responsible for fixing it.  Otherwise every DLC will just put Native into deeper and deeper chaos and break all of the mods, and we'll be too busy fixing your screwups to do our (free!) work.

Anyhow, these issues have been reported as a bug on the tracker for now.

I apologize for the harsh tone of this, but frankly I am pretty worried that we're going to see more Agent behaviors get broken or poorly tested in further DLCs for this engine, and I think that we need to see that features that affect Agents are, perhaps, the most sensitive areas of the engine in a lot of respects.

New features like Crouch should work for all mods that enable it out of the box and should be tested more thoroughly, not fixed through third-party content that is effectively a patch for something that shouldn't have been delivered in a broken state. 

I'll fix this one and distribute a fix, but I'm pretty concerned about the precendent this sets- this is, in some ways, a repeat of the mistakes that were made with WFaS.  We don't have enough people with the skills to fix these issues sitting around on-call to rescue TW from bad management decisions in regards to what gets shipped in a patch and this whole "we have a fix but you can't use it" is not a good way of handling this sort of thing.  I mean, it won't magically make our mods into something we can sell or whatever, so I'm really not sure why this is even an issue  :neutral:
 
This is a bit messy... Let's sum it up:


–Stuff They Added™ on patch 1.151

Core resources (the previously hardcoded BRFs) and Post-process shaders (postFX.fx) are now modular.
That means that we aren't constrained to the default assets anymore. That means COMPLETE modularity, even for hardcoded references.

New operations (WSE derived), goodies and syntactic fixes.
Code:
party_end_battle                       = 108    # (party_end_battle,<party_no>),


is_edit_mode_enabled                   = 255    # (is_edit_mode_enabled),


store_last_sound_channel               = 615    # (store_last_sound_channel, <destination>),
stop_sound_channel                     = 616    # (stop_sound_channel, <sound_channel_no>),


overlay_set_additional_render_height   = 952    # (overlay_set_additional_render_height, <overlay_id>, <height_adder>),


scene_prop_set_cur_hit_points          = 1820   # (scene_prop_set_cur_hit_points, <scene_prop_id>, <value>),

scene_prop_fade_out                    = 1822   # (scene_prop_fade_out, <scene_prop_id>, <fade_out_time>)
scene_prop_fade_in                     = 1823   # (scene_prop_fade_in, <scene_prop_id>, <fade_in_time>)


agent_is_in_line_of_sight              = 1826   # (agent_is_in_line_of_sight, <agent_id>, <position_no>), # rotation of the position register is not used.
agent_deliver_damage_to_agent_advanced = 1827   # (agent_deliver_damage_to_agent_advanced, <destination>, <agent_id_deliverer>, <agent_id>, <value>, [item_id]), #if value <= 0, then damage will be calculated using the weapon item. # item_id is the item that the damage is delivered. can be ignored.
                                                # this advanced mode of agent_deliver_damage_to_agent has 2 differences. 1- the delivered damage is returned. 2- the damage delivery is done after checking the relationship between agents. this might cause no damage, or even damage to the shooter agent because of a friendly fire.
team_get_gap_distance                  = 1828   # (team_get_gap_distance, <destination>, <team_no>, <sub_class>),

add_missile                            = 1829   # (add_missile, <agent_id>, <starting_position>, <starting_speed_fixed_point>, <weapon_item_id>, <weapon_item_modifier>, <missile_item_id>, <missile_item_modifier>), # starting position also contains the direction of the arrow


prop_instance_play_sound               = 1881   # (prop_instance_play_sound, <scene_prop_id>, <sound_id>, [flags]), # sound flags can be given
prop_instance_stop_sound               = 1882   # (prop_instance_stop_sound, <scene_prop_id>),

prop_instance_clear_attached_missiles  = 1885   # (prop_instance_clear_attached_missiles, <scene_prop_id>), # Works only with dynamic scene props (non-retrievable missiles)

prop_instance_add_particle_system      = 1886   # (prop_instance_add_particle_system, <scene_prop_id>, <par_sys_id>, <position_no>), # position is local, not global.
prop_instance_stop_all_particle_systems= 1887   # (prop_instance_stop_all_particle_systems, <scene_prop_id>),


particle_system_burst_no_sync          = 1975   # (particle_system_burst_without_sync,<par_sys_id>,<position_no>,[percentage_burst_strength]),

spawn_item_without_refill              = 1976   # (spawn_item_without_refill, <item_kind_id>, <item_modifier>, [seconds_before_pruning]) #if seconds_before_pruning       = 0 then item never gets pruned
agent_get_item_cur_ammo                = 1977   # (agent_get_item_cur_ammo, <destination>, <agent_id>, <slot_no>)


agent_ai_get_look_target               = 2080   # (agent_ai_get_look_target, <destination>, <agent_id>),
agent_ai_get_move_target               = 2081   # (agent_ai_get_move_target, <destination>, <agent_id>),
agent_ai_get_behavior_target           = 2082   # (agent_ai_get_behavior_target, <destination>, <agent_id>),

agent_set_max_hit_points               = 2090   # set absolute to 1 if value is absolute, otherwise value will be treated as relative number in range [0..100]
                                                # (agent_set_max_hit_points,<agent_id>,<value>,[absolute]),
agent_set_damage_modifier              = 2091   # (agent_set_damage_modifier, <agent_id>, <value>), # value is in percentage, 100 is default
agent_set_accuracy_modifier            = 2092   # (agent_set_accuracy_modifier, <agent_id>, <value>), # value is in percentage, 100 is default, value can be between [0..1000]
agent_set_speed_modifier               = 2093   # (agent_set_speed_modifier, <agent_id>, <value>), # value is in percentage, 100 is default, value can be between [0..1000]
agent_set_reload_speed_modifier        = 2094   # (agent_set_reload_speed_modifier, <agent_id>, <value>), # value is in percentage, 100 is default, value can be between [0..1000]
agent_set_use_speed_modifier           = 2095   # (agent_set_use_speed_modifier, <agent_id>, <value>), # value is in percentage, 100 is default, value can be between [0..1000]
agent_set_visibility                   = 2096   # (agent_set_visibility, <agent_id>, <value>), # 0 for invisible, 1 for visible.


store_zoom_amount                      = 2220   # (store_zoom_amount, <destination_fixed_point>),
set_zoom_amount                        = 2221   # (set_zoom_amount, <value_fixed_point>),


show_troop_details                     = 2388   # (show_troop_details, <troop_id>, <position>, <troop_price>)
set_skybox                             = 2389   # (set_skybox, <non_hdr_skybox_index>, <hdr_skybox_index>) #forces selected skybox for a scene, use -1 to disable 
set_startup_sun_light                  = 2390   # (set_startup_sun_light, <r>, <g>, <b>) #changes the sun light color
set_startup_ambient_light              = 2391   # (set_startup_ambient_light, <r>, <g>, <b>) #changes the ambient light color
set_startup_ground_ambient_light       = 2392   # (set_startup_ground_ambient_light, <r>, <g>, <b>) #changes the ground ambient light color
rebuild_shadow_map                     = 2393   # (rebuild_shadow_map),

set_shader_param_int                   = 2400   # (set_shader_param_int, <parameter_name>, <value>), #Sets the int shader parameter <parameter_name> to <value>
set_shader_param_float                 = 2401   # (set_shader_param_float, <parameter_name>, <value>), #Sets the float shader parameter <parameter_name> to <value>
set_shader_param_float4                = 2402   # (set_shader_param_float4, <parameter_name>, <valuex>, <valuey>, <valuez>, <valuew>), #Sets the float4 shader parameter <parameter_name> to <valuex/y/z/w>
set_shader_param_float4x4              = 2403   # (set_shader_param_float4x4, <parameter_name>, [0][0], [0][1], [0][2], [1][0], [1][1], [1][2], [2][0], [2][1], [2][2], [3][0], [3][1], [3][2]), #Sets the float4x4 shader parameter <parameter_name> to the given values .w components are 0001 by default

Xbox controller support:
Code:
key_xbox_a              = 0xf0
key_xbox_b              = 0xf1
key_xbox_x              = 0xf2
key_xbox_y              = 0xf3
key_xbox_dpad_up        = 0xf4
key_xbox_dpad_down      = 0xf5
key_xbox_dpad_right     = 0xf6
key_xbox_dpad_left      = 0xf7
key_xbox_start          = 0xf8
key_xbox_back           = 0xf9
key_xbox_rbumber        = 0xfa
key_xbox_lbumber        = 0xfb
key_xbox_ltrigger       = 0xfc
key_xbox_rtrigger       = 0xfd
key_xbox_rstick         = 0xfe      
key_xbox_lstick         = 0xff

Complex formations + orders + crouch boilerplate (no animations provided)
Code:
ti_on_order_issued					  = -71.0 #can only be used in module_mission_templates triggers
# Trigger Param 1: order no
# Trigger Param 2: agent id
Code:
gk_crouch = 49
gk_order_7 = 50
gk_order_8 = 51

–New flags and animation sets for items, also now we can add our own kill icons for multiplayer...
Code:
itp_is_pike                         = 0x0002000000000000
itp_offset_musket                   = 0x0004000000000000
itp_no_blur                         = 0x0008000000000000

itp_cant_reload_while_moving_mounted= 0x0010000000000000
itp_has_upper_stab                  = 0x0020000000000000
itp_kill_info_mask                  = 0x0700000000000000
itp_kill_info_bits                  = 56 # 0x0700000000000000


def custom_kill_info(x): # you have to add ico_custom_x (where x is a number between 1 and 7) mesh in order to display it correctly.
return (((bignum | x) & (itp_kill_info_mask >> itp_kill_info_bits)) << itp_kill_info_bits)


itcf_overswing_spear                = 0x0020000000000000
itcf_overswing_musket               = 0x0040000000000000
itcf_thrust_musket                  = 0x0080000000000000


New flags for sounds, (the sound engine has been rewritten from scratch, now we can stream sounds on demand without having them constantly loaded in RAM, performance improvement, faster loading) and scene props (related with movement, shadows, collisions and more)
Code:
sf_stream_from_hd      = 0x00000008
sf_always_send_via_network = 0x00100000

sf_priority_15    = 0x000000f0
sf_priority_14    = 0x000000e0
sf_priority_13    = 0x000000d0
sf_priority_12    = 0x000000c0
sf_priority_11    = 0x000000b0
Code:
sokf_enforce_shadows       = 0x0000000000100000
sokf_dont_move_agent_over  = 0x0000000000200000
sokf_handle_as_flora       = 0x0000000001000000
sokf_static_movement       = 0x0000000002000000
 
Yeah, the moddability of the core stuff is great; I can finally clean house of some junk :lol:

I don't suppose anybody has a clue about how we can pass shader params yet?
 
xenoargh said:
I don't suppose anybody has a clue about how we can pass shader params yet?

I presume it works the same as with WSE. So you need to make a new global variable and then you can set it via the module system by calling the correct function with the name of the variable in a string.
 
Well.
With the new operations...
Code:
agent_set_speed_modifier               = 2093   # (agent_set_speed_modifier, <agent_id>, <value>), # value is in percentage, 100 is default, value can be between [0..1000]

agent_set_use_speed_modifier           = 2095   # (agent_set_use_speed_modifier, <agent_id>, <value>), # value is in percentage, 100 is default, value can be between [0..1000]
...it actually should be possible to limit the movement speed for players too.

Or are these operations for something else?
 
_Sebastian_ said:
Well.
With the new operations...
Code:
agent_set_speed_modifier               = 2093   # (agent_set_speed_modifier, <agent_id>, <value>), # value is in percentage, 100 is default, value can be between [0..1000]

agent_set_use_speed_modifier           = 2095   # (agent_set_use_speed_modifier, <agent_id>, <value>), # value is in percentage, 100 is default, value can be between [0..1000]
...it actually should be possible to limit the movement speed for players too.

Or are these operations for something else?
I'm guessing these are for weapons/reload speeds.

(Moving this question to the 1.151 thread as it applies more to the patch than Dunde's code.)
 
agent_set_speed_modifier - This set the agent's movement speed
agent_set_reload_speed_modifier - This set the agent's reload speed
agent_set_use_speed_modifier - This set the agent's use speed for scene props

So, to answer your question, yes, you can make players move slower or faster.
 
Beaver said:
agent_set_speed_modifier - This set the agent's movement speed
agent_set_reload_speed_modifier - This set the agent's reload speed
agent_set_use_speed_modifier - This set the agent's use speed for scene props

So, to answer your question, yes, you can make players move slower or faster.
MAY THE LORD BLESS THEE OH MIGHTY NW TEAM! I've been waiting for this...
 
xenoargh said:
You could already adjust Agent speeds in MP, though.

Can we finally do it in SP now?
It should work for both SP and MP...
I guess they used this method in NW to limit the speed while an agent aims with a firearm and they
used it also for the walking mode when you press left-shift.


Another question... what does "sf_always_send_via_network" in the header_sounds actually do?
Is this for playing sounds in multiplayer... so that we dont need any server- and client events for playing sounds at positions and on agents?
 
That flag forces a sound run on server with agent_play_sound to always be synced to all clients, even if their more then 20 meters away from this agent (That's the default limit)


I'd like to add that your a bit ungrateful xenoargh, the crouch module.ini setting is a feature for the DLC, It is not a native feature of any kind and should not just be enabled for your mod and expected to work and then ***** if it doesen't...... If you want to get it working some work of your own is needed, in this case just some animations and other small bits.


I hope you guys like the other features though.
 
I pretty much have the feature fixed over here, just need to finish the crouch cyclic stuff for each state. 

I'll provide a patch / animations for everybody to use when it's ready.
 
xenoargh said:
You could already adjust Agent speeds in MP, though.

Can we finally do it in SP now?

But it didn't work on player-controlled agents. I wonder if it does with this function. It would be awesome if it does.
 
Is there a way to use set_skybox, set_rain, scene_set_day_time in Native MP without sync. event?

I can't test anything atm...

Will it sync automatically? (since 1.150)



Edit: I have another question too. Is it perhaps now enable to check strings with (eq,value1,value2), ?
 
Oh wow, is it Christmas already?!?  Some of the AI opcodes are ones I've been waiting for to finish my skirmisher mode AI for ranged and throwing troops!  Thanks Taleworlds, you are officially freaking awesome! Edit: (ok, I think the double-strength coffee and lack of sleep was starting to kick in here...)

I'd just given up on my mod too, now it looks like I better get back into it.  :grin:

Edit:  Assuming it all works that is.  Now after finally having read through this thread I'm a bit worried.

BTW with the "improvements" on NPC weapon selection AI, does that mean we no longer need things like code to force mounted troops to switch weapons when on horse back (lance) or on foot (secondary back-up weapon)?  That would be a good thing.  I think.  Will test later when I've got time.
 
Back
Top Bottom