Modding Q&A [For Quick Questions and Answers]

正在查看此主题的用户

状态
不接受进一步回复。
Hey everybody!

I've been looking into overhand spear attack animations, and came across this by xenoargh: https://forums.taleworlds.com/index.php/topic,115814.msg2795705.html

He mentions that while it's impossible to simply 'make new animations' because of the hardcoded nature of the engine, you could replace an 'animation slot' such as the throwing stone one with the overhand spear thrust animations and it would work fine.

That's never explained or explored in the post. I was wondering how you'd go about doing that, or if there were any guides to changing animations completely.
 
TheCaitularity 说:
Hey everybody!

I've been looking into overhand spear attack animations, and came across this by xenoargh: https://forums.taleworlds.com/index.php/topic,115814.msg2795705.html

He mentions that while it's impossible to simply 'make new animations' because of the hardcoded nature of the engine, you could replace an 'animation slot' such as the throwing stone one with the overhand spear thrust animations and it would work fine.

That's never explained or explored in the post. I was wondering how you'd go about doing that, or if there were any guides to changing animations completely.

Maybe this one will help https://forums.taleworlds.com/index.php/topic,233889.0.html
 
Slavos 说:
TheCaitularity 说:
Hey everybody!

I've been looking into overhand spear attack animations, and came across this by xenoargh: https://forums.taleworlds.com/index.php/topic,115814.msg2795705.html

He mentions that while it's impossible to simply 'make new animations' because of the hardcoded nature of the engine, you could replace an 'animation slot' such as the throwing stone one with the overhand spear thrust animations and it would work fine.

That's never explained or explored in the post. I was wondering how you'd go about doing that, or if there were any guides to changing animations completely.

Maybe this one will help https://forums.taleworlds.com/index.php/topic,233889.0.html

Unfortunately not - that was the first thing I tried, and I couldn't get it to work properly. Didn't help that it asked me to replace "ready_overswing_musket", which doesn't exist in my module_animations.

I'm also not sure if you CAN replace the throwing stone animations with an overhand attack animation, since I'm only seeing two entries for throwing stones ("ready_stone" and "release_stone"), whereas the onehanded overswing entries have three ("ready_overswing_onehanded", "release_overswing_onehanded", and "release_overswing_onehanded_continue").
 
TheCaitularity 说:
asked me to replace "ready_overswing_musket", which doesn't exist in my module_animations.

well then you know what your first step is: update your module system, as you are using a old one.

