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

Users who are viewing this thread

Status
Not open for further replies.
Three things in this question post:
First, might there be an operation to hook into to get the stack number of a troop type ('member') in a given party so the following isn't necessary:
Code:
	(party_get_num_companion_stacks, ":num_of_stacks", ":party_no"),
	(try_for_range, ":n", 0, ":num_of_stacks"),
		(party_stack_get_troop_id, ":stack_troop", ":party_no", ":n"),
		(eq, ":stack_troop", ":troop_id"),
		#do stuff like add XP, or get the number of that troop type that is wounded, etc
		(assign, ":num_of_stacks", 0),
	(try_end),

Second, I made sure to double-check (unlike my prior question about try_for_agents which you'd actually covered previously) but I didn't come up with any further comments on the various scene_set_* operations and I have a few questions.

1) Will they function on random scenes (setup by script_setup_random_scene ; have the flags sf_generate|sf_randomize) ?
2) If so, do they affect the next use of those random scenes, or just the current generation?
3) Should these be called from the menu when the scene is set up with (jump_to_scene) or in the mission with ti_before/after_mission_start ?
4) Finally, which of the following (or all of them? or I'll need to play around?) would smooth out the ridiculous/steep mounds that get created for mountainous terrain:
Code:
scene_set_valley_size = 4510 #(scene_set_valley_size, <scene_no>, <value>), #Sets <scene_no>'s terrain generator valley size to <value> (0-127)
scene_set_hill_height = 4511 #(scene_set_hill_height, <scene_no>, <value>), #Sets <scene_no>'s terrain generator hill height to <value> (0-127)
scene_set_ruggedness = 4512 #(scene_set_ruggedness, <scene_no>, <value>), #Sets <scene_no>'s terrain generator ruggedness to <value> (0-127)

And, a friendly re-query:
Caba`drin said:
I appear to have been under the mistaken impression that there was a wse script for when a savegame is loaded. Is a wse_game_load counterpart to the following script possible?

#script_wse_game_saved
# Called each time after game is saved successfully
("wse_game_saved", [
]),
 
Caba`drin said:
Three things in this question post:
First, might there be an operation to hook into to get the stack number of a troop type ('member') in a given party so the following isn't necessary:
Code:
	(party_get_num_companion_stacks, ":num_of_stacks", ":party_no"),
	(try_for_range, ":n", 0, ":num_of_stacks"),
		(party_stack_get_troop_id, ":stack_troop", ":party_no", ":n"),
		(eq, ":stack_troop", ":troop_id"),
		#do stuff like add XP, or get the number of that troop type that is wounded, etc
		(assign, ":num_of_stacks", 0),
	(try_end),
It's possible, but I don't really see the advantage over doing it via MS script:
Code:
("find_stack_for_troop", [
	(party_get_num_companion_stacks, ":num_of_stacks", ":party_no"),
	(assign, reg0, -1),
	(try_for_range, ":n", 0, ":num_of_stacks"),
		(party_stack_get_troop_id, ":stack_troop", ":party_no", ":n"),
		(eq, ":stack_troop", ":troop_id"),
		(assign, reg0, ":n"),
		(assign, ":num_of_stacks", 0),
	(try_end),
]),

Caba`drin said:
1) Will they function on random scenes (setup by script_setup_random_scene ; have the flags sf_generate|sf_randomize) ?
2) If so, do they affect the next use of those random scenes, or just the current generation?
No idea, you should try.
Caba`drin said:
3) Should these be called from the menu when the scene is set up with (jump_to_scene) or in the mission with ti_before/after_mission_start ?
As long as it's before or during ti_before_mission_start it will work. ti_after_mission_start is too late.
Caba`drin said:
4) Finally, which of the following (or all of them? or I'll need to play around?) would smooth out the ridiculous/steep mounds that get created for mountainous terrain:
Try playing a bit in the terrain generator and see the effects of the various sliders. It's probably ruggedness, though.
Caba`drin said:
And, a friendly re-query:
Noted, I'll se if it's possible/how much effort it requires.
 
