Modding Q&A [For Quick Questions and Answers]

正在查看此主题的用户

状态
不接受进一步回复。
Antonis 说:
So, both sounds are played, for each item. Not a problem and only a minor inconvenience, but still, any thoughts?

did you force the priority of your new sound ? Operation accepts sf_ flags, or you can set them on module_sounds.py.
 
I'm writing this here because I already did it on modding Discord like two times yet nobody had any idea on how to fix this or just didn't see it.

The beards in my mod are not blending up with faces. Here's how it looks like in the game:
sv-rx.jpg

There's also another problem but concerning female hair. Some kingdom ladies appear with no hair at all despite them being coded correctly in module_skins and showing up in character creation screen. The face codes look fine in files aswell, however they magically got changed later by the game engine so some ladies go bald. There are 28 female hair meshes total and most of them are showing up. I also have enabled accesories for females if that changes anything. Is there any poly limit for hair per skin/hair meshes limit in module_skins or anything like that?
 
TheCaitularity 说:
Now I'm trying to figure out how to make it work for non-hero parties, and I can't see what I need to make different. I'm sure it has something to do with that try_for_range, but I've got nothing beyond that.
Can anybody point me in the right direction?
Yes, you guessed right, your try_for_range loop is going for troops, not parties. For non-hero ones to use it, it would be better to replace it with try_for_parties. Like this:
插入代码块:
  (0, [
	(try_for_parties, ":party"),
		(party_is_active, ":party"),
                (party_get_slot, ":type", ":party", slot_party_type),
                (neq, ":type", spt_castle),
                (neq, ":type", spt_village),
                (neq, ":type", spt_town),
                (neq, ":type", spt_bandit_lair),
#		(party_get_current_terrain, ":terrain", ":party"),
		(try_begin),
			(call_script, "script_cf_is_party_on_water", ":party"),
			(party_set_icon, ":party", "icon_ship"),
		(else_try),
			(party_get_icon, ":icon", ":party"),
			(eq, ":icon", "icon_ship"),
			(party_set_icon, ":party", "icon_flagbearer_a"),
		(try_end),
	(try_end),
  ]),
I'm not sure this will do the job, but it is worth trying nevertheless.
 
I've got this, and it works!

插入代码块:
#Cait - non-lord parties turn into boats on rivers [cait_sailing] [04/06/19]
  (0, [
	(try_for_parties, ":party"),
		(party_is_active, ":party"),
            (party_get_template_id, ":type", ":party", slot_party_type),
            (neq, ":type", spt_castle),
            (neq, ":type", spt_village),
            (neq, ":type", spt_town),
            (neq, ":type", spt_bandit_lair),
		(neq, ":party", -1),
		(try_begin),
			(call_script, "script_cf_is_party_on_water", ":party"),
			(party_set_icon, ":party", "icon_ship"),
		(else_try),
			(eq, ":type", spt_cattle_herd),
			(party_get_icon, ":icon", ":party"),
			(eq, ":icon", "icon_ship"),
			(party_set_icon, ":party", "icon_cattle"),
		(else_try),
			(eq, ":type", "pt_looters"),
			(party_get_icon, ":icon", ":party"),
			(eq, ":icon", "icon_ship"),
			(party_set_icon, ":party", "icon_axeman"),
		(else_try),
			(eq, ":type", pt_manhunters),
			(party_get_icon, ":icon", ":party"),
			(eq, ":icon", "icon_ship"),
			(party_set_icon, ":party", "icon_gray_knight"),
		(else_try),
			(eq, ":type", pt_village_farmers),
			(party_get_icon, ":icon", ":party"),
			(eq, ":icon", "icon_ship"),
			(party_set_icon, ":party", "icon_peasant"),
		(else_try),
			(eq, ":type", pt_kingdom_caravan_party),
			(party_get_icon, ":icon", ":party"),
			(eq, ":icon", "icon_ship"),
			(party_set_icon, ":party", "icon_mule"),
		(else_try),
			(eq, ":type", pt_sea_raiders),
			(party_get_icon, ":icon", ":party"),
			(eq, ":icon", "icon_ship"),
			(party_set_icon, ":party", "icon_axeman"),
		(try_end),
	(try_end),
  ]),

It's kind of inelegant, since it has to do a check for every conceivable party template going over water, BUT IT WORKS! Thanks, UndeadDuke ^-^
 
Hello guys,

I am trying to give an alternative mode to a one-handed pickaxe. I would like the player to be able to press X in order to switch damage from pierce to blunt. I've managed to do that so far but I would like the weapon to visually rotate in the hand of the player when he switches damage types.

I have tried rotating the mesh by 180° in the openbrf but it still shows the same way for both melee modes. Any idea how I can fix this? Any help would be greatly appreciated :smile:

8Juvk2.jpg