Many animations are hardcoded inside the engine, so the position (if its #1, #100, etc) matters. Its a mix. Engine expects animation #30 to do something when a particular action is used (like a block), but you can use module_animations.py to define the visual animation and special flags.

The unused animations are free and can be used for stuff like a special animation for sitting, for a npc working on a field, etc. Stuff you will define by hand. Also keep in mind there are animation for humans and animations for horses, dont mix them.

download module system for 1.166/1.668 and check which ones you are missing from Native.
 
Argh! I'm going to have to start again!? I was using Diplomacy 4.2 as a base. Damnit!

I guess this is what I'm after? https://forums.taleworlds.com/index.php/topic,324014.0.html

Hopefully, the OSP code I used should be easy enough to splice back into the new source. At least I found out now. To install the Diplomacy source, I can just set it up to build directly on top of Native, right? I did manage to get the most recent Diplomacy module from the Steam Workshop, presumably the module system source from the Diplomacy for 1.168 link I mentioned is the same one used here.

Edit: Weird that I've used build_module.bat with the source I have on the Diplomacy module, and I get a bunch of errors. Not sure why.
Using the lav variation of the .bat produces slightly different errors. Note: this is NOT the test version, although the errors for that one are similar.

插入代码块:
Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 72, in <module>
    write_items(variables,variable_uses,tag_uses,quick_strings)
  File "process_items.py", line 31, in write_items
    get_weight(item[6]),
  File "E:\SteamLibrary\SteamApps\common\MountBlade Warband\Modules\diplomacy_1666_src\header_items.py", line 188, in get_weight
    a = (y >> ibf_weight_bits) & ibf_armor_mask
TypeError: unsupported operand type(s) for >>: 'AGGREGATE' and 'int'
Exporting scene data...
Exporting troops data
Traceback (most recent call last):
  File "process_troops.py", line 111, in <module>
    save_troops()
  File "process_troops.py", line 49, in save_troops
    strength = (attrib & 0xff)
TypeError: unsupported operand type(s) for &: 'AGGREGATE' and 'int'
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
WARNING: Variable name used for both local and global contexts:pool_troop
WARNING: Variable name used for both local and global contexts:pool_troop
WARNING: Variable name used for both local and global contexts:pool_troop
WARNING: Variable name used for both local and global contexts:pool_troop
WARNING: Variable name used for both local and global contexts:pool_troop
WARNING: store_script_param_2 is used more than once:dplmc_auto_loot_all
WARNING: Local variable never used: center_no, at: calculate_improvement_limit
Exporting mission_template data...
WARNING: Local variable never used: player_agent, at: 0
Exporting game menus data...
exporting simple triggers...
WARNING: Usage of unassigned global variable: $g_last_rest_center:total_cost
WARNING: Usage of unassigned global variable: $background_answer
WARNING: Usage of unassigned global variable: $background_answer
WARNING: Usage of unassigned global variable: $background_answer
exporting triggers...
exporting dialogs...
ERROR: Output token not found: lord_lend_ransom_accept
ERROR: Output token not found: lord_lend_ransom_reject
ERROR: Output token not found: master_craftsman_disguise_asked
WARNING: Usage of unassigned global variable: $g_emissarry_selected
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
WARNING: Variable name used for both local and global contexts:qst_deliver_wine_debt
Checking global variable usages...
WARNING: Global variable never used: g_player_team
WARNING: Global variable never used: $g_last_rest_center:total_cost
WARNING: Global variable never used: $background_answer
WARNING: Global variable never used: $background_answer
WARNING: Global variable never used: $background_answer
WARNING: Global variable never used: $g_emissarry_selected
Imported 28 global variables for saved-game compatability that are not used.
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .

插入代码块:
*** Warband Refined & Enhanced Compiler Kit (W.R.E.C.K.) version 1.0.0 ***
Please report errors, problems and suggestions at http://lav.lomskih.net/wreck/

Loading module... DONE.
Loading plugins... DONE.
Checking module syntax... DONE.
Allocating identifiers... DONE.
Compiling module... DONE.
Exporting module... DONE.

COMPILATION SUCCESSFUL.

The following warnings were generated during compilation:
  duplicate entity found: itm.tutorial_sword
  duplicate entity found: itm.tutorial_axe
  duplicate entity found: itm.tutorial_spear
  duplicate entity found: itm.tutorial_club
  duplicate entity found: itm.tutorial_battle_axe
  duplicate entity found: itm.tutorial_arrows
  duplicate entity found: itm.tutorial_bolts
  duplicate entity found: itm.tutorial_short_bow
  duplicate entity found: itm.tutorial_crossbow
  duplicate entity found: itm.tutorial_throwing_daggers
  duplicate entity found: itm.tutorial_saddle_horse
  duplicate entity found: itm.tutorial_shield
  duplicate entity found: itm.tutorial_staff_no_attack
  duplicate entity found: itm.tutorial_staff
  duplicate entity found: s.comment_you_were_defeated_allied_unfriendly
  duplicate entity found: s.comment_you_were_defeated_allied
  duplicate entity found: s.score
  duplicate entity found: s.routed
  duplicate entity found: s.wife
  duplicate entity found: s.husband
  duplicate entity found: s.father
  duplicate entity found: s.mother
  duplicate entity found: s.daughter
  duplicate entity found: s.son
  duplicate entity found: s.sister
  duplicate entity found: s.brother
  duplicate entity found: s.s15
  duplicate entity found: s.he
  duplicate entity found: s.she
  duplicate entity found: s.s12
  duplicate entity found: s._family_
  duplicate entity found: s.whereabouts_unknown
  duplicate entity found: s.betrothed

The following notifications were generated during compilation:
  local l.player_agent declared but never used in mt.village_raid(#11).ti_on_agent_killed_or_wounded.body
  local l.unused declared but never used in script.game_get_troop_wage
  local l.unused declared but never used in script.debug_variables
  local l.unused_2 declared but never used in script.debug_variables
  local l.unused declared but never used in script.party_inflict_attrition
  local l.center_no declared but never used in script.calculate_improvement_limit

Script processing has ended as of 16:55:50.97
Press any key to continue . . .
 
TheCaitularity 说:
Argh! I'm going to have to start again!? I was using Diplomacy 4.2 as a base. Damnit!

No, you do not need to start over again.

Engine get updates from time to time. You are using a old version that is based on a even older version of Native. So new resources available by the engine are simple not on your source code.

Its like having a old map on your GPS. You can't find a address/roads built in a town the last 20 years, even tho they are in front of you. Your GPS does not know about them. You (the engine) does.

header_XXXX.py files should be updated. In special header_operations.py

module_animations.py, as mentioned, only the animations (hardcoded) you need to replace. KEEP the position (ID number) or it won't work.
 
Well, I figure I may as well start again, since the latest version of Diplomacy has a bunch of features that I'm going to want. As I said, I haven't put too much OSP stuff in my current build, so it's not that big a deal. My frustration of having to start again mostly stems from borked or redone maps and doing something stupid without being able to roll back. Simple, early days kinda stuff.

Still a bit worried about those errors, though.
 
Hi all! I'm trying to come up with a system for exchanging prestigious gifts with lords. Ever so often a friendly lord may give you a valuable item, and if you don't give that lord a gift in turn within x days you suffer a relationship hit. You can also give items for a small relationship bonus.

To qualify for a relationship bonus or to maintain good relations, a gift must have a minimum value of 1,000 denars. Ideally you should be giving items with good modifiers like tempered weapons, spirited horses, etc. The script for lords giving you stuff is already set to do the same.

So question is, does get_item_value capture the denar value of a specific item, and will it factor in value adjustments for item modifiers? And how do I get that specific value if the item has a modifier?

Thanks!
 
dariel 说:
So question is, does get_item_value capture the denar value of a specific item, and will it factor in value adjustments for item modifiers?

Hey @dariel.

1) Download Lav's module system and check this header_XXX.py files for a better documentation. His header_operations.py in special is much more organized than Native.

You will see then that the operations are suppose to work with the base price (the one listed on module_items.py)

2) If you are interested on buying/selling price factors you have scripts for that. They take into account rarity in a town and your skills (trade, charisma) and relation with a center.

