Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Alexandru_cel_Mare said:
I have moded intensely the module_troops.py, and for reasons i do not know, it no longer makes differences between heroes and normal troops. So, whenever i enter in game to test the mod (not in edit mod, but in normal mode!), when i press the Characthers button, all the units and NPC`s from the game are there, even factional troops. How should i correct this  ?
"x_begin, x_end" constants related to troops don't work properly if they aren't placed in an orderly way, classifying them wrong. Put the odd troops (for example, a companion among Swadian troops) where they fit in.
 
I have a problem.

Two villages refuse to join fac_kingdom_3 despite that I gave them to fac_kingdom_3 with the "give_center_to_faction" script in module scripts, and in module_parties

They keep joining different factions, despite them being closer to castles from fac_kingdom_3 than any other ones!  :mad:

Anyone know a failsafe method? 
 
It doesn't matter how closer they are to castles from one faction - the script loops through all castles in order, and then loops through every village unless it's already bound. So if those two villagers are closer to another castle, then regardless of how close it is to another castle later in the range, it will be bound to the castle earlier in the range. So you should arbitrarily bind a village to a castle beforehand.
Code:
(call_script, "script_give_center_to_faction_aux", "p_village_x", "fac_kingdom_3"),
(party_set_slot, "p_village_x", slot_village_bound_center", "p_castle_y"),
...
	  # fill_village_bound_centers
    #pass 1: Give one village to each castle
 
Another question (sorry, Lumos, I haven't used it for a long time and can't really answer that - but probably not without some script work):

In Multiplayer; I'm trying to get two objects to move, using the belfry movement scripts. I have successfully managed to get one of the objects to move just like it should. It uses the siege tower entry points 110-119 for plotting a path.

The problem is that I cannot finish the path of the second object, because I can't spawn Entry Points with a value greater than of 0-127! When I try to modify the entry point number to anything above 127, it reverts back to it's old value at once. If all numbers are already taken it just spawns one with a value of 0. I need the last two points, or else the object just keeps going whatever it's last direction was. :???:

This is strange since a comment on the "multiplayer_server_check_belfry_movement" -script at the top of module_mission_templates clearly states:
Code:
#belfry entry points are 110..119 and 120..129 and 130..139

Is there any way to increase the number of allowed Entry Points? Or is there another way to circumvent this (like decreasing the amount of points for an objects path)?


EDIT: I got the second object to move from entry point 127 to it's proper end position. So all is well for now :wink:
 
Alright. I'm driving myself nuts....I must be missing something obvious. So obvious that after reading over the tutorials, searching and reading a number of threads, I still don't know what I'm doing wrong.

I want to use a custom mesh in a presentation during battles.
1) I create an image using the GIMP--it includes an alpha channel transparency (which I have gleaned isn't a problem)--and used the DDS plug in to export it as a DXT5 dds file, without mipmaps.
2) I place it in my mod's texture folder and make sure the .ini includes scan_module_textures = 1
3) I create a new line in module_meshes
4) I reference that line in my presentation code in module_presentations

The game loads correctly and runs fine until I try to call the presentation. Then it exits to desktop with an RGL error: get_object failed for texture: my_mesh

What painfully obvious step have I missed?
 
Does anybody know how to fix nonanimated LODS?
16sccz.jpg
 
Caba`drin said:
Alright. I'm driving myself nuts....I must be missing something obvious. So obvious that after reading over the tutorials, searching and reading a number of threads, I still don't know what I'm doing wrong.

I want to use a custom mesh in a presentation during battles.
1) I create an image using the GIMP--it includes an alpha channel transparency (which I have gleaned isn't a problem)--and used the DDS plug in to export it as a DXT5 dds file, without mipmaps.
2) I place it in my mod's texture folder and make sure the .ini includes scan_module_textures = 1
3) I create a new line in module_meshes
4) I reference that line in my presentation code in module_presentations

The game loads correctly and runs fine until I try to call the presentation. Then it exits to desktop with an RGL error: get_object failed for texture: my_mesh

What painfully obvious step have I missed?
wow :shock: Caba with troubles is something i thougth i was never going to see heheeh

