Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
NPC99 said:
maater66241 said:
Hello, while I was adding items into my mod, I came across 2 issues.
1. In OpenBrf, it shows this
isR7Y.png
However, in game, it shows this
uFS8Q.jpg
I checked the textures folder, and the required textures were there. I'm not sure of what I did wrong.

2. In OpenBrf, it shows this
i-xcd.png
But in game, it shows this
asCWM.jpg
1DLe4.jpg
I'm not entirely sure what happened here...

Any help on these issues would be great. Thanks in advance!

1. Check the textures tab of your BRF file to ensure you imported all of the textures required by your materials. Even if a texture is in the modules texture folder and it is displayed in OpenBRF, it will not be loaded in game unless it has been imported into a BRF file. Where textures are being shared by more than one BRF file (not the case where everything is in one BRF file), module.ini load order must be textures, materials and then meshes.

2. Your pistol mesh is incorrectly scaled for Warband. Move it into the same BRF file as Warband’s native flintlock pistol - scale it down and position it to match.

Thanks for helping me. For #2, apparently, I had 2 files named the same thing which caused both pistols to appear at the battlefield - one extremely large one (the one I still haven't resized yet) and the resized one (didn't show in image I sent because of the angle I was taking my screenshot). For #1, I couldn't really seem to figure out the problem. I checked the texture tab and inputted the missing textures that the "material" (the material using that texture was in another brf file) needed. But even after going ingame, the texture still wouldn't appear. I just decided to copy the brfs/models and placed it (and renamed it) into the file that had its textures and material. It finally worked. Now that I think about it, I think the reason why the texture didn't show is because its material was in a different file...
 
Your texture didn't show up probably because your load order in module.ini is wrong, it must look like this
load_mod_resource = my_textures
load_mod_resource = my_materials
load_mod_resource = my_meshes
 
Does anyone have any experience with crashes that don't leave anything in the log? My rgl is clear of errors but i crash every time i try to visit the streets of a town from a certain culture. At first i thought it was related to the clothing that the walkers were wearing. But it was not the case. I can enter castles and villages and no issues. And towns from other cultures. OpenBRF also doesn't return anything.
 
KratosMKII said:
Does anyone have any experience with crashes that don't leave anything in the log? My rgl is clear of errors but i crash every time i try to visit the streets of a town from a certain culture.

enable edit mode and add logging messages to your code. A simple text like "this worked 1" and "this worked 2" will help identify the issue (if it is a code issue).
 
party_add_xp_to_stack
party_upgrade_with_xp
party_add_xp
add_xp_to_troop
add_xp_as_reward
Is there any other operations than the above that add xp to a troop/player? My character is leveling to lv22-23 at the game start but i wasn't able to find the cause.


kalarhan said:
KratosMKII said:
Does anyone have any experience with crashes that don't leave anything in the log? My rgl is clear of errors but i crash every time i try to visit the streets of a town from a certain culture.

enable edit mode and add logging messages to your code. A simple text like "this worked 1" and "this worked 2" will help identify the issue (if it is a code issue).
It was not a coding issue. I managed to fix it by replacing some of the .brfs with vanilla 1257 ones. Must be some LODs created using OpenBRF. Now everything works.
 
KratosMKII said:
Is there any other operations than the above that add xp to a troop/player? My character is leveling to lv22-23 at the game start but i wasn't able to find the cause.

this is a common bug. Troop and party ID=0 just so happen to be the player.

so any code that requires a party or troop ID and is buggy... like getting a value from a slot... or a bad condition... can default to 0 (zero). That means the effect applies to the player instead.

another common bug related to this is player clones in a scene. The bug causes the agents to be spawned using the troop id = 0 (player).

so when you see a bug like that... track down your changes, etc, until you find it.  If you search this thread you will find many references to these cases. A beginner mistake like messing with the character creation menus  and causing the player to level to ~20-30 shows up every 6 months or so.