3) How to apply modifier:
3.1) Check your /data/item_modifier.txt file. This is the one that counts for the engine. Its where you can change the effect of a modifier (price/cost)
3.2) You can then create a script using those values. VC source has a example: "script_get_item_modifier_effects"

4) Instead of asking if a operation does X or Y its much faster to just test it yourself. Read this quick guide for how to use logging with your rgl_log.txt
https://forums.taleworlds.com/index.php/topic,347990.msg8335287.html#msg8335287
 
Using the warband engine how difficult would it be to code a dialogue option that transfers control over a faction from the player to a NPC. I am basically talking about an option to abdicate your throne where the NPC becomes the new king but you retain all your current lands as his vassal.
 
Hi.
How can I make loading bars?(example; in persistent world mod, buying/selling bar.) And how can I mod it's texture? I think maybe I can find it with openbrf, or find it's dds texture. But I don't think I can succeed modding bar texture.

The last word:
Sorry for my bad English :sad: I'm making sentences like this first time.
 
Kortlcha 说:
How can I make loading bars?

check for examples of
插入代码块:
create_progress_overlay                           =  915  # (create_progress_overlay, <destination>, <min_value>, <max_value>),
                                                          # Creates progress bar overlay, with positions of the bar varying between min and max values. Current value of the progress bar can be changed with (overlay_set_val). Returns bar's overlay_id.

you can replace the base texture, but it will affect any progress bar you have. You may also build one manually using meshes, that way you have more control.



PPQ_Purple 说:
Using the warband engine how difficult would it be to code a dialogue option that transfers control over a faction from the player to a NPC. I am basically talking about an option to abdicate your throne where the NPC becomes the new king but you retain all your current lands as his vassal.

Quite easy. Check the script thar deactivates the player faction and dialogs that call for it. And the ones related to making a oath to a king.

Some mods (not sure if native does) have the option to, as a king, swear a oath to another king, which means he will annex you. It is pretty much what you are asking here, in case you want to search for the feature.
 
So I have recently imported some helmets from TLD to perisno, And they are orc helmets, and I expected this issue but not the difficulty of fixing it, when the helmet is worn by a human (I want the orc helmets to fit to a human head) There is a slight offset, due to the orc skeleton and human skeleton difference, and note that it is not a SIZE difference, it is more so the helmet is too foward, how do I fix this?

