• Please note that we've updated the Mount & Blade II: Bannerlord save file system which requires you to take certain steps in order for your save files to be compatible with e1.7.1 and any later updates. You can find the instructions here.

Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.

Ramaraunt

So, I'm wondering about mission timers. I'm trying to make some sort of timer, that uses your shield skill to determine if it has been long enough since your last shield bash that you can shield bash again. I noticed there are only 3 mission timers. Are these used by other things? Will this cause issues? Is there a better way to do this?
 
If you're worried about the timers being used elsewhere, make your own timers using a per-second trigger and a value which increases every time the trigger fires, or simply by making the animation long enough that shield bash spam is unproductive.
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Ramaraunt said:
Are these used by other things? Will this cause issues? Is there a better way to do this?

1) Each trigger is a unique thingy. It has its own clock/timer, conditions, etc. They don't affect each other directly (unless you use globals/registers, or your trigger is so CPU heavy (laggy) that stops the game from running the others  :mrgreen:

2) A full trigger (not a simple trigger) has all you want.
https://forums.taleworlds.com/index.php/topic,14272.0.html

See section 8.3 of the tutorial



kraggrim said:
So the talk in the Bannerlord thread got me thinking, would it be possible to assign the "show banners over friendly troops" option to a keyboard shortcut you could press while actually playing?

Well if all you want is to turn it ON/OFF like we can do on Options ... then you need a new operation, as (IIRC) we don't have one for that. So you will need to ask the TW devs for it

If you want a hack... no idea, never tried, but you could try messing the the presentation/meshes operations
 

Ramaraunt

I managed to make a timer, that is related to your shield bash skill. So higher skill, lower wait times between bashing. Now I just have to implement this for NPCs, and I can move onto other things :grin:.

Oh, and the NPCs in my mod kick randomly now. Thanks to OSPs.
 

emir512

Recruit
Please someone see the following steps and tell if I'm wrong somewhere.

After setting up python, downloaded modsys 1143 modmerger framework, freelancer 1.51 modmerger source.

1. In module_info.py,  selected correct path. Then, test compiled, succeeded.

2. Copied modmerger files into moule system folder.

3. Installed modmerger using installer.py, then in MM options file, changed the written version 1127 to 1143,  added "freelancer", ( by taking cursor at end of "mymod1" and pressing enter thus writing it on the next line).

4. Test compilation, succeeded this time too.

5. Copied freelancer_*.py files to module system folder.

6. Test compilation and Oh My God, a ton of errors.

Did I get wrong somewhere or freelancer files need to be modified? Please answer if you have experience with modmerger framework. Thanks in advance.
 

Ramaraunt

I'm wondering how physics props work. I want to make a head prop that spawns after you get decapitated. Just paste the code, thanks!

Also how do you make an invisible helmet?
 

Ramaraunt

emir512 said:
Please someone see the following steps and tell if I'm wrong somewhere.

After setting up python, downloaded modsys 1143 modmerger framework, freelancer 1.51 modmerger source.

1. In module_info.py,  selected correct path. Then, test compiled, succeeded.

2. Copied modmerger files into moule system folder.

3. Installed modmerger using installer.py, then in MM options file, changed the written version 1127 to 1143,  added "freelancer", ( by taking cursor at end of "mymod1" and pressing enter thus writing it on the next line).

4. Test compilation, succeeded this time too.

5. Copied freelancer_*.py files to module system folder.

6. Test compilation and Oh My God, a ton of errors.

Did I get wrong somewhere or freelancer files need to be modified? Please answer if you have experience with modmerger framework. Thanks in advance.

Make sure you use Caba's additions when you are merging freelancer, or else it wont work.
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Ramaraunt said:
I want to make a head prop that spawns after you get decapitated. Just paste the code, thanks!

there is a OSP for decapitation, or you can check VC code.

VC code has the advantage of separated scripts for each part of the feature, so it may be easier to understand. See "script_goredec_special_effects".
 

Ramaraunt

I mean, I don't know how to make the scene prop in module_scene_props.py. I can't find how to do it anywhere. I have code that works, just the heads dont spawn.
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Ramaraunt said:
I mean, I don't know how to make the scene prop in module_scene_props.py. I can't find how to do it anywhere. I have code that works, just the heads dont spawn.

