Author Topic: always choose side when joining battles  (Read 19134 times)

0 Members and 1 Guest are viewing this topic.

einhar

  • Regular
  • *
    • View Profile
  • Faction: Nord
always choose side when joining battles
« on: August 30, 2009, 01:13:56 AM »
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
  • *
    • View Profile
  • Faction: Nord
  • MP nick: Rathos/Egil_Haraldson
  • M&BWBNW
Re: always choose side when joining battles
« Reply #1 on: August 30, 2009, 01:44:26 AM »
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
  • *
    • View Profile
  • Faction: Nord
Re: always choose side when joining battles
« Reply #2 on: August 30, 2009, 02:13:31 AM »
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:

NaglFaar

  • Baron
  • *
    • View Profile
  • Faction: Nord
  • MP nick: NaglFaar
  • WBM&BNW
Re: always choose side when joining battles
« Reply #3 on: August 30, 2009, 09:05:02 AM »
Does anyone know how to do this in the module system?
Mæli þarft eða þegi


the thread is in Alpha stages and when all the ideas have been put together and implemented the taleworlds post shall be completed.

cdvader

  • Guest
Re: always choose side when joining battles
« Reply #4 on: August 30, 2009, 10:48:28 AM »
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
  • *
    • View Profile
  • Faction: Nord
  • MP nick: NaglFaar
  • WBM&BNW
Re: always choose side when joining battles
« Reply #5 on: August 31, 2009, 08:57:22 AM »
Care to elaborate a little more?

In game_menus, pre_join, do you mean these?

(click to show/hide)

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.
Mæli þarft eða þegi


the thread is in Alpha stages and when all the ideas have been put together and implemented the taleworlds post shall be completed.

cdvader

  • Guest
Re: always choose side when joining battles
« Reply #6 on: August 31, 2009, 09:27:03 AM »
There are two blocks. One is a condition block, and the second is a consuqence block. Let's say we have this trigger.
Code: [Select]
    (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: [Select]
    (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
  • *
    • View Profile
  • Faction: Nord
  • MP nick: NaglFaar
  • WBM&BNW
Re: always choose side when joining battles
« Reply #7 on: August 31, 2009, 09:43:20 AM »
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:
(click to show/hide)

I'll try this out and see what happens.
Mæli þarft eða þegi


the thread is in Alpha stages and when all the ideas have been put together and implemented the taleworlds post shall be completed.

cdvader

  • Guest
Re: always choose side when joining battles
« Reply #8 on: August 31, 2009, 09:52:32 AM »
You can remove all of the stuff within the conditions block.

NaglFaar

  • Baron
  • *
    • View Profile
  • Faction: Nord
  • MP nick: NaglFaar
  • WBM&BNW
Re: always choose side when joining battles
« Reply #9 on: August 31, 2009, 10:20:48 AM »
I tried it out and it worked.

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

(click to show/hide)


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.
« Last Edit: August 31, 2009, 10:58:14 AM by NaglFaar »
Mæli þarft eða þegi


the thread is in Alpha stages and when all the ideas have been put together and implemented the taleworlds post shall be completed.

Curumo

  • Recruit
  • *
    • View Profile
  • Faction: Nord
Re: always choose side when joining battles
« Reply #10 on: September 01, 2009, 09:10:00 AM »
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...
So much death...What can man do against such reckless hate?.....Fight it!..I dunno...I give myself 2 options: Fight or sit and die. I prefer first one, What do you take, Fight..or die? ..I'm kinda insane..I think...But hey, life's life! One must make do with what they got at hand...