Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
UndeadDuke said:
Corbul said:
Ok, so let me see if I understood correctly
No you didn't  :lol: Moreover, it seems like it's your first messing with mission templates and sounds. Well, we've all been on your place once. What you need is:
1) Add custom sound in Sounds folder (it should be in .ogg or .wav format)
2) Open module_sounds.py and add new entry with it
3) Open mission_templates.py and put my code in second bracket of lead_charge mission. It is common field battle so its the most easy to test. If it work, you can later add it to siege and village battle missions.
What are the missions for siege, village battle, bandit ambushes, arena, etc.? Because I started looking and found like three instances of besieging the castle walls, but the ones I found for the arena look different from the lead_charge one, and I'm not sure where to paste the code.
 
A question about troop editing:

I'm using Morgh's to add some troop trees to a mod that doesn't have its module system available publicly.  Is there any way I can set the experience level at which the new troops level up, maybe through the text file?  Or do I just have to use old troops with close enough values as templates?
 
FleshbobSkinpants said:
A question about troop editing:

I'm using Morgh's to add some troop trees to a mod that doesn't have its module system available publicly.  Is there any way I can set the experience level at which the new troops level up, maybe through the text file?  Or do I just have to use old troops with close enough values as templates?

kalarhan said:
Topper said:
As far as I know, it's hard-coded and cannot be changed.

it is defined on module.ini, so it can be changed (XP for player, companions or troops) and the points gained per level.

Code:
    ## LEVELING SYSTEM
    skill_points_per_level              = 2
    attribute_points_per_level          = 0.195
    weapon_points_per_level             = 5
    level_boundary_multiplier           = 2.0
    attribute_required_per_skill_level  = 2

    ## XP FOR TROOPS
    player_xp_multiplier   = 1.0 
    hero_xp_multiplier     = 2.0
    regulars_xp_multiplier = 2.0

you can find more flags on VC module.ini, instead of the Native one.

The rate experience is gained determines the speed of levelling up. You can see the levels here: https://mountandblade.fandom.com/wiki/Experience


https://www.youtube.com/watch?v=a3OlgKUar70
 
Corbul said:
Ruthven said:
change_screen_quit works as a very basic permadeath
Could you please be more specific?
get Lav's modsys, open the header_operations.py and read the description on operations

set your conditions, whatever you want it to be, and when that becomes true your event will detect it and take you to the game main menu (new game, load, credits, ...). That is permadeath ... game over. Remember to save first and set the conditions on a trigger/etc to stop players from using the save file again (altho you cant stop them from using another slot/backup anyway to reload).
 
Corbul said:
What are the missions for siege, village battle, bandit ambushes, arena, etc.?
Open ID_mission_templates.py for easier search, the names in there are pretty self-explanatory.

To experience your headshot sound in basically every battle you should put code in:
village_center
bandits_at_night
back_alley_kill_local_merchant
back_alley_revolt
town_fight
lead_charge
village_attack_bandits
village_raid
arena_melee_fight
arena_challenge_fight
besiege_inner_battle_castle
besiege_inner_battle_town_center
castle_attack_walls_defenders_sally
castle_attack_walls_belfry
castle_attack_walls_ladder
sneak_caught_fight
bandit_lair

These should be enough.
 
bandicam-2019-05-16-12-22-56-017.jpg

Does anyone know what the last numerical value (highlighted) is responsible for? I want to make death animations longer so I can see the entire animation before using warband's awful ragdoll
 
CutContent said:
bandicam-2019-05-16-12-22-56-017.jpg

Does anyone know what the last numerical value (highlighted) is responsible for? I want to make death animations longer so I can see the entire animation before using warband's awful ragdoll
I believe that is the time during the animation that the ragdoll effects will begin. If it's just for testing purposes you could also disable ragdolls in the Options in-game.
 
NPC99 said:
FleshbobSkinpants said:
A question about troop editing:

I'm using Morgh's to add some troop trees to a mod that doesn't have its module system available publicly.  Is there any way I can set the experience level at which the new troops level up, maybe through the text file?  Or do I just have to use old troops with close enough values as templates?


