Changing the dating system

Users who are viewing this thread

Monkeys_Uncle

Sergeant at Arms
Hi Guys,
I've been altering the dating system to work as the shire calendar (12 30 day months + 6 special days, I'm doing them as 6 1 day months at the moment) in my mod, I think I've got it figured out correctly, but when I compile it throws aloha of syntax errors and a few of the string get messed around.

Do you guys have any idea what might be causing this problem?
Module_Strings:
Code:
("yule_reg1_reg2", "Yule {reg1}, {reg2}"),
  ("january_reg1_reg2", "Afteryule {reg1}, {reg2}"),
  ("february_reg1_reg2", "Solmath {reg1}, {reg2}"),
  ("march_reg1_reg2", "Rethe {reg1}, {reg2}"),
  ("april_reg1_reg2", "Astron {reg1}, {reg2}"),
  ("may_reg1_reg2", "Thrimidge {reg1}, {reg2}"),
  ("june_reg1_reg2", "Forelithe {reg1}, {reg2}"),
  ("lithe_reg1_reg2", "Lithe {reg1}, {reg2}"),
  ("midyear_reg1_reg2", "Midyear's Day {reg1}, {reg2}"),
  ("overlithe_reg1_reg2", "Overlithe {reg1}, {reg2}"),
  ("july_reg1_reg2", "Afterlithe {reg1}, {reg2}"),
  ("august_reg1_reg2", "Wedmath {reg1}, {reg2}"),
  ("september_reg1_reg2", "Halimath {reg1}, {reg2}"),
  ("october_reg1_reg2", "Winterfilth {reg1}, {reg2}"),
  ("november_reg1_reg2", "Blotmath {reg1}, {reg2}"),
  ("december_reg1_reg2", "Foreyule {reg1}, {reg2}"),

Module_Scripts:
Code:
#NEW
#script_game_get_date_text:
  # This script is called from the game engine when the date needs to be displayed.
  # INPUT: arg1 = number of days passed since the beginning of the game
  # OUTPUT: result string = date
  ("game_get_date_text",
    [
      (store_script_param_2, ":num_hours"),
      (store_div, ":num_days", ":num_hours", 24),
      (store_add, ":cur_day", ":num_days", 23),
      (assign, ":cur_month", 3),
      (assign, ":cur_year", 3017),
      (assign, ":try_range", 99999),
      (try_for_range, ":unused", 0, ":try_range"),
        
		(try_begin),
           (this_or_next|eq, ":cur_month", 1),
		  #(this_or_next|eq, ":cur_month", 2),
		  #(this_or_next|eq, ":cur_month", 3),
          #(this_or_next|eq, ":cur_month", 4),
		  #(this_or_next|eq, ":cur_month", 5),
          #(this_or_next|eq, ":cur_month", 6),
		  #(this_or_next|eq, ":cur_month", 7),
		   (this_or_next|eq, ":cur_month", 8),
		   (this_or_next|eq, ":cur_month", 9),
		  #(this_or_next|eq, ":cur_month", 10),
		   (this_or_next|eq, ":cur_month", 11),
          #(this_or_next|eq, ":cur_month", 12),
          #(this_or_next|eq, ":cur_month", 13),
		  #(this_or_next|eq, ":cur_month", 14),
          #(this_or_next|eq, ":cur_month", 15),
		  #(this_or_next|eq, ":cur_month", 16),
          (eq, ":cur_month", 18),
          (assign, ":month_day_limit", 1),
		
		(else_try),
          (this_or_next|eq, ":cur_month", 2),
		  (this_or_next|eq, ":cur_month", 3),
          (this_or_next|eq, ":cur_month", 4),
		  (this_or_next|eq, ":cur_month", 5),
          (this_or_next|eq, ":cur_month", 6),
		  (this_or_next|eq, ":cur_month", 7),
          (this_or_next|eq, ":cur_month", 12),
          (this_or_next|eq, ":cur_month", 13),
		  (this_or_next|eq, ":cur_month", 14),
          (this_or_next|eq, ":cur_month", 15),
		  (this_or_next|eq, ":cur_month", 16),
          (eq, ":cur_month", 17),
          (assign, ":month_day_limit", 30),
 
        (else_try),
          (try_begin),
            (store_div, ":cur_year_div_4", ":cur_year", 4),
            (val_mul, ":cur_year_div_4", 4),
            (eq, ":cur_year_div_4", ":cur_year"),
            (assign, ":month_day_limit", 1),
          (else_try),
            (assign, ":month_day_limit", 0),      
          (try_end),
        (try_end),
        
		(try_begin),
          (gt, ":cur_day", ":month_day_limit"),
          (val_sub, ":cur_day", ":month_day_limit"),
          (val_add, ":cur_month", 1),
          (try_begin),
            (gt, ":cur_month", 12),
            (val_sub, ":cur_month", 12),
            (val_add, ":cur_year", 1),
          (try_end),
        (else_try),
          (assign, ":try_range", 0),
        (try_end),
      (try_end),
      (assign, reg1, ":cur_day"),
      (assign, reg2, ":cur_year"),
      (try_begin),
        (eq, ":cur_month", 1,
        (str_store_string, s1, "str_yule_reg1_reg2"),
	  (else_try),
		(eq, ":cur_month", 2),
        (str_store_string, s1, "str_january_reg1_reg2"),
      (else_try),
        (eq, ":cur_month", 3,
        (str_store_string, s1, "str_february_reg1_reg2"),
      (else_try),
        (eq, ":cur_month", 4),
        (str_store_string, s1, "str_march_reg1_reg2"),
      (else_try),
        (eq, ":cur_month", 5),
        (str_store_string, s1, "str_april_reg1_reg2"),
      (else_try),
        (eq, ":cur_month", 6),
        (str_store_string, s1, "str_may_reg1_reg2"),
      (else_try),
        (eq, ":cur_month", 7),
        (str_store_string, s1, "str_june_reg1_reg2"),
	  (else_try),
        (eq, ":cur_month", 8),
        (str_store_string, s1, "str_lithe_reg1_reg2"),
	  (else_try),
        (eq, ":cur_month", 9),
        (str_store_string, s1, "str_midyear_reg1_reg2"),
	  (else_try),
        (eq, ":cur_month", 10),
        (str_store_string, s1, "str_overlithe_reg1_reg2"),
	  (else_try),
        (eq, ":cur_month", 11),
        (str_store_string, s1, "str_lithe_reg1_reg2"),
      (else_try),
        (eq, ":cur_month", 12),
        (str_store_string, s1, "str_july_reg1_reg2"),
      (else_try),
        (eq, ":cur_month", 13),
        (str_store_string, s1, "str_august_reg1_reg2"),
      (else_try),
        (eq, ":cur_month", 14),
        (str_store_string, s1, "str_september_reg1_reg2"),
      (else_try),
        (eq, ":cur_month", 15),
        (str_store_string, s1, "str_october_reg1_reg2"),
      (else_try),
        (eq, ":cur_month", 16),
        (str_store_string, s1, "str_november_reg1_reg2"),
      (else_try),
        (eq, ":cur_month", 17),
        (str_store_string, s1, "str_december_reg1_reg2"),
	  (else_try),
        (eq, ":cur_month", 18),
        (str_store_string, s1, "str_yule_reg1_reg2"),
      (try_end),
      (set_result_string, s1),
    ]),

Cheers,
 
Back
Top Bottom