Did you check the OSP or VC ? Its all there, including the BRF, scripts, triggers, etc. You can't copy VC BRF, but you can use the one from the OSP
 

Ramaraunt

Alright then, I managed to get it working mostly. Sorry if I'm annoying, but I want to get this working and then I'll release it as an OSP pack. Kharlan, if you mean this osp: https://forums.taleworlds.com/index.php?topic=192161.0 the link is dead. I made an invisible head simply by exporting an empty obj from blender and importing it into OpenBRF... found a head model in historic lords OSP by Thick1988, which I bloodied up the texture of a bit for use in the decapitation with Gimp. Now, all I need to figure out, is how to make it so that an agent only loses its head when it dies. Because right now, you can cut someone's head off and they are walking around like nothing happened. XD

What the heck is this from?

http://steamcommunity.com/id/Trechorsaurus/screenshots/

EDIT: WHAT THE HECK IS IT DOING

http://steamcommunity.com/sharedfiles/filedetails/?id=734564355

EDIT: the face bug, was cause i named the decapitated model "man_face", and the game thought it was my actual face. gg.
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Ramaraunt said:
Now, all I need to figure out, is how to make it so that an agent only loses its head when it dies.

As mentioned earlier you could check VC for a example (or just copy the thingy, the code is open, as long you give credit).

script_cf_goredec -> it checks the conditions for a decapitation (bone, type of weapon, etc)

Code:
        # test if agent is dying from the hit
        (store_agent_hit_points, ":inflicted_hp", ":inflicted_agent_id", 1),
        (store_sub, ":inflicted_new_hp", ":inflicted_hp", ":damage"),
        (le, ":inflicted_new_hp", 0),

note that the script makes sure you are not trying to cut heads off heroes (immortal troops), etc
 

HyperCharge

Section Moderator
M&BWBWF&SNWVC
Is there any doc. for adding castles ? or is it a "just find "castle_48" and copy'n change name of whatever you found" job ?  :smile:
 

Ramaraunt

HyperCharge said:
Is there any doc. for adding castles ? or is it a "just find "castle_48" and copy'n change name of whatever you found" job ?  :smile:

EDIT: look at the post bellow its much better.
 

kalarhan

Python Saint
Count
WBNWVCWF&S
HyperCharge said:
Is there any doc. for adding castles ?

besides adding the party (module_parties.py) that has the icon, coordinates, etc, you will also need to add scenes (module_scenes.py), npcs like a mayor (module_troops.py), edit scripts that handle distribution of titles (which faction/lord should have it), and so forth. I would check the game code for p_castle_1 and see all instances of it and how it is used, and adapt what you need.
 

kraggrim

Marquis
WBM&BWF&SNWVC
kalarhan said:
kraggrim said:
So the talk in the Bannerlord thread got me thinking, would it be possible to assign the "show banners over friendly troops" option to a keyboard shortcut you could press while actually playing?

Well if all you want is to turn it ON/OFF like we can do on Options ... then you need a new operation, as (IIRC) we don't have one for that. So you will need to ask the TW devs for it

If you want a hack... no idea, never tried, but you could try messing the the presentation/meshes operations

Probably a bit late to ask for new operations, and hacking it is somewhat beyond my scope. Cheers though kalahan.
 

TheCaitularity

Sergeant at Arms
So the issue I had a while ago that I thought was fixed, wasn't. I'm still getting it.

TheCaitularity said:
Ran into a weird issue - after my player character hits level 2 in my mod, they seem to gain bits of experience every second in seemingly random amounts - mostly little bits, sometimes hundreds at a time. If I had to guess, I'd say they're somehow gaining experience for everything that happens in the world.

I'm not sure why this is happening, or why it only happens after level 2 - I don't recall changing anything to do with experience gain. Does anybody have any idea what the problem might be?

I've altered some scripts and added some of my own, as well as added a couple of constants, but those were almost entirely to do with troop recruitment.

Edit: Nope, the problem seems to happen after a day has passed. Really weird.