kalarhan said:
Topper said:
As far as I know, it's hard-coded and cannot be changed.

it is defined on module.ini, so it can be changed (XP for player, companions or troops) and the points gained per level.

Code:
    ## LEVELING SYSTEM
    skill_points_per_level              = 2
    attribute_points_per_level          = 0.195
    weapon_points_per_level             = 5
    level_boundary_multiplier           = 2.0
    attribute_required_per_skill_level  = 2

    ## XP FOR TROOPS
    player_xp_multiplier   = 1.0 
    hero_xp_multiplier     = 2.0
    regulars_xp_multiplier = 2.0

you can find more flags on VC module.ini, instead of the Native one.

The rate experience is gained determines the speed of levelling up. You can see the levels here: https://mountandblade.fandom.com/wiki/Experience


https://www.youtube.com/watch?v=a3OlgKUar70

Thanks for the fast reply.  So I control troop leveling with the experience rate and the troop's actual level (?).  And here I thought the troop level only affects auto battles.  Now it seems obvious what it is for lol
 
Ruthven said:
CutContent said:
bandicam-2019-05-16-12-22-56-017.jpg

Does anyone know what the last numerical value (highlighted) is responsible for? I want to make death animations longer so I can see the entire animation before using warband's awful ragdoll
I believe that is the time during the animation that the ragdoll effects will begin. If it's just for testing purposes you could also disable ragdolls in the Options in-game.

yes it is! thanks
 
I'm getting an error for trying to get player facekeys and then setting them on an npc. it says I have an invalid player ID?
Heres the code from module_game_menus, it's the game menu for when you start the game right after creating your characters face.

Code:
      ("town_1",[(eq, "$current_startup_quest_phase", 0),],"map",
       [
         (get_player_agent_no, ":plyr"),	 
		 (str_store_player_face_keys, s0, ":plyr"),
		 (party_add_members, "p_main_party", "trp_daughter", 1),
		 (troop_set_face_keys, "trp_daughter", s0),
		 (change_screen_map),
       ]),
 
CutContent said:
I'm getting an error for trying to get player facekeys and then setting them on an npc. it says I have an invalid player ID?
Heres the code from module_game_menus, it's the game menu for when you start the game right after creating your characters face.

Code:
      ("town_1",[(eq, "$current_startup_quest_phase", 0),],"map",
       [
         (get_player_agent_no, ":plyr"),	 
		 (str_store_player_face_keys, s0, ":plyr"),
		 (party_add_members, "p_main_party", "trp_daughter", 1),
		 (troop_set_face_keys, "trp_daughter", s0),
		 (change_screen_map),
       ]),

read the description of those operations. You are getting the agent_ID and trying to use it as a player_ID (MP thingy). Dont mix SP and MP.

for your character in SP use the operation to get the troop face keys from trp_player
 
kalarhan said:
CutContent said:
I'm getting an error for trying to get player facekeys and then setting them on an npc. it says I have an invalid player ID?
Heres the code from module_game_menus, it's the game menu for when you start the game right after creating your characters face.

Code:
      ("town_1",[(eq, "$current_startup_quest_phase", 0),],"map",
       [
         (get_player_agent_no, ":plyr"),	 
		 (str_store_player_face_keys, s0, ":plyr"),
		 (party_add_members, "p_main_party", "trp_daughter", 1),
		 (troop_set_face_keys, "trp_daughter", s0),
		 (change_screen_map),
       ]),

read the description of those operations. You are getting the agent_ID and trying to use it as a player_ID (MP thingy). Dont mix SP and MP.

for your character in SP use the operation to get the troop face keys from trp_player

it didnt say anything about wether it was mp or sp lol, but thank you!
 
Some players have reported that the following:


