Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
JollySam said:
Can someone post the script lines for enabling the 'Talk with the Guild Master' and 'Talk with the Head Villager' options on the town and village screen? I'd like to add those to my game.

Thanks alot,
JollySam
You can find it in module_game_menus either in the open source of Custom Commander or Diplomacy.
 
What could be the reason why I have blue fog when I use the correct code for black? I call it in "ti_after_mission_start" and for grey fog it seems to work fine. Also, When I change the fog while the mission is running, it is always yellow, even if I use the code for grey I use in "ti_after_mission_start" too, where it works. What coud be the reason for that?
 
Patta said:
What could be the reason why I have blue fog when I use the correct code for black? I call it in "ti_after_mission_start" and for grey fog it seems to work fine. Also, When I change the fog while the mission is running, it is always yellow, even if I use the code for grey I use in "ti_after_mission_start" too, where it works. What coud be the reason for that?

Is is the same problem with this?
 
Does anyone have any ideas how I could make a sceneprop that spawns a weapon every 30-45 seconds? I was hoping to use it in WW3, to make it more FPS like (well, somewhat), but I haven't been able to figure out how the heck to do it.
My way around was a mission template trigger that spawned the sceneprop every 30-60 seconds (which means storing a ton of variables and positions), or spawning the prop, spawning a weapon or item on the spawn of the prop, then moving the prop underground and spawning another, which means about 100,000 weapons in 10 seconds, and a crash. Any ideas?
 
(30,0,0,[][get_num_prop_instances try_for_range scene_prop_get_instance instance_get_position position_move_x set_spawn_position spawn_item]),
or sth like that
 
Thanks. :smile:

Also, I need some help with this...
Code:
("swy_explosion_1", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "swy_explosion_1",
     100, 0.1, 0.6, -0.0, 10.0, 0.2,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0, 1), (1, 1),        #alpha keys
     (0, 1), (1, 1),      #red keys
     (0, 1), (1, 1),      #green keys
     (0, 1), (1, 1),      #blue keys
     (0, 0.2),   (1, 1),    #scale keys
     (0, 0, 0),           #emit box size
     (0, 0, 0),              #emit velocity
      10,                        #emit dir randomness
      50,                        #rotation speed
      0.5                         #rotation damping
    ),
("swy_explosion_2", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "swy_explosion_2",
     100, 0.1, 0.6, -0.0, 10.0, 0.2,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0, 1), (1, 1),        #alpha keys
     (0, 1), (1, 1),      #red keys
     (0, 1), (1, 1),      #green keys
     (0, 1), (1, 1),      #blue keys
     (0, 0.2),   (1, 1),    #scale keys
     (0, 0, 0),           #emit box size
     (0, 0, 0),              #emit velocity
      10,                        #emit dir randomness
      50,                        #rotation speed
      0.5                         #rotation damping
    ),
("swy_explosion_3", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "swy_explosion_3",
     100, 0.1, 0.6, -0.0, 10.0, 0.2,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0, 1), (1, 1),        #alpha keys
     (0, 1), (1, 1),      #red keys
     (0, 1), (1, 1),      #green keys
     (0, 1), (1, 1),      #blue keys
     (0, 0.2),   (1, 1),    #scale keys
     (0, 0, 0),           #emit box size
     (0, 0, 0),              #emit velocity
      10,                        #emit dir randomness
      50,                        #rotation speed
      0.5                         #rotation damping
    ),

Code:
["assault_bomb", "M9 HE-DP Grenades", [("assault_bomb",0)], itp_type_thrown |itp_merchandise|itp_primary ,itcf_throw_stone, 500 , weight(4)|difficulty(0)|spd_rtng(85) | shoot_speed(30) | thrust_damage(1 ,  blunt)|max_ammo(3)|weapon_length(8),imodbits_none,
[(ti_on_missile_hit, 
[(play_sound,"snd_pistol_shot"),   
(this_or_next|multiplayer_is_dedicated_server), 
(this_or_next|multiplayer_is_server),
(neg|game_in_multiplayer_mode),    
(store_trigger_param_1,":grenadier"),        
(try_for_agents,":target"),            
(agent_get_position,pos2,":target"),
(get_distance_between_positions,":dist",pos1,pos2),
(try_begin),
(lt,":dist",250),
(store_agent_hit_points,":hp",":target",1),
(store_random_in_range,":dmg",80,120),
(val_sub,":hp",":dmg"),
(agent_set_hit_points,":target",":hp",1),
(agent_deliver_damage_to_agent,":grenadier",":target"),
(try_end),
#(particle_system_burst,"psys_village_fire_big",pos1,50),
(particle_system_burst,"psys_swy_explosion_3",pos1,40),
(particle_system_burst,"psys_swy_explosion_2",pos1,40),
(particle_system_burst,"psys_swy_explosion_1",pos1,40),
(try_end)
])]],

