B Info Module System List of Hardcoded Stuff | Reference

Users who are viewing this thread

Swyter

Grandmaster Knight
Just discovered some cool stuff that cannot be changed.
I had this already in my hard disk, it looked interesting so instead of getting lost I decided to share it with you. I've added further descriptions and ordered everything a little.

This might be useful for knowing what resources are important, what to replace and what is loaded, maybe even a detail you didn't knew about or even further options of modability.

What's disclosed in here?
  • All the
    Code:
    module.ini
    directives
  • Hardcoded meshes (primary UI), textures, materials, colision, shaders, formats
  • All the passed shader variables
  • All what you cannot delete from the Module System.
    So you can get out everything but this and get a barebones version without any crash, for example
  • Behind the scenes info (Inner workings of the engine)
  • ...

Everything has been discovered from Warband's engine.
The entries may be repeated.


Code:
[b]-->VALID TEXTURE FORMATS[/b]
.dds
.jpg
.tga

[b]-->RECOGNIZED RESOURCE FORMATS[/b]
.trf - Text -> Automatically converted to binary by the engine
.brf - Binary -> faster loading, uncompressed

[b]-->HTTP REQUESTS / GAME FOOTPRINT[/b]
-accepted formats are exacly "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*"
-language en-us
-accept both gzip and deflate compression
-user agent is "Mozilla/4.0"


[b]-->FILES TRIED TO LOAD IN MODULE, IN ORDER[/b]
 --- this is more a random copy paste than serious ref :/
Sorry for the mess, unfinished ---

