Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Madijeis said:
Can I include a timer in that script without destroing WRECK? (Please forgive me if I'm so noobish, it's just that I messed up again my WRECK because of the sea raiders, didn't tought they were that important )

no idea what you mean.

Maybe you are talking about the mechanic: the script is called from time to time by a trigger to create new bandit parties, replacing the ones that were destroyed

Hour Nr. Bandit Parties 
  0              15
  5              12  (3 were destroyed)
  10            15  (event fires, 3 new bandit parties created, next event in 24 hours)
  ...

Numbers above are just a example, you define the rate on your triggers. Just search for the use of the script.



TheDragonknight said:
whenever I try to open the .bak file with openbrf it says it cant load it
Download OpenBRF
Set the module folder
Choose to open a BRF from your module, or use CTRL+F for search

.bak is a backup, why are you trying to open that file? OpenBRF works with... BRF files  :smile:
 
kalarhan said:
kraggrim said:
move outta the damn way :smile:.

there is a OSP pack with "skills" that among other thing has a shout that makes people open room for you.
https://forums.taleworlds.com/index.php/topic,62230.0.html
--> warcry works on enemies. You can use the same tech for allies


You can also create a new skill (under a shortcut) with a animation like kick that makes allies move away. Similar to what we have with shield bash.

Or use the normal kick shortcut and add a new function (make allies in front of you move away).
See if that helps

I think it will, cheers kalarhan.
Edit: Yep, got a rudimentary version working. Not quite a satisfying as actually booting my troublesome troops, but gets the job done  :grin:.
 
TheDragonknight said:
I don't have a .brf file They are .baks

OpenBRF works with the game "graphics". Stuff like weapons, houses, trees, animations. It is where you combine the textures (paint job) with the materials (apply effects to the texture) with a mesh (give it a form) that you created on a 3D software like Blender/Wings 3D

Those resources are saved inside .brf files. They can be located on your /resources and /textures folders of your mod (also on Native, as you use some of that too).

Re-read my early post. Setup your OpenBRF to point to your current mod. Then let the magic happen  :smile:

For info on how to use this great tool you should visit its own forum. Download, guides, tutorials, etc can be located there for your learning experience.
https://forums.taleworlds.com/index.php/board,215.0.html

Have fun modding!
 
It still doesn't make sense... the recources thing is in the module folder not in the python script editor thing... also it always says "cant find "and the nthe adress" Im really confused would it be possible to have someone make a video of them opening the file with the brf?
NEW: I'm still not understanding the brf thing... I also want to know how I would inimplement the lance system and other such things
 
BRF files are containers, containing resources (whether they are meshes, textures, or animations or whatever). Each of those have their own format before being packaged in a BRF. I suspect you acquired those .bak files from another source and have no idea how to actually get it into a format OpenBRF expects.
 
Posted elsewhere, but this seems more like coder central!

Is it possible to update one module system script without overwriting all the other files in your module folder?

This is really hard to explain because the module word.

I updated a mod where I had to use the module system (.py scripts). What I did was I made a death camera and everything worked out good (or so I thought). When I finished updating my mod and manually updating the mods core files, I found out that I didn't entire complete my death cam script.

Confused yet? great!

My question is: How can I compile ONE module system python file and have it only overwrite one of my core mod files. If you do not understand, when you compile the python files from the module system, they overwrite your mods module files with the updated information.

module_mission_templates.py overwrites ./modules/your_mod_name/mission_templates.txt

So instead of compiling all of the python scripts, which would essentially erase ALL my work I did today, is there a way I could compile one script so I only had an hour or two worth of rework instead of 7 hours?
 
Rezovor said:
Is it possible to update one module system script without overwriting all the other files in your module folder?

The short answer is no. The very long one is maybe.

You should do your work with the modules files (.py), all of it, and compile the entire module. Don't try mixing .txt tweaks with coding. Morgh's Tool, as a example, can work with both types, so you can still use it for items/troops.

Some changes can be done on the way you want, but it requires tech know-how on how the compiler works to understand if you changed any ID (reference). If you do, you break your mod with a partial compilation.
 
Rezovor said:
it seems these tweaks cannot be done within the .py files.

This is never true; the .txt files are just simplified machine code versions of the module system files. Unless a script is really long, you can usually find out what/where a .txt edit would be in the .py files by following the script name. The module system is infinitely easier to understand than .txt so you should be able to find their locations fairly easily.
 
SenpaiHinds said:
Rezovor said:
it seems these tweaks cannot be done within the .py files.

This is never true; the .txt files are just simplified machine code versions of the module system files. Unless a script is really long, you can usually find out what/where a .txt edit would be in the .py files by following the script name. The module system is infinitely easier to understand than .txt so you should be able to find their locations fairly easily.

I guess you saw my reply before I erased it. I replied and then went through my module system scripts carefully and realized that it's easier to update that way. I was hoping nobody would see my reply hahaha.

I'm newish to scripting for warband, but I was under the impression that I had to update the text files instead of the python files. I understand now and it looks like this will take me a couple of times with trial and error.
 
What script am I missing? My new parties still doesn't spawn
(party_template_set_slot, "pt_forest_bandits", slot_party_template_lair_type, "pt_forest_bandit_lair"),
(party_template_set_slot, "pt_forest_bandits1", slot_party_template_lair_type, "pt_forest_bandit_lair"),
(party_template_set_slot, "pt_forest_bandits2", slot_party_template_lair_type, "pt_forest_bandit_lair"),

(party_template_set_slot, "pt_forest_bandits", slot_party_template_lair_spawnpoint, "p_forest_bandit_spawn_point"),
(party_template_set_slot, "pt_forest_bandits1", slot_party_template_lair_spawnpoint, "p_forest_bandit_spawn_point"),
(party_template_set_slot, "pt_forest_bandits2", slot_party_template_lair_spawnpoint, "p_forest_bandit_spawn_point"),

(try_begin),
      (store_num_parties_of_template, ":num_parties", "pt_forest_bandits"),
      (lt,":num_parties",16), #was 14 at mount&blade, 18 in warband, 16 last decision
      (store_random,":spawn_point",num_forest_bandit_spawn_points),
      (val_add,":spawn_point","p_forest_bandit_spawn_point"),
      (set_spawn_radius, 25),
      (spawn_around_party,":spawn_point","pt_forest_bandits"),
    (try_end),
    (try_begin),
      (store_num_parties_of_template, ":num_parties", "pt_forest_bandits1"),
      (lt,":num_parties",16), #was 14 at mount&blade, 18 in warband, 16 last decision
      (store_random,":spawn_point",num_forest_bandit_spawn_points),
      (val_add,":spawn_point","p_forest_bandit_spawn_point"),
      (set_spawn_radius, 25),
      (spawn_around_party,":spawn_point","pt_forest_bandits"),
    (try_end),
    (try_begin),
      (store_num_parties_of_template, ":num_parties", "pt_forest_bandits2"),
      (lt,":num_parties",16), #was 14 at mount&blade, 18 in warband, 16 last decision
      (store_random,":spawn_point",num_forest_bandit_spawn_points),
      (val_add,":spawn_point","p_forest_bandit_spawn_point"),
      (set_spawn_radius, 25),
      (spawn_around_party,":spawn_point","pt_forest_bandits"),
 
Hello guys!
How to create "white" location on the map with 2 only options: enter and exit?
The examples are Zendar  and Four ways inn
 
homicuda said:
Hello guys!
How to create "white" location on the map with 2 only options: enter and exit?
The examples are Zendar  and Four ways inn

visiting a town/village/etc is just a party encounter that is directed to a menu.

So add a case for your new party and a new menu for it, that has those two options.

See script_game_event_party_encounter
 
Ok, so I adapted my "get out of the way" trigger from the combat abilites warcry one.
  (0, 0, 2, [(key_clicked, key_e),(neg|main_hero_fallen)
     
      ], [
     
      (play_sound,"snd_man_victory"),
     
      (get_player_agent_no, ":player_agent"),
      (agent_get_position, pos1, ":player_agent"),
     
      (try_for_agents,":agent"),
        (set_fixed_point_multiplier, 1),
  (agent_is_in_line_of_sight, ":agent", pos1), #
        (agent_is_alive,":agent"),
        (agent_is_human,":agent"),
        (agent_is_ally,":agent"),
       
        (agent_get_position, pos2, ":agent"),
        (get_distance_between_positions,":distance",pos2,pos1),
        (lt,":distance",130),
  (neg|position_is_behind_position,pos2,pos1),
       
        (set_fixed_point_multiplier, 10),
       
        (position_get_x,":player_x",pos1),
        (position_get_y,":player_y",pos1),
        (position_get_x,":enemy_x",pos2),
        (position_get_y,":enemy_y",pos2),
       
        (store_sub,":difference_x",":enemy_x",":player_x"),
        (val_mul,":difference_x",3), #was 12
       
        (store_sub,":difference_y",":enemy_y",":player_y"),
        (val_mul,":difference_y",3), #was 12
       
        (val_add,":enemy_x",":difference_x"),
        (val_add,":enemy_y",":difference_y"),
       
        (position_set_x,pos2,":enemy_x"),
        (position_set_y,pos2,":enemy_y"),
       
        (agent_set_scripted_destination,":agent",pos2,1),
      (try_end),
     
      (display_message,"@Get out of my way!",0x6495ed),
      (set_fixed_point_multiplier, 1),
  ]),
 
  (0, 1, 2, [(key_clicked, key_e),(neg|main_hero_fallen)
     
      ], [
     
      #(display_message,"@Enemies regain their courage!",0x6495ed),
      (try_for_agents,":agent"),
        (agent_is_alive,":agent"),
        (agent_is_human,":agent"),
        (agent_is_ally,":agent"),
        (agent_clear_scripted_mode,":agent"),
      (try_end),
     
  ]),
  (0, 2, 2, [(key_clicked, key_e),(neg|main_hero_fallen)
     
      ], [
     
      (try_for_agents,":agent"),
        (agent_is_alive,":agent"),
        (agent_is_human,":agent"),
        (agent_is_ally,":agent"),
        (agent_clear_scripted_mode,":agent"),
      (try_end),
     
  ]),
#EGIII WARCRY

    (0, 0, 60, [(key_clicked, key_b),(neg|main_hero_fallen)

], [
               
(play_sound,"snd_man_victory"),
             
      (get_player_agent_no, ":player_agent"),
      (agent_get_position, pos1, ":player_agent"),
  (store_character_level,":level","trp_player"),
# (agent_set_animation, ":player_agent", "anim_cheer"),
      (val_mul,":level",2),
  (val_add,":level",1),

(try_for_agents,":agent"),
(set_fixed_point_multiplier, 1),
        (agent_is_alive,":agent"),
        (agent_is_human,":agent"),
(neg|agent_is_ally,":agent"),

(agent_get_troop_id,":trp_agent", ":agent"),
(store_character_level,":troop_level",":trp_agent"),
(ge,":level",":troop_level"),
(agent_get_position, pos2, ":agent"),
(get_distance_between_positions,":distance",pos2,pos1),
(lt,":distance",500),

(set_fixed_point_multiplier, 10),

(position_get_x,":player_x",pos1),
(position_get_y,":player_y",pos1),
(position_get_x,":enemy_x",pos2),
(position_get_y,":enemy_y",pos2),

(store_sub,":difference_x",":enemy_x",":player_x"),
(val_mul,":difference_x",12),

(store_sub,":difference_y",":enemy_y",":player_y"),
(val_mul,":difference_y",12),

(val_add,":enemy_x",":difference_x"),
(val_add,":enemy_y",":difference_y"),

(position_set_x,pos2,":enemy_x"),
(position_set_y,pos2,":enemy_y"),

(agent_set_scripted_destination,":agent",pos2,1),
(try_end),

(display_message,"@You unleash a fearsome cry!",0x6495ed),
        (set_fixed_point_multiplier, 1),
(call_script, "script_focus_exp_penalty"), 
        ]),

(0, 5, 60, [(key_clicked, key_b),(neg|main_hero_fallen)

], [
               
#(display_message,"@Enemies regain their courage!",0x6495ed),
(try_for_agents,":agent"),
(agent_is_alive,":agent"),
        (agent_is_human,":agent"),
(neg|agent_is_ally,":agent"),
(agent_clear_scripted_mode,":agent"),
(try_end),

        ]),
(0, 7, 60, [(key_clicked, key_b),(neg|main_hero_fallen)

], [
               
(try_for_agents,":agent"),
(agent_is_alive,":agent"),
        (agent_is_human,":agent"),
(neg|agent_is_ally,":agent"),
(agent_clear_scripted_mode,":agent"),
(try_end),

        ]),
(the wonky indentation is just how the guy posted it)

Couple of questions.

1) In large battles I get a noticeable hang when using mine.  Are there ways I can make it more efficient?

