Warband Script Enhancer 2 (v1.0.7.1)

Users who are viewing this thread

Maybe we could wait and see if experienced modders are able to start porting their modules into this new game engine or if, with some more details, more people are able to help at wololoing mods.
Almost all finished mods are closed in development and their creators have left the scene forever. You can only count on those who still are around or on mods whose source code has been made OSP/ LSP. All the to-do steps are here, so people who want to enjoy their favorite mods and WSE2 should learn how modding works.
 

K700

Sergeant Knight
WB
In fact, the whole question is how much this will affect performance. You won't know without testing. So the final decision will be only after tests and performance measurements.
 

Hektor_Riven

Recruit
M&BWBWF&SNWVC
In fact, the whole question is how much this will affect performance. You won't know without testing. So the final decision will be only after tests and performance measurements.

Look, K700, I think you've really reached almost a final product state, it's really a great work what you've done. I don't know what's the situation with the last bugs I've reported but, let's admit it, they're minor issues, only visual ones, and I think they're probably the last.

Also the two modules mentioned (and I hope you're interested in the matter) are probably namely already compatibile, with just a couple of touches by your side.

I'd suggest to focus on seeing what's the potential of your project in this current form, then eventually try other approaches if you haven't achieved the desired goals.

Would you like more information about the last bugs I've reported? Tomorrow I'll have my clan mate in my home, we can make tests on different machines. And tell me if you'd like me to forward what I've found on the two modules I was talking about.
 

Hektor_Riven

Recruit
M&BWBWF&SNWVC
We are looking forward for scene editor release! Could you tell us how much progress you have done?
In my opinion it would be far better to have fixed these last bugs I've mentioned. Also, adding the two modules I told about would be a great addition in terms of popularity and they wouldn't require a great amount of work.
Personally I still use the scene editor with the vanilla engine, and I get reasonable performances, one can also lower the graphics. I think this is the last of the priorities now.
 

Wasteland

Recruit
In my opinion it would be far better to have fixed these last bugs I've mentioned. Also, adding the two modules I told about would be a great addition in terms of popularity and they wouldn't require a great amount of work.
Personally I still use the scene editor with the vanilla engine, and I get reasonable performances, one can also lower the graphics. I think this is the last of the priorities now.
Not every player playing this game is not a singleplayer player, there is a lot of people in multiplayer community. For example our events in "Persistent Kingdoms" have 250 concurrent players. We have not encountered any kind of bug, reported the ones we encountered. Way of the showing people difference is scene editing and to accomplish that we need powerful, optimised and many featured scene editor.
 

Mindex

Veteran
M&BWBWF&SNWVC
I apologize but I really haven't understood a thing of what you said.


Maybe that Valedentella's assertion is right concerning other things beyond modding:grin:


Does it mean that "not every player plays multiplayer" or "some players don't play multiplayer"? So I've misunderstood the following statement.

Do you underline here that there are many who play in multiplayer, right? So I've misunderstood the previous statement.

Just for history, I'm mainly a multiplayer user as you can see by my very first post in this thread:

I'm also a game and server master of a multiplayer clan which operates in Full Invasion Osiris, Napoleonic Wars, Nord Invasion and the Anglo Zulu War Reloaded, as you can partially assume by another post of mine:

However you talk as if I just use the singleplayer aspect of Mount & Blade, so I keep misunderstanding.

Then you say:

If you have not encountered any kind of bug, you cannot have reported the ones you encountered, because you haven't encountered them, so, again, I misunderstand (assuming you meant "we reported", as it's missing the sentence's subject).

At any rate, I played Persistent Kingdoms too, on EU_Galaxy (worst gaming experience in my life due to server administration), and I haven't seen any bugs there with the new K700's engine, however issues show up in other modules (including Full Invasion Osiris which is a strictly multiplayer mod).
Bugs I've reported are truth, because they are showed in attached images, videos and logs. Only one of them is considered a vanilla bug so has been rightfully discarded in regard of this project.
Please, now don't misunderstand me: I'm not telling this engine is full of bugs, actually it has very little issues especially if we consider that it cuts GPU usage of immense percentages, I'm just trying to report what I find, so to give my small help at developing this software which is going to be the top bet of my clan.


Here I don't understand who are the "showing people" or maybe do you mean that this is the way to show to the people the difference?
Then my question is, difference between what?

I'd ask, to accomplish what? Scene editing or to show the yet unspecified difference to the people?

I have a last personal question, but I'm not offended if you wish not to answer: which is the input language of your Google Translator? Because I'd have a couple of bugs to report to the Google developers as well.

Anyway you all have to forgive my confusion but if I report a bug I get treated as if it's my fault or if I'm just being of bother, and most of these issues, let's tell it straightforward, are recognizable yet at the start of the game; if I ask for instructions I'm told I don't understand anything and/or to learn (the whole) modding by myself, while we're talking about a specific way of editing shaders that to date nobody proved, by posting conversions, to understand and master; now I'm just telling to first check the last bugs and see what can be done with modules I can prove they already work with WSE2 before considering to cut some of the performances in exchange for mod compatibility but instead I get answered, concerning adding the edit mode, with something like this:

Dude. As a non native speaker I get what he is trying to say. Im assuming you are a native speaker and It shouldn't be hard to understand. Otherwise Im guessing you are trying to shame him. He may be right or not but you should not shame him for trying to speak engrishu
 
@K700 Performances matter the most, I agree with @Veledentella people should learn how to mod.
Your instructions are clear and easy to follow if you take a bit of time to understand.

WSE2 optimisations are amazing, for example with Vanilla Warband when there are a lot of agents in the field, I see some of them flying but with WSE2 nothing. Also, the game runs smoother.

Thank you for WSE and WSE2 keep it up.
 

Hektor_Riven

Recruit
M&BWBWF&SNWVC
Dude. As a non native speaker I get what he is trying to say. Im assuming you are a native speaker and It shouldn't be hard to understand. Otherwise Im guessing you are trying to shame him. He may be right or not but you should not shame him for trying to speak engrishu
I must see reason and you are right. I apologize, I've deleted the post.
I just got a bit upset to hear, if I got it right, that by playing multiplayer one has a bug-free experience. This is not true, as can be seen by my detailed reports.
It annoys me that, despite not being a native speaker, I try my best anyway to be understandable, it's also a due respect towards the developer who's doing a great job, however one simply arrives, doesn't read anything of what has been written before, and tells the contrary without arguing and caring about the language.
I'd also like to underline that, in my opinion, it would be much better to finish the bug-fixing before opening a new project branch, at least by addressing the issues that are very evident.

@K700 Performances matter the most, I agree with @Veledentella people should learn how to mod.
Your instructions are clear and easy to follow if you take a bit of time to understand.

WSE2 optimisations are amazing, for example with Vanilla Warband when there are a lot of agents in the field, I see some of them flying but with WSE2 nothing. Also, the game runs smoother.

Thank you for WSE and WSE2 keep it up.

By chance, would you be able to perform the step number 3 for six shader files?

3)Next brf files with shaders.
If you get a crash with string ERROR: Number of alternatives exceeds 3 for shader, this step is the problem. If not - go to the next step.

