Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Kortlcha said:
Hi,
when I add one more game mod to game_multiplayer_admin_panel presentation, screen is freezing. But when I click, sound is playing. Codes that I changed is these:
Code:
(try_begin),
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_team_deathmatch),
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_destroy),
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_capture_the_flag),
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_headquarters),
#        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_wave),#Kortlcha change
        (eq, "$g_multiplayer_game_type", multiplayer_game_type_siege),
        (val_add, ":cur_y", ":cur_y_adder"), #two more options for these mods (friendly fire options)
        (val_add, ":cur_y", ":cur_y_adder"),
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_capture_the_flag),
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_destroy),
        (eq, "$g_multiplayer_game_type", multiplayer_game_type_siege),
        (val_add, ":cur_y", ":cur_y_adder"), #one more option for these mods
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_destroy),
        (eq, "$g_multiplayer_game_type", multiplayer_game_type_siege),
        (val_add, ":cur_y", ":cur_y_adder"), #one more option for these mods
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_destroy),
        (eq, "$g_multiplayer_game_type", multiplayer_game_type_siege),
        (val_add, ":cur_y", ":cur_y_adder"), #one more option for these mods
      (try_end),
      #Kortlcha begin
      (try_begin),
		(eq, "$g_multiplayer_is_game_type_captain", 1),
		(val_sub, ":cur_y", ":cur_y_adder"), #-2 options but +2
	  (try_end),
	  (try_begin),
		# decrease for removed options in captain coop
	    (eq, "$g_multiplayer_game_type", multiplayer_game_type_wave),
		(val_sub, ":cur_y", ":cur_y_adder"),
		(val_sub, ":cur_y", ":cur_y_adder"),
		(val_sub, ":cur_y", ":cur_y_adder"),
	  (try_end),
      #Kortlcha end
What is the problem?

please dont self-quote so soon, this just annoys people :/

about the code, there seems to be nothing wrong in this snippet you posted that could freeze the screen, you probably editted something else somewhere, maybe by mistake, that caused it. Try commenting out this bit you posted and see if it still freezes the screen.

also, use the
Code:
[code][ /code]
tags when posting code, makes it a bit easier to read and doesnt use up as much space :smile:
 
porting info_page data...
porting scripts...
ROR: Usage of unassigned local variable: :amount
ROR: Usage of unassigned local variable: :amount
porting mission_template data...
porting game menus data...









(troop_get_slot, ":amount", ":troop_id", slot_troop_prebattle_alt_division_amount), #Count
(val_add, ":amount", 1),
(assign, ":amount", 1),
(troop_set_slot, ":troop_id", slot_troop_prebattle_alt_division_amount, ":amount"),
    (try_end),



how to solve it&
 
frozenpainter said:
In siege battle, defend troops move to entry point 10, Defend troops reinforcement move to enty 10, I want to defend troops move to entry no 10, 62 and 63.
Anyone help me?
common_siege_ai_trigger_init_2 = (
  0, 0, ti_once,
  [
    (set_show_messages, 0),
    (entry_point_get_position, pos10, 10),
    (try_for_range, ":cur_group", 0, grc_everyone),
      (neq, ":cur_group", grc_archers),
  (neq, ":cur_group", grc_cavalry),
      (team_give_order, "$defender_team", ":cur_group", mordr_hold),
      (team_give_order, "$defender_team", ":cur_group", mordr_stand_closer),
      (team_give_order, "$defender_team", ":cur_group", mordr_stand_closer),
      (team_give_order, "$defender_team_2", ":cur_group", mordr_hold),
      (team_give_order, "$defender_team_2", ":cur_group", mordr_stand_closer),
      (team_give_order, "$defender_team_2", ":cur_group", mordr_stand_closer),
    (try_end),
    (team_give_order, "$defender_team", grc_archers, mordr_stand_ground),
    (team_set_order_position, "$defender_team", grc_everyone, pos10),
    (team_give_order, "$defender_team_2", grc_archers, mordr_stand_ground),
    (team_set_order_position, "$defender_team_2", grc_everyone, pos10),
(team_give_order, "$defender_team", grc_cavalry, mordr_stand_ground),
(team_give_order, "$defender_team", grc_cavalry, mordr_stand_ground),
    (team_set_order_position, "$defender_team", grc_everyone, pos10),
    (team_give_order, "$defender_team_2", grc_cavalry, mordr_stand_ground),
    (team_set_order_position, "$defender_team_2", grc_everyone, pos10),
    (set_show_messages, 1),
    ], [])