2) The original has those 2 triggers for clearing scripted mode, one of them one second after the other. I kept basically the same format, but why are there two?
 
kraggrim said:
1) In large battles I get a noticeable hang when using mine.  Are there ways I can make it more efficient?

2) The original has those 2 triggers for clearing scripted mode, one of them one second after the other. I kept basically the same format, but why are there two?

1) As the original is very old you have a few new tricks now. Before going crazy by using a array (which would be a huge improvement), you should do a test with the easiest improvement

Code:
 (try_for_agents,":agent"),

.. get distance code

replaced by a
Code:
 (try_for_agents,":agent", position, RADIUS_DISTANCE),

Code:
try_for_agents          =   12  #(try_for_agents, <destination>, [<position_no>], [<radius_fixed_point>]),
                                # Runs a cycle, iterating all agents on the scene. Optional parameters can be used to limit it to a circle area. Avoid using pos0.

this way you won't look at every agent inside the scene, but just the ones close to you. You can then remove the distance check as well.
Code:
        (get_distance_between_positions,":distance",pos2,pos1),
        (lt,":distance",130),

2) That is a good question. Any discussion on that in the original thread?

If you still have issues on huge battles (300-800 agents) you may need to use a array to save teh agents ID, that way you won't need to look for them again and again for the clear script.
a) Find alive agents, allies, nearby you. Save ID on the array
b) xxx seconds later clear the AI for those, and clear the array