插入代码块:
 ["15_czekan_a","Pickaxe", [("15_czekan_a",0)], itp_type_one_handed_wpn|itp_unbalanced|itp_merchandise|itp_primary|itp_secondary|itp_next_item_as_melee, itc_scimitar|itcf_carry_sword_left_hip, 
210 , weight(1.2)|difficulty(0)|spd_rtng(94) | weapon_length(84)|swing_damage(30 , pierce) | thrust_damage(16 ,  blunt),imodbits_sword_high ],
 ["15_czekan_a_alt","Pickaxe", [("15_czekan_a_alt",0)], itp_type_one_handed_wpn|itp_unbalanced|itp_merchandise|itp_primary|itp_secondary, itc_scimitar|itcf_carry_sword_left_hip, 
210 , weight(1.2)|difficulty(0)|spd_rtng(94) | weapon_length(84)|swing_damage(27 , blunt) | thrust_damage(16 ,  blunt),imodbits_sword_high ],

Thanks for your time.
 
Roudrac 说:
Hello guys,

I am trying to give an alternative mode to a one-handed pickaxe. I would like the player to be able to press X in order to switch damage from pierce to blunt. I've managed to do that so far but I would like the weapon to visually rotate in the hand of the player when he switches damage types.

I have tried rotating the mesh by 180° in the openbrf but it still shows the same way for both melee modes. Any idea how I can fix this? Any help would be greatly appreciated :smile:

8Juvk2.jpg

插入代码块:
 ["15_czekan_a","Pickaxe", [("15_czekan_a",0)], itp_type_one_handed_wpn|itp_unbalanced|itp_merchandise|itp_primary|itp_secondary|itp_next_item_as_melee, itc_scimitar|itcf_carry_sword_left_hip, 
210 , weight(1.2)|difficulty(0)|spd_rtng(94) | weapon_length(84)|swing_damage(30 , pierce) | thrust_damage(16 ,  blunt),imodbits_sword_high ],
 ["15_czekan_a_alt","Pickaxe", [("15_czekan_a_alt",0)], itp_type_one_handed_wpn|itp_unbalanced|itp_merchandise|itp_primary|itp_secondary, itc_scimitar|itcf_carry_sword_left_hip, 
210 , weight(1.2)|difficulty(0)|spd_rtng(94) | weapon_length(84)|swing_damage(27 , blunt) | thrust_damage(16 ,  blunt),imodbits_sword_high ],

Thanks for your time.

It's not so simple but luckily there's an OSP that handles it [OSP][WB] Alternate Weapon Modes
 
Hello everyone,

I am not sure if this type of question belongs here but I wanted to
ask where I could ask people who might be interested to work on
a mod with me.

I know that asking something like this may not sound very professional
but I have never done something like this so I was not sure where and
how to ask.

Sorry again if this is totally wrong here.

 
Blubby 说:
I am not sure if this type of question belongs here but I wanted to
ask where I could ask people who might be interested to work on
a mod with me.

the usual path is:
1) post on the guild https://forums.taleworlds.com/index.php/board,9.0.html. Create a thread to show off your mod (ideas, features, work already done, etc). Look some other threads for templates
2) describe what you want to do, what you can do, what you have done already, what you may need help with, etc, etc. Screenshots and videos help.
3) show the list of OSP stuff you will be using and why. There are plenty of stuff to use available from code to assets, which will reduce the ammount of work you need to do yourself. But you need to look for it, filter it out, and see which ones are useful for your case.

if you can show good progress and a cool idea your chances of attracting people are higher. But it is just a chance, best to not expect help at all for some time/ever.

if you havent done anything yet, etc, that is usually a big no for most people to consider joining in.

-> this thread is a good place to ask for specific things. A problem you have. Not about the entire mod. Little things.
 
kalarhan 说:
Blubby 说:
I am not sure if this type of question belongs here but I wanted to
ask where I could ask people who might be interested to work on
a mod with me.

the usual path is:
1) post on the guild https://forums.taleworlds.com/index.php/board,9.0.html. Create a thread to show off your mod (ideas, features, work already done, etc). Look some other threads for templates
2) describe what you want to do, what you can do, what you have done already, what you may need help with, etc, etc. Screenshots and videos help.
3) show the list of OSP stuff you will be using and why. There are plenty of stuff to use available from code to assets, which will reduce the ammount of work you need to do yourself. But you need to look for it, filter it out, and see which ones are useful for your case.

if you can show good progress and a cool idea your chances of attracting people are higher. But it is just a chance, best to not expect help at all for some time/ever.

if you havent done anything yet, etc, that is usually a big no for most people to consider joining in.

-> this thread is a good place to ask for specific things. A problem you have. Not about the entire mod. Little things.

Thank you for the reply. Your information was very helpful.
I already did look at some other threads on guild and got
a fairly decent idea of how things should be now.

In regards to the OSP stuff how exactly does giving credit
work? Would I be able to simply use the stuff such as items,world maps,
scripts etc. and provide the name of the creator, or would I first have to
ask them for permission ?
 