Shaders format incompactible in Warband and WSE2 due to WSE2 skinning optimisation. Our task is to remove all warband shaders from the module brf files and compile the brf file with these shaders in the WSE2 format. We have two options.
If the shaders in the module are stored in one brf file mixed with other resources - we can add this shaders to the WSE2 core_shaders.brf and put this core_shaders.brf in module resource folder. Then remove the shaders from the original files.
If shaders stored in a separate brf, then we compile them into a separate WSE2 shader brf file and replace it.

Obenbrf does not support the new shader format, so we use WSE2 SDK for compiling shaders brf.
Check WSE2 SDK\Shaders folder.
resource_shaders.py - shader list, by default contains all shaders from core_shaders.brf
header_shaders.py
- shaders flags
build_shaders.bat - run this bat for compile brf

Shader format:
name
technique name
technique name with skin
flags
requirement flags
alternatives (fallback in openbrf)

If setled flag shf_uses_skinning, then technique name and technique name with skin swapped.
shf_uses_hlsl flag added automatically and does not require manual set.
Texture access field in openbrf not used in WSE2.

There's a mod which already works with the Warband Script Enhancer 2, but it doesn't render properly the border terrains of the maps because it has six custom shaders for these assets. If you're able to perform the above mentioned step for these six files, the Anglo Zulu War Reloaded, a module that's pretty populated online during the weekends, would benefit from the new engine's optimizations and could be officially supported (the rest are the Napoleonic Wars shaders).
 

fHood

Recruit
recently tried wse2 with osiris and have to say im rly impressed with the performance w many hundreds of units on screen, and all just feels so smooth, i rly hope more mods add support for this. GreatJob
 

Hektor_Riven

Recruit
M&BWBWF&SNWVC
What do you mean by this ? White textures ?
The Anglo Zulu War Reloaded uses Napoleonic Wars shaders, except for five custom shaders related to the scenes outer terrain.

