Author Topic: 0.89x game_menus - index  (Read 4109 times)

Khalid ibn Walid

  • Guest
0.89x game_menus - index
« on: October 25, 2007, 11:43:45 AM »
I put this up at the main M&B boards.   Figured it might be useful to people here too.

What follows is a complete account of the game_menus.py file, sorted through a simple number-driven system so its easier to see which menus lead to what.   

The ordering is exactly as in the game_menus.py file.  I originally did this for 892.  I have tried to adjust it for 894, but I might have missed a couple of things.

[....] are the jumps to other menus.

I have noted PICS and ICON changes where contained.

CHEAT denotes a cheat-mode menu.  Available only by manually changing (eq, 0, 1) in start_phase_2 [menu (2)] to eq(1, 1) and then running the python compile again.

Corrections welcome.

Khalid ibn Walid

  • Guest
Re: 0.89x game_menus - index
« Reply #1 on: October 25, 2007, 11:44:05 AM »
GAME MENUS, Part I

START UP

ORDERED MENUS (meaning, the menu title order must be retained. You're not required to retain them as is, but some sort of menu must be there under that title).

Order = #start_game_1 -> start_game_2 -> choose_skill -> past-life-explanation -> auto-return -> start_phase_2 -> game

(1) start_game_1 - choose gender. [Jump to (8 )]
(2) start_phase_2 - come across travellers (+ cheat). [Jump to game]
(3) start_game_3 - custom battle scenario choice (custom1, custom3, custom4, custom5, custom6) [Jump to (6)]
(4) training_ground -
(5) reports - choose party morale [Jump to (11)], character [Jump to (12)], party size [Jump to (13)]
(6) custom_battle_2 - sets visitors for the various custom battle scenarios [Jump to battle]
(7) custom_battle_end - post-custom battle stuff [Jump to main]

END OF ORDERED MENUS (do as you will from here. I think)

(8 ) start_game_2 - choose character type (noble, etc.). [Jump to (8a)]
(8a) choose_skill - set starting skills (swordmanship etc.) [jump to (9)]
(9) past_life_explanation - grants equipment, adjusts skills & renown [Jump to (10) & run prsnt_banner_selection]

(10) auto-return - a default return menu

Reports

(11) morale report - calculate & show party morale [jump back to (5)]
(12) character_report - calculate & show renown & fiefs [jump back to (5)]
(13) party_size - calculate & show party size [jump back to (5)]

Camp stuff

(14) camp - Set up camp. [ICON change].  Options: wait on map, cheat [jump to 15] & recruit prisoners [jump to (16)].
(15) camp_cheat - CHEAT get free renown [jump to (14)]
(16) camp_recruit_prisoners - hire your own prisoners as mercs [jump to (14)]

(17) Payday - calculate & deduct wages. [back to map]

BATTLE ENCOUNTERS

(18) SIMPLE ENCOUNTER - menu for a one party-on-one party encounter.  Quite big.  After going through conditions to check encounter type -  check if in/near village to add peasants, add nearby armies, check if you can leave,  talk to enemy leader (encounter), check if victorious [jump to (22)], if surrender/defeated [assign (70) as captivity menu, then jump to (24)], if bandits [add PIC bandits]), before proceeding on to the choice submenus covering:
- encounter_attack - charge  [jump to battle, then to (21)]
- encounter_order_attack - your men fight on their own [jump to (19)]
- surrender - [repeats (18) with surrender condition, which will jump you to (24)]
- leave [jump to map]

(19) order_attack_begin - leaderless battle menu [jump to 20]
(20) order_attack_2 - casualty outcome of leaderless battle.  Submenus to continue [repeat (20)], retreat [to (18)].

(21) BATTLE_DEBRIEF - post-battle casualty outcome of leader-led battle.  [end jumps (preassigned):
- If kicked here from simple battle (18), then jump back to (18), but now with conditions of total victory (22) or total defeat (24), through which (18) will throw you forward to 22 or 24;
- if kicked here from allied battle (26), then jump back to (26), with conditions to go on to (22) or (24)
- if kicked here from castle siege (37) then jump back to (37).
- if kicked here from siege defense (45), then jump to (44).
- if kicked here from village battle (52), then jump back to (52).].

