Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
(assign, ":lb", [first party]),
(assign, ":ub", [last party]),
(try_for_range, ":iteration", ":lb", ":ub"),
(is_between, ":iteration", ":lb", ":ub"), # to coax the MS into accepting the code
(store_random_in_range, ":center_smaller_than_town", ":lb", ":ub",
(this_or_next|party_slot_eq, ":center_smaller_than_town", slot_party_type, spt_village),
(party_slot_eq, ":center_smaller_than_town", slot_party_type, spt_castle),
[do your stuff]
(assign,  ":ub", ":lb"), # to break the loop when you're finished
(try_end),
 
Thank you. That code really helps.

Just a quick question:
Theoretically, it would be possible, that the random fief is never spt_castle or spt_village. Would it not make more sense to use different lower and upper bounds for the try_for_range and random_store_in_range in order to get more tries to reduce the risk of the code not returning a valid fief?

(assign, ":lb", 0),
(assign, ":ub", 10000),
(try_for_range, ":iteration", ":lb", ":ub"),
(is_between, ":iteration", ":lb", ":ub"), # to coax the MS into accepting the code
(store_random_in_range, ":center_smaller_than_town", [first party], [last party]),
(this_or_next|party_slot_eq, ":center_smaller_than_town", slot_party_type, spt_village),
(party_slot_eq, ":center_smaller_than_town", slot_party_type, spt_castle),
[do your stuff]
(assign,  ":ub", ":lb"), # to break the loop when you're finished
(try_end),
 
Can be done. Or if you want to be precise, you can also write a recursive script like this to call in the appropriate block:
("get_random_settlement_smaller_than_town",
[
(store_random_in_range, ":center_smaller_than_town", [first party], [last party]),
(try_begin),
(this_or_next|party_slot_eq, ":center_smaller_than_town", slot_party_type, spt_village),
(party_slot_eq, ":center_smaller_than_town", slot_party_type, spt_castle),
(assign, reg1, ":center_smaller_than_town"),
(else_try),
(call_script, "script_get_random_settlement_smaller_than_town"),
(try_end),
]),
 
Masterancza said:
Can I change the ammo for one item? For example- one pistol in game will be use bolts as ammo. Is It possible?
In short, no.
A longer answer would be "not really". In practice, you can make a crossbow which looks like a pistol, and which probably acts like a pistol. But it won't really be a pistol.
 
Hi guys, a question:
Is it possible to reduce the speed of a map icons's movement. I don't mean the travelling speed, but the speed of how they move their legs. Some of my new map icons are going normally, but in some others the feet are going like they're running for 100M sprint. Again, the map travelling speed is perfectly fine, it's the animation that has the issue. Thanks!
 
Can slots overflow and lose information?

At the top of ("game_start"[, I've added a part, which assigns spt_village to villages, spt_castle to castles and spt_town to towns:
(try_for_range, ":village", "p_village_1", "p_salt_mine"),
(party_set_slot, ":village", slot_party_type, spt_village),
(try_end),
(try_for_range, ":castle", "p_castle_1", "p_village_1"),
(party_set_slot, ":castle", slot_party_type, spt_castle),
(try_end),
(try_for_range, ":town", "p_town_1", "p_castle_1"),
(party_set_slot, ":town", slot_party_type, spt_town),
(try_end),

However, some villages, such as village_43&village_87, get assigned as towns  :shock:.
When I added extra lines to specifically set those villages as spt_village, some other villages would get assigned as towns.

The spoiler part is the only line in the whole ms, which uses (party_set_slot, "...", slot_party_type, spt_town).
 
Antonis said:
Hi guys, a question:
Is it possible to reduce the speed of a map icons's movement. I don't mean the travelling speed, but the speed of how they move their legs. Some of my new map icons are going normally, but in some others the feet are going like they're running for 100M sprint. Again, the map travelling speed is perfectly fine, it's the animation that has the issue. Thanks!
Check the frame timing?
Fire_and_Blood said:
Can slots overflow and lose information?
Why did you get rid of the Native party type assignment? Are all those villages in the village range proper?
 
Somebody said:
Why did you get rid of the Native party type assignment? Are all those villages in the village range proper?

Mostly because it's static. If town_2 get's converted to a village, it would still lie within the constants "towns_begin, towns_end", which wouldn't make any sense, since it's not supposed to be a town anymore. The only other way would be to shift all towns when one of them get's disabled, so town_2 moves to town_3, town_3 moves to town_4 and then define towns_end with a global variable, but that's ridiculous to code.

The village range should be fine, I haven't touched towns, castles or villages, so it's still:
town_1
...
town_22
castle_1
...
castle_48
village_1
...
village_110
salt_mine
 
Strange that all slots are correctly assigned other than some villages (the last center type handled first) turning into towns (the first center type handled last). Maybe including some troops above/below the centers to give them two additional dummy party "types" can do the trick.
 
Fire_and_Blood said:
Mostly because it's static. If town_2 get's converted to a village, it would still lie within the constants "towns_begin, towns_end", which wouldn't make any sense, since it's not supposed to be a town anymore. The only other way would be to shift all towns when one of them get's disabled, so town_2 moves to town_3, town_3 moves to town_4 and then define towns_end with a global variable, but that's ridiculous to code.
Or just replace all instances of range-checking in the module code with checking for slots. This will require lots of changes, but may prove it's worth in the long run.
 
Lav said:
Or just replace all instances of range-checking in the module code with checking for slots. This will require lots of changes, but may prove it's worth in the long run.

That's what I've done and what's causing this issue. And yes, it's lot's of changes  :cry:

Adding dummy parties below the last town and below the last castle didn't change anything.

I've also tried running a slightly delayed trigger, which reassigns slot_party_type,spt_village to all villages. Right after that trigger fires, all villages are actually villages. But a few days later, some of them are counting as towns again.

I was gonna make a small mod and name it "Dynamic World", but the code to upgrade villages to towns isn't even implemented yet. o_O
 
Adding dummy parties below the last town and below the last castle didn't change anything.
Sorry, I meant you could add some placeholder parties above towns with a dummy party type value (say, -2) and likewise, below villages with another dummy type (-1). Start from the latter and finish with the former placeholders when setting slots.

PS. or why not just write three new templates representing towns, castles and villages to add to parties like a slot?
 
How do I set an interactive item, and where do I put the code afterwards with what happens when the item is interacted with?
 
The Dark Robin said:
How do I set an interactive item, and where do I put the code afterwards with what happens when the item is interacted with?
Do you want to do this in single-player or in multi-player?

Assuming you want to have it in a scene, you place it as a scene-prop. The events are called when interacting with the scene-prop. In the block of ti_on_scene_prop_use you can add the item in question to the player's inventory.

Code:
 ("your_scene_prop",spr_use_time(2),"obj_of_the_prop","bo_obj_of_the_prop", [

   (ti_on_init_scene_prop,
    [
      (store_trigger_param_1, ":instance_no"),
      ...
    ]),
     
   (ti_on_scene_prop_use,
    [
      (store_trigger_param_1, ":instance_no"),
      ...
    ]),    

  ]), 

And do not forget to change this in your module.ini: can_use_scene_props_in_single_player = 1
 
Its multiplayer, and thank you I will try that as a start. :smile:

Is instance_no the player that uses it?
 
Code:
ti_on_scene_prop_use     = -44.0 #can only be used in module_scene_props triggers
# Trigger Param 1: user agent id
# Trigger Param 2: prop instance number



Does anyone know what does this error means?
Code:
Starting new log file.
 Version:  1.158 
 
 Processing Ini File {
 Module_name =  Calradia 
 Num Hints =  12 
 Setting Map Min X =  -180.000000 
 Setting Map Max X =  180.000000 
 Setting Map Min Y =  -145.000000 
 Setting Map Max Y =  145.000000 
 Setting Time Multiplier =  0.250000 
 Setting Seeing Range Multiplier =  6.500000 
 Setting Track Spotting Multiplier =  0.800000 
 Setting player_wounded_treshold =  5.000000 
 Setting hero_wounded_treshold =  15.000000 
 Setting Skill Prisoner Management Bonus =  5 
 Setting Skill Leadership Bonus =  3 
 Setting Base Companion Limit =  20 
 Setting player_xp_multiplier =  2.000000 
 Setting hero_xp_multiplier =  2.000000 
 Setting regulars_xp_multiplier =  3.000000 
 Setting damage_interrupt_attack_treshold =  3.000000 
 Setting damage_interrupt_attack_treshold_mp =  1.000000 
 Setting armor_soak_factor_against_cut =  0.800000 
 Setting armor_soak_factor_against_pierce =  0.650000 
 Setting armor_soak_factor_against_blunt =  0.500000 
 Setting armor_reduction_factor_against_cut =  1.000000 
 Setting armor_reduction_factor_against_pierce =  0.500000 
 Setting armor_reduction_factor_against_blunt =  0.750000 
 Setting horse_charge_damage_multiplier =  1.000000 
 Setting couched_lance_damage_multiplier =  0.650000 
 Setting fall_damage_multiplier =  1.000000 
 Setting shield_penetration_offset =  30.000000 
 Setting shield_penetration_factor =  3.000000 
 Setting missile_damage_speed_power =  1.900000 
 Setting melee_damage_speed_power =  2.000000 
 Setting multiplayer_walk_enabled =  0 
 Setting mission_object_prune_time =  180 
 Scan Module Textures =  1 
 Scan Module Sounds =  0 
 Loading Resource  test 
 Loading Resource  textures_face_gen 
 Loading Resource  shaders 
 Loading Resource  textures 
 Loading Resource  materials 
 Loading Resource  materials_face_gen 
 Loading Resource  uimeshes 
 Loading Resource  meshes_face_gen 
 Loading Resource  helpers 
 Loading Resource  map_tree_meshes 
 Loading Resource  map_icon_meshes 
 Loading Resource  particle_meshes 
 Loading Resource  skeletons 
 Loading Resource  tree_meshes 
 Loading Resource  xtree_meshes 
 Loading Resource  grass_meshes 
 Loading Resource  plant_meshes 
 Loading Resource  body_meshes 
 Loading Resource  object_meshes 
 Loading Resource  object_bodies 
 Loading Resource  goods_meshes 
 Loading Resource  item_meshes1 
 Loading Resource  horse_a 
 Loading Resource  arabian_horses 
 Loading Resource  arabian_castle 
 Loading Resource  food 
 Loading Resource  beards 
 Loading Resource  armors_b 
 Loading Resource  armors_c 
 Loading Resource  armors_d 
 Loading Resource  armors_e 
 Loading Resource  armors_f 
 Loading Resource  armors_g 
 Loading Resource  armors_h 
 Loading Resource  armors_i 
 Loading Resource  boots_b 
 Loading Resource  boots_c 
 Loading Resource  helmets 
 Loading Resource  helmets_b 
 Loading Resource  village_houses 
 Loading Resource  village_houses_a 
 Loading Resource  village_houses_b 
 Loading Resource  hair 
 Loading Resource  deneme 
 Loading Resource  interiors_a 
 Loading Resource  interiors_b 
 Loading Resource  interiors_c 
 Loading Resource  arena 
 Loading Resource  map_icons_b 
 Loading Resource  castle_a 
 Loading Resource  dungeon 
 Loading Resource  stone_houses 
 Loading Resource  snowy_houses 
 Loading Resource  snowy_castle 
 Loading Resource  helmets_d 
 Loading Resource  helmets_e 
 Loading Resource  helmets_f 
 Loading Resource  castle_b 
 Loading Resource  square_keep 
 Loading Resource  anim_b 
 Loading Resource  shields 
 Loading Resource  shields_b 
 Loading Resource  weapon_meshes_c 
 Loading Resource  xtree_meshes_b 
 Loading Resource  map_icons_c 
 Loading Resource  pictures 
 Loading Resource  user_interface_b 
 Loading Resource  user_interface_c 
 Loading Resource  scene_encounter_spot 
 Loading Resource  interior_thirsty_lion 
 Loading Resource  scene_small_tavern 
 Loading Resource  weapon_meshes1 
 Loading Resource  weapon_meshes_b 
 Loading Resource  houses1 
 Loading Resource  wall_meshes1 
 Loading Resource  town_houses 
 Loading Resource  doors 
 Loading Resource  churches 
 Loading Resource  town_houses_b 
 Loading Resource  castle_c 
 Loading Resource  castle_d 
 Loading Resource  castle_e 
 Loading Resource  castle_f 
 Loading Resource  castle_g 
 Loading Resource  castle_h 
 Loading Resource  castle_i 
 Loading Resource  gatehouse 
 Loading Resource  viking_houses 
 Loading Resource  fake_houses 
 Loading Resource  town_houses_c 
 Loading Resource  banners 
 Loading Resource  map_flags 
 Loading Resource  map_flags_b 
 Loading Resource  map_flags_c 
 Loading Resource  map_flags_d 
 Loading Resource  particles_2 
 Loading Resource  prisons 
 Loading Resource  prisons_b 
 Loading Resource  interiors_d 
 Loading Resource  costumes_b 
 Loading Resource  costumes_c 
 Loading Resource  arena_costumes 
 Loading Resource  boots_a 
 Loading Resource  terrain_borders 
 Loading Resource  terrain_borders_b 
 Loading Resource  skyboxes 
 Loading Resource  object_b 
 Loading Resource  tree_e_meshes 
 Loading Resource  destroy 
 Loading Resource  xtree_meshes_c 
 Loading Resource  grass_meshes_b 
 Loading Resource  interiors_steppe 
 Loading Resource  grooming_horse 
 Loading Resource  town_houses_d 
 Loading Resource  horses_b 
 Loading Resource  ani_horse_mounted 
 Loading Resource  deneme2 
 Loading Resource  horse_skeleton 
 Loading Resource  steppe_fake_houses 
 Loading Resource  weapon_meshes_d 
 Loading Resource  tableau_shields 
 Loading Resource  heraldic_armors 
 Loading Resource  spear 
 Loading Resource  weapons_e 
 Loading Resource  weapons_f 
 Loading Resource  instruments 
 Loading Resource  sarranid_armors 
 Loading Resource  custom_banner 
 Loading Resource  simple_primitives 
 Loading Resource  ani_man_walk 
 Loading Resource  ani_twohanded 
 Loading Resource  ani_onehanded 
 Loading Resource  ani_death 
 Loading Resource  ani_stand_guardsman 
 Loading Resource  ani_human_mounted 
 Loading Resource  ani_lady_stand 
 Loading Resource  ani_poses 
 Loading Resource  ani_stand_shopkeeper 
 Loading Resource  ani_man_cheer 
 Loading Resource  ani_stand_onhorse 
 Loading Resource  ani_throw_stone 
 Loading Resource  ani_strikes 
 Loading Resource  ani_equip_arms 
 Loading Resource  ani_run_p 
 Loading Resource  ani_run_forward_left_right 
 Loading Resource  uni_strikes3 
 Loading Resource  ani_walk_sideways 
 Loading Resource  ani_run_sideways 
 Loading Resource  ani_stand 
 Loading Resource  ani_crouch_down 
 Loading Resource  ani_low_walk 
 Loading Resource  ani_turn_man 
 Loading Resource  ani_attacks_single 
 Loading Resource  ani_lancer 
 Loading Resource  ani_attacks 
 Loading Resource  ani_kicks 
 Loading Resource  ani_parry_attack 
 Loading Resource  ani_walk_backward 
 Loading Resource  ani_run_lookingsides 
 Loading Resource  ani_defends 
 Loading Resource  ani_walk_lookingsides 
 Loading Resource  ani_jump 
 Loading Resource  ani_wedding 
 Loading Resource  arabian_props 
 Loading Resource  uni_jump 
 Loading Resource  uni_stances 
 Loading Resource  uni_equip 
 Loading Resource  uni_strike 
 Loading Resource  uni_throws 
 Loading Resource  uni_fistswing 
 Loading Resource  uni_lord_stand 
 Loading Resource  uni_defence 
 Loading Resource  uni_sideways 
 Loading Resource  dart 
 Loading Resource  armors_new_a 
 Loading Resource  armors_new_b 
 Loading Resource  armors_new_heraldic 
 Loading Resource  armors_new_arena 
 Loading Resource  crossbows 
 Loading Resource  arabian_armors 
 Loading Resource  rock 
 Loading Resource  costumes_d 
 Loading Resource  nordic_helmets 
 Loading Resource  sarranid_helmets 
 Loading Resource  sarranid_armor 
 Loading Resource  raw_materials 
 Loading Resource  khergit_lady_dress 
 Loading Resource  vaegir_helmets 
 Loading Resource  gauntlets_new 
 Loading Resource  sarranid_lady_dress 
 Loading Resource  sarranid_boots 
 Loading Resource  bride_dress 
 Loading Resource  full_plate_armor 
 Loading Resource  weapon_meshes_e 
 Loading Resource  fur_armors_a 
 Loading Resource  ui_server_filter 
 Loading Resource  warhorse_new 
 Loading Resource  ship 
 Loading Resource  arabian_houses 
 Loading Resource  object_c 
 Loading Resource  tree_f 
 Loading Resource  interiors_arabian 
 Loading Resource  arabian_village 
 Loading Resource  valleyProps 
 Loading Resource  workshops 
 Loading Resource  barrier_primitives 
 Loading Resource  town_houses_e 
 Loading Resource  wb_mp_objects_a 
 
} //Processing Ini File Finished
 WARNING: UNABLE TO MAP SOUND CODE:  snd_release_crossbow_medium 
 WARNING: UNABLE TO MAP SOUND CODE:  snd_release_crossbow_far 
 WARNING: UNABLE TO MAP SOUND CODE:  snd_bullet_hit_body 
 WARNING: UNABLE TO MAP SOUND CODE:  snd_player_hit_by_bullet 
 WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_check_party_sees_party 
 WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_get_party_speed_multiplier 
 WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_missile_launch 
 WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_missile_dives_into_water 
 Loading Module...
 Loading item kinds...
 Loading dialogs...
 Loading mission templates...
 Loading party templates...
 Exiting physics manager...  OK!
 Exiting network manager...  OK!
 Deleting resources...  Exiting physics manager...  OK!
whevener the dedicated server finished initializing it crashes and the rlg_log is just that. Normal native is working fine

And now it's working fine for no reason... wtf
 
Is the position of bridges in module_parties hardcoded?

There doesn't seem to be a constant which defines their position in module_parties, but when I move them further up, they don't show up ingame anymore.
 
When i opened the battle map,this opcode error is coming :S

Vy7qNr.jpg

i wanna to give code of battle presentation.But its too long.passing the character limit..

Im opening the game with WSE.
 
Status
Not open for further replies.
Back
Top Bottom