TheCaitularity said:
troycall said:
TheCaitularity said:
Ran into a weird issue - after my player character hits level 2 in my mod, they seem to gain bits of experience every second in seemingly random amounts - mostly little bits, sometimes hundreds at a time. If I had to guess, I'd say they're somehow gaining experience for everything that happens in the world.

I'm not sure why this is happening, or why it only happens after level 2 - I don't recall changing anything to do with experience gain. Does anybody have any idea what the problem might be?

I've altered some scripts and added some of my own, as well as added a couple of constants, but those were almost entirely to do with troop recruitment.

I had a similiar issue when I was altering the game_start script, im assuming you broke something within the game_start script, note that without code we can't really help you - at most we can guess, and that isn't enough.

This is when backups come to play, roll back into the latest module that you didn't have bugs with, then compare with the latest version, check what you edited (I personally sort by time modified and use the Notepad +++ Plugin "Compare", however if you don't want to use that you can use a website like: https://text-compare.com/ but I wouldn't recommend that for large-scale work, debug and diagnose, repetitive work I know, but its how I figured out most of the issues I ran into.

In the other hand if you are modding with .txt files, then there isn't any way to help you unless its a known glitch, other than roll back to the latest .txt backups you had.

Ah... yes, I did make quite a few alterations to game_start. Modding with the module system. I'll see what I can do with the 'compare' thing (pretty confident PSPad has a compare function between two files).

Edit:
Tried yesterday's backup and I'm not having the issue, so that's something.

It's happening after a day, which doesn't really make anything clearer. I'll post the major changes to game_start script here, in case that unearths anything useful.

Code:
...
     # Setting the random town sequence:
      (store_sub, ":num_towns", towns_end, towns_begin),
      (assign, ":num_iterations", ":num_towns"),
      (try_for_range, ":cur_town_no", 0, ":num_towns"),
        (troop_set_slot, "trp_random_town_sequence", ":cur_town_no", -1),
      (try_end),
      (assign, ":cur_town_no", 0),
      (try_for_range, ":unused", 0, ":num_iterations"),
        (store_random_in_range, ":random_no", 0, ":num_towns"),
        (assign, ":is_unique", 1),
        (try_for_range, ":cur_town_no_2", 0, ":num_towns"),
          (troop_slot_eq, "trp_random_town_sequence", ":cur_town_no_2", ":random_no"),
          (assign, ":is_unique", 0),
        (try_end),
        (try_begin),
          (eq, ":is_unique", 1),
          (troop_set_slot, "trp_random_town_sequence", ":cur_town_no", ":random_no"),
          (val_add, ":cur_town_no", 1),
        (else_try),
          (val_add, ":num_iterations", 1),
        (try_end),
      (try_end),

 #Initialize Male Village unique recruits
     (party_set_slot, "p_village_1", slot_center_volunteer_troop_type, "trp_bryton_countryman"),
     ...
     (party_set_slot, "p_village_100", slot_center_volunteer_troop_type, "trp_bryton_countryman"),

     (party_set_slot, "p_village_101", slot_center_volunteer_troop_type, "trp_bryton_countryman"),
     ...
     (party_set_slot, "p_village_110", slot_center_volunteer_troop_type_female, "trp_bryton_countrywoman"),

