Modding Q&A [For Quick Questions and Answers]

正在查看此主题的用户

状态
不接受进一步回复。
In openbrf, rightclick 1korpys_a.1 and compute lods, open brf stoppng running error, I tryed another model compute lods, there is no error, just 1korpys_a.1 model give error, anyone have idea?
EgbY2D.png

edit:I realized, if selected SpecMap openbrf stopping runnig.How can I remove SpecMap ?
 
Put a none in the Specular box in the material tab. When you will make lods, put it back in. If is still gives an error, try changing the shader temporarily along with just disabling specular map.  :smile:
 
Also I'm pretty sure you shouldn't be generating .LOD for scene props, at least none of the Native assets including siege towers have them. Just make sure the collision mesh is simplified.
 
Jackson... 说:
That doesn't really apply to art or this particular case.

of course it does, as LOD is about performance, same as optimization of code.

oh and don't forget: coding is a mix of science and art  :mrgreen:
 
Jackson... 说:
LOD's are an afterthought, so dangers of premature optimisation don't come into it. They also can't harm the main work like optimising code can.

I don't think you understand the spirit of the quote. It is OK, you could do some research on the topic (after all, it is a long discussion that started decades ago and still open today) if you want to. As now this is going in a circle of off-topic discussion, we can move on back to quick questions, quick answers  :mrgreen:
 
Jackson... 说:
Just because the native game is badly optimised doesn't mean mods should be.