(22) TOTAL_VICTORY - post-leader-led battle menu, from here we get self-loop (in order) of renown points, meetings with ally thanking you, defeated enemies cursing you [if they escape, jump to (23)], released heroes thanking you, prisoners-taking screen and finally loot screen.  [end jumps (predefined elsewhere):
- if kicked here from (18) or (26) or (44), jump to map.
- if kicked here from castle_siege (37), jump to (41).]

(23) enemy_slipped_away - menu telling you Lord x escaped.  [jump back to (22)].

(24) Total_defeat - lose items & troops. [jump to pre-assigned captivity menu, that is:
- if from (18) or (26) , then jump to (70);
- if from castle siege (37), then jump to (74);
- if from siege defense (45), then jump to (75)].

(25) PRE-JOIN - menu if you come across existing battle. Sort who is ally/enemy and offer who to join. [Jump to (26)]

(26) JOIN_BATTLE - Quite big.  Similar to simple_encounter, but for allied battle.  Submenus covering:
      -  join_attack - charge with ally  [jump to battle, then to (21)]
       - join_order_attack - your men fight with ally on their own [jump to (27)]
      - surrender - [repeats (26) with surrender condition, which will assign (70) as captivity menu and jump you to (24)]
      - leave

(27) join_order_attack - leaderless allied battle casualties [jump back to (26)] 
« Last Edit: October 26, 2007, 01:25:08 PM by Khalid ibn Walid »

Khalid ibn Walid

  • Guest
Re: 0.89x game_menus - index
« Reply #2 on: October 25, 2007, 11:46:00 AM »
 GAME MENUS - PART II

Automatic entry places

(28) Zendar - on entering Zendar, auto, doesn't wait for your reply.  Submenus (empty title) for:
- zendar center - jump to zendar town center scene
- z tavern - jump to zendar tavern scene)
- z merchant - you know.
- z arena - ditto
- town_1 leave

(29) Salt mine - auto-entry menu.  Again, menu doesn't wait for reply but just jumps.
(30) Four Ways Inn - as above
(31) test_scene - as above
(32) Dhorak_keep - as above

Attack Castle Stuff

(33) join_siege_outside. [PIC: siege sighted] If come across a siege (center-vs.-template battle). Options:
- approach_besiegers - go to besiegers [jump to (35)]
- pass_through_siege - go to besieged [jump to (34)]

(34) cut_siege_without_fight - depending on center type, jump to town [jump to 59] or castle [jump to 36].
(35) besiegers_camp_with_allies - talk to siege commander.