...

	  # Cultures:
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_1_troop, "trp_bryton_countryman"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_2_troop, "trp_bryton_militiaman"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_3_troop, "trp_bryton_footman"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_4_troop, "trp_bryton_bowman"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_5_troop, "trp_bryton_yeoman"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_5_troop_female, "trp_bryton_yeowoman"),

      (faction_set_slot, "fac_culture_2", slot_faction_tier_1_troop, "trp_vaegir_recruit"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_2_troop, "trp_vaegir_footman"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_3_troop, "trp_vaegir_veteran"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_4_troop, "trp_vaegir_infantry"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_5_troop, "trp_vaegir_knight"),
      (faction_set_slot, "fac_culture_2",  slot_faction_tier_5_troop_female, "trp_bryton_yeowoman"),
      
      (faction_set_slot, "fac_culture_3", slot_faction_tier_1_troop, "trp_shirokami_peasant_man"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_2_troop, "trp_khergit_skirmisher"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_3_troop, "trp_khergit_horseman"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_4_troop, "trp_khergit_horse_archer"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_5_troop, "trp_khergit_veteran_horse_archer"),
      (faction_set_slot, "fac_culture_3",  slot_faction_tier_5_troop_female, "trp_bryton_yeowoman"),
      

      (faction_set_slot, "fac_culture_4", slot_faction_tier_1_troop, "trp_nord_recruit"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_2_troop, "trp_nord_footman"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_3_troop, "trp_nord_trained_footman"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_4_troop, "trp_nord_warrior"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_5_troop, "trp_nord_veteran"),
      (faction_set_slot, "fac_culture_4",  slot_faction_tier_5_troop_female, "trp_bryton_yeowoman"),
      

      (faction_set_slot, "fac_culture_5", slot_faction_tier_1_troop, "trp_rhodok_tribesman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_2_troop, "trp_rhodok_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_3_troop, "trp_rhodok_trained_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_4_troop, "trp_rhodok_veteran_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_5_troop, "trp_rhodok_sergeant"),
      (faction_set_slot, "fac_culture_5",  slot_faction_tier_5_troop_female, "trp_bryton_yeowoman"),
      

      (faction_set_slot, "fac_culture_6", slot_faction_tier_1_troop, "trp_sarranid_recruit"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_2_troop, "trp_sarranid_footman"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_3_troop, "trp_sarranid_archer"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_4_troop, "trp_sarranid_horseman"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_5_troop, "trp_sarranid_mamluke"),
      (faction_set_slot, "fac_culture_6",  slot_faction_tier_5_troop_female, "trp_bryton_yeowoman"),

...

      (try_for_range, ":village_no", villages_begin, villages_end),
        (call_script, "script_update_volunteer_troops_in_village", ":village_no"),
        (call_script, "script_update_volunteer_troops_in_village_female", ":village_no"),
      (try_end),
      
...

Somebody then suggested this:

Somebody said:
Post script_update_volunteer_troops_in_village_female and script_update_volunteer_troops_in_village.
I suspect that your modified recruit script grabs slot_center_volunteer_troop_type or slot_center_volunteer_troop_type_female (normally it uses slot_center_npc_volunteer_troop_type), doesn't do validation, and adds the player's troop as recruit to parties. Those parties then get added xp every two days, and as part of those parties the player gains exp over and over. Double-check where you are fetching and setting the value of new slots and make sure any slot that is used to store troop id is greater than 0 (the player troop). Also check for slot range overlaps, because stuff being overwritten isn't fun.

And I replied with this:

