Modding Q&A [For Quick Questions and Answers]

Status
Not open for further replies.

Winter

Developer
Best answers
0
Another 'unexplained non-functional thing with no logical reason':

It's currently very unwise to make more mission templates with the "mtf_battle_mode,charge," flag. This flag will make the game include your mission template in the list of templates it uses for the encounter_attack menu, choosing a template at random -- rather than the template it's told to pick -- and using that for the battle you're going into. For example, if you have a charge template that jumps you into Zendar centre, this will pop up at random during normal battles with, for example, a bunch of mountain bandits that you encountered on the far side of the map.

And it's a damned if you do, damned if you don't situation -- because if you don't put the charge flag on your template, it will never be used by the encounter_attack menu, even if you explicitly put it in there.

This is the reason why I won't be using my unlimited-reinforcement system in the next version of Storymod, at least until Armagan fixes this glaring bug.

Sacrificially,
Winter
 

fisheye

Winter said:
if you don't put the charge flag on your template, it will never be used by the encounter_attack menu, even if you explicitly put it in there.
Why would you use encounter_attack instead of just jumping straight to the mission? The only benefit I can think of is the "attack options" screen which shows you the type and number of your troops vs theirs. Admittedly useful, but is there more?
 

Winter

Developer
Best answers
0
fisheye said:
Why would you use encounter_attack instead of just jumping straight to the mission? The only benefit I can think of is the "attack options" screen which shows you the type and number of your troops vs theirs. Admittedly useful, but is there more?
Um, I think you're confused here. The problem is that the game will end up automatically using your charge template half the time, for any fight that uses encounter_attack. That means all party encounters. If you wanted to make a modified, alternate set of charge templates to work alongside the native ones (like I did), that's made impossible by this bug/feature.

Stereotaxically,
Winter
 

fisheye

Winter said:
If you wanted to make a modified, alternate set of charge templates to work alongside the native ones (like I did), that's made impossible by this bug/feature.
It's also made even further impossible by the fact that you cannot change the attack options in the encounter_attack screen. The encounter menus that are in module_game_menus are never called. I think they must be for an old version of M&B.
 

Janus

*spicy* *camper*
Administrator
WBWF&SM&BVC
Best answers
0
Fisheye's OBJ to BRF collision model converter would go well in the first post here as well:
http://forums.taleworlds.com/viewtopic.php?t=7414
 
Best answers
0
Hi, Ive only just downloaded the mod tools and am having fun trying out all the differen't aspects of what you can do. Ive tried to go through many of the great tutorials that people have provided, but I'm having a few problems and I was wondering if someone could either direct me towards the answer or be able to help me out. Specifically what I'm doing is trying to add another room to be accessable in a town. Im making a room in Thir Ive already got the Scn_town_2_room made, And I'm trying to figure out...

A) how to make the menu for Thir add it to the menu, it seems that the code will only let it be added to all the towns. How do I make it say "Go to Room" as one of the options?
B) Once I get that is it only a matter of making a passage corresponding to its number?
 

Janus

*spicy* *camper*
Administrator
WBWF&SM&BVC
Best answers
0
Smaug_the_dragon, did you get that one figured out? Just now noticed this post, can help if it's still needed.

Anyway, a recent question answered by Fujiwara made me think that these need to be added, both pretty much for the official module system:

Q: How can I find out the exact coordinates the player party is at on the world map in-game?
A: With edit mode enabled, simply hit Ctrl+E on the world map in the game to have your coordinates displayed.

Q: How can I make unique faces for NPCs?
A: With edit mode enabled, go to your Character screen and click the Edit Face button. Play around with all the sliders and settings until you've got the face you're after. Now click Ctrl+E, and you'll notice a box/button pop up at the top right with a string of characters in it. Click this and it will copy the face code to the clipboard. In module_troops.py, simply paste in it in as the face code.
 
Best answers
0
Ok, I'm a bit further along in my modding skills now, thanks for the help.

Currently I'm trying to figure out if its possible to have an npc not be in a town if its night and present if its during the day (and vice versa) Is there a way to tell if its night or day, and then tell mabye the entry point to dissapear if its night. I'd also like to be able to do that with doors and such, closing them during the night ect. Is this even possible?
 

sheek

Knight at Arms
WB
Best answers
0
What's the maximum number of parties you can have and is there any way to raise the limit?
 

Winter

Developer
Best answers
0
smaug_the_dragon said:
Ok, I'm a bit further along in my modding skills now, thanks for the help.

Currently I'm trying to figure out if its possible to have an npc not be in a town if its night and present if its during the day (and vice versa) Is there a way to tell if its night or day, and then tell mabye the entry point to dissapear if its night. I'd also like to be able to do that with doors and such, closing them during the night ect. Is this even possible?
Remove the troop's scene assignment. Make a set_visitor operation for this troop in a try_begin in the town menu, underneath the normal set_visitor stuff for the towns. In the try_begin, use (eq,"$current_town","p_your_NPC's_town"). Then store_time_of_day, and use is_between to specify the hours you want the NPC to be present.

Voila, it is done. (For a town that uses the v0.731 mechanism, anyway. For custom menus, it's even easier.)

Ridiculously,
Winter
 
Best answers
0
Thanks for the help winter, Ok so I got it to recognize what time it is (im just putting the operation under where it checks for wheather the scene is nighttime or daytime. and now I got it to recognize what town it is, but i'm sorry im confused about where to go from here, what equation do I use to specify which troop and which entry point?
 
Best answers
0
Never mind I think Ive got it! Wow this is fun, kinda like treasure hunting, it gives you such a thrill when you figure it out!
 
Best answers
0
Ok no I don't. My code seemend fine, but I would get errors, and then when I fixed the errors it froze when entering the town. I think I may have put it into a repeting loop.

I placed this in City center menu right under neath where it said "set_visitor" for 25,26,27 and 28.

I started a new try_begin statment, and said that if it was in town 7

then I stored what kind of troops they were in registers.... (do you mabye need to declare the registers somewhere, or can you just use anynumber you want?)

Then I stored what time of day it was in another register,

Then I set if it was between certin times

Then I set the visitor to the entry point, and the registerd number.

Is there an 'endif'? How does the program know when the 'if' statement is completed? I'm used to visual basic and every 'if' needs a 'endif' statement. But that doesn't seem to happen here
 

Winter

Developer
Best answers
0
smaug_the_dragon said:
Ok no I don't. My code seemend fine, but I would get errors, and then when I fixed the errors it froze when entering the town. I think I may have put it into a repeting loop.
Show us your code, don't just describe it!

In any case, it sounds like you forgot the end_try. I assumed you'd know you had to put that in, 'cause . . . well, otherwise it won't work.

Hope that helps.

Consubstantially,
Winter
 

ironpants

Squire
Best answers
0
Is there a way to make one scene conditionally use two or more entry points?  For example one castle scene that puts you outside / inside the walls depending on attack / defense conditions.
 

fisheye

ironpants said:
Is there a way to make one scene conditionally use two or more entry points?  For example one castle scene that puts you outside / inside the walls depending on attack / defense conditions.
Yes. Use set_visitor, put troop 0 (player) at the appropriate position.
 
Status
Not open for further replies.