Scene props (and other static preshaded objects) aren't a big deal and the engine can render millions of vertices without a performance hit. What's more LOD4 isn't really that far away in scene prop terms, so unless you have a really simple shape (or use masked textures to suggest fences, etc.) the LOD model won't be much cheaper than the LOD0.
Basically unless you've modelled a 100,000 vert monster and want it to be all over a 10x10km scene, it's better not to make LODs in order to keep memory use down. A far more effective way (I've found) to make scene props and meshes in general cheaper is to create texture maps for each building to reduce the number of draw calls.
 
Most mods I play wind up having scenes that run terribly because of excessive geometry. LOD's are one of albeit many things that could help with that. I don't think memory really comes into it since you could free up the same amount of memory by removing one or two textures.

They're usually not needed, but I don't see any reason to say you shouldn't make them.

jacobhinds 说:
A far more effective way (I've found) to make scene props and meshes in general cheaper is to create texture maps for each building to reduce the number of draw calls.

Assuming you mean what I think you mean, that will indeed reduce the number of draw calls, but it will also dramatically increase the number of setpass calls, which are far more expensive.
 
What I mean is creating a texture with some of the seamless architecture textures like plank and stucco_* on it and merging the relevant submeshes on each building. I did this with a few things simply because I was tired of editing meshes split into 20 parts using OpenBRF.
 
I've added in a new playable race, and I'm trying to implement a separate dialogue tree for the opening merchant. The dialogue string ran a little long for one chat box, so I added in a second. However, now about a third of the time after the first two dialogues trigger it will then trigger the mercenary dialogue ("Anything else, {sir/madam}?") before continuing with the standard intro.

  #Quest 0 - Alley talk
  [anyone|auto_proceed, "start",
  [
    (is_between, "$g_talk_troop", "trp_swadian_merchant", "trp_startup_merchants_end"),
    (eq, "$talk_context", tc_back_alley),
    (eq, "$talked_with_merchant", 0),   
  ], 

  "{!}.", "start_up_quest_1_next",
 
  []],

  [anyone, "start_up_quest_1_next",
  [
  (try_begin),
    (eq,"$character_gender",2), #UNDEAD QUEST LINE
(str_store_string, s11, "str_undead_first_chat_with_starting_merchant"),
  (else_try), #STANDARD QUEST LINE
(str_store_string, s11, "str_first_chat_with_starting_merchant"),
  (try_end),
  ],
  "{s11}", "start_up_quest_1_next_next",
  [
   
  ]],
 
  [anyone, "start_up_quest_1_next_next",
  [
  (try_begin),
    (eq,"$character_gender",2), #UNDEAD QUEST LINE
(str_store_string, s11, "str_undead_first_chat_with_starting_merchant_2"),
  (else_try), #STANDARD QUEST LINE
(str_store_string, s11, "str_first_chat_with_starting_merchant_2"),
  (try_end),
  ],
 
  "{s11}", "close_window",
 
  [   
    (assign, "$talked_with_merchant", 1),
    (mission_disable_talk),
  ]],

Mercenary text for reference:

  [anyone, "start", [
  #(is_between,"$g_talk_troop",town_specialists_begin,town_specialists_end),
  ],
  "Anything else, {sir/madam}?", "economy_after_recruited", []],

  [anyone|plyr, "economy_after_recruited", [],
  "Make your preparations. We'll be moving at dawn.", "economy_after_recruited_2", []],
  [anyone|plyr, "economy_after_recruited", [],
  "Take your time. We'll be staying in this town for a while.", "economy_after_recruited_2", []],

Etc...

And the original code for the merchant dialogue:

  #Quest 0 - Alley talk
  [anyone|auto_proceed, "start",
  [
    (is_between, "$g_talk_troop", "trp_swadian_merchant", "trp_startup_merchants_end"),
    (eq, "$talk_context", tc_back_alley),
    (eq, "$talked_with_merchant", 0),   
  ], 
  "{!}.", "start_up_quest_1_next",
  []],

  [anyone, "start_up_quest_1_next",
  [], 
  "Are you all right? Well.... I guess you're alive, at any rate. I'm not sure that we can say the same for the other fellow. That's one less thief to trouble our streets at night, although Heaven knows he won't be the last.... Anyway, maybe you can help me with something. Let's talk more inside. Out here, we don't know who's listening", "close_window",
  [   
    (assign, "$talked_with_merchant", 1),
    (mission_disable_talk),
  ]],

Any ideas on what I'm doing wrong, or how to stop this from happening? Thanks!
 
I'm sorry to keep posting, but I'm new to M&B modding (though not programming in general) and keep running into a bunch of strange issues that I can't make sense of.

I tried to work around my earlier issue of the merchant pulling additional dialogue by adding:

(neq|is_between, "$g_talk_troop", "trp_swadian_merchant", "trp_startup_merchants_end"),

to the chat sequence that's interrupting in at the end of the opening scene where you first meet the merchant (before returning with him to his quarters). However, that just results in having a different dialogue getting appended to mine ("Surrender or die" is next up). Adding the same bit of code to that just pushes the interrupting dialogue to something else and so on. All this clears up as soon as I drop it back down to just one dialogue in the initial meeting. I reckon I'll just have to surrender my dreams of having two initial chat boxes... Ah well.

On to my latest issue: I created a new NPC to give a quest in Reyvadin:

  ["ancient_smith","Ildus Hamixsmit","Ildus Hamixsmit",tf_hero, scn_town_8_tavern|entry(1),reserved, fac_commoners,[itm_ar_pla_mer_leatherapron,itm_bo_vae_t3_leather,itm_we_vae_blunt_hammerempirewar],def_attrib|level(5),wp(20),knows_common,0x0000000fd510358f385281c55b8e44eb00000000001d9b220000000000000000],

I edited the scene to add his entry point, and he shows up correctly. However, he spawns in the tavern as a member of the player's party (name is colored green). If you have a bodyguard NPC companion with you, it will trigger the follow code and he'll run from his spot to chase you around the tavern. He isn't in the player's actual party on the map. Any idea on what's causing this? I'm running my mod based off the Floris Expanded mod, if that matters. Thanks!
 
Syke 说:
I'm sorry to keep posting, but I'm new to M&B modding (though not programming in general) and keep running into a bunch of strange issues that I can't make sense of.

Did you read the basic tutorial on dialogs? https://forums.taleworlds.com/index.php/topic,12733.0.html

As you are not "new in general", I will assume you know what a BRE (Business Rules Engine, like Drools) is. Dialogs work under those.

Read from up to bottom. Entire file. For player dialog it will check all of them and display all that are true (conditional block). For NPC it will display the first that is true (again, conditional block).

First few dialogs are used to setup flags/variables used by the rest. They are fake entries, just for setup.

Remember you can add logging to your code (that includes dialogs). Enable EDIT MODE on game launcher and it will print to rgl_log.txt. You can then use any tools/techniques you are familiar with to parser your logs (from a simple Notepad++ check to integrated tool).
 
Hi all,

1) How can I spawn the player and his/her troops separately? I usually use the below:

插入代码块:
(set_jump_mission, "mt_amath_dollen_attack"),
				(eq, "$g_encountered_party", "p_raft"),
				(assign, ":lp_scene", "scn_black_shield_fortress"),
				(modify_visitors_at_site,":lp_scene"),
		               (reset_visitors),
		               (set_visitor, 0, "trp_player"),

Then use the below MT:

插入代码块:
(
    "amath_dollen_attack",mtf_battle_mode|mtf_synch_inventory,charge,
    "You lead your men to battle.",
    [
      # Player
      (0,mtef_team_0|mtef_use_exact_number,af_override_horse,aif_start_alarmed,16,[]),

2) After learning how to do #1, how can I separate types of troops to spawn at  different entry points?

For example, Entry 0 = Player,  Entry 1 = Archers, Entry 3 = Cavalry.

Thanks in advance.
 
Khamukkamu 说:
1) How can I spawn the player and his/her troops separately?
2) how can I separate types of troops to spawn at  different entry points?

1) Use different EPs. You can even move/teleport agents from inside the mission (for example, using a after_spawn trigger)
1.1) remember to consider what happens with reinforcements waves

2) You have operations that check the class/division of a troop or agent (xxxx_get_class, xxxx_get_division)
 
I would very much like to know how to stop enemies from running away on the world map. kalarhan said I can change the AI behavior. Anyone know how I would go about doing that?
 
dudetheman 说:
how to stop enemies from running away on the world map. Anyone know how I would go about doing that?

1) Which mod are you working on? Native, Floris, VC, etc
2) Do you have the mod source (modsys)? Version? And what version for Warband (1.171?)
3) Did you study the basic tutorial on modding? https://forums.taleworlds.com/index.php/topic,240255.0.html
4) How do you want to go about doing this? Stop every single enemy from running from you? Only some? And so on.

There are tweaks that can be done without the source (with the .txt files), but usually we discuss modding here (coding, etc) instead. So your answers above will help understand your issue and what you can/can't do.
 
1) It would be Native.
2) No. I'm using the Steam version 1.170.
3) Not yet. But, I will if necessary.
4) Ideally I would like enemies to not run away from the player at all. Except maybe deserters after battles.

If it can be done by just modifying a text file that would be super.
 
状态
不接受进一步回复。
后退
顶部 底部