[NOTE: 33-35 don't seem properly done]

(36) CASTLE_OUTSIDE - if come across a castle. Long menu, checking lots of condition - check relations, sneakability, if/who owns, if lord conversation requested,  if friendly  [jump to (59)], if already besieging [jump to (37)] . Submenus:
- request_meeting - talk to guard. [returns to map]
- town_sneak - sneak through gates.  Probability will lead to sneak success [jump to (67)] or sneak failure [jump to (68)].
- castle_start_siege - starts your siege of castle [jump to (37)]
- castle_leave - leave [back to map]
- castle_cheat_interior - CHEAT
- castle_cheat_exterior - CHEAT   

(37) CASTLE_BESIEGE - [PIC: siege sighted] Long menu with conditions - calculate siege parameters & method, check if ready, or emptied/already victorious [jump to (22) with instructions to proceed to (41)], player defeated [jump to (24) with captivity menu (74) for after].  Options & submenus:
- siege_request_meeting - meet with castellan to ask him to surrender [returns to map]
- wait_24_hours - rest on map
- castle_lead_attack - jump to player-led assault [battle return to (21) with condition to jump thereafter back to (37)]
- attack_stay_back - order troops to assault [jump to (40)]
- build_ladders - [jump to (38)]
- build_siege_tower - [jump to (39)]
- lift_siege - leave.

(38) construct_ladders - set up ladders calculations. [if yes, rest on map, if no, jump back to (37)]
(39) construct_siege_towers - set up siege tower calculations [if yes, rest on map. if no, jump back to (37)]
(40) castle_attack_walls_simulate - [PIC: siege sighted] casualty report from leaderless assault on castle. [jump to (37)]
(41) castle_taken - if garrison surrrenders. Should have options to garrison, but not yet entered.  [jump to  (41a)]

Fief Stuff

(41a) castle_taken_2 -  send petition to your lord for captured castle [jump to (59)]
(41b) requested_castle_granted_to_player - [PIC messenger]  Lord grants captured castle to player. [jump to (43)],
(41c) requested_castle_granted_to_another - [PIC messenger] Just informing you got stiffed. [return to map]
(42) give_center_to_player - lord offers you fief.  [Jump to 43]
(43) give_center_to_player2 - fief accepted. [back to map]

Defend Castle stuff:

(44) under_siege_attacked_continue -  Long, with lots of conditions on victory [jump to (22)], defeat [assign (75) as captivity menu and jump to (24)], or enemy lifted siege by himself [jump to (59)]. No options.

(45) siege_started_defender - If player is defending castle.  You get here from condition on (59). Options:
- siege_defender_join_battle - lead defense of your walls from belfry/ladder attack [returns to (21), with condition to then go forward onto (44) post-battle].
- siege_defender_troops_join_battle - leaderless defense of walls [jump to (46)].
- siege_defender_do_not_join_battle - retreat from siege [jump to (46)]
- siege_defender_surrender [jump to (44)]

(46) siege_join_defense - casualty outcome of leaderless defense and/or retreat from siege [jump to (44)].

Village stuff

(47) VILLAGE - when enter village, long with conditions.  If in process of looting [jump to (56)],  If loot-time finished [jump to (54)]. If being raided by someone else [no options]. Submenus:
- village_manage [jump to (49)]
- recruit_volunteers [jump to (48)]
- village_center - to village scene
- village_buy_food - to trade screen
- village_take_food - [jump to (51)]
- village_loot - [jump to (52)]
- village_reports - CHEAT [jump to (63)]

(48) recruit_volunteers - recruit villages [jump back to (47)]

(49) village_manage - improve stuff. Options:
- village_improve_housing - [jump to (50)]
- village_improve_irrigation - [jump to (50)]
- village_improve_mill - [jump to (50)]

(50) village_improve - calculate & report improvement costs of chosen improvement. Make choice [jump back to (49)].

(51) village_take_food - villagers give stuff.  There is probability of a village to attack instead [jump to (52)].  Otherwise, exchange screen & return to village [jump to (47)].

(52) village_start_attack - goes through conditions: if you're too strong [jump to (53)], if already victorious [jump to (53)], if already defeated [jump to (55)]. Options:
- village_raid_attack - lead attack [post-battle return to (21) with condition to proceed onto (52)].
- leave (return to map).

(53) village_loot_no_resist - villagers flee.  You may proceed to begin looting [rest on map].

(54) village_loot_complete -  Get cash.  Looting screen. [jump to (57)]

(55) village_loot_defeat - if defeated by villagers. No losses. [jump to map]

(56) village_loot_continue - if loot-time not yet finished. Options to continue [rest_on_map] or stop [return to map]

(57) close - nothing. Just a return screen

(58) center_tax - get fief dues.  Depending where you are, return either to village [jump to (47)] or town [jump to (59)].
« Last Edit: October 26, 2007, 03:00:05 PM by Khalid ibn Walid »

Khalid ibn Walid

  • Guest
Re: 0.89x game_menus - index
« Reply #3 on: October 25, 2007, 11:46:38 AM »
Town Stuff

(59) TOWN - major menu on entering town or castle.  Lots of conditions: check if under siege [jump to (45)], if asked for trade assessment [jump to (66)], if fief with dues [jump to (58)].  Submenus: (see note below):
- castle_castle - in a castle, enter Lord's keep. (jump to castle keep scene).
- disguise_and_sneak - DISABLED.  Should jump to succeed (67) or fail (68), but this is a dummy.  Actual sneaking menu  is in (36)].
- town_castle - in a town, enter Lord's castle (jump to town castle scene; equipment removed via script).
- town_center - jump to town scene.  Checks night/pilgrim outfit, places guards, starts walkers.
- town_tavern - also places companion/ransom broker/traveler/minister, if applicable
- town_merchant - to store
- town_arena -  to arena
- town_dungeon - menu entry only visible by CHEAT
- castle_inspect - if castle
- trade_with_merchants - enter multi-menu market [jump to (65)]
- castle_station_troops - if owned castle, screen for exchange_members
- castle_wait - rest on map.
- town_alley - CHEAT. (jump to scene)
- town_leave - return to map
- castle_cheat_interior - CHEAT (jump to scene)
- castle_cheat_town_exterior - CHEAT (jump to scene)
- center_reports - CHEAT. [jump to (63)]
- manage_center - [jump to (60)]
- sail_from_port - CHEAT get ship & sail the seas. (return to map).

