A Question about a "Trigger"

Users who are viewing this thread

Average

Yes, new to modding, and i get embarrassed having to ask for help anytime i get stumped by this, but ive noticed there has been no star wars mod for warband, with help from a forum user i was able to figure out how to generally use python, but i cant figure out most triggers....i know its a big part, i read the tutorial, but wow. Thing is, im doing this in the clone wars, and i was just going to do two factions (yes, im leaving out Hutt Cartel, as they dont rise largely until the Empire), But anyway, The Cofederacy of Independent Systems (CIS) and the Galactic Republic. So using Morphs i simply combined all the factions increased relations with other factions and put negative relations with other factions. Tis be hard. When they start, they instantlly declare peace with atleast one faction, and i know in time theyd declare war on their combined faction. I remember reading somewhere a trigger could reset their wars...making them longer and their peace, so i can make all the combined factions always at peace, and always at war with the other.... ive been looking through the Module_Triggers.py and Module_simple_triggers.py and ive discovered in the simple triggers, this little line.

#diplomatic indices
  (24,
  [
  (call_script, "script_randomly_start_war_peace_new", 1),

  (try_begin),
(store_random_in_range, ":acting_village", villages_begin, villages_end),
(store_random_in_range, ":target_village", villages_begin, villages_end),
(store_faction_of_party, ":acting_faction", ":acting_village"),
(store_faction_of_party, ":target_faction", ":target_village"), #target faction receives the provocation
(neq, ":acting_village", ":target_village"),
(neq, ":acting_faction", ":target_faction"),

(call_script, "script_diplomacy_faction_get_diplomatic_status_with_faction", ":target_faction", ":acting_faction"),
(eq, reg0, 0),

(try_begin),
(party_slot_eq, ":acting_village", slot_center_original_faction, ":target_faction"),

(call_script, "script_add_notification_menu", "mnu_notification_border_incident", ":acting_village", -1),
(else_try),
(party_slot_eq, ":acting_village", slot_center_ex_faction, ":target_faction"),

(call_script, "script_add_notification_menu", "mnu_notification_border_incident", ":acting_village", -1),

(else_try),
(set_fixed_point_multiplier, 1),
(store_distance_to_party_from_party, ":distance", ":acting_village", ":target_village"),
(lt, ":distance", 25),

(call_script, "script_add_notification_menu", "mnu_notification_border_incident", ":acting_village", ":target_village"),
(try_end),
  (try_end),
That sends off a little bell that it could mean war and peace, sure, there plenty more of war and peace things, but Diplomatic status stands out, is this what i should edit? and if so, how? Sorry for my idiocy. Im cautios doing Tech like stuff, as problems tend to find me. Ive also had problems with Thogrim Map editor, but ive found a topic with a similar question being answered and im waiting on that to be finished, plus i shouldnt edit the map until i atleast have factions... Any reply is helpful.
 
well, its been a day, so i guess im bumping this, anyone got the slightest idea?
 
Average said:
Yes, new to modding, and i get embarrassed having to ask for help anytime i get stumped by this, but ive noticed there has been no star wars mod for warband, with help from a forum user i was able to figure out how to generally use python, but i cant figure out most triggers....i know its a big part, i read the tutorial, but wow. Thing is, im doing this in the clone wars, and i was just going to do two factions (yes, im leaving out Hutt Cartel, as they dont rise largely until the Empire), But anyway, The Cofederacy of Independent Systems (CIS) and the Galactic Republic. So using Morphs i simply combined all the factions increased relations with other factions and put negative relations with other factions. Tis be hard. When they start, they instantlly declare peace with atleast one faction, and i know in time theyd declare war on their combined faction. I remember reading somewhere a trigger could reset their wars...making them longer and their peace, so i can make all the combined factions always at peace, and always at war with the other.... ive been looking through the Module_Triggers.py and Module_simple_triggers.py and ive discovered in the simple triggers, this little line.

#diplomatic indices
  (24,
  [
  (call_script, "script_randomly_start_war_peace_new", 1),

  (try_begin),
(store_random_in_range, ":acting_village", villages_begin, villages_end),
(store_random_in_range, ":target_village", villages_begin, villages_end),
(store_faction_of_party, ":acting_faction", ":acting_village"),
(store_faction_of_party, ":target_faction", ":target_village"), #target faction receives the provocation
(neq, ":acting_village", ":target_village"),
(neq, ":acting_faction", ":target_faction"),

(call_script, "script_diplomacy_faction_get_diplomatic_status_with_faction", ":target_faction", ":acting_faction"),
(eq, reg0, 0),

(try_begin),
(party_slot_eq, ":acting_village", slot_center_original_faction, ":target_faction"),

(call_script, "script_add_notification_menu", "mnu_notification_border_incident", ":acting_village", -1),
(else_try),
(party_slot_eq, ":acting_village", slot_center_ex_faction, ":target_faction"),

(call_script, "script_add_notification_menu", "mnu_notification_border_incident", ":acting_village", -1),

(else_try),
(set_fixed_point_multiplier, 1),
(store_distance_to_party_from_party, ":distance", ":acting_village", ":target_village"),
(lt, ":distance", 25),

(call_script, "script_add_notification_menu", "mnu_notification_border_incident", ":acting_village", ":target_village"),
(try_end),
  (try_end),
That sends off a little bell that it could mean war and peace, sure, there plenty more of war and peace things, but Diplomatic status stands out, is this what i should edit? and if so, how? Sorry for my idiocy. Im cautios doing Tech like stuff, as problems tend to find me. Ive also had problems with Thogrim Map editor, but ive found a topic with a similar question being answered and im waiting on that to be finished, plus i shouldnt edit the map until i atleast have factions... Any reply is helpful.

Back from the future... Look, another modding person trying to make consistent faction relations in the Star Wars universe!
Code:
http://forums.taleworlds.com/index.php?topic=64162.0

Basically, you have to edit the
Code:
randomly_start_war_peace(_new)
script inside
Code:
module_scripts.py
.
Read that thread, it basically talks about the same thing, and they are golden age modders.


This might be useful for coalitions, if you want to start to get fancy:
Code:
http://forums.taleworlds.com/index.php?topic=135338.0

More here:
Code:
https://encrypted.google.com/search?q=script_randomly_start_war_peace+site:forums.taleworlds.com
 
ill be honest, i dont know what they mean from "hack up", do i just make the script look like this?

#------------------------------------------------------------------------------------------------------
#SW - trying to make it so empire and rebel can't declare peace
(try_begin),
(eq, ":cur_kingdom", fac_kingdom_1),
(eq, ":cur_kingdom_2", fac_kingdom_2),
(assign, ":continue", 0),
(try_end),
(try_begin),
(eq, ":cur_kingdom", fac_kingdom_2),
(eq, ":cur_kingdom_2", fac_kingdom_1),
(assign, ":continue", 0),
(try_end),
#------------------------------------------------------------------------------------------------------

              (try_end),
              (eq, ":continue", 1),
              (call_script, "script_diplomacy_start_war_between_kingdoms", ":cur_kingdom", ":cur_kingdom_2", ":initializing_war_peace_cond"),
 
Average said:
ill be honest, i dont know what they mean from "hack up", do i just make the script look like this?
...

Do you understand it? Maybe you should make something easier to get the hang of it first.
I can code it for you so that you can paste it without learning anything, but will be useless in the long run.

Do some coding and read first, do small tweaks. Going from text editing tools to real modding is pretty challenging at first.
 
Im not sure if 'Hack' is a term i should know. If found a bit of code in Notepad++ module_scripts.py  that looks similar, but unable to see the part of being edited.

Code:
 ("randomly_start_war_peace_new",
    [
    (store_script_param_1, ":initializing_war_peace_cond"),
	
	(assign, ":players_kingdom_at_peace", 0), #if the player kingdom is at peace, then create an enmity
	(try_begin),
		(is_between, "$players_kingdom", "fac_kingdom_1", kingdoms_end),
		(assign, ":players_kingdom_at_peace", 1),
	(try_end),
	
    (try_for_range, ":cur_kingdom", "fac_kingdom_1", kingdoms_end),
        (faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active),
	  
		(try_for_range, ":cur_kingdom_2", kingdoms_begin, kingdoms_end),
			(neq, ":cur_kingdom", ":cur_kingdom_2"),
			(faction_slot_eq, ":cur_kingdom_2", slot_faction_state, sfs_active),
		
			(call_script, "script_npc_decision_checklist_peace_or_war", ":cur_kingdom", ":cur_kingdom_2", -1),
			(assign, ":kingdom_1_to_kingdom_2", reg0),
			
			(store_relation, ":cur_relation", ":cur_kingdom", ":cur_kingdom_2"),
			(try_begin),
				(lt, ":cur_relation", 0), #AT WAR
 
Back
Top Bottom