If one applies to the Anglo Zulu War Reloaded the Warband Script Enhancer 2 patch made for Napoleonic Wars and creates a proper BAT file, the game lunches but it crashes with the following error:

"Number of alternatives exceeds 3 for shader over_border_shader_failed"

This "over_border_shader_failed" is the first of five shaders contained in the "terrain_borders.brf" file into the Resource directory of the Anglo Zulu War Reloaded module.
I've opened the file with a BRF editor and found, in fact, these five shader I'm talking about. They are:
  • over_border_shader_failed
  • under_border_shader
  • Border_Shader_old
  • over_border_shader_old
  • over_border_shader
If one deletes these elements within the BRF file, the Anglo Zulu War Reloaded works perfectly with the Warband Script Enhancer 2, however some outer terrains are, as you guessed, white.

Since, unfortunately, I haven't understood the instructions, I cannot proceed with the conversion explained in the third part of K700's tutorial. I asked specifically to be addressed in this process, as can be seen here:
[...]
III.
  1. You say we have two options depending on where the shader files are located, id est if they're inside a single BRF package or if they're inside one or more BRF packages that include other resources. I have no clue, however, for which files I've to look. Can you give me the exact names of these shader files?
  2. Once I have extracted the files from the module's BRF packages, either by cutting and pasting them from the BRFs that contains them or by simply extracting that single BRF which is supposed to include all the shaders in one place, how can I proceed with compiling? It's mentioned that I have to run the "build_shaders.bat" file, but where is it supposed to take the information to compile the shaders? Shall I simply put the files I've found in the sub-folder "Shaders" of the WSE2 SDK directory?
  3. What does it mean "If setled flag shf_uses_skinning, then technique name and technique name with skin swapped"?[...]
But, as everyone already knows, I was told what I was told.

If you think you would be able to perform this process, a pretty popular multiplayer mod could be added to the ones supported by this new game engine.

A link to the mod's download page on Mod.DB is here; here instead there's a small patch.
For easy access, here is the specific BRF file of the mod that contains the five shaders that would need to be converted.
 
Since, unfortunately, I haven't understood the instructions, I cannot proceed with the conversion explained in the third part of K700's tutorial
I will try to explain it to you and for everyone who is interested.

Open the brf file"s" you want to port the shaders from (in this case terrain_borders.brf).

This is my problem :
If the shaders in the module are stored in one brf file mixed with other resources - we can add this shaders to the WSE2 core_shaders.brf and put this core_shaders.brf in module resource folder. Then remove the shaders from the original files.

My module is based on Napoleonic War and mm_shaders.brf acts like core_shaders.brf
I copied the resource_shaders that K700 create for NW and start from here.

Next read the guide to understand and "copy" the shaders' attributes (technique, flags...) into your resource_shaders file.

This is a snippet of my file
Python:
    ("standart_shader_skin_nobump_nospec_noterraincolor", "standart_skin_nobump_nospec_noterraincolor", "standart_noskin_nobump_nospec_noterraincolor", shf_uses_skinning|shf_uses_diffuse_map, 0, [
        "specular_shader_skin",
    ]),
    #AZW Reloaded
    ("over_border_shader_failed", "skybox", "", shf_static_lighting|shf_preshaded|shf_uses_diffuse_map, 0, [
        "diffuse_no_shadow"
    ]),
    ("under_border_shader", "skybox", "", shf_static_lighting|shf_uses_diffuse_map, 0, []),
    ("over_border_shader", "diffuse_no_shadow", "", shf_static_lighting|shf_uses_diffuse_map, 0, []),
]

Compile your shaders and rename the brf if you need to (mm_shaders in my case).

Hope that help.
 

Hektor_Riven

Recruit
M&BWBWF&SNWVC
I will try to explain it to you and for everyone who is interested.

Open the brf file"s" you want to port the shaders from (in this case terrain_borders.brf).

This is my problem :


My module is based on Napoleonic War and mm_shaders.brf acts like core_shaders.brf
I copied the resource_shaders that K700 create for NW and start from here.

Next read the guide to understand and "copy" the shaders' attributes (technique, flags...) into your resource_shaders file.

