SP Fantasy Tohlobaria (v0.8 is out!)

Users who are viewing this thread

Tohlabria version 0.2 Beta is out  :grin:

Download link : https://www.dropbox.com/s/2tynu9bhhz9lrgh/Tohlobaria_0.2.zip

I'll update the description page tomorrow ...
 
Thanks Alfredthegreat,
almost all  obvious bugs in the previous version have been fixed (I hope )
if you find any others issues,  I'm at your disposal!
 
How do I recruit soldiers??? I have been searching the map in villages, castles, towns, people, wondering bands of people and can't find where to recruit. (in taverns there are the mercenaries) any help?

Also how do you upgrade troops???
 
in villages of course (it takes one or two days before volunteers begin to appear in villages)

Paysan upgrade Tree :

Paysan ---> Militia ---> Footman ---> Light infantry (now go to the nearest town and upgrade/equip your soldier to) ---> Heavy Infantry--->Sergeant (now go to the nearest town and upgrade/equip your soldier to)---> Armoured Sergeant ---> Foot Knight (now go to the nearest town and upgrade/equip your soldier to) ---> Knight
ZEUa4js.jpg
 
progress report

version 0.3 is 50% complete :

- Tournaments (I hope) more fun, more lucrative but harder (or too easy depending on the level of the player)
- A new "imperial" quest.
- introducing  firearms.
- New characters, troops,  scenes and some others minors changes and fixes...
6HE3ihl.jpg


 
fladin said:
Paysan ---> Militia ---> Footman ---> Light infantry (now go to the nearest town and upgrade/equip your soldier to) ---> Heavy Infantry--->Sergeant (now go to the nearest town and upgrade/equip your soldier to)---> Armoured Sergeant ---> Foot Knight (now go to the nearest town and upgrade/equip your soldier to) ---> Knight

This is awesome. How have you done it?
 
It looks like a great feature this code from SOmebody. Is it difficult to add? I'll probably add it to my mod if I can :razz:

Other question...