Blubby 说:
In regards to the OSP stuff how exactly does giving credit
work? Would I be able to simply use the stuff such as items,world maps,
scripts etc. and provide the name of the creator, or would I first have to
ask them for permission ?
You don't need to ask them anymore, only mention them in your credits^^
 
@[Bcw]Btm_Earendil
That is a relief, I do not even know if most of the people are still active to ask for permission.

@kalarhan
Thank you for the links. I will keep those guidelines in mind.
Also the OSP/LSP Modifications List is very useful.

Thanks for the replies.
 
插入代码块:
party_get_template_id                 = 1609  # (party_get_template_id, <destination>, <party_id>),
                                              # Retrieves what party template was used to create the party (if any). Commonly used to identify encountered party type.
You'll have to restructure the code a bit. Ups... I dropped this here... :mrgreen:
插入代码块:
	#Updating 'lord party' icon in every frame
	(0,
		[
			(try_for_parties, ":party_id"),
				(party_slot_eq, ":party_id", slot_party_type, spt_kingdom_hero_party),

				(party_is_active, ":party_id"),
				(gt, ":party_id", 0),

				(party_get_current_terrain, ":terrain_type", ":party_id"),
				(party_get_icon, ":icon", ":party_id"),
				(try_begin),
					(this_or_next|eq, ":terrain_type", rt_water),
					(eq, ":terrain_type", rt_river),

					(assign, ":icon", "icon_ship"),
				(else_try),
					(assign, ":icon", "icon_gray_knight"), #assign default icon
				(try_end),

				#set icon
				(party_set_icon, ":party_id", ":icon"),
			(try_end),
		]
	),
 
Hi all its me yet again
I have tried to put in an invasion party to my mod but failed so going for the easier option I have looked through the forum for a simple alternative and came across these two through they both do not do exactly what I want as I have 10 lord parties which I want to spawn after so many days in game but they only spawn once and when they are defeated that's it.

  (try_begin),
  (store_current_hours, ":cur_hours"),
      (try_begin),
    (100 * 24,ti_once,[],[
    (set_spawn_radius, 4),
    (try_for_range, ":i", 0, 1),
          (spawn_around_party, "p_town_1", "pt_chieftain samio"),
          (val_add, ":i", 1),
    (try_end),
This code is close to what I want but I do not want them to just attack nords.

  (try_begin),
  (store_current_hours, ":cur_hours"),
      (try_begin),
      (gt,":cur_hours",2400,ti_once),# i have changed this so i hope it will spawn after 100 days and only once
      (try_begin),
      (store_num_parties_of_template, ":num_parties", "pt_chieftain samio_party"),
      (lt,":num_parties",1),
      (store_random,":spawn_point",num_chieftain samio_spawn),
      (val_add,":spawn_point","p_chieftain samio_spawn"),
      (spawn_around_party,":spawn_point","pt_chieftain samio_party"),
  (assign,"$chieftain samio_party",reg(0)),
  (party_set_banner_icon, "$chieftain samio_party", "icon_map_flag_kingdom_f"),  
  (party_set_ai_behavior, "$chieftain samio_party", ai_bhvr_patrol_location),
  (party_set_ai_patrol_radius,"$chieftain samio_party",1000),
    (try_end),
This one i think will do what i wont it to do but any tips or corrections would be great
Many thanks for your help.
 
Trying to implement Motomataru formations, but having troubles getting the orders to show / work when starting a battle (the F4 menu for instance). Is there anyone here who can point me in the right direction? (File or script, presentation, etc)
It's with the ranks, wedge and shield wall formations.

I added all the scripts, mission templates, constant en presentation codes and don't have any errors while running the compiler.
Also added + formations_triggers, at the end of the mission template it should be used in. (Battles)

A big thanks in advance for anyone who can help me out with this!
 
markfamily 说:
      (gt,":cur_hours",2400,ti_once),# i have changed this so i hope it will spawn after 100 days and only once

插入代码块:
gt                         = 32      # (gt, <value1>, <value2>),
                                     # Checks that value1 > value2

that is the operation. Two parameters. Comparing one to the other. Why are you passing 3 parameters to it? It wont work.

ti_once is used on the trigger time itself as a very high number that should never be reached, that is all.

插入代码块:
# TRIGGER REPEAT FREQUENCY CONSTANTS

ti_once        = 100000000.0
for campaign trigger that means hours, so over 10,000 (ten thousands) years. As a normal campaign doesnt go over 3-6 years... you can see what the trick is doing.



gokiller 说:
Trying to implement Motomataru formations,
post the link to this OSP, as there are multiple versions, including one (IIRC) after VC release with new operations on it.

you can start by checking what happens with the F4 key on your mission triggers. Something like this (from VC)
插入代码块:
  # Trigger file: extended_battle_menu_F4
  (0, 0, 0, [
      (game_key_clicked, gk_order_4),

you can also study VC code itself. It is not ready for copy+paste, but it is the best/newest version you will likely find.
 
状态
不接受进一步回复。
后退
顶部 底部