Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Does anybody know what it is that detaches parties after a 'party_quick_attach_to_current_battle' ?

I followed the code in dialogs, game_menus and scripts I can't find a global or the like that is set to make that operation do so. So I guess the detachment is hardcoded? Or, and that's actually what I hope, did I miss something?

 
Ritter Dummbatz said:
Does anybody know what it is that detaches parties after a 'party_quick_attach_to_current_battle' ?

I followed the code in dialogs, game_menus and scripts I can't find a global or the like that is set to make that operation do so. So I guess the detachment is hardcoded? Or, and that's actually what I hope, did I miss something?
There is an operation to detach a party. It may be towards the end of header_operations.py, separate from the party operations. Just search the module system for its use.
 
Lumos said:
Can anyone tell me how can one get the ids of the first two of the player's companions? I think there must be a simple way, but my mind is absolutely blank... :smile:
I think you need to use the party_get_troop_stack (just guessing) to get the second and third stacks. The first is the player and then whatever follows in the party screen.
 
ithilienranger said:
Lumos said:
Can anyone tell me how can one get the ids of the first two of the player's companions? I think there must be a simple way, but my mind is absolutely blank... :smile:
I think you need to use the party_get_troop_stack (just guessing) to get the second and third stacks. The first is the player and then whatever follows in the party screen.
Thanks, but I deleted my post. It was really a very simple solution - I can't see how I've overlooked it.
 
Ritter Dummbatz said:
Does anybody know what it is that detaches parties after a 'party_quick_attach_to_current_battle' ?

I followed the code in dialogs, game_menus and scripts I can't find a global or the like that is set to make that operation do so. So I guess the detachment is hardcoded? Or, and that's actually what I hope, did I miss something?

party_leave_cur_battle                = 1666  # (party_leave_cur_battle, <party_id>),
 
Alright thanks for your answers. But not really what I meant.
For example if I move to a lord to may be attack him. More nearby lords chose to fight on my or his side in other words they've been quick attached. But I chose to just leave. They all are detached again and everything's like before and so are their positions.
I can't find the code that's responsible for that.



 
Ritter Dummbatz said:
Alright thanks for your answers. But not really what I meant.
For example if I move to a lord to may be attack him. More nearby lords chose to fight on my or his side in other words they've been quick attached. But I chose to just leave. They all are detached again and everything's like before and so are their positions.
I can't find the code that's responsible for that.

Ah, I misunderstood what you meant. I thought you want  some parties leave the ingoing battle.

I think the leave_encounter did that. party_quick_attach_to_current_battle attached the parties to the encountered party, and when leave_encounter operation 's called, it will reset the encountered party and de-attach the additional parties. I'm not sure if the  party_quick_attach_to_current_battle really attach the parties to the encountered party or it only hide them and make a copy of their members into encountered party, but it's seems that the leave_encounter operations is responsible in reversing the process.
 
Yeah, that was my impression as well at the first place but there seems to be more behind that. I use the quick_attach and join with 'my nearby guys' a battle. Afterwards they are still within my party. The detachment is done as soon as I do all kinds of things that have nothing to do with the battle itself, like talking to another lord or peasant i.e. As soon as that dialogue ends the parties are deattached and teleported back to the place where it all began.
I checked everything the globals and the leave_encounter- and the like operations to no avail (so far). So I am currently working on a workaround for that but I would prefer to know the way it should be done.
 
Just a quick question, would " (troop_set_slot, "trp_knight_1_1", slot_lord_reputation_type, lrep_upstanding),  " set the lord to have the upstanding personality? Thanks :smile:
 
Swyter said:
Bayard-X said:
Dear Community,

I wonder about how to edit the food's morale effect. Using the search function, I got a result consisting in a similar question on page 116 of this thread, but no reply.

I really only want to edit  in a defined manner the morale effect of  food. And for the sake of better game feeling, the morale effect of those drinks, too.



It's in
Code:
module_scripts.py
, into a script named
Code:
get_player_party_morale_values
.
I'm talking about the vanilla game, but should be mostly the same for Warband, search for this text:
Code:
    # script_get_player_party_morale_values
    # Output: reg0 = player_party_morale_target
    ("get_player_party_morale_values",
      [

Look for the food modifier part and comment it out... (You know, put # before every line so it's not read by the compiler)
If you're using Notepad++ you can use the Ctrl+Q after selecting the text.

If you want to alter what kind of items gives morale, then look for the constants
Code:
food_begin
and
Code:
food_end
in
Code:
module_constants.py
.

Surely my modding mates can give you more hints about it.


Thank you very much, I'm going to try it out.
 
I have a problem with music... I changed the music in module_music.py, and ingame, i dont hear anything. Format is .ogg (Vorbis), converted with the MediaCoder Audio Software. I added the sounds to. In the menu i sometimes hear the music, but everywhere else not.
 
Patta said:
I have a problem with music... I changed the music in module_music.py, and ingame, i dont hear anything. Format is .ogg (Vorbis), converted with the MediaCoder Audio Software. I added the sounds to. In the menu i sometimes hear the music, but everywhere else not.

I've converted every song and track of SWC to OGG Vorbis, the quality is better, and the files smaller. Have you changed the extension?

If you look at the Native audio files you'll find they have also chosen that format.
Drop a file of these to MediaCoder and check in its properties if they have the same conversion rate, compression algorithm and so.

As last tip, I'd recommend to try to open them with a Media Player so you can see if they're valid files...
 
Status
Not open for further replies.
Back
Top Bottom