Im pretty sure I might need to import the helmets into blender and do some stuff, but I dont know how to accurately get the helmet to fit first try, you know? (E.G. Moving the helmet back, then going in game to find it offset again) ALSO, I'd like to add in, how do I get the specific helmet from the BRF into blender, because in the file that it is taking them from (My_Meshes.BRF) there are multiple meshes, is there a way to split them???

Thanks in advance!

cyzv0j
 
If you search around I remember this question being answered before. It might be as simple as using roto-translate-rescale in OpenBRF.
 
Hey guys, I'm tryna change the troop tree for the mod A Clash of Kings and I needed some info.

In the mod, top tier infantry levels straight up into cavalry, how would I go about changing it so that you can upgrade infantry to cavalry at an earlier tier rather than from top tier infantry?

Would I need to delete the existing cavalry troops and put them back in or could I change their upgrade paths to an earlier tier?

Thanks.
 
How feasible would it be to code in a testudo formation? So giving an order for your men to form a square (or squares) while blocking in a certain direction and advancing.
 
Shouldn't be impossible, I think, but doing it perfectly probably is impossible. Force the bots to be close to each other, hold their shields in front of them, and move somewhere. It's been done before, sort of at least, so you should take a look at existing formations kits to see how they've done that sort of thing.
The problem might be the bit with the shields on top. You could feasibly add an animation for that and force all agents not in the front row to use it, but it might look really artificial and robotic. Even if regular movement looks okay, with a simple animation that forces a dude to put his shield at a 90-degree angle above him, climbing a hill will look abysmal, with shields clipping in rows everywhere, and I don't think there's a way to hack your way around it.
Furthermore, it's unlikely the engine will think the shields-above-head agents are actually blocking, and I have absolutely no idea whether or not the shield will do anything (block projectiles properly) if it's forced in a bizarre position through an animation.
However, I feel like the agents shouldn't have too hard a time moving forwards in this formation, once everything said above's been done, but it's hard to tell for certain. After all, I don't think we've seen a testudo done in this engine before (have we?).

In short, it's unlikely to be very easy to do, but it might just work, and it'll look bloody impressive if it does.
 
Lumos 说:
Shouldn't be impossible, I think, but doing it perfectly probably is impossible. Force the bots to be close to each other, hold their shields in front of them, and move somewhere. It's been done before, sort of at least, so you should take a look at existing formations kits to see how they've done that sort of thing.
The problem might be the bit with the shields on top. You could feasibly add an animation for that and force all agents not in the front row to use it, but it might look really artificial and robotic. Even if regular movement looks okay, with a simple animation that forces a dude to put his shield at a 90-degree angle above him, climbing a hill will look abysmal, with shields clipping in rows everywhere, and I don't think there's a way to hack your way around it.
Furthermore, it's unlikely the engine will think the shields-above-head agents are actually blocking, and I have absolutely no idea whether or not the shield will do anything (block projectiles properly) if it's forced in a bizarre position through an animation.
However, I feel like the agents shouldn't have too hard a time moving forwards in this formation, once everything said above's been done, but it's hard to tell for certain. After all, I don't think we've seen a testudo done in this engine before (have we?).

In short, it's unlikely to be very easy to do, but it might just work, and it'll look bloody impressive if it does.

Thanks for the detailed answer. What about something like a saxon shield wall? A row of people in VERY tight formation.
 
AelleCyning 说:
What about something like a saxon shield wall? A row of people in VERY tight formation.

check VC source for the latest formation code (same author from the old OSP kit), and modify it to fit your style (within engine limits)



Sultan_24 说:
Hey guys, I'm tryna change the troop tree for the mod A Clash of Kings and I needed some info.

You can change upgrade path (troop tree), it is a quite simple setting:

troop A -> troop B
troop B -> troop C (normal) or troop D (alternative)

You don't have the modsys for ACOK, so you will need to check the tools like Barracks and Morghs and see what you can do with them. Or learn how to manually edit the .txt files

-> note that doesn't take into consideration many side effects. Things like upgrade costs, wages, templates for reinforcements of lords, and internal custom code (for ACOK) that is not using the basic Native system. It may generate very weird results, including complete breaking your game balance. You have being warned  :mrgreen:
 
状态
不接受进一步回复。
后退
顶部 底部