always choose side when joining battles

Currently Viewing (Users: 0, Guests: 1)

einhar

Regular
Best answers
0
I wanna add an option to my mod witch could give the opportunity to the player to always be abble to choose a side when joining a battle. even if the player is not allied or ennemy to either side.

a stupid exemple:  A Swadian lord is in a battle VS Looters,                i wanna join the looters!

if some peoples know links that gives a tutorial on this or wanna spend some time on explaining it on this post, it would be very usefull for me and a lot of others, i'm shure


thanks in advance modders.
 

Rath0s

Baron
M&BWBNW
Best answers
0
Would also be cool if you did not have to choose sides and charge for both parties. :twisted:

But sorry cant help you.
 

einhar

Regular
Best answers
0
haha

i like how you think!

and be a one man army!



I finnally found what I was searching... by searching the forums... like I posted that topic a little in a hurry.


If someone is interested, here's the link where I get my info... from "tommylaw"

I hope he wont get upset that I give U that link...  :roll:

anyway, thanks to this tommylaw, i tried his code change and it works perfectly  :wink:

so here's how you can always choose your side when joining a fight:

http://forums.taleworlds.com/index.php/topic,46290.msg1530222.html#msg1530222

its reply #1149

oh, and one last thing... dont click on the bad name and fight against a friendly lord...
it really do a diplomatic incident  :roll:
 

cdvader

I'd say this is pretty simple. Remove the conditions checks on "pre_join", and change the g_enemy_party's to g_ally_party's.
 

NaglFaar

Baron
M&BWBNW
Best answers
0
Care to elaborate a little more?

In game_menus, pre_join, do you mean these?

"Move in to help the {s2}.",[
              (select_enemy,0),
              (assign,"$g_enemy_party","$g_encountered_party"),
              (assign,"$g_ally_party","$g_encountered_party_2"),
              (jump_to_menu,"mnu_join_battle")]),

.....

"Rush to the aid of the {s1}.",[
              (select_enemy,1),
              (assign,"$g_enemy_party","$g_encountered_party_2"),
              (assign,"$g_ally_party","$g_encountered_party"),
              (jump_to_menu,"mnu_join_battle")]),

......

And what are condition checks?
I'm a bit new to this so some points in the right direction would be nice.

If you have the time ofcourse.
Otherwise, thanks anyway.
 

cdvader

There are two blocks. One is a condition block, and the second is a consuqence block. Let's say we have this trigger.
Code:
    (0, 0, 0
	    [conditions block],
		 [consuqences block],
	),
Now another example. The "Something has happened!" message wont display until the global variable "$something_has_happened" is 1.
Code:
    (0, 0, ti_once,
	    [(eq, "$something_has_happened", 1)], #Conditions block.
		[(display_message, "@Something has happened!")], #Consuqences block.
	),
So, remove the conditions block, and try first by not changing the g_enemy_party stuff.
 

NaglFaar

Baron
M&BWBNW
Best answers
0
Then I think I should comment out these 4 lines in the script:

      ("pre_join_help_attackers",[
          (store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"),
          (store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"),
          (store_faction_of_party, ":defender_faction", "$g_encountered_party"),
          (store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"),
          (ge, ":attacker_relation", 0),
          (lt, ":defender_relation", 0),

          ],
          "Move in to help the {s2}.",[
              (select_enemy,0),
              (assign,"$g_enemy_party","$g_encountered_party"),
              (assign,"$g_ally_party","$g_encountered_party_2"),
              (jump_to_menu,"mnu_join_battle")]),
.....
.....


      ("pre_join_help_defenders",[
          (store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"),
          (store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"),
          (store_faction_of_party, ":defender_faction", "$g_encountered_party"),
          (store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"),
          (ge, ":defender_relation", 0),
          (lt, ":attacker_relation", 0),

          ],
          "Rush to the aid of the {s1}.",[
              (select_enemy,1),
              (assign,"$g_enemy_party","$g_encountered_party_2"),
              (assign,"$g_ally_party","$g_encountered_party"),
              (jump_to_menu,"mnu_join_battle")]),



Here is the whole script:
Code:
(
    "pre_join",0,
    "You come across a battle between {s2} and {s1}. You decide to...",
    "none",
    [
        (str_store_party_name, 1,"$g_encountered_party"),
        (str_store_party_name, 2,"$g_encountered_party_2"),
      ],
    [
      ("pre_join_help_attackers",[
          (store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"),
          (store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"),
          (store_faction_of_party, ":defender_faction", "$g_encountered_party"),
          (store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"),
          (ge, ":attacker_relation", 0),
          (lt, ":defender_relation", 0),
          ],
          "Move in to help the {s2}.",[
              (select_enemy,0),
              (assign,"$g_enemy_party","$g_encountered_party"),
              (assign,"$g_ally_party","$g_encountered_party_2"),
              (jump_to_menu,"mnu_join_battle")]),
      ("pre_join_help_defenders",[
          (store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"),
          (store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"),
          (store_faction_of_party, ":defender_faction", "$g_encountered_party"),
          (store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"),
          (ge, ":defender_relation", 0),
          (lt, ":attacker_relation", 0),
          ],
          "Rush to the aid of the {s1}.",[
              (select_enemy,1),
              (assign,"$g_enemy_party","$g_encountered_party_2"),
              (assign,"$g_ally_party","$g_encountered_party"),
              (jump_to_menu,"mnu_join_battle")]),
      ("pre_join_leave",[],"Don't get involved.",[(leave_encounter),(change_screen_return)]),
    ]
  ),

I'll try this out and see what happens.
 

NaglFaar

Baron
M&BWBNW
Best answers
0
I tried it out and it worked.

By commenting out the whole block, do you mean like this:

      ("pre_join_help_attackers",[
          #(store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"),
          #(store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"),
          #(store_faction_of_party, ":defender_faction", "$g_encountered_party"),
          #(store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"),
          # (ge, ":attacker_relation", 0),
          # (lt, ":defender_relation", 0),

          ],
          "Move in to help the {s2}.",[
              (select_enemy,0),
              (assign,"$g_enemy_party","$g_encountered_party"),
              (assign,"$g_ally_party","$g_encountered_party_2"),
              (jump_to_menu,"mnu_join_battle")]),


.......
.......

      ("pre_join_help_defenders",[
          #(store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"),
          #(store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"),
        #(store_faction_of_party, ":defender_faction", "$g_encountered_party"),
          #(store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"),
          # (ge, ":defender_relation", 0),
          # (lt, ":attacker_relation", 0),

          ],
          "Rush to the aid of the {s1}.",[
              (select_enemy,1),
              (assign,"$g_enemy_party","$g_encountered_party_2"),
              (assign,"$g_ally_party","$g_encountered_party"),
              (jump_to_menu,"mnu_join_battle")]),


However I get some warnings when I compile.
It says:

Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
WARNING: Local variable never used: attacker_relation
WARNING: Local variable never used: defender_relation
WARNING: Local variable never used: attacker_relation
WARNING: Local variable never used: defender_relation

I know it isn't something to worry about but I'd like to remove those errors.
Will they, by doing as you mentioned above?




EDIT

Well It compiled without errors by removing the whole block.
I'll just try it out in-game.



EDIT 2

All worked out well.
Thank you a lot.
 

Curumo

Recruit
Best answers
0
Sounds pretty cool...be a deadly Arena match...Deadly as in, you can kill them..not just knock em out.  :mrgreen: I'd love that...