TheCaitularity said:
script_update_volunteer_troops_in_village
Code:
  #script_update_volunteer_troops_in_village
  # INPUT: arg1 = center_no
  # OUTPUT: none
  ("update_volunteer_troops_in_village",
    [
       (store_script_param, ":center_no", 1),
       (party_get_slot, ":player_relation", ":center_no", slot_center_player_relation),
       (party_get_slot, ":center_culture", ":center_no", slot_center_culture),


##	   (try_begin),
##		(eq, "$cheat_mode", 2),
##	    (str_store_party_name, s4, ":center_no"),
##	    (str_store_faction_name, s5, ":center_culture"),
##	    (display_message, "str_updating_volunteers_for_s4_faction_is_s5"),
##	   (try_end),

	   ##slot_center_volunteer_troop_type
       ##slot_faction_tier_1_troop

##       (faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
       (party_get_slot, ":volunteer_troop", ":center_no", slot_center_volunteer_troop_type),
       (assign, ":volunteer_troop_tier", 1),
       (store_div, ":tier_upgrades", ":player_relation", 10),
       (try_for_range, ":unused", 0, ":tier_upgrades"),
         (store_random_in_range, ":random_no", 0, 100),
         (lt, ":random_no", 10),
         (store_random_in_range, ":random_no", 0, 2),
         (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", ":random_no"),
         (try_begin),
           (le, ":upgrade_troop_no", 0),
           (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", 0),
         (try_end),
         (gt, ":upgrade_troop_no", 0),
         (val_add, ":volunteer_troop_tier", 1),
         (assign, ":volunteer_troop", ":upgrade_troop_no"),
       (try_end),

       (assign, ":upper_limit", 8),
       (try_begin),
         (ge, ":player_relation", 4),
         (assign, ":upper_limit", ":player_relation"),
         (val_div, ":upper_limit", 2),
         (val_add, ":upper_limit", 6),
       (else_try),
         (lt, ":player_relation", 0),
         (assign, ":upper_limit", 0),
       (try_end),


##diplomacy begin
      (assign, ":percent", 100),
      (try_begin), #-30% if not owner
        (neg|party_slot_eq, ":center_no", slot_town_lord, "trp_player"),
        (val_sub, ":percent", 30),
      (try_end),
      (try_begin), #1%/4 renown
        (troop_get_slot, ":player_renown", "trp_player", slot_troop_renown),
        (val_div, ":player_renown", 4),
        (val_add, ":percent", ":player_renown"),
      (try_end),
      (try_begin), #1%/3 honour
        (assign, ":player_honour", "$player_honor"),
        (val_div, ":player_honour", 3),
        (val_add, ":percent", ":player_honour"),
      (try_end),
      (try_begin), #+5% if king
        (faction_get_slot, ":faction_leader", "fac_player_supporters_faction", slot_faction_leader),
        (eq, ":faction_leader", "trp_player"),
        (val_add, ":percent", 5),

        (try_begin), #-5% for each point of serfdom
          (faction_get_slot, ":serfdom", "fac_player_supporters_faction", dplmc_slot_faction_serfdom),
          (neq, ":serfdom", 0),
          (val_mul, ":serfdom", 5),
          (val_sub, ":percent", ":serfdom"),
        (try_end),

        (try_begin),  #+5% if king of village
          (store_faction_of_party, ":faction", ":center_no"),
          (eq, ":faction", "fac_player_supporters_faction"),
          (val_add, ":percent", 5),
        (try_end),
      (try_end),

      (try_begin),
        (gt, ":upper_limit", 0),
        (val_clamp, ":percent", 0, 201),
        (val_mul, ":upper_limit", ":percent"),
        (val_div, ":upper_limit", 100),
      (try_end),

##diplomacy end


       (val_mul, ":upper_limit", 3),
       (store_add, ":amount_random_divider", 2, ":volunteer_troop_tier"),
       (val_div, ":upper_limit", ":amount_random_divider"),

       (store_random_in_range, ":amount", 0, ":upper_limit"),
       (party_set_slot, ":center_no", slot_center_volunteer_troop_type, ":volunteer_troop"),
       (party_set_slot, ":center_no", slot_center_volunteer_troop_amount, ":amount"),
     ]),

script_update_for_volunteer_troops_in_village_female
  #script_update_volunteer_troops_in_village_female
  # INPUT: arg1 = center_no
  # OUTPUT: none
  ("update_volunteer_troops_in_village_female",
    [
      (store_script_param, ":center_no", 1),
      (party_get_slot, ":player_relation", ":center_no", slot_center_player_relation),
      (party_get_slot, ":center_culture", ":center_no", slot_center_culture),


##   (try_begin),
## (eq, "$cheat_mode", 2),
##     (str_store_party_name, s4, ":center_no"),
##     (str_store_faction_name, s5, ":center_culture"),
##     (display_message, "str_updating_volunteers_for_s4_faction_is_s5"),
##   (try_end),

  ##slot_center_volunteer_troop_type
      ##slot_faction_tier_1_troop

##      (faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
      (party_get_slot, ":volunteer_troop", ":center_no", slot_center_volunteer_troop_type_female),
      (assign, ":volunteer_troop_tier", 1),
      (store_div, ":tier_upgrades", ":player_relation", 10),
      (try_for_range, ":unused", 0, ":tier_upgrades"),
        (store_random_in_range, ":random_no", 0, 100),
        (lt, ":random_no", 10),
        (store_random_in_range, ":random_no", 0, 2),
        (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", ":random_no"),
        (try_begin),
          (le, ":upgrade_troop_no", 0),
          (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", 0),
        (try_end),
        (gt, ":upgrade_troop_no", 0),
        (val_add, ":volunteer_troop_tier", 1),
        (assign, ":volunteer_troop", ":upgrade_troop_no"),
      (try_end),

      (assign, ":upper_limit", :cool:,
      (try_begin),
        (ge, ":player_relation", 4),
        (assign, ":upper_limit", ":player_relation"),
        (val_div, ":upper_limit", 2),
        (val_add, ":upper_limit", 6),
      (else_try),
        (lt, ":player_relation", 0),
        (assign, ":upper_limit", 0),
      (try_end),


##diplomacy begin
      (assign, ":percent", 100),
      (try_begin), #-30% if not owner
        (neg|party_slot_eq, ":center_no", slot_town_lord, "trp_player"),
        (val_sub, ":percent", 30),
      (try_end),
      (try_begin), #1%/4 renown
        (troop_get_slot, ":player_renown", "trp_player", slot_troop_renown),
        (val_div, ":player_renown", 4),
        (val_add, ":percent", ":player_renown"),
      (try_end),
      (try_begin), #1%/3 honour
        (assign, ":player_honour", "$player_honor"),
        (val_div, ":player_honour", 3),
        (val_add, ":percent", ":player_honour"),
      (try_end),
      (try_begin), #+5% if king
        (faction_get_slot, ":faction_leader", "fac_player_supporters_faction", slot_faction_leader),
        (eq, ":faction_leader", "trp_player"),
        (val_add, ":percent", 5),

        (try_begin), #-5% for each point of serfdom
          (faction_get_slot, ":serfdom", "fac_player_supporters_faction", dplmc_slot_faction_serfdom),
          (neq, ":serfdom", 0),
          (val_mul, ":serfdom", 5),
          (val_sub, ":percent", ":serfdom"),
        (try_end),

        (try_begin),  #+5% if king of village
          (store_faction_of_party, ":faction", ":center_no"),
          (eq, ":faction", "fac_player_supporters_faction"),
          (val_add, ":percent", 5),
        (try_end),
      (try_end),

      (try_begin),
        (gt, ":upper_limit", 0),
        (val_clamp, ":percent", 0, 201),
        (val_mul, ":upper_limit", ":percent"),
        (val_div, ":upper_limit", 100),
      (try_end),

##diplomacy end


      (val_mul, ":upper_limit", 3),
      (store_add, ":amount_random_divider", 2, ":volunteer_troop_tier"),
      (val_div, ":upper_limit", ":amount_random_divider"),

      (store_random_in_range, ":amount", 0, ":upper_limit"),
      (party_set_slot, ":center_no", slot_center_volunteer_troop_type_female, ":volunteer_troop"),
      (party_set_slot, ":center_no", slot_center_volunteer_troop_amount, ":amount"),
    ]),

Issue seems to be resolved - I found slot_center_volunteer_troop_type_female in module_constants may have been overwriting something, because I changed the number and I've been unable to recreate the XP issue (waiting it out and winning battles).

So, a couple of things:

- I have no idea how to 'validate' those slots. I also can't find where I would check where those slots are being called, etc, in relation to troop_id; the recruitment scripts don't mention troop_id, as far as I can see.
- After checking module_constants, I found a few overlapping ones which I switched out to different numbers, which didn't seem to fix anything. I'm not sure how far I can go with assigning numbers to new constants, or when constants stop having the potential to 'overlap' - it SEEMS to be the big commented title breaks, but I'm not too sure.

Really lost on this one.

Maybe I need to start from scratch, fresh Diplomacy module system, and use slot_faction_tier_X_troop and derivations thereof, instead of doing what I did. I haven't added THAT much genuinely unique code that I can't easily copy from my current module system to use in the new one, and it would mean not messing with game_start to the extent that I have (although I would be making slot_faction_tier_X_troop_female, I suppose, so still messing with a lot of things, MORE things looking at how many times slot_faction_tier_X_troop shows up by the looks of it).
 

Ramaraunt

So question: What is the legality of using VC code? Cause lots of it solves my problems with certain things. I don't want to break any copyright laws or anything of that nature.

If I use VC code in my mod, does that mean only people with VC can play it?
 
Status
Not open for further replies.
Top Bottom