/languages/*
/data/
/textures/*
\module.ini
\game_variables.txt
mb.fx  -> This and the following one and more than interesting. Works also for the vanilla game without Iron Launcher
mb.fxo -> Compiled per-module effects file, in HLSL, use the uncomplicated one so the game does it on runtime.
main.bmp
language.txt
languages\<lang>\*
languages\<lang>\<files>

Data\item_modifiers.txt
Data\flora_kinds.txt
data\ground_specs.txt
data\skyboxes.txt
Data\mission_types.txt

\module.ini
\main.bmp


[b]--> EXTRA REGISTRY KEYS[/b]
last_module
module_system_folder -> Used by the in-game ****ty script debugger.


[b]--> VIDEO PLAYER COMMAND LINE[/b]
binkplay.exe
paradox.bik /P /I2 /Z /J /U1 /W-1 /H-1 /C /B2 -> 1st vid
taleworlds_intro.bik /P /I2 /Z /J /U1 /W-1 /H-1 /C /B2 -> 2nd v

[b]-->MODULE.INI RECOGNIZED DIRECTIVES[/b]
load_resource
load_mod_resource
load_module_resource
time_multiplier

armor_soak_factor_against_cut
armor_soak_factor_against_pierce
armor_soak_factor_against_blunt
armor_reduction_factor_against_cut
armor_reduction_factor_against_pierce
armor_reduction_factor_against_blunt

missile_damage_speed_power
melee_damage_speed_power
damage_interrupt_attack_treshold
damage_interrupt_attack_threshold
horse_charge_damage_multiplier
couched_lance_damage_multiplier
seeing_range
track_spotting_multiplier
blood_multiplier
skill_leadership_bonus
skill_prisoner_management_bonus
base_companion_limit
player_xp_multiplier
hero_xp_multiplier
regulars_xp_multiplier
hero_wounded_treshold
player_wounded_treshold

map_min_x
map_min_y
map_max_x
map_max_y
map_sea_direction
map_sea_speed_x
map_sea_speed_y
map_river_direction
map_river_speed_x
map_river_speed_y
map_tree_types
map_snow_tree_types
map_steppe_tree_types
map_desert_tree_types

display_wp_one_handed
display_wp_two_handed
display_wp_polearms
display_wp_archery
display_wp_crossbows
display_wp_throwing
display_wp_firearms

module_version -> interesting for savegames
compatible_module_version

scan_module_textures
scan_module_sounds

module_name -> real use apart from in-gmae ref?
num_hints

starting_year
starting_month
starting_day

enable_quick_battles
disable_food_slot
limit_hair_colors

show_faction_color
show_quest_notes
show_party_ids_instead_of_names

main_menu_font_color_red
main_menu_font_color_green
main_menu_font_color_blue

works_with_version_min
works_with_version_max


[b]-->HARDCODED STUFF[/b]

[i]CORE RESOURCES (in order)[/i]
core_shaders -> cannot be unloaded or overridden at all, the last serious limitation  :/
core_textures
core_materials
core_ui_meshes
core_pictures

[i]SKELETONS[/i]
skel_horse -> its hardcoded due the terrain alignment code for the horse legs, that dynamically changes the anim on determinated bones. So the horse is always horizontal even in cliffs and stuff

[i]MESHES[/i]
flying_missile
entry_arrow
_mesh_passage
def_trousers
sun

slider_hor
handle_hor
map_legend
scrollbar
scrollbar_handle
medium_button
medium_button_down
progressbar
handle_hor
progressbar_handle
button_drop
button_drop_clicked
button_drop_hl
button_drop_child
button_drop_child_clicked
button_drop_child_hl
party_button
party_button_down

battle_icon -> crossed swords in the strateg. map

map_legend_outline

warrider_logo
mission_window
meeting_window
button5_up
button5_down
button5_hl
message_window
party_button
party_button_down
longer_button_down
longer_button
medium_button_down
medium_button

pic_mercenary  -> legacy? still used at all? main menu mesh of the displayed picture

load_window  -> bg
debrief_window

options_window

slider_hor
handle_hor
button_drop
button_drop_clicked
button_drop_hl
button_drop_child
button_drop_child_clicked
button_drop_child_hl

medium_button_down
medium_button

meeting_window

ini_pic_mb_warrior_1
ini_pic_mb_warrior_2
ini_pic_mb_warrior_3
ini_pic_mb_warrior_4

progressbar
progressbar_handle -> i hate the red vertex coloring, cannot be changed without retouching core_res

[i]MATERIALS[/i]
matte
background

river -> note the shder inheritances 
river_mud

agent_name

[i]TEXTURES[/i]
cursor

[i]SHADERS[/i]
default

[i]SHADER MB.FX/O PASSED VARIABLES[/i]
fFogStart
fFogEnd
fFogStart
fFogEnd
fFogDensity
vFogColor
vPointLightColor
vSkyLightDir
vSkyLightColor
vLightPosDir
vLightDiffuse
vSunDir
vSunColor
shadowmap_texture
matSunViewProj
vSkyLightColor
vSunColor
vAmbientColor
vCameraPos
matView
matViewProj
time_var
diffuse_texture
diffuse_texture_2
normal_texture
specular_texture
env_texture
env_texture
iLightIndices
iLightPointCount
vMaterialColor
vMaterialColor2
diffuse_texture
texture_offset
matWaterWorldViewProj
matWorld
matWorldView
matWorldViewProj
matBoneOriginArray
matWorldArray
matBoneOriginArray
matWorldArray

[i]RESERVED KEYWORD[/i]
none -> it's "none", not none of none  :)

[i]COLLISION MESHES [BODY OBJECT][/i]
boshield
bo_mesh_passage

[i]SOUNDS[/i]
snd_click -> You can change the sound itself of all those, this is only the reference name
snd_gong
snd_quest_taken
snd_quest_completed
snd_quest_succeeded
snd_quest_concluded
snd_quest_failed
snd_quest_cancelled

[i]SCRIPTS[/i]
game_start
game_event_party_encounter
game_event_simulate_battle
game_get_item_buy_price_factor
game_get_item_sell_price_factor
game_event_buy_item
game_event_sell_item
game_get_troop_wage

[i]PRESENTATIONS[/i]
prsnt_game_start -> Much more than interesting, using it in SWC
prsnt_game_escape -> Same than the other one.
prsnt_game_credits -> Well known

[i]PARTICLE SYSTEMS[/i]
psys_game_rain
psys_game_snow
psys_game_blood
psys_game_blood_2
psys_game_hoof_dust
psys_game_hoof_dust_snow
psys_game_hoof_dust_mud
psys_game_water_splash_1


[b]-->GAME VARIABLES[/b]
save_b_save_x -> incomplete list, looks like game_variables.txt is showing the full one.
save_b_save_y
save_b_save_x_a
save_b_save_y_a
save_b_save_size_y
save_b_save_button_h
restore_game_panel_down
restore_game_panel
save_b_save_t_s
save_b_save_t_s
save_b_save_t_c
save_b_save_t_h_c
save_t_name_x
save_t_name_y
save_t_info_x
save_t_info_y
save_t_error_x
save_t_error_y
...
 
starting_year
starting_month
starting_day

this three shouldn't bee right... the date text won't show up right because there is a script that makes the year start at 1257
 
MadocComadrin said:
Wait, what about text/plain?

The
Code:
*/*
part does the trick.
That string isn't that important, but it can be used to detect Mount&Blade game clients and their queries in any web server.

Might be useful for someone.

___

I'm more interested in the hardcoded list. Some time ago Theoris did a barebones version of the Warband msys.
Due the amount of stuff removed it had some occassional crashes. Thanks to this list anyone can do an stripped version of the native's functionality without crashing at all.


Barebones means independence of resources, easy ports and rapid loading.
I'm going to do it that way for SWC Warband version.  :smile:


Let's see how it goes.
 
Ah, sorry, wasn't paying attention there. Still, that should still be one format that you should mention in the front, since it's used quite a bit engine-wise.
 
Swyter said:
-->VALID TEXTURE FORMATS
.dds
.jpg
.tga