This is a snippet of my file
Python:
    ("standart_shader_skin_nobump_nospec_noterraincolor", "standart_skin_nobump_nospec_noterraincolor", "standart_noskin_nobump_nospec_noterraincolor", shf_uses_skinning|shf_uses_diffuse_map, 0, [
        "specular_shader_skin",
    ]),
    #AZW Reloaded
    ("over_border_shader_failed", "skybox", "", shf_static_lighting|shf_preshaded|shf_uses_diffuse_map, 0, [
        "diffuse_no_shadow"
    ]),
    ("under_border_shader", "skybox", "", shf_static_lighting|shf_uses_diffuse_map, 0, []),
    ("over_border_shader", "diffuse_no_shadow", "", shf_static_lighting|shf_uses_diffuse_map, 0, []),
]

Compile your shaders and rename the brf if you need to (mm_shaders in my case).

Hope that help.
I thank you for your time but, unfortunately, I still don't understand. Actually I tried to make precise questions about the process as was explained by K700 and I'd have precise questions concerning each of your points too but I fear it wouldn't be useful to try my luck at asking again.
An outsider opinion, if you all allow me to say so, is that in all of these instructions there are many sentences that has implicit subjects and objects. I'm sure that who has experience may easily recall what is being discussed but unexperienced users like me don't have the proper means to understand.

If one wants to convert the Anglo Zulu War Reloaded module, it must be one that's capable of doing so, even if we're talking about five files only.
Unfortunately everything slowed down as other matters are being discussed but I've also tested another mod that's working almost perfectly with the Warband Script Enhancer 2, the Nord Invasion, however I think that only K700 may decide to take a look at these modules or not as only he has the experience to do so in an efficient way. To date, I haven't received any manifestation of interest towards these things.

While I'd be happy to see progresses in the development of this new engine as it's being used more and more by my clan, I recognize I cannot but limit myself to bug reporting. When I'll receive news from the previous ones I've reported, I've collected more data concerning other issues that I'd like to share.
 
I'm sure that who has experience may easily recall what is being discussed but unexperienced users like me don't have the proper means to understand.
That is the point, you must be somewhat proficient at modding to know what is going on in the instructions. If I still were around as far as serious modding is concerned, I would port the mod to WSE2 for you, but unfortunately I am short of time.
To date, I haven't received any manifestation of interest towards these things.
K700 does the engine, porting is left to modders.
 

K700

Sergeant Knight
WB
Please wait with porting, a new version of the engine with resource compatibility is in testing.
 
I would port the mod to WSE2 for you, but unfortunately I am short of time.
I've already did it.

If one wants to convert the Anglo Zulu War Reloaded module, it must be one that's capable of doing so, even if we're talking about five files only.
Sorry I should have uploaded the files earlier...

Please wait with porting, a new version of the engine with resource compatibility is in testing.
Hope the performances will not be impacted too much.
 

K700

Sergeant Knight
WB
1.0.7.0
-Added wse2 launcher.
-Restored shader compatibility.
-Restored hair materials.
-Added bLoadModuleIniOptions, bLimitHairColors config options.
-Warning messages requires enabled edit mode.


This major update brings back shader compatibility and allows WSE2 to run any modules out of the box.
This update does not need to be installed in a separate folder, just install it in your warband folder, warband and WSE2 can now work from one folder.
Also added launcher from Useful_Lesbian, which simplifies the launch of mods and has function of updating wse2.
Possible performance loss compared to the old WSE2 version is related to cpu skinning. Meshes with rigging requires material with skinning shader. Meshes without rigging requires material without skinning shader. Previously, WSE2 loaded the correct version of the shader, which was one of the reasons for the incompatibility. Now you need to take care of optimizing the mod yourself.

FAQ:

I can run any mod for Warband with WSE2 without any adjustment?
Yes! Exception - module contains its own postFX.fx module. In this case, you need to edit this file and add to the end this strings
Code:
#if WSE2
#include "postFX_WSE2.fx"
#endif

I run my mod in WSE2 and get a black screen with FXAA or Post Processing Filter enabled.
You need to edit postFX.fx file from your module and add to the end this strings
Code:
#if WSE2
#include "postFX_WSE2.fx"
#endif

How can I improve the performance of the mod?
Enable edit mode, run mod and check rgl_log.txt. You need to fix PERFORMANCE WARNING. Meshes with rigging requires material with skinning shader. Meshes without rigging requires material without skinning shader. This will increase performance for both WSE2 and Warband since the CPU is the bottleneck.
 
Last edited:
It is a tremendously big update bearing great significance, thank you, K700; amazing!

@Hektor_Riven, look at it, your dream has come true. This time, however, you will need to learn how to make those three small adjustments yourself should any need arise. The difficulty level has been quite lowered, so you have to rely on yourself now.
 
Top Bottom