por Rafalongo Lun Mar 20, 2017 7:41 pm
no vi nada util en header_operations, pero encontré esto ni bien se abre "module triggers, indicaciones, aunque no sé de que parte habla:
####################################################################################################################
# Each trigger contains the following fields:
# 1) Check interval: How frequently this trigger will be checked
# 2) Delay interval: Time to wait before applying the consequences of the trigger
# After its conditions have been evaluated as true.
# 3) Re-arm interval. How much time must pass after applying the consequences of the trigger for the trigger to become active again.
# You can put the constant ti_once here to make sure that the trigger never becomes active again after it fires once.
# 4) Conditions block (list). This must be a valid operation block. See header_operations.py for reference.
# Every time the trigger is checked, the conditions block will be executed.
# If the conditions block returns true, the consequences block will be executed.
# If the conditions block is empty, it is assumed that it always evaluates to true.
# 5) Consequences block (list). This must be a valid operation block. See header_operations.py for reference.
####################################################################################################################
ese punto 2 parece la clave, la cagada es que no se formular una linea de python, me guío por observacion copy and paste xD pero voy a mirar un poco mas...
SOLUCIONADO tambien pude agregar lo de que cobren, resulta que donde se creaba la variable money que despues no me encontraba no lo habia agregado por estar fuera del "try begin, try end" especifico. al final terminé remplazando esta parte del codigo que usaba enteramente por el del brytenwalda (el viejo dle brytenwalda, xq en la ultima version utiliza otor diferente...), ya que note que al mio le faltaba la parte de
neq "no igual a ser prisionero" así que supongo que si te metías al mar siendo prisionero con este cambio me iba a cobrar y desmoralizar.
Lo del tiempo de espera creo que es por el principio de la primera linea, en mi codigo decia 0.1, en este dice 0.5, otro cambio no hay...
así quedó
- Código:
## SEA BATTLES BEGIN
(0.5, 0, 0, [(neq, "$g_player_icon_state", pis_ship),
(neq, "$g_player_is_captive", 1),
(party_get_current_terrain,":terrain","p_main_party"),
(assign,reg1,":terrain"),
], # rt_steppe is an example for the name of your new water terrain
[(try_begin),
(troop_get_inventory_slot, ":cur_horse", "trp_player", 8), #horse slot
(assign, ":new_icon", -1),
(try_begin),
(eq,reg1,7),
(assign, ":new_icon", "icon_ship"),
#(display_message,"@water"),
(store_troop_gold,":money","trp_player"),
(try_begin),
(gt,":money",9),
(troop_remove_gold, "trp_player", 10),
(display_message,"@You hire a boat for the trip."),
(display_message,"@Tus hombres se ponen nerviosos al cruzar el mar."),
(call_script, "script_change_player_party_morale", -1),
(else_try),
(display_message,"@No tienes dinero suficiente para el viaje, pero obligas a unos pescadores a prestarte sus botes."),
(call_script, "script_change_player_honor", -1),
(display_message,"@Tus hombres se ponen nerviosos al cruzar el mar."),
(call_script, "script_change_player_party_morale", -1),
(try_end),
(else_try),
(eq, "$g_player_icon_state", pis_normal),
(try_begin),
(ge, ":cur_horse", 0),
(assign, ":new_icon", "icon_player_horseman"),
#(display_message,"@no water, horse"),
(else_try),
(assign, ":new_icon", "icon_player"),
#(display_message,"@no water, no horse"),
(try_end),
(else_try),
(eq, "$g_player_icon_state", pis_camping), # All of this is thanks to Lumos bein' generous, and not being as much of a lazy arse as I am
(assign, ":new_icon", "icon_camp"),
(try_end),
(party_set_icon,"p_main_party", ":new_icon"),
]),