There is also some more advanced code used on VC formations to control agents, but that is probably overkill for a simple skill that you won't spam (only use now and then)
 
Can I use this thread to verify code/logic? Havent tested it yet, but it compiles with no issues:smile:

Goal: New random quest --> Spawn party template nearby

Code:
         (else_try),
        	(eq, ":quest_no", "qst_defend_village"),
          	(try_begin),
	            (faction_slot_eq, ":giver_faction_no", slot_faction_side, faction_side_good),
	            (ge, "$g_talk_troop_faction_relation", 0),
	            (is_between, ":player_level", 2,7),
	            (gt, ":giver_center_no", 0),#Skip if lord is outside the center
	            (assign, ":cur_object_center", ":giver_center_no"), #TLD: just start from the same town
	            (call_script, "script_cf_get_random_enemy_center_within_range", "p_main_party", tld_max_quest_distance),
	            (assign, ":cur_target_center", reg0),
	            (assign, ":dist", reg1),
	            (store_faction_of_party,"$qst_defend_village",":cur_target_center"),
	            (neq, ":cur_target_center", ":giver_center_no"),#Skip current center
	            (ge, ":dist", 20),
	            (assign, ":quest_target_party_template", "pt_village"),
	            (assign, ":quest_object_center", ":cur_object_center"),
	            #(assign, ":quest_target_center", ":cur_target_center"),
	            (assign, ":quest_importance", 8),
	            (assign, ":quest_xp_reward", 300),
	            (assign, ":quest_gold_reward", 600),
	            (assign, ":quest_rank_reward", 9),
	            (assign, ":result", ":quest_no"),
	            (assign, ":quest_expiration_days", 30),
	            (assign, ":quest_dont_give_again_period", 20),
          (try_end),