Another question,
In siege battle attacker troops spawned at enty no 0, I want to attacker reinforcement troops spawned entry no 0, 60, 61.
My mission template
(
    "castle_attack_walls_ladder",mtf_battle_mode|mtf_synch_inventory,-1,
    "You attack the walls of the castle...",
    [
    (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,4,[]),
   

    (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,0,[]),
    (10,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,0,[]),
    (11,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,2,[]),
    (15,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,0,[]),

    (40,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (41,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (42,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (43,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (44,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (45,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (46,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
(47,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (48,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
(60,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,2,[]),#attacker
    (61,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,2,[]),#attacker
(62,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,5,[]),#defender
(63,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,5,[]),#defender
    ],
 
This:

Code:
        (
    "flee_to_the_wall_12",menu_text_color(0xFF000000)|mnf_disable_all_keys,
    "Entering the yard, you see a few men of the Night's Watch training, but Castle Black seems almost abandoned.",
    "none",
    [(set_background_mesh, "mesh_pic_game_event_snow"),],
    [
      ("choice_10_1",[],"Leave.",[
     (troop_set_note_available, "trp_kingdom_nights_watch_lord", 0),
     (troop_set_slot, "trp_kingdom_nights_watch_lord", slot_troop_occupation, slto_dead),
     (troop_set_slot, "trp_kingdom_nights_watch_lord", slot_troop_change_to_faction, "fac_no_faction"),
     (troop_set_slot, "trp_kingdom_nights_watch_lord", slot_troop_original_faction, "fac_no_faction"),
     (troop_set_note_available, "trp_kingdom_2_lord", 0),
     (troop_set_slot, "trp_kingdom_2_lord", slot_troop_occupation, slto_dead),
     (troop_set_slot, "trp_kingdom_2_lord", slot_troop_change_to_faction, "fac_no_faction"),
     (troop_set_slot, "trp_kingdom_2_lord", slot_troop_original_faction, "fac_no_faction"),
     (troop_set_note_available, "trp_knight_2_26", 0),
     (troop_set_slot, "trp_knight_2_26", slot_troop_occupation, slto_dead),
     (troop_set_slot, "trp_knight_2_26", slot_troop_change_to_faction, "fac_no_faction"),
     (troop_set_slot, "trp_knight_2_26", slot_troop_original_faction, "fac_no_faction"),
     (troop_set_note_available, "trp_knight_2_4", 0),
     (troop_set_slot, "trp_knight_2_4", slot_troop_occupation, slto_dead),
     (troop_set_slot, "trp_knight_2_4", slot_troop_change_to_faction, "fac_no_faction"),
     (troop_set_slot, "trp_knight_2_4", slot_troop_original_faction, "fac_no_faction"),
     (troop_set_note_available, "trp_knight_2_5", 0),
     (troop_set_slot, "trp_knight_2_5", slot_troop_occupation, slto_dead),
     (troop_set_slot, "trp_knight_2_5", slot_troop_change_to_faction, "fac_no_faction"),
     (troop_set_slot, "trp_knight_2_5", slot_troop_original_faction, "fac_no_faction"),
     (troop_set_note_available, "trp_knight_2_13", 0),
     (troop_set_slot, "trp_knight_2_13", slot_troop_occupation, slto_dead),
     (troop_set_slot, "trp_knight_2_13", slot_troop_change_to_faction, "fac_no_faction"),
     (troop_set_slot, "trp_knight_2_13", slot_troop_original_faction, "fac_no_faction"),
     (troop_set_note_available, "trp_knight_2_15", 0),
     (troop_set_slot, "trp_knight_2_15", slot_troop_occupation, slto_dead),
     (troop_set_slot, "trp_knight_2_15", slot_troop_change_to_faction, "fac_no_faction"),
     (troop_set_slot, "trp_knight_2_15", slot_troop_original_faction, "fac_no_faction"),
     (troop_set_note_available, "trp_knight_2_21", 0),
     (troop_set_slot, "trp_knight_2_21", slot_troop_occupation, slto_dead),
     (troop_set_slot, "trp_knight_2_21", slot_troop_change_to_faction, "fac_no_faction"),
     (troop_set_slot, "trp_knight_2_21", slot_troop_original_faction, "fac_no_faction"),
#MORMONT
        (try_begin),
 
          # make them king
          (faction_set_slot, "fac_kingdom_nights_watch", slot_faction_leader, "trp_knight_nights_watch_5"),
 
          # announce it!
          #TODO: generate a presentation for this! (start_presentation, "prsnt_enemy_succession"),
          (str_store_troop_name, s1, "trp_knight_nights_watch_5"),
          (str_store_faction_name, s2, "fac_kingdom_nights_watch"),
          (display_message, "@{s1} is the new ruler of {s2}.", 0xFFFF2222),
          #TODO: update the game log for this event
      (try_end),
 
      # free up the deceased's fief
      (try_for_range, ":fief", centers_begin, centers_end),
        (party_get_slot, ":lord", ":fief", slot_town_lord),
        (eq, ":lord", "trp_kingdom_nights_watch_lord"),
        (call_script, "script_give_center_to_lord", ":fief", "trp_knight_nights_watch_5", 0),
(try_end),
#STARK
        (try_begin),

      # no longer our prisoner 
          # make them king
          (faction_set_slot, "fac_kingdom_2", slot_faction_leader, "trp_knight_2_3"),
 
          # announce it!
          #TODO: generate a presentation for this! (start_presentation, "prsnt_enemy_succession"),
          (str_store_troop_name, s1, "trp_knight_2_3"),
          (str_store_faction_name, s2, "fac_kingdom_2"),
          (display_message, "@{s1} is the new ruler of {s2}.", 0xFFFF2222),
          #TODO: update the game log for this event
      (try_end),
 
      # free up the deceased's fief
      (try_for_range, ":fief", centers_begin, centers_end),
        (party_get_slot, ":lord", ":fief", slot_town_lord),
        (eq, ":lord", "trp_kingdom_2_lord"),
        (call_script, "script_give_center_to_lord", ":fief", "trp_knight_2_3", 0),
      (try_end),
#NEW
#HORNWOOD
      # free up the deceased's fief
      (try_for_range, ":fief", centers_begin, centers_end),
        (party_get_slot, ":lord", ":fief", slot_town_lord),
        (eq, ":lord", "trp_knight_2_26"),
        (call_script, "script_give_center_to_lord", ":fief", "trp_knight_2_3", 0),
(try_end),
#FLINT
      # free up the deceased's fief
      (try_for_range, ":fief", centers_begin, centers_end),
        (party_get_slot, ":lord", ":fief", slot_town_lord),
        (eq, ":lord", "trp_knight_2_4"),
        (call_script, "script_give_center_to_lord", ":fief", "trp_knight_2_3", 0),
(try_end),
#CERWYN
      # free up the deceased's fief
      (try_for_range, ":fief", centers_begin, centers_end),
        (party_get_slot, ":lord", ":fief", slot_town_lord),
        (eq, ":lord", "trp_knight_2_5"),
        (call_script, "script_give_center_to_lord", ":fief", "trp_knight_2_3", 0),
(try_end),
#UMBER
      # free up the deceased's fief
      (try_for_range, ":fief", centers_begin, centers_end),
        (party_get_slot, ":lord", ":fief", slot_town_lord),
        (eq, ":lord", "trp_knight_2_13"),
        (call_script, "script_give_center_to_lord", ":fief", "trp_knight_2_3", 0),
(try_end),
#MANDERLY
      # free up the deceased's fief
      (try_for_range, ":fief", centers_begin, centers_end),
        (party_get_slot, ":lord", ":fief", slot_town_lord),
        (eq, ":lord", "trp_knight_2_15"),
        (call_script, "script_give_center_to_lord", ":fief", "trp_knight_2_3", 0),
(try_end),
#TALLHART
      # free up the deceased's fief
      (try_for_range, ":fief", centers_begin, centers_end),
        (party_get_slot, ":lord", ":fief", slot_town_lord),
        (eq, ":lord", "trp_knight_2_21"),
        (call_script, "script_give_center_to_lord", ":fief", "trp_knight_2_3", 0),
      (try_end),
        (call_script, "script_diplomacy_start_peace_between_kingdoms", "fac_kingdom_2", "fac_kingdom_9", 1), 
        (call_script, "script_dplmc_start_defensive_between_kingdoms", "fac_kingdom_2", "fac_kingdom_9", 1),
                        (remove_party,  "$g_robb_stark"),
                        (remove_party,  "$g_jeor_mormont"),
                        (remove_party,  "$g_donelle_hornwood"),
                        (remove_party,  "$g_benfred_tallhart"),
                        (remove_party,  "$g_medger_cerwyn"),
                        (remove_party,  "$g_robin_flint"),
                        (remove_party,  "$g_smalljon_umber"),
                        (remove_party,  "$g_wendel_manderly"),
         (leave_encounter),
         (change_screen_return),
                  
        ]
       ),
    ]
  ),

Code:
#Specific Lord ID - Wyman Manderly
   (try_for_parties, ":party_no"),
		(party_get_slot, ":cur_party_type", ":party_no", slot_party_type),
		(eq, ":cur_party_type", spt_kingdom_hero_party),
		(party_get_num_companion_stacks, ":no_stack", ":party_no"),
		(try_for_range, ":stack_no", 0, ":no_stack"),
			(party_stack_get_troop_id, ":troop_no", ":party_no", ":stack_no"),
			(eq, ":troop_no", "trp_kingdom_2_lord"),
			(assign, "$g_robb_stark", ":party_no"),
		(try_end),
		(try_for_range, ":stack_no", 0, ":no_stack"),
			(party_stack_get_troop_id, ":troop_no", ":party_no", ":stack_no"),
			(eq, ":troop_no", "trp_kingdom_nights_watch_lord"),
			(assign, "$g_jeor_mormont", ":party_no"),
		(try_end),
		(try_for_range, ":stack_no", 0, ":no_stack"),
			(party_stack_get_troop_id, ":troop_no", ":party_no", ":stack_no"),
			(eq, ":troop_no", "trp_knight_2_26"),
			(assign, "$g_donelle_hornwood", ":party_no"),
		(try_end),
		(try_for_range, ":stack_no", 0, ":no_stack"),
			(party_stack_get_troop_id, ":troop_no", ":party_no", ":stack_no"),
			(eq, ":troop_no", "trp_knight_2_21"),
			(assign, "$g_benfred_tallhart", ":party_no"),
		(try_end),
		(try_for_range, ":stack_no", 0, ":no_stack"),
			(party_stack_get_troop_id, ":troop_no", ":party_no", ":stack_no"),
			(eq, ":troop_no", "trp_knight_2_5"),
			(assign, "$g_medger_cerwyn", ":party_no"),
		(try_end),
		(try_for_range, ":stack_no", 0, ":no_stack"),
			(party_stack_get_troop_id, ":troop_no", ":party_no", ":stack_no"),
			(eq, ":troop_no", "trp_knight_2_4"),
			(assign, "$g_robin_flint", ":party_no"),
		(try_end),
		(try_for_range, ":stack_no", 0, ":no_stack"),
			(party_stack_get_troop_id, ":troop_no", ":party_no", ":stack_no"),
			(eq, ":troop_no", "trp_knight_2_15"),
			(assign, "$g_wendel_manderly", ":party_no"),
		(try_end),
		(try_for_range, ":stack_no", 0, ":no_stack"),
			(party_stack_get_troop_id, ":troop_no", ":party_no", ":stack_no"),
			(eq, ":troop_no", "trp_knight_2_13"),
			(assign, "$g_smalljon_umber", ":party_no"),
		(try_end),
	(try_end),
	
	]),

Causes this:

Code:
 SCRIPT ERROR ON OPCODE 1232: Invalid Party ID: 0; LINE NO: 92: 
 At menu menu_flee_to_the_wall_12 item mno_choice_10_1 consequence. At menu menu_flee_to_the_wall_12 item mno_choice_10_1 consequence. SCRIPT ERROR ON OPCODE 1232: Invalid Party ID: 0; LINE NO: 93: 
 At menu menu_flee_to_the_wall_12 item mno_choice_10_1 consequence. At menu menu_flee_to_the_wall_12 item mno_choice_10_1 consequence.

I feel like I've been blinding myself looking at this - any suggestions or tips would be welcome.
 
KnightV said:
                (troop_get_slot, ":amount", ":troop_id", slot_troop_prebattle_alt_division_amount), #Count
(val_add, ":amount", 1),
(assign, ":amount", 1),
(troop_set_slot, ":troop_id", slot_troop_prebattle_alt_division_amount, ":amount"),
    (try_end),

lets see what you are doing above:
a) get a value from a slot, value is X
b) add 1 to that value, value is = X + 1
c) set value to 1 (losing all data you got so far). Value is now X = 1
d) use that value that means nothing (as you have a hardcoded value of 1)

to solve the unassigned error you need to assign a value, like 0 (zero), before the loop, or before it is used on a get_slot operation, and so on

Code:
(assign, ":var", 0),
(try_for_range, ":troop", trp_1, trp_last),
   (val_add, ":var", 1),
   ... stuff
(try_end),

^ just a example

Code:
      (assign, ":var", 0),
      (troop_get_slot, ":var", ":troop", slot_X),
      (val_add, ":var", 1),
      (troop_set_slot, ":troop", slot_Y, ":var"),
    (try_end),
^another example



KnightV said:
i have merged pbod 0.96.3 in my mod but when i play and press G or H game crashes with error invalid opcode 8
what is OPCODE 8? Look inside your header_operations.py and try to find it  :wink:
 
opcode 1232 means operation remove_party

Code:
(remove_party,  "$g_robb_stark"),
(remove_party,  "$g_jeor_mormont"),
(remove_party,  "$g_donelle_hornwood"),
(remove_party,  "$g_benfred_tallhart"),
(remove_party,  "$g_medger_cerwyn"),
(remove_party,  "$g_robin_flint"),
(remove_party,  "$g_smalljon_umber"),
(remove_party,  "$g_wendel_manderly"),

one of these globals must be unitialized, thus you are trying to remove party 0, which is the player party
 
Code:
store_time_of_day          = 2271  # (store_time_of_day, <destination>),
																	 # Stores current day hour (value in 0..24 range).
gives the campaign time, its probably the one you are looking for.


if youre looking for time inside a scene, its probably one of these:
Code:
get_startup_sun_light                        = 2394  # (get_startup_sun_light, <position_no>),
																										 # Version 1.165+. Returns startup sunlight color in (x, y, z) coordinates of position register.
get_startup_ambient_light                    = 2395  # (get_startup_ambient_light, <position_no>),
																										 # Version 1.165+. Returns startup ambient light color in (x, y, z) coordinates of position register.
get_startup_ground_ambient_light             = 2396  # (get_startup_ground_ambient_light, <position_no>),
																										 # Version 1.165+. Returns startup ambient ground lighting color in (x, y, z) coordinates of position register.
 
kalarhan said:
whydott said:
why did it error?

Code:
# ("castle_9"

the "#" means that line is just a comment, it has no effect on the game. It is disabled. It is turned off. It is not really there.
NPC99 said:
whydott said:
yes I don't have (for example) castle_9 but I don't write it in both module_parties.py and ID_parties.py .
It's like "I do it in purpose"
then it should be okay right? why did it error?


If you remove castle_9 from module_parties.py, the compiler will object to any code that still refers to it. Search all the files in your module folder for all references to p_castle_9 and remove or change them.

thank you, Its already done  :grin:

Lets move another question, can I create a scenario? it will be in the start of new game. each scenario have different start date, different owner of fief, maybe new faction available, something like that.
 
(troop_get_slot, ":alt_division", ":troop_id", slot_troop_prebattle_alt_division),
(is_between, ":alt_division", 0, 9), #Valid division
(troop_get_class, ":class", ":troop_id"),
(neq, ":class", ":alt_division"), #So there is an actual change to make
(assign, ":amount", 0),
(troop_get_slot, ":amount", ":troop_id", slot_troop_prebattle_alt_division_amount), #Count
(val_add, ":amount", 1),
(troop_set_slot, ":troop_id", slot_troop_prebattle_alt_division_amount, ":amount"),

    (try_end), 






Kalarhan, i know English bad that's why can you give example with fixed code which i posted
 
whydott said:
Lets move another question, can I create a scenario? it will be in the start of new game. each scenario have different start date, different owner of fief, maybe new faction available, something like that.

sure. See the huge (1000+ lines of code) script_game_start and auxiliary scripts. They are responsible for most of the game first day setup (who owns what, etc). You can create different types of campaigns if you want to, just don't expect to be easy on the first time, as that script is a mess/spaghetti/lacks all logic/not organized. You will need to clean it up to make new versions.

VC DLC, as a example, has a presentation on a new game that lets you choose between storyline (RPG campaign), and three different sandbox modes (adventurer, minor lord, king).

You are free to do whatever you like with your starting scenario. You just can't change the world map (geography like rivers and mountains). But you can change the date, enable/disable towns, create/destroy factions, and so on.

Again: not something that Native did, so expect to have to do some of the work yourself. Not easy task with a 10-step tutorial. Your own work.


KnightV said:
i added it but it is not work

"it did not work" = anything. Don't compute. Need further data.

KnightV said:
Kalarhan there is not any word @opcode@ in header_operations
OPCODE = OPERATION, as in, you look for the value (number), like "8"

Remember to use the edit button dude, you are doing multiple posts again.
 
kalarhan said:
whydott said:
Lets move another question, can I create a scenario? it will be in the start of new game. each scenario have different start date, different owner of fief, maybe new faction available, something like that.

sure. See the huge (1000+ lines of code) script_game_start and auxiliary scripts. They are responsible for most of the game first day setup (who owns what, etc). You can create different types of campaigns if you want to, just don't expect to be easy on the first time, as that script is a mess/spaghetti/lacks all logic/not organized. You will need to clean it up to make new versions.

VC DLC, as a example, has a presentation on a new game that lets you choose between storyline (RPG campaign), and three different sandbox modes (adventurer, minor lord, king).

You are free to do whatever you like with your starting scenario. You just can't change the world map (geography like rivers and mountains). But you can change the date, enable/disable towns, create/destroy factions, and so on.

Again: not something that Native did, so expect to have to do some of the work yourself. Not easy task with a 10-step tutorial. Your own work.

Ah I see :shock: so, no mod have done this before?
 
Ikaguia said:
opcode 1232 means operation remove_party

Code:
(remove_party,  "$g_robb_stark"),
(remove_party,  "$g_jeor_mormont"),
(remove_party,  "$g_donelle_hornwood"),
(remove_party,  "$g_benfred_tallhart"),
(remove_party,  "$g_medger_cerwyn"),
(remove_party,  "$g_robin_flint"),
(remove_party,  "$g_smalljon_umber"),
(remove_party,  "$g_wendel_manderly"),

one of these globals must be unitialized, thus you are trying to remove party 0, which is the player party

What does that mean? That it is unitialized? That the assigned party does not exist?
 
Cozur said:
What does that mean? That it is unitialized? That the assigned party does not exist?

one global has no value (default is 0), or for some reason is set to 0 (game logic, bug, etc). Remove party operation is used. Player part is deleted. Because player party is "p_main_party", which as you can see on ID_parties.py, that is the player party. "p_main_party = 0"
another global also has value of 0. For whatever reason. Game tries to remove that party (id=0) again. Party does not exists. So it can't be removed a second time. Game gives a error warning that you tried to remove a party that does not exists.
check your globals and why they are trying to use the value of 0
or at the very least add a check condition before each remove:

1) is value > 0
2) is party still active
3) then remove



whydott said:
Ah I see :shock: so, no mod have done this before?

dunno, I for sure haven't played all thousands of Warband mods or even remember the features of all the few I played lol  :razz:

if you meant about a tutorial: I don't recall any. It is basic ground work, which requires a little more experience from the modder and coding work (not a easy copy and paste task), so you need to decide if you want to do it or not.

the easiest way to create multiple campaign is to have multiple mods, as the Native way is easier to apply that way.

the further your design moves from Native (or any other base mod you are using), the harder the coding tasks becomes. And the amount of time it will take. Keep that in mind if this is your first project. Trying to do something too complicate will only lead you to frustration and you will most likely just abandon the project half way through.
 
KnightV said:
i have add a new brf new textures but in game one armor is white what is wrong&&
What about it ??? And how to put scripts from file module_scripts_addon? I have pasted their in the end of file but appear errors " usage of unassign end variable"
I say about wse
 
Status
Not open for further replies.
Back
Top Bottom