The work in villages script from gekukojo

Users who are viewing this thread

THIS CODE DOES NOT BELONG TO ME AND I HAVE RIGGED IT FROM GEKOKUJO! NOR DO I KNOW WHETHER I SHOULD POST THIS SO PLEASE DO NOT BAN ME

EDIT: I HAD NO ERRORS BUT IF YOU FACE THEN PLEASE TELL ME

It is pretty easy to implement as you just need games_menu.py and strings.py it also includes town work too but i don't know why it isn't working properly (everything goes smoothly but you don't get the pay)

Paste this up anywhere in games_menu either in the very down

here is the txt


(I have declared the variable for sumarai but not used it so there would be a notifiction if you are using a new compiler)
Python:
  #gekokujo 3.1 labor start
  (
    "labor",0,
    "{s20} {s22} {s23} {s24}", #s20 = employer, #s22 = description, #s23 = skill bonus, #s24 = notes
    "none",
    [
      (try_begin),
        (is_between, "$current_town", towns_begin, towns_end),
       
        (set_background_mesh, "mesh_pic_camp"),
       
        #random employer (and work site)
        #s21 is the placename associated with the employer, used by #s22 for towns
        (store_random_in_range, ":seed", 0, 40),
        (store_add, ":selection", "str_gekokujo_labor_town_employer_1", ":seed"),
        (str_store_string, s20, ":selection"),
        (store_add, ":selection", "str_gekokujo_labor_town_site_1", ":seed"),
        (str_store_string, s21, ":selection"),
       
        #random description
        (store_random_in_range, ":seed", 0, 10),
        (store_add, ":selection", "str_gekokujo_labor_town_need_1", ":seed"),
        (str_store_string, s22, ":selection"),
       
        #notes
        (str_store_string, s24, "str_gekokujo_labor_town_notes"),
      (else_try),
        (set_background_mesh, "mesh_pic_camp"),
       
        #random employer
        (store_random_in_range, ":seed", 0, 10),
        (store_add, ":selection", "str_gekokujo_labor_village_employer_1", ":seed"),
        (str_store_string, s20, ":selection"),
       
        #random description
        (store_random_in_range, ":seed", 0, 10),
        (store_add, ":selection", "str_gekokujo_labor_village_need_1", ":seed"),
        (str_store_string, s22, ":selection"),
       
        #notes
        (str_store_string, s24, "str_gekokujo_labor_village_notes"),
      (try_end),
     
      #random skill bonus (50% chance that it is nothing)
      #reg30 is where the skill is stored until the job is accepted
      (store_random_in_range, ":seed", 0, 2),
      (try_begin),
        (eq, ":seed", 1),
        (store_random_in_range, ":seed", 1, 10),
      (try_end),
     
      (try_begin),
        (is_between, "$current_town", towns_begin, towns_end),
        (store_add, ":selection", "str_gekokujo_labor_town_skill_1", ":seed"),
      (else_try),
        (store_add, ":selection", "str_gekokujo_labor_village_skill_1", ":seed"),
      (try_end),
      (str_store_string, s23, ":selection"),
     
      (try_begin),
        (eq, ":seed", 1),
        (assign, reg30, "skl_ironflesh"),
      (else_try),
        (eq, ":seed", 2),
        (assign, reg30, "skl_power_strike"),
      (else_try),
        (eq, ":seed", 3),
        (assign, reg30, "skl_power_throw"),
      (else_try),
        (eq, ":seed", 4),
        (assign, reg30, "skl_power_draw"),
      (else_try),
        (eq, ":seed", 5),
        (is_between, "$current_town", towns_begin, towns_end),
        (assign, reg30, "skl_weapon_master"),
      (else_try),
        (eq, ":seed", 5),
        (assign, reg30, "skl_shield"),
      (else_try),
        (eq, ":seed", 6),
        (assign, reg30, "skl_athletics"),
      (else_try),
        (eq, ":seed", 7),
        (assign, reg30, "skl_riding"),
      (else_try),
        (eq, ":seed", 8),
        (assign, reg30, "skl_trainer"),
      (else_try),
        (eq, ":seed", 9),
        (is_between, "$current_town", towns_begin, towns_end),
        (assign, reg30, "skl_inventory_management"),
      (else_try),
        (eq, ":seed", 9),
        (assign, reg30, "skl_engineer"),
      (else_try),
        (assign, reg30, -1),
      (try_end),
     
      #skill bonus is (skill level / 3) + 1
      (try_begin),
        (neq, reg30, -1),
        (store_skill_level, ":skill_level", reg30, "trp_player"),
        (val_div, ":skill_level", 3),
        (val_add, ":skill_level", 1),
        #(val_mul, reg31, ":skill_level"),
      (else_try),
        (assign, ":skill_level", 1),
      (try_end),
     
      #base pay
      #towns: 5 mon x skill bonus, which is (skill level / 3) + 1
      #villages: 1 item (skill bonus gives relations)
      (try_begin),
        (is_between, "$current_town", towns_begin, towns_end),
        (assign, reg31, 30), #reg31 = base wage, for towns
        (val_mul, reg31, ":skill_level"), #multiply by skill bonus
        (assign, reg34, 2), #reg34 = relationship bonus (unused for towns)
      (else_try),
        (assign, reg31, 1), #reg31 = items, for towns
        (assign, reg34, ":skill_level"), #villages get relationship increases
      (try_end),
     
      #other workers
      (party_get_num_companion_stacks, ":num_stacks", "p_main_party"),
      (assign, reg32, 0), #reg32 = number of additional workers
#      (assign, reg33, 0), #reg33 = number of samurai
      (try_for_range, ":cur_stack", 1, ":num_stacks"), #go through every party member except player
        (party_stack_get_troop_id, ":return_troop", "p_main_party", ":cur_stack"),
        (party_stack_get_size, ":stack_size", "p_main_party", ":cur_stack"),
        (try_begin),
 #         (is_between, ":return_troop", samurai_troops_begin, samurai_troops_end),
#          (val_add, reg33, ":stack_size"),
#        (else_try),
          (val_add, reg32, ":stack_size"),
          (party_stack_get_num_wounded, ":stack_size", "p_main_party", ":cur_stack"),
          (val_sub, reg32, ":stack_size"),
        (try_end),
      (try_end),
           
      (try_begin),
        (is_between, "$current_town", towns_begin, towns_end),
        (assign, ":bonus", reg32), #+1 mon per worker
      (else_try),
        (store_div, ":bonus", reg32, 10), #+1 item per 10 workers
      (try_end),
      (val_add, reg31, ":bonus"),
     
      #notes
      (try_begin),
        (is_between, "$current_town", towns_begin, towns_end),
        (str_store_string, s24, "str_gekokujo_labor_town_notes"),
      (else_try),
        (str_store_string, s24, "str_gekokujo_labor_village_notes"),
      (try_end),
     
      (try_begin),
        (gt, reg32, 0), #if the player is bringing laborers
        (str_store_string, s24, "str_gekokujo_labor_availability"),
        (try_begin),
          (gt, reg33, 0), #if the player has samurai in addition to laborers
          (str_store_string, s24, "str_gekokujo_labor_samurai"),
        (try_end),
      (try_end),
    ],
    [
      ("work", [], "Take the job.",
        [
          #(assign, "$gekokujo_labor_skill", reg30),
          #(assign, "$gekokujo_labor_workers", reg32),
          #(assign, "$gekokujo_labor_samurai", reg33),
          (assign, "$gekokujo_labor_pay", reg31),
          (assign, "$gekokujo_labor_extra", reg34),
          (try_begin),
            (is_between, "$current_town", towns_begin, towns_end),
            (rest_for_hours, 8, 20, 0),
          (else_try),
            (rest_for_hours, 72, 20, 0),
          (try_end),
          (assign, "$gekokujo_labor_disable_food", 1), #disable eating and encounters
          (assign, "$auto_enter_town", "$current_town"),
          (assign, "$g_town_visit_after_rest", 1),
          (assign, "$auto_enter_menu_in_center", "mnu_labor_complete"),
          (change_screen_return),
        ]),
      ("wait", [], "Wait for a better job.",
        [
          (rest_for_hours, 1, 5, 0),
          (assign, "$auto_enter_town", "$current_town"),
          (assign, "$g_town_visit_after_rest", 1),
          (assign, "$auto_enter_menu_in_center", "mnu_labor"),
          (change_screen_return),
        ]),
      ("nevermind", [], "Nevermind...",
        [
          (try_begin),
            (is_between, "$current_town", towns_begin, towns_end),
            (jump_to_menu, "mnu_town_trade"),
          (else_try),
            (jump_to_menu, "mnu_village"),
          (try_end),
        ]),
    ]
  ),
 
  (
    "labor_complete",0,
    "{s10}",
    "none",
    [
      (assign, "$gekokujo_labor_disable_food", 0), #re-enable eating and encounters
     
      (assign, reg31, "$gekokujo_labor_pay"),
      (assign, reg34, "$gekokujo_labor_extra"),
      (try_begin),
        (is_between, "$current_town", towns_begin, towns_end),
        (troop_add_gold, "trp_player", reg31),
        (str_store_string, s10, "str_gekokujo_labor_town_complete"),
      (else_try),
        #select the reward item
        (store_random_in_range, ":seed", 0, 4),
       
        #prevent rice from being a reward if qst_deliver_grain is active in the village
        (try_begin),
          (check_quest_active, "qst_deliver_grain"),
          (quest_slot_eq, "qst_deliver_grain", slot_quest_target_center, "$current_town"),
          (eq, ":seed", 0),
          (store_random_in_range, ":seed", 1, 4),
        (try_end),
       
        #give the reward item
        (try_begin),
          (eq, ":seed", 0),
          (assign, ":reward", "itm_grain"), #rice
        (else_try),
          (eq, ":seed", 1),
          (assign, ":reward", "itm_raw_grapes"), #soybeans
        (else_try),
          (eq, ":seed", 2),
          (assign, ":reward", "itm_cabbages"), #vegetables
        (else_try),
          (assign, ":reward", "itm_apples"), #fruit
        (try_end),
        (troop_add_items, "trp_player", ":reward", reg31),
       
        #display the reward item
        (try_begin),
          (eq, reg31, 1),
          (store_add, ":selection", "str_gekokujo_labor_village_reward_1_singular", ":seed"),
        (else_try),
          (store_add, ":selection", "str_gekokujo_labor_village_reward_1_plural", ":seed"),
        (try_end),
        (str_store_string, s11, ":selection"),
       
        #if there's a bonus, give it as a relationship change
        (try_begin),
          (gt, reg34, 0),
          (call_script, "script_change_player_relation_with_center", "$current_town", reg34),
        (try_end),
       
        (str_store_string, s10, "str_gekokujo_labor_village_complete"),
      (try_end),
    ],
    [
      ("continue", [], "Continue...",
      [
        (try_begin),
          (is_between, "$current_town", towns_begin, towns_end),
          (jump_to_menu, "mnu_town_trade"),
        (else_try),
          (jump_to_menu, "mnu_village"),
        (try_end),
        #(change_screen_return)
      ]),
    ]
  ),
  #gekokujo 3.1 labor end

Python:
 #gekokujo 3.1 labor start
 ("gekokujo_labor_town_ask_1", "Does anyone in town need help with work?"),
 ("gekokujo_labor_town_ask_2", "Does anyone in town have need for workers?"),
 ("gekokujo_labor_village_ask_1", "Does anyone in the village need help with work?"),
 ("gekokujo_labor_village_ask_2", "Does the village need any workers?"),
 
 ("gekokujo_labor_town_answer_normal", "Of course! The merchants and skilled craftsmen always need people to clean their shops, lift heavy things, make deliveries, dig ditches, and so forth. Finding workers for everyone is actually one of my most important tasks."),
 ("gekokujo_labor_town_answer_renowned", "Of course, {sir/madam}. We can never find enough help even in great years. But it's a bit strange hearing someone of your stature offering their services in this way."),
 ("gekokujo_labor_town_answer_lord", "{playername}-dono? Are you actually offering to do the work of lowly commoners?"),
 ("gekokujo_labor_village_answer_normal", "Of course! Even when we aren't doing harvests or sowing, we always need help gathering firewood, milling rice, raising levees, building storehouses, and so forth. We might be a bit out of the way, but we see our fair share of migrant workers."),
 ("gekokujo_labor_village_answer_renowned", "Of course, {sir/madam}. Are you saying you can find some workers for us? Because it's a bit unheard of for someone of your stature to offer to work in the mud."),
 ("gekokujo_labor_village_answer_lord", "{playername}-dono? Are you actually offering to do the work of lowly peasants?"),
 
 ("gekokujo_labor_town_notes", "^^You will work for 8 hours, and at the end of the day you will be paid {reg31} mon. You have no further obligations after that point."), #reg31 = pay
 ("gekokujo_labor_village_notes", "^^You will work for 3 days, under the total care of the villagers--they will feed and house you. They have no money, however, and at the end of the 3 days you will be paid in kind."),
 ("gekokujo_labor_availability", "{s24}^^You are bringing {reg32} of your people to work with you. The employer promises to assign you as their foreman."), #reg32 = available workers in party
 ("gekokujo_labor_samurai", "{s24} You have {reg33} samurai in your party refusing to join in. They promise to stand guard, however."), #reg33 = lazy samurai in party
 
 ("gekokujo_labor_town_employer_1", "A carpenter"),
 ("gekokujo_labor_town_employer_2", "A boatbuilder"),
 ("gekokujo_labor_town_employer_3", "A lantern maker"),
 ("gekokujo_labor_town_employer_4", "A roofer"),
 ("gekokujo_labor_town_employer_5", "A stonemason"),
 ("gekokujo_labor_town_employer_6", "A weaver"),
 ("gekokujo_labor_town_employer_7", "A dyer"),
 ("gekokujo_labor_town_employer_8", "A kimono maker"),
 ("gekokujo_labor_town_employer_9", "A print maker"),
 ("gekokujo_labor_town_employer_10", "A paper maker"),
 ("gekokujo_labor_town_employer_11", "A tatami mat maker"),
 ("gekokujo_labor_town_employer_12", "A lacquerer"),
 ("gekokujo_labor_town_employer_13", "A sake brewer"),
 ("gekokujo_labor_town_employer_14", "A soy sauce brewer"),
 ("gekokujo_labor_town_employer_15", "An innkeeper"),
 ("gekokujo_labor_town_employer_16", "A bath house proprietor"),
 ("gekokujo_labor_town_employer_17", "A tea house proprietor"),
 ("gekokujo_labor_town_employer_18", "A noodle house proprietor"),
 ("gekokujo_labor_town_employer_19", "A theater proprietor"),
 ("gekokujo_labor_town_employer_20", "A game house proprietor"),
 ("gekokujo_labor_town_employer_21", "A silk merchant"),
 ("gekokujo_labor_town_employer_22", "A rice merchant"),
 ("gekokujo_labor_town_employer_23", "A horse merchant"),
 ("gekokujo_labor_town_employer_24", "A lumber merchant"),
 ("gekokujo_labor_town_employer_24", "A tobacco merchant"),
 ("gekokujo_labor_town_employer_25", "A Chinese merchant"),
 ("gekokujo_labor_town_employer_26", "A Nanban merchant"),
 ("gekokujo_labor_town_employer_27", "A swordsmith"),
 ("gekokujo_labor_town_employer_28", "A bowyer"),
 ("gekokujo_labor_town_employer_29", "A gunsmith"),
 ("gekokujo_labor_town_employer_30", "A fletcher"),
 ("gekokujo_labor_town_employer_31", "An armorer"),
 ("gekokujo_labor_town_employer_32", "A toolmaker"),
 ("gekokujo_labor_town_employer_33", "A silversmith"),
 ("gekokujo_labor_town_employer_34", "An instument maker"),
 ("gekokujo_labor_town_employer_35", "A Shinto priest"),
 ("gekokujo_labor_town_employer_36", "A Buddhist monk"),
 ("gekokujo_labor_town_employer_37", "A Christian priest"),
 ("gekokujo_labor_town_employer_38", "A woodcarver"),
 ("gekokujo_labor_town_employer_39", "A sculptor"),
 ("gekokujo_labor_town_employer_40", "A painter"),
 
 ("gekokujo_labor_town_site_1", "shop"),
 ("gekokujo_labor_town_site_2", "shop"),
 ("gekokujo_labor_town_site_3", "shop"),
 ("gekokujo_labor_town_site_4", "shop"),
 ("gekokujo_labor_town_site_5", "shop"),
 ("gekokujo_labor_town_site_6", "weavery"),
 ("gekokujo_labor_town_site_7", "dyeworks"),
 ("gekokujo_labor_town_site_8", "shop"),
 ("gekokujo_labor_town_site_9", "print shop"),
 ("gekokujo_labor_town_site_10", "shop"),
 ("gekokujo_labor_town_site_11", "shop"),
 ("gekokujo_labor_town_site_12", "shop"),
 ("gekokujo_labor_town_site_13", "brewery"),
 ("gekokujo_labor_town_site_14", "brewery"),
 ("gekokujo_labor_town_site_15", "inn"),
 ("gekokujo_labor_town_site_16", "bath house"),
 ("gekokujo_labor_town_site_17", "tea house"),
 ("gekokujo_labor_town_site_18", "noodle house"),
 ("gekokujo_labor_town_site_19", "theater"),
 ("gekokujo_labor_town_site_20", "game house"),
 ("gekokujo_labor_town_site_21", "shop"),
 ("gekokujo_labor_town_site_22", "shop"),
 ("gekokujo_labor_town_site_23", "shop"),
 ("gekokujo_labor_town_site_24", "shop"),
 ("gekokujo_labor_town_site_24", "shop"),
 ("gekokujo_labor_town_site_25", "shop"),
 ("gekokujo_labor_town_site_26", "shop"),
 ("gekokujo_labor_town_site_27", "smithy"),
 ("gekokujo_labor_town_site_28", "shop"),
 ("gekokujo_labor_town_site_29", "shop"),
 ("gekokujo_labor_town_site_30", "shop"),
 ("gekokujo_labor_town_site_31", "shop"),
 ("gekokujo_labor_town_site_32", "smithy"),
 ("gekokujo_labor_town_site_33", "smithy"),
 ("gekokujo_labor_town_site_34", "shop"),
 ("gekokujo_labor_town_site_35", "shrine"),
 ("gekokujo_labor_town_site_36", "temple"),
 ("gekokujo_labor_town_site_37", "church"),
 ("gekokujo_labor_town_site_38", "shop"),
 ("gekokujo_labor_town_site_39", "shop"),
 ("gekokujo_labor_town_site_40", "shop"),
 
 #s21 = location (optional)
 ("gekokujo_labor_town_need_1", "needs to tear down the roof of their {s21}."),
 ("gekokujo_labor_town_need_2", "needs help to rebuild their {s21} after major fire damage."),
 ("gekokujo_labor_town_need_3", "needs help to build a new storehouse they've planned."),
 ("gekokujo_labor_town_need_4", "is moving to a new {s21} and needs porters."),
 ("gekokujo_labor_town_need_5", "received a large delivery at their {s21} and needs to move it to their storehouse."),
 ("gekokujo_labor_town_need_6", "needs to move several heavy items from their storehouse to their {s21}."),
 ("gekokujo_labor_town_need_7", "needs to send out several deliveries across town."),
 ("gekokujo_labor_town_need_8", "needs help carrying a heavy delivery to their {s21}."),
 ("gekokujo_labor_town_need_9", "lost all of their regular laborers and need temporary replacements for today."),
 ("gekokujo_labor_town_need_10", "needs help on a major project at their {s21}."),
 
 ("gekokujo_labor_town_skill_1", "The work is straightforward."),
 ("gekokujo_labor_town_skill_2", "The work is physically punishing. (Ironflesh)"),
 ("gekokujo_labor_town_skill_3", "The work is repetitive. (Power Strike)"),
 ("gekokujo_labor_town_skill_4", "The work requires a lot of pushing. (Power Throw)"),
 ("gekokujo_labor_town_skill_5", "The work requires heavy pulling. (Power Draw)"),
 ("gekokujo_labor_town_skill_6", "You will be hired to guard rather than help with the work. (Weapon Master)"),
 ("gekokujo_labor_town_skill_7", "The work requires a lot of walking around town. (Athletics)"),
 ("gekokujo_labor_town_skill_8", "The work involves horses. (Riding)"),
 ("gekokujo_labor_town_skill_9", "The work requires large teams of unskilled laborers. (Trainer)"),
 ("gekokujo_labor_town_skill_10", "The employer's storehouse is disorganized and difficult to navigate. (Inventory Management)"),
 
 ("gekokujo_labor_village_employer_1", "The whole village"),
 ("gekokujo_labor_village_employer_2", "One of the families"),
 ("gekokujo_labor_village_employer_3", "A farmer, who is currently sick,"),
 ("gekokujo_labor_village_employer_4", "A farmer, who is currently injured,"),
 ("gekokujo_labor_village_employer_5", "An elderly farmer"),
 ("gekokujo_labor_village_employer_6", "A young farmer"),
 ("gekokujo_labor_village_employer_7", "An old widower"),
 ("gekokujo_labor_village_employer_8", "An old widow"),
 ("gekokujo_labor_village_employer_9", "One of the rich farmers"),
 ("gekokujo_labor_village_employer_10", "A farm inherited by some orphans"),
 
 ("gekokujo_labor_village_need_1", "needs help with the rice harvest."),
 ("gekokujo_labor_village_need_2", "needs help to raise some levees."),
 ("gekokujo_labor_village_need_3", "needs some ditches to be dug."),
 ("gekokujo_labor_village_need_4", "needs help to gather firewood."),
 ("gekokujo_labor_village_need_5", "needs people to pick fruit from trees."),
 ("gekokujo_labor_village_need_6", "needs a lot of people to help hull the rice harvest."),
 ("gekokujo_labor_village_need_7", "needs help carrying rice to the lord's storehouse."),
 ("gekokujo_labor_village_need_8", "needs help building a new storehouse."),
 ("gekokujo_labor_village_need_9", "needs help building a new farmhouse."),
 ("gekokujo_labor_village_need_10", "needs help to weed their field."),
 
 ("gekokujo_labor_village_skill_1", "The work is straightforward."),
 ("gekokujo_labor_village_skill_2", "The work is physically punishing. (Ironflesh)"),
 ("gekokujo_labor_village_skill_3", "The work is repetitive. (Power Strike)"),
 ("gekokujo_labor_village_skill_4", "The work requires a lot of pushing. (Power Throw)"),
 ("gekokujo_labor_village_skill_5", "The work requires heavy pulling. (Power Draw)"),
 ("gekokujo_labor_village_skill_6", "The work requires a lot of walking around in the forest. (Foraging)"), #sk_shield
 ("gekokujo_labor_village_skill_7", "The work requires a lot of walking around in the fields. (Athletics)"),
 ("gekokujo_labor_village_skill_8", "The work involves draft animals. (Riding)"),
 ("gekokujo_labor_village_skill_9", "The work requires large teams of unskilled laborers. (Trainer)"),
 ("gekokujo_labor_village_skill_10", "The employer's flood control infrastructure is dilapidated. (Engineering)"),
 
 ("gekokujo_labor_town_complete", "At the end of your shift, the grateful employer hands you {reg31} mon and wishes you luck in finding a new job tomorrow."),
 ("gekokujo_labor_village_complete", "The grateful villagers, lacking money, compensate you with {s11}. They welcome you to come back anytime."),
 
 ("gekokujo_labor_village_reward_1_singular", "a sack of rice"),
 ("gekokujo_labor_village_reward_2_singular", "a sack of soybeans"),
 ("gekokujo_labor_village_reward_3_singular", "a basket of vegetables"),
 ("gekokujo_labor_village_reward_4_singular", "a basket of fruit"),
 
 ("gekokujo_labor_village_reward_1_plural", "{reg31} sacks of rice"),
 ("gekokujo_labor_village_reward_2_plural", "{reg31} sacks of soybeans"),
 ("gekokujo_labor_village_reward_3_plural", "{reg31} baskets of vegetables"),
 ("gekokujo_labor_village_reward_4_plural", "{reg31} baskets of fruit"),
 #gekokujo 3.1 labor end

Python:
  #Paste this in (" "Village" ")
        ("gekokujo_labor",
        [
          #Only show this when the player would get the rest of the village menus
          (neg|party_slot_eq, "$current_town", slot_village_state, svs_looted),
          (neg|party_slot_eq, "$current_town", slot_village_state, svs_being_raided),
          (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1),
        ],
        "Find work in the village.",
        [
          (jump_to_menu, "mnu_labor"),
        ]),

:smile:

Hope it works for you
 
Last edited:
@WarBand Boi could you post it in {CODE} blocks? The indentations get all messed up when you post it as normal text.
Additionally, marking the code type as python will allow syntax highlight.
You can do it like this:
{CODE=python}code code
more code
even more{/CODE}
Just use square brackets [] instead of {}
(or insert code block by using the menus)
 
@WarBand Boi could you post it in {CODE} blocks? The indentations get all messed up when you post it as normal text.
Additionally, marking the code type as python will allow syntax highlight.
You can do it like this:
{CODE=python}code code
more code
even more{/CODE}
Just use square brackets [] instead of {}
(or insert code block by using the menus)
Thanks for that because by manually inserting them takes me to the home page for some reason
edit: i will upload a .txt for assistance too
 
Well i tried the code and it worked fine for me and just not the work in town part which i said it doesn't work

For starters your code is using undeclared constants such as samurai_troops_begin and samurai_troops_end. The compiler will give you an error if you'd add this stuff to a vanilla module system. There's other problems as well. I know that you're trying to be helpful but you're not being helpful. I encourage you to stop flooding the forums and discord with nonsense and work on your own skills instead.
 
For starters your code is using undeclared constants such as samurai_troops_begin and samurai_troops_end. The compiler will give you an error if you'd add this stuff to a vanilla module system. There's other problems as well. I know that you're trying to be helpful but you're not being helpful. I encourage you to stop flooding the forums and discord with nonsense and work on your own skills instead.
I have "#' out them and it gives me a warning on that they are declared but not used and then works fine and on top of that i have reccuring problems with native modsys so i use diplomacy steam 4's modsys and i haven't even posted anything on discord in days. and how am i suppose to even learn it by myself with no resources? I haven't even posted enough threads to so on "Flood" the forums

work on your own skills instead.
Tell me how? No one tells me where to start work upon them and keep on bashing like you. atleast give some guidance instead of just throwing me aside
 
Last edited:
You can start working on your skills by implementing some Code OSPs into your mod. Check if you understand them in regard what they are supposed to do and how the code is supposed to be set up, implement them, check if you have implemented them succesfully.
 
You can start working on your skills by implementing some Code OSPs into your mod. Check if you understand them in regard what they are supposed to do and how the code is supposed to be set up, implement them, check if you have implemented them succesfully.
Thanks :smile:
and i did implement this OSP i posted and it worked as stated in the post
 
Yes, but it is not useful if you post it around. Beginners start with little scripts and implement them one by one. At the point they want to achieve more complex scripts like this one here they know how to look up the OSP module systems by themselves. It is not useful to post every little script out of OSP mods which one has implemented.
 
At least he has energy. The DESIRE and the energy are two things needed. But ... it will take time. Good things always do.
I don't want him to feel the "community" hates newbies; people just get tired, and time is always precious. There were good things said by all but the tone might not be readable if someone was like me an Aspie. At age 63, I am still reading things 3 times to try to get nuances someone else expects are requirements for life. Breathing is a requirement; I have trouble breathing. I post, but make mistakes. Maybe other people do too.
I certainly want to see their work in 6 months or a year; but I might have left the forum after feeling "beat down". So in the name of justice, be kind but you were each correct. Just understand some people see things differently, or weren't aware. I still like the young effort though.
 
(I have declared the variable for sumarai but not used it so there would be a notifiction if you are using a new compiler)
Then just remove the declaration, and problem solved.
If you think you may need that code in the future and would rather keep it, then comment it out.
Comments start with # sign.
 
Back
Top Bottom