Code:
[anyone|plyr,"lord_mission_defend_accept", [],
  "Ok","lord_pretalk",[
      (quest_get_slot, ":quest_giver_center", "$random_quest_no", slot_quest_giver_center),
      (quest_get_slot, ":quest_target_party_template", "$random_quest_no", slot_quest_target_party_template),
      (set_spawn_radius, 5),
      (spawn_around_party,":quest_giver_center",":quest_target_party_template"),
      (assign, "$qst_defend_village_party", reg0)
      (str_store_troop_name_link,s9,"$g_talk_troop"),
      (setup_quest_text,"$random_quest_no"),
      (str_store_string, s2, "@{s9} asked you to defend a village under attack."),
      (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"),
      (call_script, "script_change_player_relation_with_troop","$g_talk_troop",1),
      (quest_get_slot, reg1, "$random_quest_no", slot_quest_expiration_days)]],

(also, is there a better / faster way to test random quests than simply keep trying til it is given?)
 
kraggrim said:
Code:
 (0, 0, 2, [(key_clicked, key_e),(neg|main_hero_fallen)
      
      ], [
      
      (play_sound,"snd_man_victory"),
      
      (get_player_agent_no, ":player_agent"),
      (agent_get_position, pos1, ":player_agent"),
      
      (try_for_agents,":agent"),
        (set_fixed_point_multiplier, 1),
        (agent_is_in_line_of_sight, ":agent", pos1), #
        (agent_is_alive,":agent"),
        (agent_is_human,":agent"),
        (agent_is_ally,":agent"),
        
        (agent_get_position, pos2, ":agent"),
        (get_distance_between_positions,":distance",pos2,pos1),
        (lt,":distance",130),
        (neg|position_is_behind_position,pos2,pos1),
        
        (set_fixed_point_multiplier, 10),
        
        (position_get_x,":player_x",pos1),
        (position_get_y,":player_y",pos1),
        (position_get_x,":enemy_x",pos2),
        (position_get_y,":enemy_y",pos2),
        
        (store_sub,":difference_x",":enemy_x",":player_x"),
        (val_mul,":difference_x",3), #was 12
        
        (store_sub,":difference_y",":enemy_y",":player_y"),
        (val_mul,":difference_y",3), #was 12
        
        (val_add,":enemy_x",":difference_x"),
        (val_add,":enemy_y",":difference_y"),
        
        (position_set_x,pos2,":enemy_x"),
        (position_set_y,pos2,":enemy_y"),
        
        (agent_set_scripted_destination,":agent",pos2,1),
      (try_end),
      
      (display_message,"@Get out of my way!",0x6495ed),
      (set_fixed_point_multiplier, 1),
  ]),
  
  (0, 1, 2, [(key_clicked, key_e),(neg|main_hero_fallen)
      
      ], [
      
      #(display_message,"@Enemies regain their courage!",0x6495ed),
      (try_for_agents,":agent"),
        (agent_is_alive,":agent"),
        (agent_is_human,":agent"),
        (agent_is_ally,":agent"),
        (agent_clear_scripted_mode,":agent"),
      (try_end),
      
  ]),
  (0, 2, 2, [(key_clicked, key_e),(neg|main_hero_fallen)
      
      ], [
      
      (try_for_agents,":agent"),
        (agent_is_alive,":agent"),
        (agent_is_human,":agent"),
        (agent_is_ally,":agent"),
        (agent_clear_scripted_mode,":agent"),
      (try_end),
      
  ]),
1) In large battles I get a noticeable hang when using mine.  Are there ways I can make it more efficient?
2) The original has those 2 triggers for clearing scripted mode, one of them one second after the other. I kept basically the same format, but why are there two?
It's not allways the best solution to copy and paste OSP code.
You're sometimes better off to just understand the theroy behind it in order to write your own version and then shorten it as much as possible.
Only one trigger is needed to fulfil all tasks.
Put the condition checks in a logical/performant order and clean up the loops.
Code:
(0, 1, 2, 
[
  (key_clicked, key_e),
  (neg|main_hero_fallen),

  (play_sound, "snd_man_victory"),
  (display_message, "@Get out of my way!", 0x6495ed),
  (set_fixed_point_multiplier, 10),

  (get_player_agent_no, ":player_agent"),
  (agent_get_position, pos1, ":player_agent"),
  (position_get_x, ":player_x", pos1),
  (position_get_y, ":player_y", pos1),
      
  (try_for_agents, ":agent", pos1, 13),#distance check, 13 due to the fixed point multiplier
    (agent_is_alive, ":agent"),
    (agent_is_human, ":agent"),
    (agent_is_ally, ":agent"),
    (agent_get_position, pos2, ":agent"),
    (neg|position_is_behind_position, pos2, pos1),
    (agent_is_in_line_of_sight, ":agent", pos1),#most expensive check... belongs down here
    
    (position_get_x, ":enemy_x", pos2),
    (position_get_y, ":enemy_y", pos2),

    (store_sub, ":difference", ":enemy_x", ":player_x"),
    (val_mul, ":difference", 3),
    (val_add, ":enemy_x", ":difference"),
    #reuse variables as often as possible
    (store_sub, ":difference", ":enemy_y", ":player_y"),
    (val_mul, ":difference", 3),
    (val_add, ":enemy_y", ":difference"),

    (position_set_x, pos2, ":enemy_x"),
    (position_set_y, pos2, ":enemy_y"),
    
    (agent_set_slot, ":agent", slot_agent_warcry_effected, 1),#dont forget to add this slot
    (agent_set_scripted_destination, ":agent", pos2, 1),
  (try_end),  
],
[#fires after 1 sec
  (try_for_agents, ":agent"),
    (agent_slot_eq, ":agent", slot_agent_warcry_effected, 1),
    (agent_set_slot, ":agent", slot_agent_warcry_effected, 0),#reset
    (agent_clear_scripted_mode,":agent"),
  (try_end),
]),
There's still some potential for optimization such as combining some actions with other existing triggers, but this version should just work fine (haven't tested it though)
 