-->RECOGNIZED RESOURCE FORMATS
.trf - Text -> Automatically converted to binary by the engine
.brf - Binary -> faster loading, uncompressed

I never thought that TGA and JPG would be accepted by Warband.  It would be stupid to use them anyway...since the file size of a 1024x1024 TGA is like 2 or 4 megabytes, and a JPG is like 1.5, while a Dxt1 DDS is 683 kb. :grin:

And what is a TRF? Text resource file...but how can you even make them? :???:
 
Specialist said:
I never thought that TGA and JPG would be accepted by Warband.  It would be stupid to use them anyway...since the file size of a 1024x1024 TGA is like 2 or 4 megabytes, and a JPG is like 1.5, while a Dxt1 DDS is 683 kb. :grin:

And what is a TRF? Text resource file...but how can you even make them? :???:


  • The DirectX texture loader accepts all those extensions... But surely specular materials might be messed up because of the lacking alpha channel.


  • You can make TRFs with the official Blender Exporter. It's the workflow that the Taleworlds Devs use.
    They don't work directly with BRFs. Instead of that, the game accepts an alternative text-based format (same than OBJ or SMD files) that gets automatically converted to a "compiled" Binary file at the launching time.

    Pretty cool (but don't confuse it with compressed content). :smile:

    This last thing isn't widely known. As the BRF format itself was reversed-engineered by a Spanish (Castillian as me, yay!) guy named Lurb. And after various itinerations Thorgrim carried with the editor project. So we never had any official SDK or anything. That Blender plug-in comes with five, maybe six years of delay... *sigh* :smile:

    And that's the history lesson for today.
 
Sorry for the necrobump, but this has been useful to me.  Looking at this and the bare bones module system by Theoris, I've been able to strip down the module system clean without the game crashing or getting stuck.  What I wanted to ask is the only change concerning hardcoded stuff between 1.143 and 1.153 the core resources becoming modifiable and the new directives?  And Swyter, are you going to update this or is that not a priority right now? :cool:
 
I don't want to necro it, but searching for various (newer) RGL logs, I've found few other scripts too:

game_missile_launch
game_missile_dives_into_water
game_get_cheat_mode
game_enable_cheat_mode

All in all, an excellent thread with comprehensive information.

PS. game_missile_launch apparently has two script parameters respectively returning the attacker agent and the weapon the missile is fired from. It also saves the weapon's position into pos0.
 
Dusk Voyager said:
I don't want to necro it, but searching for various (newer) RGL logs, I've found few other scripts and a presentation too:

game_missile_launch
game_missile_dives_into_water
game_get_cheat_mode

prsnt_game_before_quit

All in all, an excellent thread with comprehensive information.

Yeah, this is from 2011 (so WB 1.143 or even earlier). There's a lot of new stuff in there, and core resources are now modular.

Anyone interested can open the latest Warband executable with Notepad++ and take a look to the strings between all the mojibake, you don't need to be a xXxl33t hax0rXx to find out what is hardcoded nowadays.

Also,
Code:
prsnt_game_before_quit
is what the game uses in Demo mode to launch the promo screens, I believe.

Thanks for the contribution, and don't worry about necro'ing.
 
Lionheart2 said:
What about skills?

You can find all the constants and skill slots inside
Code:
header_skills.py
, from the module system.
There are a bunch of unused skills left for modders, they are flagged as disabled and you can rename them as you wish.

To make them do stuff, you have to script everything by yourself. Like manually getting the skill level and conditionally applying buffs or changing troop behaviors, or anything else you might want.


Of course all that is done within
Code:
module_skills.py
, with the scripting for the overall map being done in
Code:
module_triggers.py
or
Code:
module_simple_triggers.py
, and in action mode my using
Code:
module_mission_templates.py
.
 
Swyter said:
Lionheart2 said:
What about skills?

You can find all the constants and skill slots inside
Code:
header_skills.py
, from the module system.
There are a bunch of unused skills left for modders, they are flagged as disabled and you can rename them as you wish.

To make them do stuff, you have to script everything by yourself. Like manually getting the skill level and conditionally applying buffs or changing troop behaviors, or anything else you might want.


Of course all that is done within
Code:
module_skills.py
, with the scripting for the overall map being done in
Code:
module_triggers.py
or
Code:
module_simple_triggers.py
, and in action mode my using
Code:
module_mission_templates.py
.

I meant, well I heard that, some skills like Inventory Management had their effects hardcoded. Do you know which are hardcoded?
 
Lionheart2 said:
I meant, well I heard that, some skills like Inventory Management had their effects hardcoded. Do you know which are hardcoded?

All the default skills have hardcoded effects. They programmed them directly in the source of the engine and cannot be changed directly, or disabled in any way.

If you take a look to their in-game descriptions by hovering over them you can see how they work, what effects they have and, if you want... programmatically counter it or something, with the help of the module system.

It may be a hacky workaround, but is the only sane way of doing something with them.
 
Back
Top Bottom