Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Fire_and_Blood said:
In 5th line, add a "," after "close_window"

err,now,this is coming;

JEbvzo.png

code;
Code:
[trp_wagon_master,"start", [],
    "What can I do for you, chief?", "wagon_train_talk",[]],

  [anyone|plyr,"wagon_train_talk", [], "You follow my lead and try to stay out of trouble.", "wagon_train_follow_lead",[]],
  [anyone,"wagon_train_follow_lead", [], "Alright. We'll be right behind you.", "close_window",[(party_set_ai_behavior, "$g_encountered_party", ai_bhvr_escort_party),
                                                                                                    (party_set_ai_object,"$g_encountered_party", "p_main_party"),
                                                                                                    (assign, "$g_leave_encounter", 1)]],
  
  [anyone|plyr,"wagon_train_talk", [], "You stay here. I'll be back in a while.", "wagon_train_stay_here",[]],
  [anyone,"wagon_train_stay_here", [], "Alright. We'll be waiting here for you.", "close_window",[(party_set_ai_behavior, "$g_encountered_party", ai_bhvr_hold),
                                                                                                     (assign, "$g_leave_encounter", 1)]],
        
 [anyone|plyr,"wagon_train_talk", [], "Let's check the inventory.", "start",[(change_screen_loot, "trp_wagon_possessions"),]],
  
  [anyone|plyr,"wagon_train_talk", [], "Let's check the troop assignments.", "start",[(change_screen_exchange_members, "$g_talk_troop_party"),]],

    [anyone|plyr, "wagon_train_talk", [],  "[Disband the wagon]", "close_window",
   [(disable_party, "p_wagon_train"), (assign, "$wagon_active", 0), # To allow for creation of another one
   ]],

    [anyone,"wagon_train_disband1", [(party_get_num_companions,":num_troops","$g_encountered_party"),(gt,":num_troops",1)],
                                     "Are you sure? I still have troops.", "wagon_train_disband2",[]],

  [anyone,"wagon_train_disband1", [(party_get_num_companions,":num_troops","$g_encountered_party"),(eq,":num_troops",1)],
                                     "All right.  I'll see you around.", "close_window",[(party_clear,"p_wagon_train"),
                                                                                                        (party_add_members,"p_wagon_train","trp_wagon_master",1),
                                                                                                        (disable_party, "p_wagon_train"),
                                                                                                       (assign, "$wagon_active", 0), # To allow for creation of another one
                                                                                                        ]],

  [anyone|plyr, "wagon_train_disband2", [],  "Yes, I want to disband the wagon train.", "close_window", [(party_clear,"p_wagon_train"),
                                                                                                        (party_add_members,"p_wagon_train","trp_wagon_master",1),
                                                                                                        (disable_party, "p_wagon_train"),
                                                                                                       (assign, "$wagon_active", 0), # To allow for creation of another one
                                                                                                        ]],

  [anyone|plyr, "wagon_train_disband2", [],  "Wait. I want to look at the troops.", "start", [(change_screen_exchange_members, "$g_talk_troop_party"),]],

should i add as a troop ?
 
In terms of painting the terrain yes, but for making the map geometry and moving around parties, Swyter's cartographer(with Blender for sculpting) is your friend.
 
I have a grenade, how when it collided with the ground it will go away, my grenades work as Light_Throwing_Axes items I've added a few lines of code, as mentioned how it disappears when collisions with ground

thank for anyone help me :V  :mrgreen: :mrgreen:
sorry my english bad
 
Please, do you have an idea for a better lighting for my toch ?
It work at one meter max  :roll:

It's not my codes, but i've made the toch is based on a shield (left hand + weapon).
["torch", "Torche", [("new_torch",0)], itp_type_shield|itp_wooden_parry, 0,  11 , weight(0.5)|hit_points(9999)|body_armor(1)|spd_rtng(1)|weapon_length(1),imodbits_none, [(ti_on_init_item, [(set_position_delta,43,32,5),(particle_system_add_new, "psys_torch_fire"),(particle_system_add_new, "psys_torch_smoke"),(set_current_color,150, 130, 70),(add_point_light, 10, 30),])]],

More color ? like 350,230,170 ?
Or more big or more intense ? add_point_light, 10, 30 ?

GKVgM.jpg

Thank you.

You can take my codes...
 
Well, I think that this: (set_current_color,150, 130, 70) is just the color of the light that emitts from the torch, I cannot see how you can have more light if it was another color(say, deep red or deep yellow). Increasing the radius(add_point_light, 10, 30),) probably will have it shed more light. 
 
Antonis said:
Well, I think that this: (set_current_color,150, 130, 70) is just the color of the light that emitts from the torch, I cannot see how you can have more light if it was another color(say, deep red or deep yellow). Increasing the radius(add_point_light, 10, 30),) probably will have it shed more light.

Thanks, i was work on the red part  :smile:
It is possible to add a "light_red" scene prop at the torch ?  :roll:

I cant see the "light" scene prop codes, it is hardcoded ?