fladin said:
- More difficult to establish his own kingdom (it's not enough to take a castle and declare independence).

What does this feature means? What do you more need to do to make your kingdom?

Cheers!

PS: I've made a thread on my spanish forum about your mod: http://www.caballerosdecalradia.net/t3458-spen-tohlobaria :wink:
 
not so difficult (as beginner,  it took me a while to understand how it works :???:)
if you want here's my code (not elegant but it works), to add into module_presentations
#----------------upgrade troop in town (academy osp by somebody)----------
("upgrade_troops", 0, mesh_face_gen_window, [
(ti_on_presentation_load,
  [
(presentation_set_duration, 999999),
(set_fixed_point_multiplier, 1000),

## next presentation
(assign, "$g_presentation_next_presentation", -1),
(assign, "$t_troop", -1),
(assign, "$toh_troop_size", -1),

(str_clear, s0),
(create_text_overlay, "$g_presentation_obj_1", s0, tf_scrollable),
(position_set_x, pos1, 510),
(position_set_y, pos1, 100),
(overlay_set_position, "$g_presentation_obj_1", pos1),
(position_set_x, pos1, 400),
(position_set_y, pos1, 600),
(overlay_set_area_size, "$g_presentation_obj_1", pos1),
(set_container_overlay, "$g_presentation_obj_1"),

(assign, ":pos_x", 150),
(party_get_num_companion_stacks, ":num_stacks", "p_main_party"),
(try_begin), #limit stack range to updated stacks
  (val_clamp, "$g_cur_stack", -1, ":num_stacks"),
  (party_stack_get_troop_id, ":troop_no", "p_main_party", "$g_cur_stack"),
  (this_or_next|le, ":troop_no", 0),
  (this_or_next|troop_is_hero, ":troop_no"),
  (neg|is_between, ":troop_no", tohlobarian_heavy_troop_begin, tohlobarian_heavy_troop_end),
  (assign, "$g_cur_stack", -1),
(try_end),
(store_mul, ":pos_y", ":num_stacks", 40),
(val_sub, ":pos_y", 40),
(val_max, ":pos_y", 560),
(try_for_range, ":slot_no", 0, ":num_stacks"),
  (party_stack_get_troop_id, ":troop_no", "p_main_party", ":slot_no"),
  (this_or_next|troop_is_hero, ":troop_no"), #discard results from displaying
  (neg|is_between, ":troop_no", tohlobarian_heavy_troop_begin, tohlobarian_heavy_troop_end),
  (troop_set_slot, "trp_temp_array_a", ":slot_no", -1),
(else_try),
  (party_stack_get_size, ":stack_size", "p_main_party", ":slot_no"),
  (party_stack_get_num_wounded, ":num_wounded", "p_main_party", ":slot_no"),
  (str_store_troop_name, s1, ":troop_no"),
  (assign, reg2, ":stack_size"),
  (str_store_string, s2, "@ "),
  (try_begin),
(is_between, ":troop_no", tohlobarian_heavy_troop_begin, tohlobarian_heavy_troop_end),#<---upgradables troops
(str_store_string, s2, "@ + "),
  (try_end),
  (try_begin),
(gt, ":num_wounded", 0),
(store_sub, reg3, ":stack_size", ":num_wounded"),
(str_store_string, s1, "@{s1} ({reg3}/{reg2} {s2})"),
  (else_try),
(str_store_string, s1, "@{s1} ({reg2}) {s2}"),
  (try_end),
  (create_game_button_overlay, reg1, s1),
  (position_set_x, pos1, ":pos_x"),
  (position_set_y, pos1, ":pos_y"),
  (overlay_set_position, reg1, pos1),
  (position_set_x, pos1, 300),
  (position_set_y, pos1, 32),
  (overlay_set_size, reg1, pos1),
  (troop_set_slot, "trp_temp_array_a", ":slot_no", reg1),
  (val_sub, ":pos_y", 40),
(try_end),
(try_begin),
  (gt, "$g_cur_stack", -1),
  (troop_get_slot, ":dest_obj", "trp_temp_array_a", "$g_cur_stack"),
  (gt, ":dest_obj", 0),
  (overlay_set_alpha, ":dest_obj", 0x80),
  (party_stack_get_troop_id, "$t_troop", "p_main_party", "$g_cur_stack"),
  (neg|troop_is_hero, "$t_troop"),
  (party_stack_get_size, "$toh_troop_size", "p_main_party", "$g_cur_stack"),
  (party_stack_get_num_wounded, ":num_wounded", "p_main_party", "$g_cur_stack"),
  (val_sub, "$toh_troop_size", ":num_wounded"),
  (try_begin),
(gt, "$toh_troop_size", 0),
(store_faction_of_troop, ":color", "$t_troop"),
(faction_get_color, ":color", ":color"),
(overlay_set_color, ":dest_obj", ":color"),
  (else_try), #all wounded - cannot upgrade
(overlay_set_color, ":dest_obj", 0xFF0000),
(overlay_set_alpha, ":dest_obj", 0xFF),
  (try_end),
(try_end),
(set_container_overlay, -1),
(store_troop_gold, "$g_talk_agent", "trp_player"),
(try_begin),
(gt, "$t_troop", 0),
(position_set_x, pos1, 275),
#-----------troops and their upgrades ---------
(assign, ":extra_cost", 0),
(try_begin),
(eq, "$t_troop","trp_light_infantry"),
(assign, ":upgrade_troop", "trp_heavy_infantry"),
(else_try),
(eq, "$t_troop","trp_veteran_archer"),
(assign, ":upgrade_troop", "trp_heavy_archer"),
(else_try),
(eq, "$t_troop","trp_sergeant"),
(assign, ":upgrade_troop", "trp_armoured_sergeant"),
(else_try),
(eq, "$t_troop","trp_light_cavalry"),
(assign, ":upgrade_troop", "trp_heavy_cavalry"),
(assign, ":extra_cost", 100),
(else_try),
(eq, "$t_troop","trp_foot_knight"),
(assign, ":upgrade_troop", "trp_knight"),
(assign, ":extra_cost", 200),
(else_try),
(eq, "$t_troop","trp_elite_cavalry"),
(assign, ":upgrade_troop", "trp_knight"),
(assign, ":extra_cost", 200),
(else_try),
(eq, "$t_troop","trp_veteran_pickman"),
(assign, ":upgrade_troop", "trp_halberdier"),
(assign, ":extra_cost", 50),
(else_try),
(eq, "$t_troop","trp_common_prisoner"),
(assign, ":upgrade_troop", "trp_footman"),
(assign, ":extra_cost", 100),
(else_try),
(eq, "$t_troop","trp_war_prisoner"),
(assign, ":upgrade_troop", "trp_heavy_infantry"),
(assign, ":extra_cost", 150),
(else_try),
(eq, "$t_troop","trp_imprisoned_veteran"),
(assign, ":upgrade_troop", "trp_armoured_sergeant"),
(assign, ":extra_cost", 200),
(else_try),
(faction_slot_eq, "fac_player_supporters_faction", slot_faction_state, sfs_active),
(eq, "$t_troop","trp_imprisoned_nobleman"),
(assign, ":upgrade_troop", "trp_heavy_cavalry"),
(assign, ":extra_cost", 250),
(try_end),
#----------------------------------------------
(gt, ":upgrade_troop", 0),
(str_store_troop_name, s2, ":upgrade_troop"),
(create_button_overlay, "$g_presentation_obj_2", "@Upgrade to {s2}", tf_center_justify),
(call_script, "script_game_get_join_cost", ":upgrade_troop"),
(assign, ":cost", reg0),
(val_add, ":cost",":extra_cost"),
(try_begin),
  (lt, "$g_talk_agent", ":cost"),
  (str_store_string, s1, "@Insufficient funds"),
  (overlay_set_color, "$g_presentation_obj_2", 0xFF1111),
(else_try),
  (call_script, "script_game_get_money_text", ":cost"),
(try_end),
(overlay_set_tooltip, "$g_presentation_obj_2", s1),
 
(position_set_y, pos1, 100),
(overlay_set_position, "$g_presentation_obj_2", pos1),
(try_end),

# cur troop
(try_begin),
  (gt, "$g_cur_stack", -1),
  (party_stack_get_troop_id, ":troop_no", "p_main_party", "$g_cur_stack"),
  (store_mul, ":cur_troop", ":troop_no", 2), #with weapons
  (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_6", -1, "tableau_game_party_window", ":cur_troop"),
  (position_set_x, pos1, 1750),
  (position_set_y, pos1, 1750),
  (overlay_set_size, "$g_presentation_obj_6", pos1),
  (position_set_x, pos1, 50),
  (position_set_y, pos1, 240),
  (overlay_set_position, "$g_presentation_obj_6", pos1),

(else_try), #default, startup
  (create_mesh_overlay, "$g_presentation_obj_6", "mesh_pic_mb_warrior_1"),
  (position_set_x, pos1, -500),
  (position_set_y, pos1, 250),
  (overlay_set_position, "$g_presentation_obj_6", pos1),
  # (overlay_set_display, "$g_presentation_obj_6", 0),
  (display_message, "@Press Shift or Ctrl to upgrade up to 5 or all members"),
(try_end),

#gold overlay (image button so we can click on it)
(position_set_x, pos1, 500),
(position_set_y, pos1, 500),
(create_image_button_overlay, "$g_presentation_obj_10", "mesh_icon_gold", "mesh_icon_gold"),
(overlay_set_size, "$g_presentation_obj_10", pos1),
(position_set_x, pos1, 580),
(position_set_y, pos1, 40),
(overlay_set_position, "$g_presentation_obj_10", pos1),
(overlay_set_tooltip, "$g_presentation_obj_10", "@Click here or press ESC to finish recruiting"),

#gold display
(call_script, "script_game_get_money_text", "$g_talk_agent"),
(create_text_overlay, reg1, "@You have {s1}", tf_with_outline),
(position_set_x, pos1, 690),
(position_set_y, pos1, 60),
(overlay_set_position, reg1, pos1),
(overlay_set_color, reg1, 0xFFFFFF),
# done
# (create_game_button_overlay, "$g_presentation_obj_10", "str_done"),
# (position_set_x, pos1, 900),
# (position_set_y, pos1, 50),
# (overlay_set_position, "$g_presentation_obj_10", pos1),

  ]
),

(ti_on_presentation_event_state_change,
  [
  (store_trigger_param_1, ":eek:bject"),

  (party_get_num_companion_stacks, ":num_stacks", "p_main_party"),
  (try_for_range, ":slot_no", 0, ":num_stacks"),
(troop_slot_eq, "trp_temp_array_a", ":slot_no", ":eek:bject"),
(assign, "$g_cur_stack", ":slot_no"),
(assign, ":num_stacks", -1),
(start_presentation, "prsnt_upgrade_troops"),
  (try_end),

  (try_begin),
(gt, "$g_cur_stack", -1),
(assign, ":quantity", 1),
(try_begin),
  (this_or_next|key_is_down, key_left_shift),
  (key_is_down, key_right_shift),
  (assign, ":quantity", 5),
(else_try),
  (this_or_next|key_is_down, key_left_control),
  (key_is_down, key_right_control),
  (assign, ":quantity", 9999),
(try_end),
(val_min, ":quantity", "$toh_troop_size"),
#(val_min, ":quantity", "$g_talk_troop_relation"),

(try_begin),
  (eq, ":eek:bject", "$g_presentation_obj_2"),
  #(eq, ":eek:bject", "$g_presentation_obj_3"),
  (gt, "$t_troop", 0),
  (try_begin),
(eq, ":eek:bject", "$g_presentation_obj_2"),
#-----------troops and their upgrades ---------
(assign, ":extra_cost", 0),
(try_begin),
(eq, "$t_troop","trp_light_infantry"),
(assign, ":upgrade_troop", "trp_heavy_infantry"),
(else_try),
(eq, "$t_troop","trp_veteran_archer"),
(assign, ":upgrade_troop", "trp_heavy_archer"),
(else_try),
(eq, "$t_troop","trp_sergeant"),
(assign, ":upgrade_troop", "trp_armoured_sergeant"),
(else_try),
(eq, "$t_troop","trp_light_cavalry"),
(assign, ":upgrade_troop", "trp_heavy_cavalry"),
(assign, ":extra_cost", 100),
(else_try),
(eq, "$t_troop","trp_foot_knight"),
(assign, ":upgrade_troop", "trp_knight"),
(assign, ":extra_cost", 200),
(else_try),
(eq, "$t_troop","trp_elite_cavalry"),
(assign, ":upgrade_troop", "trp_knight"),
(assign, ":extra_cost", 200),
(else_try),
(eq, "$t_troop","trp_veteran_pickman"),
(assign, ":upgrade_troop", "trp_halberdier"),
(assign, ":extra_cost", 50),
(else_try),
(eq, "$t_troop","trp_common_prisoner"),
(assign, ":upgrade_troop", "trp_footman"),
(assign, ":extra_cost", 100),
(else_try),
(eq, "$t_troop","trp_war_prisoner"),
(assign, ":upgrade_troop", "trp_heavy_infantry"),
(assign, ":extra_cost", 150),
(else_try),
(eq, "$t_troop","trp_imprisoned_veteran"),
(assign, ":upgrade_troop", "trp_armoured_sergeant"),
(assign, ":extra_cost", 200),
(else_try),
(faction_slot_eq, "fac_player_supporters_faction", slot_faction_state, sfs_active),
(eq, "$t_troop","trp_imprisoned_nobleman"),
(assign, ":upgrade_troop", "trp_heavy_cavalry"),
(assign, ":extra_cost", 250),
(try_end),
#----------------------------------------------
#(assign, ":upgrade_troop", "trp_heavy_infantry"),
#(troop_get_upgrade_troop, ":upgrade_troop", "$t_troop", 0),
  (try_end),
  (call_script, "script_game_get_join_cost", ":upgrade_troop"),
  (assign, ":cost", reg0),
  (val_add, ":cost", ":extra_cost"),
  (gt, ":upgrade_troop", 0),
  #gold check
  (store_mul, ":gold", ":cost", ":quantity"),
  (try_begin), #sufficient funds
(ge, "$g_talk_agent", ":gold"),
(val_sub, "$g_talk_agent", ":gold"),
  (else_try),
(store_div, ":quantity", "$g_talk_agent", ":cost"),
(store_mul, ":gold", ":cost", ":quantity"),
  (try_end),
  (gt, ":quantity", 0),
  (party_remove_members, "p_main_party", "$t_troop", ":quantity"),
  (troop_remove_gold, "trp_player", ":gold"),

  (party_add_members, "p_main_party", ":upgrade_troop", ":quantity"),
  #(val_sub, "$g_talk_troop_relation", ":quantity"),
  #(party_set_slot, "$current_town", slot_town_prosperity, "$g_talk_troop_relation"),

  #do stack reassignment
  (party_stack_get_troop_id, ":troop", "p_main_party", "$g_cur_stack"),
  (try_begin),
(neq, ":troop", "$t_troop"), #if we don't have any of the cur stack remaining
(neq, ":troop", ":upgrade_troop"), #or if we haven't upgraded all of them at once
(party_get_num_companion_stacks, ":no_stacks", "p_main_party"),
(try_for_range, ":stacks", 1, ":no_stacks"),
  (party_stack_get_troop_id, ":troop", "p_main_party", ":stacks"),
  (eq, ":troop", ":upgrade_troop"), #since we already upgraded at least 1
  (assign, "$g_cur_stack", ":stacks"),
  (assign, ":no_stacks", -1),
(try_end),
  (try_end),

  (start_presentation, "prsnt_upgrade_troops"),
(else_try), #this can be expanded with
  (eq, ":eek:bject", "$g_presentation_obj_6"), # troop note
  (assign, "$g_presentation_next_presentation", "prsnt_upgrade_troops"),
  (assign, "$temp", "$t_troop"),
  # (start_presentation, "prsnt_troop_note"),
(try_end),
  (try_end),
  (try_begin),
# (this_or_next|key_clicked, key_escape),
#(this_or_next|le, "$g_talk_troop_relation", 1),
(eq, ":eek:bject", "$g_presentation_obj_10"),
#unset globals
(assign, "$t_troop", -1),
(assign, "$g_talk_troop_relation", -1),
(assign, "$g_presentation_next_presentation", -1),
(assign, "$toh_troop_size", -1),
#(play_sound, "snd_enemy_flag_taken"),
(presentation_set_duration, 0),
  (try_end),
]),
(ti_on_presentation_run,
[
  (party_get_num_companion_stacks, ":num_stacks", "p_main_party"),
  (assign, ":cur_slots", "$g_cur_stack"),
  (try_begin),
(key_clicked, key_escape),
(presentation_set_duration, 0),
  (else_try),
(this_or_next|key_clicked, key_mouse_scroll_down),
(key_clicked, key_down),
(store_add, ":cur_slots", "$g_cur_stack", 1),
(try_begin),
  (val_mod, ":cur_slots", ":num_stacks"),
(try_end),
(assign, ":dir", 1),
  (else_try),
(this_or_next|key_clicked, key_mouse_scroll_up),
(key_clicked, key_up),
(store_sub, ":cur_slots", "$g_cur_stack", 1),
(try_begin),
  (lt, ":cur_slots", 1),
  (store_sub, ":cur_slots", ":num_stacks", 1),
(try_end),
(assign, ":dir", -1),
  (try_end),

  (try_begin), #do actual offset calcs - loopover already done previously
(neq, ":cur_slots", "$g_cur_stack"),
(assign, ":prev", 0),
(assign, ":next", ":num_stacks"),
(try_for_range, ":slot_no", ":prev", ":next"),
  (neg|troop_slot_eq, "trp_temp_array_a", ":slot_no", -1),
  (try_begin), #find previous
(le, ":slot_no", ":cur_slots"),
(assign, ":prev", ":slot_no"),
  (try_end),
  (try_begin),
(ge, ":slot_no", ":cur_slots"),
(assign, ":next", ":slot_no"),
  (try_end),
(try_end),
(try_begin),
  (eq, ":dir", 1),
  (assign, "$g_cur_stack", ":next"),
(else_try),
  (eq, ":dir", -1),
  (assign, "$g_cur_stack", ":prev"),
(try_end),
(start_presentation, "prsnt_upgrade_troops"),
  (try_end),
  ]),
  ]),
#------------------------------------------------------

after must appoint two constants for the beginning and the end of upgradeables troops, and a menu to access that presentation ....

What does this feature means? What do you more need to do to make your kingdom?

-increased the necessary renows to be received as a vassal.
- taking center in being independent does'nt establish automatically you kingdom (you're just some bandits who have able to occupy a stronghold).
- the safest way is to build your OWN castle and declare your independence on YOUR lands.

anyway this aspect of the game isn't finished yet (like all mod)

It's nice of you to add my little project in your forum, I'll take a look (with the help of google translation of course  :cool:)
Thank you again
 
Thanks for the codes, I'll try them  :smile:

Also these features about kingdom management sounds really good, keep up this work!

PS: I see you have registered on my forum and posted a message on the thread. Thanks for that  :smile:
 
It's me to say thank you

Progress report :

-working on my own "homemade" battle tactics : each faction will have its own miltary doctrine.
already completed those of  Bororvod and Hadvog
XSKtB7A.jpg

- 1 vs 1 tournament
dDjR3QY.jpg
 
Looking amazing! I admit, as a mod make myself, I am very interested in this:
fladin said:
my own "homemade" battle tactics : each faction will have its own miltary doctrine.
I hope you will share it when it comes out(?). :smile:
 
It's nothing special, only some  basic commands such as : grc_ , mordr_ ...that fit the playing style of the faction.
of course i'll share when it's ready
 
Thanks Antonis and good luck to you too.

Progress report :
I was finally able to upload it on nexusmod ... so it's possible finally :roll:
http://www.nexusmods.com/mbwarband/mods/5903/?

Imifir troops basic tactics almost completed
geXCjgs.jpg
 
it was the original idea : by choosing the faction at character creation, you choose your troops ...
but I think :  the player must "deserve" these troops (beings in a very good relationship with the faction or better a vassal = can access the resources of this faction)
 
Back
Top Bottom