I tried to make some similar and i remember to had the same problem. I dont know wat i did to solve it, but try to import that texture to one off the brfs in resource folder and see what happens (and make sure that she is gonna to be read before the brf with the mesh in the module ini.
Hope it helps.
 
Caba`drin said:
The game loads correctly and runs fine until I try to call the presentation. Then it exits to desktop with an RGL error: get_object failed for texture: my_mesh

What painfully obvious step have I missed?
You need to duplicate another material (and its various flags) and then create (or again, copy) an actual planar mesh - just having the texture isn't enough for the game to register it properly unless you're simply replacing an older mesh with the same name. AFAIK, the game can only reference meshes (and materials for tableau_materials), but not textures directly.

KingLuke said:
Does anybody know how to fix nonanimated LODS?
LODs still need to be rigged - try copying the original mesh, and then right clicking on the lod meshes and select paste rigging in OpenBRF.
 
Fafhrd said:
wow :shock: Caba with troubles is something i thougth i was never going to see heheeh
Heh. 1) Peruse back a few pages...I've asked my fair share of (foolish) questions in this thread. 2) There's a reason I've stuck to coding and not texture-y/model-y things... <this board needs a shifty-eyes smiley>

Somebody said:
You need to duplicate another material (and its various flags) and then create (or again, copy) an actual planar mesh - just having the texture isn't enough for the game to register it properly unless you're simply replacing an older mesh with the same name. AFAIK, the game can only reference meshes (and materials for tableau_materials), but not textures directly.

Hrm. Okay. So, I've downloaded OpenBRF and started trying things...I'll preface this response with another report of failed tutorial and thread diving. All I've seen are things telling me to create a .dds (done) and use OpenBRF without instruction as to how (I'm trying) or how to create a very nice texture (irrelevant for what I'm trying to do).

Regardless, I made a copy of one of the big mesh BRFs that have all of the buttons (core_ui_meshes). I deleted all of them save for one of the longer buttons, which I renamed for my purposes. I then imported a new material with texture and tried to ensure the "flags" number were the same on the material and mesh. My texture shows up with the correct alpha and everything in OpenBRF, so I save this as a new .BRF file--one file including the mesh, material, and texture. I put it in Mod\Resources, add the module.ini line.

Now, no further crashes...but when I try to create an overlay from the mesh, nothing shows up.
A flag problem? Everything can't be in the same .BRF?
 
Caba`drin said:
... <this board needs a shifty-eyes smiley>

Totally agreed

Caba`drin said:
Hrm. Okay. So, I've downloaded OpenBRF and started trying things...I'll preface this response with another report of failed tutorial and thread diving. All I've seen are things telling me to create a .dds (done) and use OpenBRF without instruction as to how (I'm trying) or how to create a very nice texture (irrelevant for what I'm trying to do).

Regardless, I made a copy of one of the big mesh BRFs that have all of the buttons (core_ui_meshes). I deleted all of them save for one of the longer buttons, which I renamed for my purposes. I then imported a new material with texture and tried to ensure the "flags" number were the same on the material and mesh. My texture shows up with the correct alpha and everything in OpenBRF, so I save this as a new .BRF file--one file including the mesh, material, and texture. I put it in Mod\Resources, add the module.ini line.

Now, no further crashes...but when I try to create an overlay from the mesh, nothing shows up.
A flag problem? Everything can't be in the same .BRF?

i believe you are having a problem of Rendering order.
Take a look at that core_ui_meshes materials for the medium_button mesh. You will see that are several materials who look the same above and below the ui_new material...just the Rend. Ord and flags change.
Test different rendering orders for your material. Hope it helps
 
Quick question; is there a way to check which scene you're currently on in multiplayer-specifically for use in mission template triggers? I've looked over header-operations 3-4 times looking for something to no avail, so it might be a variable or a slot. Either way, any help would be greatly appreciated...and you might get a map named after you or something.  :mrgreen:
 
MadocComadrin said:
Quick question; is there a way to check which scene you're currently on in multiplayer-specifically for use in mission template triggers?
Use store_current_scene.

Caba`drin said:
Now, no further crashes...but when I try to create an overlay from the mesh, nothing shows up.
A flag problem? Everything can't be in the same .BRF?
Have you set the mesh size properly? In most cases, the mesh scale will be 1,1,1; however when you create an overlay, the size might either be too small or the mesh might not be centered properly - off the screen in most cases.
 
Somebody said:
Caba`drin said:
Now, no further crashes...but when I try to create an overlay from the mesh, nothing shows up.
A flag problem? Everything can't be in the same .BRF?
Have you set the mesh size properly? In most cases, the mesh scale will be 1,1,1; however when you create an overlay, the size might either be too small or the mesh might not be centered properly - off the screen in most cases.

This is the single most frustrating thing I have attempted to do since beginning to trying to mod Warband. I've no bloody clue what I am doing. That said, I don't believe it is a problem with the code I'm using in the module system...once there, I can resize/monkey with positioning to my heart's content. I'm fairly certain it's a problem with whatever the heck I'm supposed to be doing with openBRF.

I just noticed that I can see the .dds texture I created on the material and texture tab, but when I go to the mesh tab, it just shows up white. I'm guessing that is a problem. However, I don't see any feature by which I can remap where the mesh is trying to apply the texture...

[me=Caba`drin]is hapless *[/me]
 
If you just wanted one planar mesh using the whole texture, try using Import->New Menu Background - the flags and shaders are probably usable in presentations, but the dimensions might be off. Otherwise, remap the texture onto the mesh using Wings or something.
 
Somebody said:
If you just wanted one planar mesh using the whole texture, try using Import->New Menu Background - the flags and shaders are probably usable in presentations, but the dimensions might be off. Otherwise, remap the texture onto the mesh using Wings or something.

Oh do I feel sheepish. New Menu Background and all was well.
(I thought creating a full UVMap for a simple plane would be a bit excessive, so thanks for point this out.)
Many thanks for your patience and continued responses, one and all. I will endeavor to end my noob-esque question hounding here.
 
Status
Not open for further replies.
Back
Top Bottom