Note, I call the particle system burst in the item, but when I try to use the grenade, no particle effects start. The mesh isn't the issue, and neither is a typo. I ended up trying the same three particle codes with 3-4 other meshes and they do the same thing, so then I copied one of the native particle systems and only changed the mesh name and the ID.
I have 8 other meshes in the BRF that work, everything is in Module INI, I have flags set the same as Native, but it still won't play (oh, I also made a plasma-esque grenade using the same code, but different particles). I get no errors when building, but this is just being a real pain in the butt.
Any ideas what's wrong?

 
I also had a particle system problem with the grenade code similar to yours. I put the particle system burst lines in front of everything and now it works perfect. I do not get the logic but it works. I suppose your problem is not similar to mine however trying is free  :smile:

I arranged as this:
Code:
[(ti_on_missile_hit, 
[
(this_or_next|multiplayer_is_dedicated_server), 
(this_or_next|multiplayer_is_server),
(neg|game_in_multiplayer_mode),    

#particles here#
(particle_system_burst,"psys_swy_explosion_3",pos1,40),
(particle_system_burst,"psys_swy_explosion_2",pos1,40),
(particle_system_burst,"psys_swy_explosion_1",pos1,40),
#end#
(play_sound,"snd_pistol_shot"), #sound does not play at the position, does it?

(store_trigger_param_1,":grenadier"),        
(try_for_agents,":target"),            
#bla bla continues
 
Hey guys could you help me???
I want to make a mod with the module system, but when i go to create the mod wiht the "build_module" happens this:

http://desmond.imageshack.us/Himg5/scaled.php?server=5&filename=image1ef.png&res=medium


pls help me!! thanks
(sorry my english, im brazilian)
 
Does anyone know of any good music mods for Warband? If I have to listen to that 'main menu' track once more, I'll go mad.
 
Thanks man!
I put the module path in the "export_dir" and worked. I had placed before in "#export_dir"....
 
Hey there.

So now i have this code which is working as a different variation of "Meet with Guild Master" which lets you speak with Lord of the town without entering to hall.

      ("meet_with_lord",
      [
          (party_slot_eq,"$current_town",slot_party_type, spt_town),
        ],
        "Meet with the Lord.",
        [
          (try_begin),
            (call_script, "script_cf_enter_center_location_bandit_check"),
          (else_try),
            (party_get_slot, ":conversation_troop", "$current_town", slot_town_lord),
            (call_script, "script_setup_troop_meeting", ":conversation_troop", -1),
          (try_end),
         
          ]),

There is no problem in code, thing is i need to add a check operation so this code only operates when the Lord is in town. Simple yet don't know which operation handles...
 
Ak2k said:
Thanks man!
I put the module path in the "export_dir" and worked. I had placed before in "#export_dir"....
só pra te avisar, tudo que fica depois de um # são só "comentarios", voce pode colocar qualquer coisa atras disso e não vai mudar nada, normalmente isso é usado pra explicar o qq o code faz ou para dar exemplos
 
Belendor Torheal Artendor said:
There is no problem in code, thing is i need to add a check operation so this code only operates when the Lord is in town. Simple yet don't know which operation handles...
There are likely a few ways you can do this. First, I'd check if the slot slot_troop_cur_center is set correctly. That would be a simple one-line test for the troop ID held in slot_town_lord.

Otherwise, get the party ID for the troop held in slot_town_lord by getting the value of slot_troop_leaded party. Then use (party_is_in_town,<party_id_1>,<party_id_2>), and check if the party is attached to the current town.
 
SonKidd said:
Does anyone know how to make manual block the default setting for admin panel?

A bit late but I think you can try adding this line to [font=consolas,fixedsys]script_game_quick_start[/font]:
Code:
(server_set_control_block_dir, 1),

There are other default values there so it should work.
 
I confused completely.
Is there no way to find which armor is worn by an agent other when to scan through all items with agent_has_item_equipped?

UPD:
OMG, i'm blind.
agent_get_item_slot
 
Rongar said:
I confused a bit.
Is there a way to find which armor is worn by an agent other when to scan through all items with agent_has_item_equipped?
Use (agent_get_item_slot, <destination>, <agent_id>, <value>), value between 0-7, order is weapon1, weapon2, weapon3, weapon4, head_armor, body_armor, leg_armor, hand_armor

or, better as an ek_ constant:
#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


Specifically (agent_get_item_slot, ":armor", ":agent", ek_body),
 
Status
Not open for further replies.
Back
Top Bottom