• Please note that we've updated the Mount & Blade II: Bannerlord save file system which requires you to take certain steps in order for your save files to be compatible with e1.7.1 and any later updates. You can find the instructions here.

AGI-based movement speed modifier

Users who are viewing this thread

GrizzlyAdamz

Veteran
WB
Hey, where should I look to figure out how Blood&Steel adjusted the effect AGI has on running speed?
A character with ~60 AGI probably moved 2x as fast in that mod.
 

GrizzlyAdamz

Veteran
WB
There are a lot, and I'm not sure what I'm looking for.
Tried looking in globals, variables, troops, that kind of stuff. No dice.



Huh, this it? Figured it might be tied to animation speed or something..gonna compare it against another mod, stare at it, that kind of thing.
Code:
from header_common import *
from header_animations import *

####################################################################################################################
#  There are two animation arrays (one for human and one for horse). Each animation in these arrays contains the following fields:
#  1) Animation id (string): used for referencing animations in other files. The prefix anim_ is automatically added before each animation-id .
#  2) Animation flags: could be anything beginning with acf_ defined in header_animations.py
#  3) Animation master flags: could be anything beginning with amf_ defined in header_animations.py
#  4) Animation sequences (list).
#  4.1) Duration of the sequence.
#  4.2) Name of the animation resource.
#  4.3) Beginning frame of the sequence within the animation resource.
#  4.4) Ending frame of the sequence within the animation resource.
#  4.5) Sequence flags: could be anything beginning with arf_ defined in header_animations.py
# 
####################################################################################################################

#plan : 
# basic movement : walk ride etc. 0 -20000
#  on_foot  : 0     - 10000
#  horse    : 10000 - 20000
# combat         :                20000 - 40000
# fall           :                4000 - 70000
# act            : misc.          70000 - ...

amf_priority_jump           = 2
amf_priority_ride           = 2
amf_priority_continue       = 1
amf_priority_attack         = 10
amf_priority_cancel         = 12
amf_priority_defend         = 14
amf_priority_defend_parry   = amf_priority_defend + 1
amf_priority_throw          = amf_priority_defend + 1
amf_priority_blocked        = amf_priority_defend_parry
amf_priority_parried        = amf_priority_defend_parry
amf_priority_kick           = 33
amf_priority_jump_end       = 33
amf_priority_reload         = 60
amf_priority_mount          = 64
amf_priority_equip          = 70
amf_priority_rear           = 74
amf_priority_striked        = 80
amf_priority_fall_from_horse= 81
amf_priority_die            = 95



horse_move = 10000
combat     = 20000
defend     = 35000
blow       = 40000
 

GrizzlyAdamz

Veteran
WB
jacobhinds said:
GrizzlyAdamz said:

Go to module.ini and add the line can_run_faster_with_skills = 1

No dice, but ty
...or would it require a new character?


Found some interesting stuff.
Code:
	#Speed up Heroes, including the player
	(try_begin),
		(troop_is_hero, ":id"),
		(agent_set_speed_modifier, ":agent_no", 150),
	(try_end),	
	
	(troop_get_slot, ":char_class", "trp_player", slot_troop_character_class),
	(try_begin),
		(eq, ":id", "trp_player"),#It's the player
		(eq, ":char_class", 3),#Player is a Barbarian
		(agent_set_speed_modifier, ":agent_no", 200),#Really fast!
	(try_end),
Not sure what :agent_no is, (maybe the placeholder for an unspecified agent?), but this seems promising.
Trouble is, regular troops had the speed buff too.
Which makes this next section interesting:
Code:
	#Alephs can't crouch and are really slow
	(try_begin),
		(eq, ":id", "trp_aleph"),
		(agent_ai_set_can_crouch, ":agent_no", 0),
		(agent_set_speed_modifier, ":agent_no", 50),#Really slooow!
	(try_end),
	
	#Remnants can't crouch and are really fast
	(try_begin),
		(eq, ":id", "trp_death_knight_remnant"),
		(agent_ai_set_can_crouch, ":agent_no", 0),
		(agent_set_speed_modifier, ":agent_no", 250),#Really FAST
	(try_end),	
	
	#Convert Marnid into the Aleph if player is not driving it and we're not indoors
	(try_begin),
		(eq, "$g_player_drives_aleph", 0),
		(eq, "$g_player_owns_aleph", 1),
		(eq, "$g_can_drive_aleph_here", 1),
		(try_begin),
			(eq, ":id", "trp_npc2"),#Is Marnid
			(agent_get_team, ":team", ":agent_no"),
			(agent_get_position, pos1, ":agent_no"),
			(agent_fade_out, ":agent_no"),
			(set_spawn_position, pos1),
			(spawn_agent, "trp_aleph"),
			(agent_ai_set_can_crouch, reg0, 0),#disable crouching
			(agent_set_speed_modifier, reg0, 50),#Really slooow!
			(agent_set_team, reg0, ":team"),
		(try_end),
	(try_end),
This has (2) of the irregular troops in it. Question is, where are the others?

Browsing through the search results from N++, I don't see anything else.
 

gdwitt

Knight at Arms
Grizzly,
Thank you for the nicely laid out post.
Can you point us to the source code download for what you are posting?
GDW
 

GrizzlyAdamz

Veteran
WB
Blood and Steel is what I'm looking at, module_scripts.py is what I cited in my last post.
Here's a dropbox link for just that file if you prefer.


Hmm, maybe it's related to encumbrance?
Nope, encumbrance still plays a large role in B&S.
 

Duh

Duke
M&BWB
":agent_no: or any other ":thing" with ":" around it is a (local) variable. Usually agent is used to refer to all the characters within a mission (i.e. the 'scene' that is running and being checked and affected by the code).

The hero check in your code snippet excludes all non hero characters in the lines thereafter though. (Same goes for the specific unit checks)

If you cant find anything else with the operation MV suggested you might try digging around with the agility skill.
 
Top Bottom