[WB] Warband Script Enhancer v3.2.0 (21/07/2013)

Users who are viewing this thread

Status
Not open for further replies.
Another question. What's the formula to convert unallocated WP points into WP? It's seems related to weapon mastery skills and current points but it's not linear. I want to use  troop_get_proficiency_points, troop_set_proficiency_points and related operations to perform autoleveling up to companions and AI lords.
 
dunde said:
Another question. What's the formula to convert unallocated WP points into WP? It's seems related to weapon mastery skills and current points but it's not linear. I want to use  troop_get_proficiency_points, troop_set_proficiency_points and related operations to perform autoleveling up to companions and AI lords.
Code:
weaponMasterTable = [60, 100, 140, 180, 220, 260, 300, 340, 380, 420, 460]

def clamp(x, min, max):
	return min if x < min else max if x > max else x

def raise_wpf_nonlinear(currentWpf, addedWpf, weaponMaster):
	factor = 70.0 / (currentWpf + 70.0)
	threshold = float(weaponMasterTable[clamp(weaponMaster, 0, 10)])

	if threshold < currentWpf:
		factor *= 20.0 / (currentWpf - threshold + 20.0)

	for i in xrange(1, 15):
		if currentWpf > 50 * i:
			factor *= 0.65

	return currentWpf + factor * 2 * addedWpf

def get_wpp_required_to_upgrade(currentWpf, weaponMaster):
	newWpf = currentWpf
	oldWpf = int(newWpf)
	required = 0

	while (True):
		newWpf = raise_wpf_nonlinear(newWpf, 1.0, weaponMaster)
		required += 1

		if int(newWpf) > oldWpf:
			break

	return required;

print 'WPF:',
currentWpf = clamp(float(raw_input()), 0.0, 1000.0)
print 'WM:',
weaponMaster = clamp(int(raw_input()), 0, 10)
wppToUpgrade = get_wpp_required_to_upgrade(currentWpf, weaponMaster)
print 'WM skill: %d' % weaponMaster
print 'WPF before raise: %d' % int(currentWpf)
print 'WPP needed for raise: %d' % wppToUpgrade
print 'WPF after raise: %d' % int(raise_wpf_nonlinear(currentWpf, wppToUpgrade, weaponMaster))
 
Lumos said:
I've never heard of patch 1.154, to be honest.
Does it add new features?
It does for NW, no mention yet of non-NW Warband changes. We wait for more info.
Warband Patch 1.154
Common:
- Fixed a bug that made upper stabs unblockable when in crouch-mode.
- Horses don’t rear up anymore when hit by a bayonet to their front.
- Upper stab chamber attacks are now not blockable anymore just like the lower stab.
 
According to the Game Hub on steam, the new version of warband only affects Napoleonic Wars and not normal Warband, so I think you just need to alter the coding to let WSE run 1.154.
 
Can you make the following functions:

get_face_texture
set_face_texture

get_body_texture
set_body_texture

set_gender_type(sets gender to :male or :female for modders who want to make races such as undead,and always,new gender-races are set as female).

and the following item flags:
itp_show_torso_only
itp_show_both_arms
itp_show_right_arm
itp_show_lef_arm

However,the set_body_texture or the body hex colors i.e.:
    [("manface_young_2",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),
    ("manface_midage",0xffdfefe1,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),
    ("manface_young",0xffd0e0e0,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),   
#    ("manface_old",0xffd0d0d0,["hair_white","hair_brunette","hair_red","hair_blonde"],[0xffffcded, 0xffbbcded, 0xff99eebb]),
    ("manface_young_3",0xffdceded,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
    ("manface_7",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]),
    ("manface_midage_2",0xfde4c8d8,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]),
    ("manface_rugged",0xffb0aab5,["hair_blonde"],[0xff171313, 0xff007080c]),
#    ("manface_young_4",0xffe0e8e8,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
    ("manface_african",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),   
#    ("manface_old_2",0xffd5d5c5,["hair_white"],[0xffffcded, 0xffbbcded, 0xff99eebb]),
must work even with these itp flags.

I can make the 3d models of torso and arms if you want.
 
ThaneWulfgharn said:

Can you not just use: 'player_set_skin' for genders or is that only Multiplayer?

Also their are already:

'face_keys_get_face_texture'
'face_keys_set_face_texture'

I understand you must use face keys for this but hell, Why should he code new operations when you can already do it?

Wolf.
 
Wolfstar said:
ThaneWulfgharn said:

Can you not just use: 'player_set_skin' for genders or is that only Multiplayer?

Also their are already:

'face_keys_get_face_texture'
'face_keys_set_face_texture'

I understand you must use face keys for this but hell, Why should he code new operations when you can already do it?

Wolf.
I didn't exactly knew about face keys and player_set_skin.Player_set_skin requires wse_network_connection = 0.

EDIT: I tried player_set_skin and it shows this error:
Unrecognized opcode 2902.; LINE NO: 2:
At menu menu_start_game_1 item mno_start_undead consequence.
At menu menu_start_game_1 item mno_start_undead consequence.
 
Aye, I've been looking into them further and it appears face keys can only be set for players and not agents :/. Oh well, i hope you find a way around it :wink:.

Wolf.
 
Status
Not open for further replies.
Back
Top Bottom