add test messages to print your variables like troop_id, title_index, etc, so you can see it being executed. Should make any mistake easier to spot.
 
kalarhan said:
KratosMKII said:
Is there any other operations than the above that add xp to a troop/player? My character is leveling to lv22-23 at the game start but i wasn't able to find the cause.

this is a common bug. Troop and party ID=0 just so happen to be the player.

so any code that requires a party or troop ID and is buggy... like getting a value from a slot... or a bad condition... can default to 0 (zero). That means the effect applies to the player instead.

another common bug related to this is player clones in a scene. The bug causes the agents to be spawned using the troop id = 0 (player).

so when you see a bug like that... track down your changes, etc, until you find it.  If you search this thread you will find many references to these cases. A beginner mistake like messing with the character creation menus  and causing the player to level to ~20-30 shows up every 6 months or so.



add test messages to print your variables like troop_id, title_index, etc, so you can see it being executed. Should make any mistake easier to spot.
Thank you. Another question: do you know if "script_game_start" executes first in a new game before the "mnu_start_game_0" is displayed? I hear the level up sound before the menu pops up.
 
KratosMKII said:
if "script_game_start" executes first in a new game before the "mnu_start_game_0" is displayed? I hear the level up sound before the menu pops up.

its the same case. When in doubt, add logging messages to your scripts, triggers, menus, etc, and it will create a nice sequence on your logger

...
run menu 1
run menu 2
run script 1
run menu 3
end script 1
run trigger 57
...
 
hello , i maybe cause a collapse at some modder , sorry for that ^^' but i must know something :
can you think is possible to split the body mesh and equip case  in 2 part = head torso legs foot ? and right hand left hand ?
 
Equipment slots are hardcoded (you can't add a leg slot). Boots and gloves come in pairs (you can modify the mesh to not be symmetrical though). You would need to make variations of the torso armor with different legs.
 
Somebody said:
Equipment slots are hardcoded (you can't add a leg slot). Boots and gloves come in pairs (you can modify the mesh to not be symmetrical though). You would need to make variations of the torso armor with different legs.

ho okay, this my 2 option if my first idea not possible ^^ , thank you for reply me :smile:
 
Hey guys.
Does anybody have any idea as to how one would go about changing the division names in a specific mission template (i.e. changing the little message that pops up when you press "1" from "Infantry, hear me" to "x, hear me")?
Thanks
 
Guitarma said:
about changing the division names in a specific mission template (i.e. changing the little message that pops up when you press "1" from "Infantry, hear me" to "x, hear me")?

languages folder of your mod, ui.csv file
 
Guitarma said:
I don't seem to have a ui.csv file in my languages folder. I also don't have an English language folder. Is it somewhere else?

Native uses the folder on "game folder/languages/[your language here]/"

other modules are "game folder/modules/[your mod name here]/languages/[your language here]/"
 
I cannot find the cause of the xp bug. Now i'm also getting random 3-4 digit xp every hour or so in the map.
Code:
add_xp_to_troop
add_xp_as_reward
add_gold_as_xp
party_add_xp
party_add_xp_to_stack
party_upgrade_with_xp
What operation other than above can give xp to the player?


(0,0, ti_on_switch_to_map, [],
  [
  (troop_set_slot, "trp_globals_troop", slot_adv_transfer_mode, 0),
  ]
),
Why do i get a "TypeError: not all arguments converted during string formatting" with this?
 
KratosMKII said:
What operation other than above can give xp to the player?

use logging to test the use of those operations to find out your bug, in case you cant by just reading the code. Do a simple test like:

for "script_XPTO", get player level, print message "START Script XPTO, player level = {reg1}", print after the operation/script call the message "END Script XPTO, player level = {reg1}"

that way you will quickly see which trigger/script/etc increased the level, right?

log:
START Script XPTO, player level = 10
....
END Script XPTO, player level = 33


TLDR: use a simple code snippet to print runtime information to test your code
 
 
Status
Not open for further replies.
Back
Top Bottom