[NOTE ON TOWN: town menu covers both towns & castles.  The ORDERING must be kept as passage numbers depend on them. So if you must adjust ordering, remember to use dummy entries to keep the ordering intact.  The final entry into submenu options is the exit passage label for this scene from other scenes, e.g. "Door to castle", "Door to town", etc.]

(60) center_management - not available yet. [jump to (59)].

Ship stuff

(61) disembark - ship-related if hit shore. [Return to map.]
(62) ship_reembark - if reach ship from shore.  [Return to map].

Trade stuff

(63) center_reports - CHEAT Gives you prices and production.  [Jump to (64).].

(64) price_and_production - CHEAT reports production and prices in town.  [Jumps back to village (47) or town (59)].

(65) town_trade - multi-menu market place. Submenus:
- assess_prices (rest on map)
- trade_with_arms_merchant (weaponsmith trade screen)
- trade_with_armor_merchant
- trade_with_horse_merchant
- trade_with_goods_merchant
- back_to_town_menu [jump to (59)]

(66) town_trade_assessment - reports best prices & production specialties. [return to (65)]

Sneak stuff

(67) sneak_into_town_succeeded - [jump to (59)]

(68) sneak_into_town_caught - - guards spot your attempt
- Fight (jump to town scene, with (59) only as passage menu);
- surrender [jump to (73)]

(69) sneak_into_town_caught_ran_away - you flee. [back to map]

Captivity types

(70) captivity_start_wilderness -  (remember via (24), preset in (18) or (26)).  If surrendered, jump to (71); if defeated, jump to (72).
(71) captivity_start_wilderness_surrender - Assigns encountered party as capturer [Jump to (76)]
(72) captivity_start_wilderness_defeat - Assigns post-battle party as capturer [Jump to (76)]
 
(73) captivity_start_castle_surrender - if captured in sneak attempt (from (68)). Assigns capturer [jump to (79)]

(74) captivity_start_castle_defeat -  if defeated in castle siege fight (via (24), preset in (37)). Assigns capturer. [jump to (79)]

(75) captivity_start_under_siege_defeat - if defeated in siege defense (via (24), preset in (45)).  Assigns capturer [jump to (79)]

(76) captivity_wilderness_taken_prisoner - [PIC: prisoner wilderness] Start captivity clock  [rest on map, sets (77) as automenu]
(77) captivity_wilderness_check - triggered by time, end of captivity clock [jumps to (78)]
(78) captivity_end_wilderness_escape - [PIC: prisoner escape] Set player party near capturer. [back to map]

(79) captivity_castle_taken_prisoner - start captivity clock  [rest on map, sets (80) as automenu]
(80) captivity_castle_check - end captivity clock. Decides result: ransom offer [jump to 82] or prisoner exchange [jump to 81] or continue captivity [jump to 83].

(81) captivity_end_exchanged_with_prisoner - release [jump to map]
(82) captivity_end_propose_ransom - money for release.  If accept, [jump to map].  If reject, [rest on map, (80) as automenu]
(83) captivity_castle_remain - [PIC: prisoner in cell]  restart captivity clock. [rest on map, set (80) as automenu]

Faction

(84) invite_player_to_faction - [PIC: messenter] king of x offers vassalage, accept [jump to (85)]  or reject [back to map]

(85) invite_player_to_faction_accepted [back to map]

Offline fujiwara

  • Master
  • *****
  • Posts: 858
    • View Profile
Re: 0.89x game_menus - index
« Reply #4 on: October 25, 2007, 03:55:17 PM »
A good resource, thanks.

A menu-related question: when switching from menu to menu, does program control pass to the new menu, such that if I call change_screen_return from the menu, I'm not passed through the old menu?

The horses tend to get their legs caught in the catapult rather than being properly launched.

Offline Hellequin

  • Journeyman
  • ***
  • Posts: 254
    • View Profile
Re: 0.89x game_menus - index
« Reply #5 on: October 25, 2007, 04:09:27 PM »
Correct.

Offline fujiwara

  • Master
  • *****
  • Posts: 858
    • View Profile
Re: 0.89x game_menus - index
« Reply #6 on: October 25, 2007, 04:11:23 PM »
Excellent; that has tripped me up in the past.

The horses tend to get their legs caught in the catapult rather than being properly launched.