Code:
        (party_clear_particle_systems, "p_riverrun_mill"),
        (call_script, "script_change_troop_faction", "trp_knight_sellsword_1", "fac_kingdom_9"),
        (troop_set_slot, "trp_knight_sellsword_1", slot_troop_occupation, slto_kingdom_hero),
	(str_store_troop_name, s1, "trp_knight_sellsword_1"),
	(str_store_faction_name, s2, "fac_kingdom_9"),
        (call_script, "script_create_kingdom_hero_party", "trp_knight_sellsword_1", "trp_kingdom_9_lord"),
	(display_log_message, "@Ser Jaime Lannister has returned to the Westerlands."),
        (troop_set_slot, "trp_knight_sellsword_1", slot_troop_banner_scene_prop, "spr_banner_lords_khergit08"),
        (troop_set_note_available, "trp_knight_sellsword_1",1),
        (troop_set_slot, "trp_knight_sellsword_1", slot_troop_age, 36),
        (troop_set_slot, "trp_knight_sellsword_1", slot_troop_father, "trp_kingdom_9_lord"),
        (add_xp_as_reward,4000),(troop_add_gold, "trp_player", 5000),(call_script, "script_end_quest", "qst_rescue_jaime_6"),(call_script, "script_change_player_relation_with_troop", "trp_kingdom_9_lord", 15),

Will sometimes turn their player into knight_sellsword_1 rather than spawning that specific party. I've been unable to replicate the conditions causing the bug. Any ideas?
 
Modmerger 0.2.5 Help Needed

I've come up against a wall, I'm not very savvy when it comes to modmerger and someone added my mod to modmerger years ago so we could add it to Floris. I just need a very ( I suppose) easy question answered.

If I need to add 'not_in_party" to my module system as required by this modmerger code
Code:
pos = codeblock.FindLineMatching( (assign, "$talk_context", tc_ally_thanks) )
codeblock.InsertBefore(pos, not_in_party ) #prevents player in party from being thanked by allies

The where in the following code would I add it?

Code:
(assign, "$talk_context", tc_ally_thanks),
          (call_script, "script_setup_troop_meeting", ":ally_leader", ":ally_leader_dna"),
        (else_try),

Would this require a comma before or after the not_in_party ?

I've basically been giving up on finishing my next release because I havnt been able to get it running correctly ...  :oops:
If there's some kind of documentation for modmerger let me know , I've read the old forum posts tho.. I'm a slack ass, I code in GML these days.

Cheers for any replies in advance :mrgreen:
 
Cozur said:
Some players have reported that the following:


Code:
        (party_clear_particle_systems, "p_riverrun_mill"),
        (call_script, "script_change_troop_faction", "trp_knight_sellsword_1", "fac_kingdom_9"),
        (troop_set_slot, "trp_knight_sellsword_1", slot_troop_occupation, slto_kingdom_hero),
	(str_store_troop_name, s1, "trp_knight_sellsword_1"),
	(str_store_faction_name, s2, "fac_kingdom_9"),
        (call_script, "script_create_kingdom_hero_party", "trp_knight_sellsword_1", "trp_kingdom_9_lord"),
	(display_log_message, "@Ser Jaime Lannister has returned to the Westerlands."),
        (troop_set_slot, "trp_knight_sellsword_1", slot_troop_banner_scene_prop, "spr_banner_lords_khergit08"),
        (troop_set_note_available, "trp_knight_sellsword_1",1),
        (troop_set_slot, "trp_knight_sellsword_1", slot_troop_age, 36),
        (troop_set_slot, "trp_knight_sellsword_1", slot_troop_father, "trp_kingdom_9_lord"),
        (add_xp_as_reward,4000),(troop_add_gold, "trp_player", 5000),(call_script, "script_end_quest", "qst_rescue_jaime_6"),(call_script, "script_change_player_relation_with_troop", "trp_kingdom_9_lord", 15),

Will sometimes turn their player into knight_sellsword_1 rather than spawning that specific party. I've been unable to replicate the conditions causing the bug. Any ideas?

Most likely it has to do with the creation of the party 'create_kingdom_hero_party', I see that as a second argument you pass the ID-troop, when it should be the ID-party... Maybe I'm wrong, just check that...

@Taragoth
It's hard to guess if you don't show the code from the list ' not_in_party'...
 
Status
Not open for further replies.
Back
Top Bottom