Recent content by jik

  1. Neutral map icon problem

    Always remember, unless you want a tuple to have a similar attributes (such as with parties and items) don't group them with native ones.  Add them to the end.

    There is an operation that sets the player's spawn point to a spot near one of the training grounds.  This uses constants that search from the first training ground to one past the last training ground.
  2. Vertex animation for map icons.

    hmm...  This is a good question.  I have made new banners and they work fine.  Troops on the map and towns are all parties.

    Maybe a specific flag on the party allows for animated icons?
  3. Limited AoE

    why not make a variable at the begining of the code and set it to 2.  Each agent you hit reduces this number.  When it is 0, no longer deal damage.
  4. Recruiting other than faction recruits, and something else.

    I personally have not done this, but came across the operations when I was looking at some particle stuff.

    The head_operations.py holds all the game coded operations.  It's a good place to look first when trying to do something, but not knowing what tool to use.
  5. Issues With the Module System Tutorial

    yeo said:
    jik said:
    there is a link to some updates done by myself to the tutorial system.  See the links in my sig.
    thx man, are you sure that everything work?

    I was done quite a while ago, and many of the bugs have been touched on.  Read the thread, the issues have been looked at.  Just make sure to read it carefully.  There are things in the MS that might work differently than you would think.
  6. fixing hit_points on destructible scene props

    I agree.  Half the pain of coding is having to start a new game for every code change
  7. fixing hit_points on destructible scene props

    Nice work!

    But why can you not use the movable flag?  I have found that when destroying things, the best way to make it destroyed is to move it out of the way quickly.

  8. Recruiting other than faction recruits, and something else.

    there are map particle affects (smoke is the most common).  Look in the operations.py file, you will find the operations there.

    As to having the AI leave a site alone, they don't go to the training areas...  look at them.  Most likely the village would have to be part of a faction that is completely neutral.
  9. Weird bug: Faction colors (occurs again)

    Ok, well I have a similar problem.  Most factions in my game are white, except the one that is suppose to be orange, but that one is red... 
    I run a script to set the faction leaders and colors the way I want them to be.  There are 8 factions (and a dummy faction) and 8 colors.  When the player pics a banner, he is picking a faction (color) to be the Leader of.  This script "should" go through each faction and assign the leader, and now the color.  Still get the same result...  Here is my code:

    ##script_re_assign_towns
    ##This script will check which faction color the player chose, remove that lord from the head of the house and put the player there.
    ##May want it so the lord opposite the player will hate him.  There are 8 banners in each of 8 colors.
    ##The first banner is 214, so the first yellow (after the last red) is 222, then the first white is 230, and so on.
    ##fac_unborn is where I store Heros not yet in play.  This is based off 8 factions, 8 colors, 8 kings.
    ##No inputs
    ("re_assign_towns",
    [(display_message,"@Setting up the lords"),
    (troop_get_slot,":cur_banner","trp_player",slot_troop_banner_scene_prop),
    (assign, reg50, ":cur_banner"),
    (str_store_string, s50,"@NONE!"),
    (assign,":banner",-1),
    (try_begin),
    (lt,":cur_banner",222),  ##is it less than the first of the next segment
    (assign,":banner",1),
    (str_store_string, s50,"@RED"),
    (else_try),
    (lt,":cur_banner",230), 
    (assign,":banner",2),
    (str_store_string, s50,"@YELLOW"),
    (else_try),
    (lt,":cur_banner",23:cool:
    (assign,":banner",3),
    (str_store_string, s50,"@WHITE"),
    (else_try),
    (lt,":cur_banner",246), 
    (assign,":banner",4),
    (str_store_string, s50,"@BLACK"),
    (else_try),
    (lt,":cur_banner",254), 
    (assign,":banner",5),
    (str_store_string, s50,"@BLUE"),
    (else_try),
    (lt,":cur_banner",262), 
    (assign,":banner",6),
    (str_store_string, s50,"@GREEN"),
    (else_try),
    (lt,":cur_banner",270), 
    (assign,":banner",7),
    (str_store_string, s50,"@PURPLE"),
    (else_try),
    #(lt,":cur_banner",27:cool:,    ## for now, any banner after the first orange will be orange.
    (assign,":banner",:cool:,
    (str_store_string, s50,"@ORANGE"),  ##if it's from the last set it's orange!
    (try_end),
    (dialog_box, "@the banner number is {reg50}", "@{s50} Faction chosen"),

    (assign,":cur_lord","trp_kingdom_1_lord"),
    (assign,":cur_town","p_town_1"),
    (assign,":counter",1),
    (try_for_range,":cur_fac","fac_kingdom_1",kingdoms_end),
    (assign,":banner_ranger", :cool:,                                          ##For picking the banner range for AI lords
    (try_begin),
    (eq,":banner",":counter"),                                        ##meaning that the player has this color
    (assign,":new_lord","trp_player"),                                ##Put the player in the spot to gain the faction
    (call_script, "script_player_join_faction", ":cur_fac"),
    (faction_set_slot,":cur_fac",slot_faction_marshall,"trp_player"),  ##Just in case?
    (troop_set_faction,":cur_lord","fac_unborn"),                      ##take out the old king
    (troop_set_slot, "trp_kingdom_1_lord", slot_troop_occupation, 0),  ##Mark them as unused
    (party_relocate_near_party, "p_main_party", ":cur_town", 3),      ##Locate the player near the town
    (else_try),
    (assign,":new_lord",":cur_lord"),                      #Else, leave in the natural lord
    (val_mul,":banner_ranger",":counter"),                #will be the start point of the banners (8-16-24-32, etc)
    (store_add,":banner_first",":banner_ranger",206),      #first run will be 214, second run will be 222, etc.
    (store_add,":banner_last",":banner_first",9),          #will be 223,231, (one after the last banner)
    (store_random_in_range,":lord_banner",":banner_first",":banner_last"),
    (troop_set_slot, ":cur_lord", slot_troop_banner_scene_prop, ":lord_banner"),
    (try_end),
    (faction_set_slot, ":cur_fac", slot_faction_leader, ":new_lord"),
    (call_script, "script_give_center_to_faction", ":cur_town", ":cur_fac"),
    (call_script, "script_give_center_to_lord", ":cur_town",  ":new_lord", 0),
    (str_store_troop_name,s1,":new_lord"),
    (faction_set_name, ":cur_fac", "@House of {s1}"),
    (try_begin),
    (eq,":counter",1),
    (faction_set_color,":cur_fac", 0xFF0000),
    (else_try),
    (eq,":counter",2),
    (faction_set_color,":cur_fac", 0xFFFF00),
    (else_try),
    (eq,":counter",3),
    (faction_set_color,":cur_fac", 0xFFFFFF),
    (else_try),
    (eq,":counter",4),
    (faction_set_color,":cur_fac", 0x999999),
    (else_try),
    (eq,":counter",5),
    (faction_set_color,":cur_fac", 0x0080FF),
    (else_try),
    (eq,":counter",6),
    (faction_set_color,":cur_fac", 0x00FF00),
    (else_try),
    (eq,":counter",7),
    (faction_set_color,":cur_fac", 0xAB00AB),
    (else_try),
    (eq,":counter",:cool:,
    (faction_set_color,":cur_fac", 0xFF8000),
    (try_end),
    (val_add,":cur_lord",1),
    (val_add,":cur_town",1),
    (val_add,":counter",1),
    (end_try),
    (call_script, "script_give_center_to_faction", "p_town_9", "fac_unborn"),  ##give center castle to no-one.
    ]
    ),

    I have just added the last try to force the colors for each faction.  The leaders are set, but the colors still are not set right.
  10. My queries

    Which tutorial are you reading?  I have updated it.  See my sig
  11. Issues With the Module System Tutorial

    there is a link to some updates done by myself to the tutorial system.  See the links in my sig.
  12. Adding Banners

    in the tableau materials, these are the lines that set the background color for a tableau (Heraldic) material:

    (store_sub, ":background_slot", ":banner_mesh", arms_meshes_begin), #banner_meshes_begin),
    (troop_get_slot, ":background_color", "trp_banner_background_color_array", ":background_slot"),
    (cur_tableau_set_background_color, ":background_color"),


    So what you need to be doing is for your specific banner, you need to set the troop slot for the background for your specific flag.
    Here is what I did to set the background colors in groups of 8:

    ###script_j_banner_bg
    ###Sets the background colors for use with the tableau definitions.
    ###based on this:      (troop_set_slot, "trp_banner_background_color_array", 0, 0xFF8f4531),
    ###0xFF0000 red, 0xFFFF00 yellow, 0xFFFFFF white, 0x888888 black, 0x0080FF blue, 0x00FF00 green, 0xAB00AB purple, 0xFF8000 orange. 
    ###With above troop_set_slot example, colors start with 0xFF, as aposed to just 0x 

    ("j_banner_bg",
    [
    (try_for_range,":this_banner",0,:cool:,##RED
    (troop_set_slot, "trp_banner_background_color_array",":this_banner", 0xFFbb0000), ##0xFFaa1111),
    (try_end),
    (try_for_range,":this_banner",8,16),##YELLOW
    (troop_set_slot, "trp_banner_background_color_array",":this_banner", 0xFFaaaa00), ##0xFFaaaa11),
    (try_end),
    (try_for_range,":this_banner",16,24),##WHITE
    (troop_set_slot, "trp_banner_background_color_array",":this_banner", 0xFF999999), ##0xFFcccccc),
    (try_end),
    (try_for_range,":this_banner",24,32),##BLACK
    (troop_set_slot, "trp_banner_background_color_array",":this_banner", 0xFF111111),
    (try_end),
    (try_for_range,":this_banner",32,40),##BLUE
    (troop_set_slot, "trp_banner_background_color_array",":this_banner", 0xFF0000bb),
    (try_end),
    (try_for_range,":this_banner",40,4:cool:,##GREEN
    (troop_set_slot, "trp_banner_background_color_array",":this_banner", 0xFF00bb00),
    (try_end),
    (try_for_range,":this_banner",48,56),##PURPLE
    (troop_set_slot, "trp_banner_background_color_array",":this_banner", 0xFFaa00aa),
    (try_end),
    (try_for_range,":this_banner",56,64),##ORANGE
    (troop_set_slot, "trp_banner_background_color_array",":this_banner", 0xFFbb7700),
    (try_end),
    ]
    ),

    You can quite simply find in the beginning for the game_start sript and change/add the setting for your banner.  If you don't define it, it will be 0 (or 0xFF000000, or black).
  13. A request...

    I still don't get what you are looking for.  Are you talking about the custom banners in game? 

    I have reworked the first 64 banners (and background colors associated with the banners, which is not by default the same as the banner background) for my mod.  Is this what you are looking for?  It has been done specifically for my mod.
  14. A request...

    winrehs007 said:
    Is there any Banner-ready to implement in-game...??

    Thanks in advance guys.... :cool:

    Could you be more specific?  What do you mean by banner-ready?
  15. Adding Banners

    The background heraldic colors are set by the banner background color, not the color of the banner.  This is set in the first script.  The banner should still show on the map, but know that there are 2 banners for the map that are coded wrong.  I found this out since I remade the first 64 banners myself for my mod.  I think it was 7 and 21.  For your test, use the 3rd banner image.
Back
Top Bottom