Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
does anyone know how to edit zendar? because normally it would be easy, I would just substitute in another scene, however there are no passages to the merchant and tavern it seems to be built in, so I dont know which passages are needed.
 
Thorgrim, I think this thread about texturing items should be added to Q&A thread, and Janus agrees (in fact, he suggested it)

http://forums.taleworlds.com/index.php/topic,9290.0.html

EDIT. Oh, I just realised that the post above is about it as well.
 
Could someone elaborate over what changes need to be made to the conversation.txt in the module file? Earlier, i read something about editing the dialogue.txt in the module file but there is none. So what extra lines should i add to the conversation.txt (example) to make my hero/party recruitable? examples? :grin: thanks.
 
Added links to these tutorials by Yoshiboy:
Extension Tutorial - Unwrapping in Wings 3d
Extension Tutorial - Making Scenes and Scene props (using wings3d)

Remember, if you have something to add, post a reply to this thread.
 
Common error: Assert:

Expression: rgl_between(skill_level,0,(skills[skill_no].max.level+1))

You'd think this occurs when you have troops with skills higher than their allowable attributes? E.g. Int 4, Trade 10?

NO!

This assert is checked when the game reads your skills. It verifies that the number read was not more than 10. It doesn't give a damn what your dependent attribute is (Int, Str, Dex, Cha).

Why would this happens when you have well-behaved troops with skills <= 10?

Typically, it means you're either reading a skill from a nonexistent troop or reading a nonexistent skill, or both.

Go back to your store_skill_level etc check. Make sure your arguments are right.

I had this code:

Code:
    (try_for_range,reg(12),"trp_marnid","trp_ymira"),
      (store_skill_level, reg(13),reg(3),skl_trade),
      (val_max, reg(14),reg(13)),
    (end_try,0),

Which raised the assert every time. If you look closely, you'll see the arguments to store_skill_level are wrong. It should be      (store_skill_level, reg(13),skl_trade,reg(3)).

Happy debugging!
 
store_free_inventory_capacity

Works fine for main player, but when applied to a troop:

As of v0.751, the above command returns how many free slots the troop has in its main inventory + after its equipment has been equipped (so PLUS space of whatever it's wearing right now). Bizarre but true.

This means it could return as much as 9 (?) for a troop with a full inventory, if the troop is wearing 9 items of gear.

To really ensure that the troop has space, check that the returned value is 10 or more.
 
Question: How do you change the troops recruitable in a town? I have an inkling that it's __mercs, but I don't know.
 
It's in the main triggers, along with shop inventory refreshing... without looking into the file again, I couldn't say exactly where though.
 
The initial number and type of mercs are in the _mercs parties in module_parties. Reinforcements for these parties are set in module_triggers, under the tag "refresh tavernkeepers".

Informatively,
Winter
 
I've got a question about writing triggers.

Is there a way to have an OR statement of sorts in the conditions block such that if (X is true or Y is true) then continue on to consequences block? I am trying to consolidate some of my triggers that are doing virtually the same thing but with different variables for different factions.

Thanks in advance
Ahadhran
 
Ahadhran said:
I've got a question about writing triggers.

Is there a way to have an OR statement of sorts in the conditions block such that if (X is true or Y is true) then continue on to consequences block? I am trying to consolidate some of my triggers that are doing virtually the same thing but with different variables for different factions.

Thanks in advance
Ahadhran
Funny you should ask that, Winter just gave an elegant solution I was unaware of earlier in another thread:

http://forums.taleworlds.com/index.php/topic,10843.msg210561.html#msg210561

To quote a bit:
I've done it many times, just string a whole bunch of "this_or_next|" prefixes together.
 
Janus said:
Funny you should ask that, Winter just gave an elegant solution I was unaware of earlier in another thread:

http://forums.taleworlds.com/index.php/topic,10843.msg210561.html#msg210561

Damn,  I can't imagine how you guys manage to mod without knowing about stuff like this. I've been relying on this_or_next since Storymod 0.5 . . . I'll try and document header_operations soon so we can shed some light on all these operations.

I've been working on the actual module system as welll -- the header_operations in the next version of the module system should be a lot more enlightening than its predecessors, with usage examples (in proper syntax) of every operation. And Armagan is now letting me fix all the spelling and grammar errors in Native, so things are getting a lot more organised across the board.

Militantly,
Winter
 
wow that is really great. I have been doing things in the most clumsey and convoluted way imaginable :smile: But no longer!

heh anyway could you give an example of how the "this_or_next" looks in a piece of code? I'm sure I could figure it out with trial and error (plus a little logic) but I prefer the painless method.

Thanks again
Ahadhran

Note: with the new found knowledge from the stuff Winter has been posting I will be able make Darkmod a good bit more interesting. I have already figured out how to make assasins that no longer run away from you and have a party to match yours :twisted:!
 
Ahadhran said:
heh anyway could you give an example of how the "this_or_next" looks in a piece of code? I'm sure I could figure it out with trial and error (plus a little logic) but I prefer the painless method.

Thanks again
Ahadhran

Well, here's a dialogue line from the keep garrison system in Storymod. This line will appear in the dialogue menu if the player has either trp_pikeman or trp_halberdier in his party:

  [trp_guard_captain|plyr,"captain_garrison_44", [[this_or_next|main_party_has_troop,"trp_pikeman"],[main_party_has_troop,"trp_halberdier"]], "One of the infantry types.", "captain_garrison_451",[]],

Hope that sufficiently explains it!

Unctuously,
Winter
 
ahh that makes sense. Is there a way to use it for more than two options? so can you do:

[(this_or_next|eq,"$variable_one",1),(eq,"$variable_two",1),(eq,"$variable_three,1)]

and so on and so forth, or does it only recognize the first two conditions.

I promise this is my last question regarding this :grin:
 
Ahadhran said:
ahh that makes sense. Is there a way to use it for more than two options? so can you do:

[(this_or_next|eq,"$variable_one",1),(eq,"$variable_two",1),(eq,"$variable_three,1)]

and so on and so forth, or does it only recognize the first two conditions.

I promise this is my last question regarding this :grin:

[(this_or_next|eq,"$variable_one",1),(this_or_next|eq,"$variable_two",1),(eq,"$variable_three,1)]

Any number of conditions can be used, you just have to leave the last one without a prefix.

Prognostically,
Winter
 
Status
Not open for further replies.
Back
Top Bottom