cmpxchg8b said:
Caba`drin said:
4) Finally, which of the following (or all of them? or I'll need to play around?) would smooth out the ridiculous/steep mounds that get created for mountainous terrain:
Try playing a bit in the terrain generator and see the effects of the various sliders. It's probably ruggedness, though.

Ruggedness determines the amount of hills and also a bit how steep they are. But you most probably also want to alter the height.

Once I have time to fiddle around with it I'll try and see if I can influence the random terrain generation for multiplayer maps, I have failed to do this previously.
 
Barabas said:
cmpxchg8b said:
Caba`drin said:
4) Finally, which of the following (or all of them? or I'll need to play around?) would smooth out the ridiculous/steep mounds that get created for mountainous terrain:
Try playing a bit in the terrain generator and see the effects of the various sliders. It's probably ruggedness, though.

Ruggedness determines the amount of hills and also a bit how steep they are. But you most probably also want to alter the height.

Great, thanks both of you. I hadn't been in the terrain editor before--guess my questions revealed that ignorance though. Definitely ruggedness. Hill height a bit, definitely not valley height. Definitely ruggedness.

That said, I can't get (scene_set_ruggedness, <scene>, 0), to have any effect on randomly generated scenes. I've called it before and after (jump_to_scene) and ti_before/after_mission_start (the after just for giggles). No dice. Tried setting to 1, in case there was something goofy about 0. Still no luck.

I was going to ask
Now, any chance of storing the terrain hex value (eg 0x000000004c7337420002308c000075dd00002aa900006d4b ) or any of the above components to determine whether or not ruggedness/hill height needs to be turned down?
...but that isn't quite relevant any more.


I did learn, however, that if you continue to enter/retreat from a randomly generated scene, you'll rotate through about 3 different variations of the scene while on the same spot and in the same encounter.
 
Edit: [SOLVED]. Ignore the "problem" part below. There was no problem with the engine (as [cmpxchg8b] spotted, I was just accidentally removing the rigging). Bones can be added to skeletons at will already.


I was wondering if some light could be shed about what went wrong with this small testrun:
[link to MiniTailMod, a toy-mod to test addition of bones to the human skeleton]

Has I said there, I suspect
self said:
that the game is hardwired to send animation data (i.e. per-bone transforms), at runtime (i.e. to the vertex shader), for exactly 20 bones (for humans)
instead of however many bones there are in the skeleton/animation.

More wild guesses: I kinda expect the game to first pre-compute and store these [number-of-bones]x[number-of-frames] 4x4 matrices, for all animations, then send them dynamically (as uniforms) during rendering. In either of both occasions, it could be the case that  [number-of-bones] is hardwired to be 20. If that the case, maybe that limit could be lifted? E.g. Reading the real number of bones from module.ini or a txt file could be a patch (reading it directly from the skeleton in brf files would be cleaner naturally).



(OT: I've more urgent and possible easier requirements for a script enhancer, but since I really care this one for M&B, not WB, I will ask it in the other thread)
 
Hello,
when I try to run WSE i get the following error: failed to inject library into remote process...
I did try to find solution and so far none worked. I ran it as administrator, I have net.framework, microsoft visual C++ - nothing helps... wse_loader_log is empty and I can't find wse_crash_log.
Any help would be greatly appreciated because  it seems that many modifications require WSE and  it's essantial to have it working...
 
It's a known problem that occurs to many people, but I haven't been able to fix it because I haven't been able to reproduce it (tried all kinds of different operating systems nad configurations, still no luck).
If you're using antivirus software or security suites, you might wanna try disabling that. If not, I'm afraid the only way to make it work is download the non-Steam version from TaleWorlds and activate the game with your Steam key. :sad:
 
I believe some World Map operations are needed. Specially the times, when you need a party to do somethings depend on terrain, or the times when you don't want the player to pass the bridge without destroying the castle that guards it, i.e. (stop_party), (get_terrain_type),
 
Revan06 said:
Hello,
when I try to run WSE i get the following error: failed to inject library into remote process...
I did try to find solution and so far none worked. I ran it as administrator, I have net.framework, microsoft visual C++ - nothing helps... wse_loader_log is empty and I can't find wse_crash_log.
Any help would be greatly appreciated because  it seems that many modifications require WSE and  it's essantial to have it working...

I have this exact some problem on my older computer with Windows XP sp3 with WSE 2.5.0
With 2.4.7 I think I had a different error...
failed to inject library into remote process
code 6
invalid windows API

something like that.
 
Belendor Torheal Artendor said:
I believe some World Map operations are needed. Specially the times, when you need a party to do somethings depend on terrain, or the times when you don't want the player to pass the bridge without destroying the castle that guards it, i.e. (stop_party), (get_terrain_type),
Native already has (party_get_current_terrain,<destination>,<party_id>),
And stopping an AI party could be accomplished with (party_set_ai_behavior,<party_id>,<ai_bhvr>),  with hold position or the player with a simple (party_set_position, <party_id>,<pos>), and calling a menu or starting an encounter.

The_dragon said:
were can i see the source code?or how can i get it?
No need to repeat a question you asked only 6 hours ago. cmp hasn't released the source of WSE...which likely means he doesn't intend to.
 
Status
Not open for further replies.
Back
Top Bottom