Nevermind, i'm stupid  :oops:

  ("light_red",sokf_invisible,"light_sphere","0",  [
    (ti_on_init_scene_prop,
      [
          (store_trigger_param_1, ":prop_instance_no"),
          (set_fixed_point_multiplier, 100),
          (prop_instance_get_scale, pos5, ":prop_instance_no"),
          (position_get_scale_x, ":scale", pos5),
          (store_mul, ":red", 2 * 170, ":scale"),
          (store_mul, ":green", 2 * 100, ":scale"),
          (store_mul, ":blue", 2 * 30, ":scale"),
          (val_div, ":red", 100),
          (val_div, ":green", 100),
          (val_div, ":blue", 100),
          (set_current_color,":red", ":green", ":blue"),
          (set_position_delta,0,0,0),
          (add_point_light_to_entity, 20, 30),
      ]),
    ]),

Edit: wow  :shock: i think it's possible to make : a weapon at Lhand, and a weapon at the Rhand !

By every mission template, (if item equiped= weapon left hand) /right click = play anim (left hand attack), agent deliver damages to agent at a specific distance...and a "left hand weapon" based on a shield  :razz:
 
The only entry for the "light_red" in scene_props.py is this:

Code:
  ("light_red",sokf_invisible,"light_sphere","0",  [
     (ti_on_init_scene_prop,
      [
          (store_trigger_param_1, ":prop_instance_no"),
          (set_fixed_point_multiplier, 100),
          (prop_instance_get_scale, pos5, ":prop_instance_no"),
          (position_get_scale_x, ":scale", pos5),
          (store_mul, ":red", 2 * 170, ":scale"),
          (store_mul, ":green", 2 * 100, ":scale"),
          (store_mul, ":blue", 2 * 30, ":scale"),
          (val_div, ":red", 100),
          (val_div, ":green", 100),
          (val_div, ":blue", 100),
          (set_current_color,":red", ":green", ":blue"),
          (set_position_delta,0,0,0),
          (add_point_light_to_entity, 20, 30),

I don't know if it helps, though.

EDIT:
spr_light_red 16384 0 light_sphere 0 1
-40.000000  13 2071 1 1224979098644774912 2124 1 100 1852 2 5 1224979098644774912 735 2 1224979098644774913 5 2122 3 1224979098644774914 340 1224979098644774913 2122 3 1224979098644774915 200 1224979098644774913 2122 3 1224979098644774916 60 1224979098644774913 2108 2 1224979098644774914 100 2108 2 1224979098644774915 100 2108 2 1224979098644774916 100 1950 3 1224979098644774914 1224979098644774915 1224979098644774916 1955 3 0 0 0 1961 2 20 30
is the entry from the .txt file, if it helps
 
Apologies if this is more of a "how do" than a question, but, is it possible to change the "Deaths" column in multiplayer to accumulate a score instead? My intention is to have a score column that replaces deaths and lists the number equivalent to the damage dealt by a player to enemies minus team damage and loss of HP.
 
Why is this code not working?
Code:
 ("cf_genocide_fight", # genocide dark robin
    [
	  (try_for_range,":troop","trp_farmer","trp_troops_end"),
	    (troop_get_type, ":race", ":troop"),
		(this_or_next|eq, ":race", 2),
		(eq, ":race", 3),
		(main_party_has_troop, ":troop"),
		(try_begin),
			(troop_is_hero, ":troop"),
			(remove_member_from_party, ":troop", "p_main_party"),
		(else_try),
			(party_remove_members, "p_main_party",":troop",9000),
		(try_end),
	  (try_end),
		  
		  (party_add_template, "p_elf_natives", "pt_native_elves"),
		  (assign, "$g_encountered_party_2", "p_elf_natives"),
              (assign,"$g_enemy_party","$g_encountered_party_2"),
              (assign,"$g_ally_party","$g_encountered_party"),
          (store_random_in_range, ":enmity", -100, -75),
          (call_script, "script_change_player_relation_with_center", "$current_town", ":enmity"),
          (call_script, "script_calculate_battle_advantage"),
          (set_battle_advantage, reg0),
          (set_party_battle_mode),
          (assign, "$g_battle_result", 0),
          (assign, "$genocide_attack_evil", 1),
		  (assign, "$genocide", 1),
          (set_jump_mission,"mt_genocide"),
          (party_get_slot, ":scene_to_use", "$current_town", slot_town_center),
          (jump_to_scene, ":scene_to_use"),
          (assign, "$g_next_menu", "mnu_village_start_attack"),

		  (call_script, "script_change_player_honor", -20),
		(call_script, "script_faction_follows_controversial_policy", "fac_player_supporters_faction",logent_policy_ruler_attacks_without_provocation),
          (call_script, "script_objectionable_action", tmt_humanitarian, "str_genocide"),
(display_message, "@You and your men begin the slaughter.", color_hero_news),
          (jump_to_menu, "mnu_battle_debrief"),
          (change_screen_mission),
      ]),
I am trying to make it so the encountered party (the player owned town) will join the player's team, and they will both be fighting the artificially generated "elf natives" template, but it just ends up with the player's party fighting his own garrison. :???: Everything else works though.
 
You are literally doing nothing for the teams that will be fight. Do a check by getting the teams of the agents that eill be fighting and set their relation to -1 after setting them alarmed.
 
I have a gunshot wound psys, I want my psys will stick to the collision( ti_on_missile_hit) , it's like blood to stick to the body being hit,
can do it?
sorry my english bad  :mrgreen: :mrgreen:
 
Hey, guys, does anyone know how to change the currency from denars to sth else? I don't mean just in dialogs(that's the easy part), but to make the game read, for example "drachmas" where it read "denars".
 
Antonis said:
Hey, guys, does anyone know how to change the currency from denars to sth else? I don't mean just in dialogs(that's the easy part), but to make the game read, for example "drachmas" where it read "denars".

This?

Code:
  ("1_denar", "1 denar"),
  ("reg1_denars", "{reg1} denars"),
 
Antonis said:
Hey, guys, does anyone know how to change the currency from denars to sth else? I don't mean just in dialogs(that's the easy part), but to make the game read, for example "drachmas" where it read "denars".

Code:
#script_game_get_money_text:
  # This script is called from the game engine when an amount of money needs to be displayed.
  # INPUT: arg1 = amount in units
  # OUTPUT: result string = money in text
  ("game_get_money_text",
    [
      (store_script_param_1, ":amount"),
      (try_begin),
        (eq, ":amount", 1),
        (str_store_string, s1, "str_1_denar"),
      (else_try),
        (assign, reg1, ":amount"),
        (str_store_string, s1, "str_reg1_denars"),
      (try_end),
      (set_result_string, s1),
  ]),
 
So, what does that change, only dialogs:
Code:
  ("1_denar", "1 denar"),
  ("reg1_denars", "{reg1} denars"),

Thanks, btw.
EDIT
Oh, wait, I'm an idiot, okay, thanks! :smile:
 
HungKnight said:
I have a gunshot wound psys, I want my psys will stick to the collision( ti_on_missile_hit) , it's like blood to stick to the body being hit,
can do it?
sorry my english bad  :mrgreen: :mrgreen:
(ti_on_agent_hit, 0, 0,
[
(store_trigger_param, ":agent", 1),
(store_trigger_param, ":attacker", 2),
(store_trigger_param, ":damage", 3),
        (eq, reg0, "itm_cartridge"),
        (set_spawn_position, pos0),
        (spawn_scene_prop, [make a new scene prop the shape of a wound to enter its ID here]),
        (agent_set_attached_scene_prop, ":agent", [the same prop]),
#############################################################
        (set_trigger_result, ":damage"),
#############################################################
],[]),
 
Does anyone know, why this code breaks the fiefs name link? The displayed message shows the fiefs name in black, in all other cases, where I've used str_store_party_name_link, it's possible to click on the fiefs name and it will forward to it's page, but for some reason not here.

################# Downgrade trigger begin :to initiate downgrade of centers, if raided too frequently
(24,
[
(try_for_range, ":center_no", centers_begin, centers_end),
(str_store_party_name_link, s1, ":center_no"),
(assign, "$g_center_no", ":center_no"),
(store_current_hours, ":cur_hours"),
(try_begin),
(party_slot_eq, ":center_no", slot_party_type, spt_town),
(party_get_slot, ":times_attacked", ":center_no", slot_center_times_attacked),
(ge, ":times_attacked", 10),
(party_set_slot, ":center_no", slot_party_type, spt_village),
(party_set_slot, ":center_no", slot_center_times_attacked, 0),  #reset times_attacked, so it doesn't keep downgrading over and over
(party_set_slot, ":center_no", dplmc_slot_center_last_attacked_time, ":cur_hours"),
(party_set_icon, ":center_no", "icon_village_a"),
##### add more stuff here to make it real village
(call_script, "script_set_scenes"),
(display_message, "@ The war and frequent attacks have taken it's toll on {s1}. It has downgraded to a village"),
(else_try),
(party_slot_eq, ":center_no", slot_party_type, spt_village),
(party_get_slot, ":times_attacked", ":center_no", slot_center_times_attacked),
(ge, ":times_attacked", 2),
(party_set_slot, ":center_no", slot_party_type, spt_hamlet),
(party_set_slot, ":center_no", slot_center_times_attacked, 0),  #reset times_attacked, so it doesn't keep downgrading over and over
(party_set_slot, ":center_no", dplmc_slot_center_last_attacked_time, ":cur_hours"),
(call_script, "script_set_scenes"),
(display_message, "@ The war and frequent raidings have taken it's toll on {s1}. It has downgraded to a hamlet"),
(else_try),
 
Does somebody know why my items are not showing up in this chest? The food items are there, but not the weapon.

Code:
  ["chest_enticing_damsel", "Enticing Damsel Storage", "Enticing Damsel Storage", tf_hero|tf_is_merchant, 0,reserved,  fac_neutral,[itm_smoked_fish, itm_cheese, itm_hand_axe], def_attrib|level(2),wp(20),knows_common|knows_inventory_management_2, 0x00000000000c218501ef4f5d2ccb0026],

_4aJN.jpg


 
Status
Not open for further replies.
Back
Top Bottom