Running into issues with this code, not exactly sure which part is the problem, dosen't seem to trigger any errors either at the correct mission templates, but the torches are not assigned to the troops it appears.
Code:
    (try_begin),
          (is_currently_night),
          (store_random_in_range, ":random_in_range_1_10", 0, 10), # 10% Chance of torch being assigned
          (store_trigger_param_1, ":trigger_param_1"),
          (agent_is_human, ":trigger_param_1"),
          (agent_is_non_player, ":trigger_param_1"),
          (try_begin),
            (eq, ":random_in_range_1_10", 1),
            #(agent_get_wielded_item, ":wielded_item_player_agent_no_1", ":trigger_param_1", 1),
            (agent_get_wielded_item, ":wielded_item_var_2_0", ":trigger_param_1", 1),
            (neg|is_between, ":wielded_item_var_2_0", "itm_tutorial_spear", "itm_items_end"),
            (agent_unequip_item, ":trigger_param_1", ":wielded_item_var_2_0", 1), #Remove item from item range above in slot 1 (Shield)
            (agent_equip_item, ":trigger_param_1", 886, 1), #Apply to slot 1 (Shield) after item is removed from above, item ID is 886 for torch.
            #(else_try),
            #Else try
          (try_end),
        (try_end),

kalarhan said:
troycall said:
I got some code close to a prototype:

1) Please use proper indentation. Much easier to read  :mrgreen: . Check the process_line_correction.py to make it automatic ...

Code:
(try_begin), 
  (store_time_of_day, ":cur_hour"),
  (ge, ":cur_hour", 21), #greater then 9 PM
  (lt, ":cur_hour", 5), #lower then 5 AM
  (store_random_in_range, ":random_in_range_1_10", 1, 10), #1 in a 10 chance of item being assigned
  
  (try_begin),
    (assign, ":rand", "random_in_range_1_10"),
    (eq, ":rand", 1),
    (assign, "itm_torch", trp_player), #Obtain item slot 0-4 and replace in here (Not sure what im doing here)
  (else_try),#Else try

  stuff ...

  (try_end),
(try_end),

2) You are missing the ":" on this line
Code:
(assign, ":rand", "random_in_range_1_10"),

3) If you want 10% (1 in 10), you need to change that range. Its 0 (zero) based, and (end-1). So a
(range, 1, 10) -> [1,2,3,4,5,6,7,8,9]  -> no 10 in there. That makes 1/9 (11.1%)
Usually you will see this
Code:
(store_random_in_range, ":random", 0, 10),
If you really want use 1, then go to 11
Code:
(store_random_in_range, ":random", 1, 10+1),

4) Not sure why you are reassing the rand to another variable to use it. That is not necessary. Why:
Code:
(assign, ":rand", "random_in_range_1_10"),
?

5) Troop inventory starts counting from the gear (weapons, armor, horse, food) and then moves to the backpack/chest/whetever you want to call it. See the constants on header_items.py
Code:
#equipment slots
ek_item_0 = 0
ek_item_1 = 1
ek_item_2 = 2
ek_item_3 = 3
ek_head   = 4
ek_body   = 5
ek_foot   = 6
ek_gloves = 7
ek_horse  = 8
ek_food   = 9


max_inventory_items = 96
num_equipment_kinds = ek_food + 1
ek_item_0 is the first weapon (top right), and so on...

A agent follows the same system for the gear. And you have operations to remove/add items to a agent (just as you do to a troop). The important part here is that the agent is temporary, so you won't affect the savegame.

Download Lav's module and check section Z22. Remember you need to remove a item (if it is there) before giving a new one.

6) Your time test won't work. Check this operation:
Code:
is_between                 = 33      # (is_between, <value>, <lower_bound>, <upper_bound>),
                                     # Checks that lower_bound <= value < upper_bound
or
Code:
is_currently_night         = 2273  # (is_currently_night),
                                   # Checks that it's currently night in the game on worldmap
 
Status
Not open for further replies.
Back
Top Bottom