Flying Squirrel Entertainment

Mount & Blade Warband: Napoleonic Wars => Modifications => Topic started by: Gokiller on November 30, 2014, 11:22:01 pm

Title: [Tutorial] Creating new unit section
Post by: Gokiller on November 30, 2014, 11:22:01 pm
[Tutorial] Creating a new unit section


I've been toying around a bit with the unit menu of NW the past hours. With some sweet results. (For someone who barely touches presentations etc) Considering I haven't really seen this in any mod currently I thought that I mind as well create a quick tutorial for it.

What is the advantage of a new section?
You can fit in a whole new bunch of units in the menu without scretching it out or anything. Simple and efficient. Especially for the modifications out there that could use the space!

This is the result we will be working towards in this tutorial:
Spoiler
(https://www.fsegames.eu/forum/proxy.php?request=http%3A%2F%2Fcloud-4.steampowered.com%2Fugc%2F548640734226078312%2F1FE43110AF67EBAB5A36B9BCADEC4EF931BE3336%2F&hash=2ec3b88b639c18b7abe505ae7e7e77b06ff4de8e)
[close]


Files we will be edditing (coloured Green):

- module_strings
- module_presentations
- module_scripts
- module_constants

Section name

We shall be naming our new section "Bydanders" for the sake of whatever. You can change the name of your section to whatever you want. But you'll have to replace "bydanders".

Getting started

Let's start with module_strings as we will need to start with creating a new string to be used in the presentation.
This will be the name of the section.

Search for:
Code
("cavalry", "Cavalry"),

Place under that:
Code
  ("bydanders", "Bydanders"),

Now we will head to module_presentations to create the new section.
 
Search for:
Code
        (create_mesh_overlay, reg0, "mesh_white_plane"),
        (overlay_set_color, reg0, 0x000000),
        (overlay_set_alpha, reg0, 0xD0),
        (position_set_x, pos1, 370),
        (position_set_y, pos1, 660),
        (overlay_set_position, reg0, pos1),
        (position_set_x, pos1, 5500),
        (position_set_y, pos1, 1600),
        (overlay_set_size, reg0, pos1),

Place under that (leave one line between it)
Code
        (create_mesh_overlay, reg0, "mesh_white_plane"),
        (overlay_set_color, reg0, 0x000000),
        (overlay_set_alpha, reg0, 0xD0),
        (position_set_x, pos1, 370),
        (position_set_y, pos1, 610),
        (overlay_set_position, reg0, pos1),
        (position_set_x, pos1, 5500),
        (position_set_y, pos1, 1600),
        (overlay_set_size, reg0, pos1),

Search for:
Code
        (create_button_overlay, "$g_presentation_obj_select_cavalry", "str_cavalry", 0),
        (try_begin),
          (eq, "$g_multiplayer_select_presentation_unit_type", troop_select_type_cavalry),
          (overlay_set_color,"$g_presentation_obj_select_cavalry",0xECEB82),
        (else_try),
          (overlay_set_color,"$g_presentation_obj_select_cavalry",0xFFFFFF),
        (try_end),
        (position_set_x, pos1, 255),
        (position_set_y, pos1, 660),
        (overlay_set_position, "$g_presentation_obj_select_cavalry", pos1),
        #(position_set_x, pos1, 1500),
        #(position_set_y, pos1, 1500),
        #(overlay_set_size, "$g_presentation_obj_select_cavalry", pos1),
        (troop_set_slot,"trp_x_pos","$g_presentation_obj_select_cavalry",250),
        (troop_set_slot,"trp_y_pos","$g_presentation_obj_select_cavalry",660),
        (troop_set_slot,"trp_x_size","$g_presentation_obj_select_cavalry",1000),
        (troop_set_slot,"trp_y_size","$g_presentation_obj_select_cavalry",1000),

Under that, (leave one line between it) place the following:
Code
        (create_button_overlay, "$g_presentation_obj_select_bydanders", "str_bydanders", 0),
        (try_begin),
          (eq, "$g_multiplayer_select_presentation_unit_type", troop_select_type_bydanders),
          (overlay_set_color,"$g_presentation_obj_select_bydanders",0xECEB82),
        (else_try),
          (overlay_set_color,"$g_presentation_obj_select_bydanders",0xFFFFFF),
        (try_end),
        (position_set_x, pos1, 370),
        (position_set_y, pos1, 610),
        (overlay_set_position, "$g_presentation_obj_select_bydanders", pos1),
        #(position_set_x, pos1, 1500),
        #(position_set_y, pos1, 1500),
        #(overlay_set_size, "$g_presentation_obj_select_bydanders", pos1),
        (troop_set_slot,"trp_x_pos","$g_presentation_obj_select_bydanders",300),
        (troop_set_slot,"trp_y_pos","$g_presentation_obj_select_bydanders",660),
        (troop_set_slot,"trp_x_size","$g_presentation_obj_select_bydanders",1000),
        (troop_set_slot,"trp_y_size","$g_presentation_obj_select_bydanders",1000),

Search for:
Code
      (else_try),
          (eq,":object","$g_presentation_obj_select_cavalry"),
          (assign, "$g_multiplayer_select_presentation_unit_type",troop_select_type_cavalry),
          (presentation_set_duration, 0),
          (start_presentation,"prsnt_multiplayer_item_select"),

Place under that:
Code
        (else_try),
  (eq,":object","$g_presentation_obj_select_bydanders"),
          (assign, "$g_multiplayer_select_presentation_unit_type",troop_select_type_bydanders),
          (presentation_set_duration, 0),
          (start_presentation,"prsnt_multiplayer_item_select"),
(make sure that there is a (else_try) between this new section and the begin of the artillery section)

Next file: module_constants

Search for:
Code
troop_select_type_artillery

Place under that:
Code
troop_select_type_bydanders = 4

Now we will head to the last file, module_scripts in order to get units in the new section.

Search for:
Code
(assign,":unit_type",troop_select_type_artillery),

Between that and (try_end) place this:
Code
	(else_try),
  (is_between, ":troop_no", "trp_british_infantry2","trp_british_highlander"), # Brits

      (assign,":unit_type",troop_select_type_bydanders),
(You can toy around with what units you want to be on it. At this moment we have the units british_infantry2 and british_highlander placed in the new section.

Run the build and check if they're errors, if none goodjob!


You can create more sections, just re-do the above steps and toy around a bit with the positioning of the string and box.

Hope this helps, there could be a tiny possibility that there could be a mistake in there. If so and noticed please inform me so it can be rapidly adjusted. My first somewhat modding tutorial so mistakes are expected to be made.  :-X

If there are any questions feel free to ask them!

Cheers,
Gokiller
Title: Re: [Tutorial] Creating new unit section
Post by: Parrot on November 30, 2014, 11:37:21 pm
Very useful! Well written as well, easy to follow...
Title: Re: [Tutorial] Creating new unit section
Post by: Gokiller on December 01, 2014, 09:52:17 am
Quickly added a forgotten part that involved the module_constants file 
Title: Re: [Tutorial] Creating new unit section
Post by: Mercuri on December 02, 2014, 11:43:33 am
It's possible to have the "bylanders" Unit Section at the same level as the other Unit Sections are? Or it's not possible and it may be below the Specialist class?
Title: Re: [Tutorial] Creating new unit section
Post by: Gokiller on December 02, 2014, 01:54:00 pm
I´m sure that is possible. You just need to toy around a bit with the sizes of the other sections and shuffle them to the left or right to fit the fourth one in.

I did it on this way: Below the first three, because it has a sweet look. But if you want you can place the button/section where ever you want. You also need to play around a bit with the location.
Title: Re: [Tutorial] Creating new unit section
Post by: Mercuri on December 02, 2014, 03:44:30 pm
Okay thx, very great tutorial!
Title: Re: [Tutorial] Creating new unit section
Post by: Mercuri on December 06, 2014, 08:39:02 pm
Hello Gokiller, I'm having some problems. I want to create a new sections for the Infantry in order to divide it. But I want diferents names for each faction and each unit tipe. I tryed it but doesn't work, i don't know if it isn't possible or ir cause I did something wrong.

I'm getting this error: 'int' object is not callable.

First of all, the unit types that I want for each faction was:
Spoiler
Faction 1
  • Maestrazgo's Ift
  • Northern Ift
  • Cavalry
  • Specialist
Faction 2
  • Liberal Ift
  • Royal Infantry
  • Cavalry
  • Specialist
[close]

As I want diferent unit types for each faction I supposed that I need to create 4 new unit types and assign them the units (I dont know if this is possible or not)

Now I'm going to sow you what I did.

module_strings:
Code
  #Unit Selection
  ("infantry", "Infantry"),
  ("infantry1", "Maestrazgo's Ift"),
  ("infantry2", "Northern Ift"),
  ("infantry3", "Liberal Ift"),
  ("infantry4", "Royal Infantry"),
  ("cavalry", "Cavalry"),
  ("specialists", "Specialists"),
  ("ranker", "Ranker"),
  ("equipment", "Equipment:"),
  ("random", "Random"),
  ("howitzer", "Howitzer"),
  ("cannon", "Cannon"),

module_presentations:
Code
      ### REGIMENT SELECT ###
     
      (try_begin),
        #(is_between,":my_team_no",0,2), #Player has selected a team - load regiment presentation
       
        (create_mesh_overlay, reg0, "mesh_white_plane"),
        (overlay_set_color, reg0, 0x000000),
        (overlay_set_alpha, reg0, 0xD0),
        (position_set_x, pos1, 110),
        (position_set_y, pos1, 660),
        (overlay_set_position, reg0, pos1),
        (position_set_x, pos1, 5500),
        (position_set_y, pos1, 1600),
        (overlay_set_size, reg0, pos1),
         
        (create_mesh_overlay, reg0, "mesh_white_plane"),
        (overlay_set_color, reg0, 0x000000),
        (overlay_set_alpha, reg0, 0xD0),
        (position_set_x, pos1, 110),
        (position_set_y, pos1, 610),
        (overlay_set_position, reg0, pos1),
        (position_set_x, pos1, 5500),
        (position_set_y, pos1, 1600),
        (overlay_set_size, reg0, pos1),

        (create_mesh_overlay, reg0, "mesh_white_plane"),
        (overlay_set_color, reg0, 0x000000),
        (overlay_set_alpha, reg0, 0xD0),
        (position_set_x, pos1, 240),
        (position_set_y, pos1, 660),
        (overlay_set_position, reg0, pos1),
        (position_set_x, pos1, 5500),
        (position_set_y, pos1, 1600),
        (overlay_set_size, reg0, pos1),
         
        (create_mesh_overlay, reg0, "mesh_white_plane"),
        (overlay_set_color, reg0, 0x000000),
        (overlay_set_alpha, reg0, 0xD0),
        (position_set_x, pos1, 370),
        (position_set_y, pos1, 660),
        (overlay_set_position, reg0, pos1),
        (position_set_x, pos1, 5500),
        (position_set_y, pos1, 1600),
        (overlay_set_size, reg0, pos1),
Code
        (create_button_overlay, "$g_presentation_obj_select_infantry", "str_infantry", 0),
        (try_begin),
          (eq, "$g_multiplayer_select_presentation_unit_type", troop_select_type_infantry),
          (overlay_set_color,"$g_presentation_obj_select_infantry",0xECEB82),
        (else_try),
          (overlay_set_color,"$g_presentation_obj_select_infantry",0xFFFFFF),
        (try_end),
        (position_set_x, pos1, 125),
        (position_set_y, pos1, 660),
        (overlay_set_position, "$g_presentation_obj_select_infantry", pos1),
        #(position_set_x, pos1, 1500),
        #(position_set_y, pos1, 1500),
        #(overlay_set_size, "$g_presentation_obj_select_infantry", pos1),
        (troop_set_slot,"trp_x_pos","$g_presentation_obj_select_infantry",100),
        (troop_set_slot,"trp_y_pos","$g_presentation_obj_select_infantry",660),
        (troop_set_slot,"trp_x_size","$g_presentation_obj_select_infantry",1000),
        (troop_set_slot,"trp_y_size","$g_presentation_obj_select_infantry",1000),

        (create_button_overlay, "$g_presentation_obj_select_infantry1", "str_infantry1", 0),
        (try_begin),
          (eq, "$g_multiplayer_select_presentation_unit_type", troop_select_type_infantry1),
          (overlay_set_color,"$g_presentation_obj_select_infantry1",0xECEB82),
        (else_try),
          (overlay_set_color,"$g_presentation_obj_select_infantry1",0xFFFFFF),
        (try_end),
        (position_set_x, pos1, 125),
        (position_set_y, pos1, 660),
        (overlay_set_position, "$g_presentation_obj_select_infantry1", pos1),
        #(position_set_x, pos1, 1500),
        #(position_set_y, pos1, 1500),
        #(overlay_set_size, "$g_presentation_obj_select_infantry1", pos1),
        (troop_set_slot,"trp_x_pos","$g_presentation_obj_select_infantry1",100),
        (troop_set_slot,"trp_y_pos","$g_presentation_obj_select_infantry1",660),
        (troop_set_slot,"trp_x_size","$g_presentation_obj_select_infantry1",1000),
        (troop_set_slot,"trp_y_size","$g_presentation_obj_select_infantry1",1000),

        (create_button_overlay, "$g_presentation_obj_select_infantry2", "str_infantry2", 0),
        (try_begin),
          (eq, "$g_multiplayer_select_presentation_unit_type", troop_select_type_infantry2),
          (overlay_set_color,"$g_presentation_obj_select_infantry2",0xECEB82),
        (else_try),
          (overlay_set_color,"$g_presentation_obj_select_infantry2",0xFFFFFF),
        (try_end),
        (position_set_x, pos1, 125),
        (position_set_y, pos1, 610),
        (overlay_set_position, "$g_presentation_obj_select_infantry2", pos1),
        #(position_set_x, pos1, 1500),
        #(position_set_y, pos1, 1500),
        #(overlay_set_size, "$g_presentation_obj_select_infantry3", pos1),
        (troop_set_slot,"trp_x_pos","$g_presentation_obj_select_infantry2",100),
        (troop_set_slot,"trp_y_pos","$g_presentation_obj_select_infantry2",660),
        (troop_set_slot,"trp_x_size","$g_presentation_obj_select_infantry2",1000),
        (troop_set_slot,"trp_y_size","$g_presentation_obj_select_infantry2",1000),

        (create_button_overlay, "$g_presentation_obj_select_infantry3", "str_infantry3", 0),
        (try_begin),
          (eq, "$g_multiplayer_select_presentation_unit_type", troop_select_type_infantry3),
          (overlay_set_color,"$g_presentation_obj_select_infantry3",0xECEB82),
        (else_try),
          (overlay_set_color,"$g_presentation_obj_select_infantry3",0xFFFFFF),
        (try_end),
        (position_set_x, pos1, 125),
        (position_set_y, pos1, 660),
        (overlay_set_position, "$g_presentation_obj_select_infantry3", pos1),
        #(position_set_x, pos1, 1500),
        #(position_set_y, pos1, 1500),
        #(overlay_set_size, "$g_presentation_obj_select_infantry3", pos1),
        (troop_set_slot,"trp_x_pos","$g_presentation_obj_select_infantry3",100),
        (troop_set_slot,"trp_y_pos","$g_presentation_obj_select_infantry3",660),
        (troop_set_slot,"trp_x_size","$g_presentation_obj_select_infantry3",1000),
        (troop_set_slot,"trp_y_size","$g_presentation_obj_select_infantry3",1000),

        (create_button_overlay, "$g_presentation_obj_select_infantry4", "str_infantry4", 0),
        (try_begin),
          (eq, "$g_multiplayer_select_presentation_unit_type", troop_select_type_infantry4),
          (overlay_set_color,"$g_presentation_obj_select_infantry4",0xECEB82),
        (else_try),
          (overlay_set_color,"$g_presentation_obj_select_infantry4",0xFFFFFF),
        (try_end),
        (position_set_x, pos1, 125),
        (position_set_y, pos1, 610),
        (overlay_set_position, "$g_presentation_obj_select_infantry4", pos1),
        #(position_set_x, pos1, 1500),
        #(position_set_y, pos1, 1500),
        #(overlay_set_size, "$g_presentation_obj_select_infantry4", pos1),
        (troop_set_slot,"trp_x_pos","$g_presentation_obj_select_infantry4",100),
        (troop_set_slot,"trp_y_pos","$g_presentation_obj_select_infantry4",660),
        (troop_set_slot,"trp_x_size","$g_presentation_obj_select_infantry4",1000),
        (troop_set_slot,"trp_y_size","$g_presentation_obj_select_infantry4",1000),

        (create_button_overlay, "$g_presentation_obj_select_cavalry", "str_cavalry", 0),
        (try_begin),
          (eq, "$g_multiplayer_select_presentation_unit_type", troop_select_type_cavalry),
          (overlay_set_color,"$g_presentation_obj_select_cavalry",0xECEB82),
        (else_try),
          (overlay_set_color,"$g_presentation_obj_select_cavalry",0xFFFFFF),
        (try_end),
        (position_set_x, pos1, 255),
        (position_set_y, pos1, 660),
        (overlay_set_position, "$g_presentation_obj_select_cavalry", pos1),
        #(position_set_x, pos1, 1500),
        #(position_set_y, pos1, 1500),
        #(overlay_set_size, "$g_presentation_obj_select_cavalry", pos1),
        (troop_set_slot,"trp_x_pos","$g_presentation_obj_select_cavalry",250),
        (troop_set_slot,"trp_y_pos","$g_presentation_obj_select_cavalry",660),
        (troop_set_slot,"trp_x_size","$g_presentation_obj_select_cavalry",1000),
        (troop_set_slot,"trp_y_size","$g_presentation_obj_select_cavalry",1000),
       
        (create_button_overlay, "$g_presentation_obj_select_artillery", "str_specialists", 0),
        (try_begin),
          (eq, "$g_multiplayer_select_presentation_unit_type", troop_select_type_artillery),
          (overlay_set_color,"$g_presentation_obj_select_artillery",0xECEB82),
        (else_try),
          (overlay_set_color,"$g_presentation_obj_select_artillery",0xFFFFFF),
        (try_end),
        (position_set_x, pos1, 370),
        (position_set_y, pos1, 660),
        (overlay_set_position, "$g_presentation_obj_select_artillery", pos1),
        #(position_set_x, pos1, 1500),
        #(position_set_y, pos1, 1500),
        #(overlay_set_size, "$g_presentation_obj_select_artillery", pos1),
        (troop_set_slot,"trp_x_pos","$g_presentation_obj_select_artillery",400),
        (troop_set_slot,"trp_y_pos","$g_presentation_obj_select_artillery",660),
        (troop_set_slot,"trp_x_size","$g_presentation_obj_select_artillery",1000),
        (troop_set_slot,"trp_y_size","$g_presentation_obj_select_artillery",1000),
Code
        (else_try),
          (eq,":object","$g_presentation_obj_select_back"),
          (presentation_set_duration, 0),
          (start_presentation,"prsnt_multiplayer_team_select"),
        (else_try),
          (eq,":object","$g_presentation_obj_select_infantry"),
          (assign, "$g_multiplayer_select_presentation_unit_type",troop_select_type_infantry),
          (presentation_set_duration, 0),
          (start_presentation,"prsnt_multiplayer_item_select"),
        (else_try),
          (eq,":object","$g_presentation_obj_select_infantry1"),
          (assign, "$g_multiplayer_select_presentation_unit_type",troop_select_type_infantry1),
          (presentation_set_duration, 0),
          (start_presentation,"prsnt_multiplayer_item_select"),
        (else_try),
          (eq,":object","$g_presentation_obj_select_infantry2"),
          (assign, "$g_multiplayer_select_presentation_unit_type",troop_select_type_infantry2),
          (presentation_set_duration, 0),
          (start_presentation,"prsnt_multiplayer_item_select"),
        (else_try),
          (eq,":object","$g_presentation_obj_select_infantry3"),
          (assign, "$g_multiplayer_select_presentation_unit_type",troop_select_type_infantry3),
          (presentation_set_duration, 0),
          (start_presentation,"prsnt_multiplayer_item_select"),
        (else_try),
          (eq,":object","$g_presentation_obj_select_infantry4"),
          (assign, "$g_multiplayer_select_presentation_unit_type",troop_select_type_infantry4),
          (presentation_set_duration, 0),
          (start_presentation,"prsnt_multiplayer_item_select"),
        (else_try),
          (eq,":object","$g_presentation_obj_select_cavalry"),
          (assign, "$g_multiplayer_select_presentation_unit_type",troop_select_type_cavalry),
          (presentation_set_duration, 0),
          (start_presentation,"prsnt_multiplayer_item_select"),
        (else_try),
          (eq,":object","$g_presentation_obj_select_artillery"),
          (assign, "$g_multiplayer_select_presentation_unit_type",troop_select_type_artillery),
          (presentation_set_duration, 0),
          (start_presentation,"prsnt_multiplayer_item_select"),

module_constants:
Code
troop_select_type_infantry  = 1
troop_select_type_infantry1 = 1
troop_select_type_infantry2 = 2
troop_select_type_infantry3 = 1
troop_select_type_infantry4 = 2
troop_select_type_cavalry   = 3
troop_select_type_artillery = 4

module_scripts:
Code
  # script_multiplayer_get_unit_type_for_select_presentation
  # Input: arg1 = troop_id
  # Output: reg0 = unit_type
  ("multiplayer_get_unit_type_for_select_presentation",
    [
    (try_begin),
      (this_or_next|is_between, ":troop_no", "trp_british_infantry","trp_british_infantry2"), # Brits

      (assign,":unit_type",troop_select_type_infantry1),
    (else_try)
      (this_or_next|is_between, ":troop_no", "trp_british_infantry2","trp_british_hussar"), # Brits

      (assign,":unit_type",troop_select_type_infantry2),
    (else_try)
      (this_or_next|is_between, ":troop_no", "trp_french_infantry","trp_french_infantry2"), # French

      (assign,":unit_type",troop_select_type_infantry3),
    (else_try)
      (this_or_next|is_between, ":troop_no", "trp_french_infantry2","trp_french_hussar"), # French

      (assign,":unit_type",troop_select_type_infantry4),
    (try_begin), # Cavalry
      (this_or_next|is_between, ":troop_no", "trp_british_hussar","trp_british_arty"), # Brits
      (this_or_next|is_between, ":troop_no", "trp_french_hussar","trp_french_arty"), # French
      (this_or_next|is_between, ":troop_no", "trp_prussian_dragoon","trp_prussian_arty"), # Prussian
      (this_or_next|is_between, ":troop_no", "trp_russian_hussar","trp_russian_arty"), # Russian
                   (is_between, ":troop_no", "trp_austrian_hussar","trp_austrian_arty"), # Austrian

      (assign,":unit_type",troop_select_type_cavalry),
    (else_try),
      (this_or_next|is_between, ":troop_no", "trp_british_arty","trp_french_infantry"), # Brits
      (this_or_next|is_between, ":troop_no", "trp_french_arty","trp_prussian_infantry"), # French
      (this_or_next|is_between, ":troop_no", "trp_prussian_arty","trp_russian_partizan"), # Prussian
      (this_or_next|is_between, ":troop_no", "trp_russian_arty","trp_austrian_infantry"), # Russian
                   (is_between, ":troop_no", "trp_austrian_arty","trp_british_arty_commander"), # Austrian
     
           
      (assign,":unit_type",troop_select_type_artillery),
    (try_end),
     
    (assign,reg0,":unit_type"),
  ]),

And this is how it looks ingame:
Spoiler
(https://i.gyazo.com/e394901b891e0076bd915e148d16b4a4.png)
[close]

So if you or anyone can help I will be so grateful.
Cheers.
Mercuri
Title: Re: [Tutorial] Creating new unit section
Post by: Gokiller on December 07, 2014, 01:29:17 pm
Don't really have the time atm to get a full look into that. But some first things I notice is that.

That you didn't edit the next part in both first presentation part and the second.
Quote
       (overlay_set_alpha, reg0, 0xD0),
        (position_set_x, pos1, 110),
        (position_set_y, pos1, 660),

As you can see in your presentation lines you have put the same position for like 4 sections. In which case you obviously won't see them because they now are just under the current one (infantry that is). So check out these values and adjust them accordingly. I'would advice to use the cavalry and artillery values as standard to work with.

Secondly. for module constants. Don't give out the same number twice. For example, you gave the number 1 to several slots same to 2. Just count ahead of the last one, so 5-6-7 etc.

First check if you get this fixed right. Then I'll check for the rest.

Goodluck.
Title: Re: [Tutorial] Creating new unit section
Post by: Mercuri on December 07, 2014, 09:43:28 pm
I've been talking with my team and we really didn't need to do this beacuse we eliminated unnecessary units from each faction and now fit in the list.But many thanks for reply me, when I have time I will do it for my personal use because I think it's a good idea to have different unit types in different factions.
Title: Re: [Tutorial] Creating new unit section
Post by: DanyEle on December 09, 2014, 07:00:23 pm
Very nice guide. I never actually tried to create a new unit selection myself, but this might come in handy in the future :)
Title: Re: [Tutorial] Creating new unit section
Post by: DanyEle on December 14, 2014, 12:51:09 pm
Sticked! People are welcome to create tutorials and guides other people might use.
Title: Re: [Tutorial] Creating new unit section
Post by: Gokiller on December 14, 2014, 03:32:49 pm
Cheers! Glad that it's appreciated!
Title: Re: [Tutorial] Creating new unit section
Post by: DeadlyWarrior on December 14, 2014, 07:48:11 pm
Very nice tutorial!
Title: Re: [Tutorial] Creating new unit section
Post by: Incognitoandahalf on December 18, 2014, 01:32:56 am
how is it your code looks like that? My code always opens in a .txt file and looks something like this
Code
prsnt_multiplayer_item_select 2 0 4
-60.000000  659 2124 1 1000 415 1 1224979098644774912 401 1 1224979098644774912 402 2 1224979098644774913 1224979098644774912 404 2 1224979098644774914 1224979098644774912 911 2 72057594037927936 30 729 2 1 70 730 2 1 20 926 2 72057594037927936 1 729 2 1 755 730 2 1 1035 925 2 72057594037927936 1 500 3 358 72057594037927936 70 500 3 359 72057594037927936 20 500 3 360 72057594037927936 755 500 3 361 72057594037927936 1035 911 2 72057594037927936 30 729 2 1 540 730 2 1 85 926 2 72057594037927936 1 729 2 1 580 730 2 1 1215 925 2 72057594037927936 1 500 3 358 72057594037927936 540 500 3 359 72057594037927936 85 500 3 360 72057594037927936 580 500 3 361 72057594037927936 1215 911 2 72057594037927936 30 729 2 1 540 730 2 1 335 926 2 72057594037927936 1 729 2 1 285 730 2 1 1825 925 2 72057594037927936 1 500 3 358 72057594037927936 540 500 3 359 72057594037927936 335 500 3 360 72057594037927936 285 500 3 361 72057594037927936 1825 911 2 72057594037927936 30 729 2 1 715 730 2 1 335 926 2 72057594037927936 1 729 2 1 285 730 2 1 1825 925 2 72057594037927936 1 500 3 358 72057594037927936 715 500 3 359 72057594037927936 335 500 3 360 72057594037927936 285 500 3 361 72057594037927936 1825 911 2 72057594037927936 30 729 2 1 70 730 2 1 235 926 2 72057594037927936 1 729 2 1 755 730 2 1 2125 925 2 72057594037927936 1 500 3 358 72057594037927936 70 500 3 359 72057594037927936 235 500 3 360 72057594037927936 755 500 3 361 72057594037927936 2325 4 0 31 2 1224979098644774914 -1 2133 2 144115188075857181 0 3 0 1 2 86 1224979098644774914 2133 2 1224979098644774915 72057594037927937 941 3 144115188075857187 216172782113784122 0 729 2 1 820 730 2 1 40 926 2 144115188075857187 1 921 2 144115188075857187 16777215 500 3 358 144115188075857187 800 500 3 359 144115188075857187 40 500 3 360 144115188075857187 1000 500 3 361 144115188075857187 1000 941 3 144115188075857188 216172782113784147 0 729 2 1 620 730 2 1 40 926 2 144115188075857188 1 921 2 144115188075857188 16777215 500 3 358 144115188075857188 540 500 3 359 144115188075857188 40 500 3 360 144115188075857188 1000 500 3 361 144115188075857188 1000 4 0 911 2 72057594037927936 6 921 2 72057594037927936 0 922 2 72057594037927936 208 729 2 1 110 730 2 1 660 926 2 72057594037927936 1 729 2 1 5500 730 2 1 1600 925 2 72057594037927936 1 911 2 72057594037927936 6 921 2 72057594037927936 0 922 2 72057594037927936 208 729 2 1 240 730 2 1 660 926 2 72057594037927936 1 729 2 1 5500 730 2 1 1600 925 2 72057594037927936 1 911 2 72057594037927936 6 921 2 72057594037927936 0 922 2 72057594037927936 208 729 2 1 370 730 2 1 660 926 2 72057594037927936 1 729 2 1 5500 730 2 1 1600 925 2 72057594037927936 1 912 3 144115188075857189 216172782113784523 0 4 0 31 2 144115188075857197 1 921 2 144115188075857189 15526786 5 0 921 2 144115188075857189 16777215 3 0 729 2 1 125 730 2 1 660 926 2 144115188075857189 1 500 3 358 144115188075857189 100 500 3 359 144115188075857189 660 500 3 360 144115188075857189 1000 500 3 361 144115188075857189 1000 912 3 144115188075857190 216172782113784524 0 4 0 31 2 144115188075857197 2 921 2 144115188075857190 15526786 5 0 921 2 144115188075857190 16777215 3 0 729 2 1 255 730 2 1 660 926 2 144115188075857190 1 500 3 358 144115188075857190 250 500 3 359 144115188075857190 660 500 3 360 144115188075857190 1000 500 3 361 144115188075857190 1000 912 3 144115188075857191 216172782113784525 0 4 0 31 2 144115188075857197 3 921 2 144115188075857191 15526786 5 0 921 2 144115188075857191 16777215 3 0 729 2 1 370 730 2 1 660 926 2 144115188075857191 1 500 3 358 144115188075857191 400 500 3 359 144115188075857191 660 500 3 360 144115188075857191 1000 500 3 361 144115188075857191 1000 2133 2 1224979098644774916 590 730 2 1 1224979098644774916 729 2 1 98 729 2 2 900 730 2 2 900 729 2 3 750 730 2 3 750 910 3 72057594037927936 216172782113784154 0 921 2 72057594037927936 16777215 926 2 72057594037927936 1 925 2 72057594037927936 2 2106 2 1224979098644774916 28 730 2 1 1224979098644774916 729 2 1 100 500 3 358 72057594037927936 98 500 3 359 72057594037927936 590 500 3 360 72057594037927936 900 500 3 361 72057594037927936 900 458 2 1224979098644774917 1224979098644774913 6 3 1224979098644774918 100 116 500 3 5 1224979098644774918 -1 3 0 6 3 1224979098644774918 116 132 500 3 5 1224979098644774918 -1 3 0 2133 2 1224979098644774919 1224979098644774914 2133 2 1224979098644774920 1 6 3 1224979098644774921 0 1224979098644774920 32 2 1224979098644774919 -1 2173 2 1224979098644774922 1224979098644774919 4 0 2147483679 2 1224979098644774917 1224979098644774922 2106 2 1224979098644774919 1 2105 2 1224979098644774920 1 5 0 2133 2 1224979098644774920 0 3 0 3 0 2133 2 1224979098644774923 0 6 3 1224979098644774924 74 346 2173 2 1224979098644774925 1224979098644774924 2133 2 1224979098644774926 0 4 0 32 2 1224979098644774925 11 2106 2 1224979098644774925 11 2133 2 1224979098644774926 1 3 0 31 2 1224979098644774925 1224979098644774917 1 2 249 1224979098644774924 2133 2 1224979098644774927 72057594037927936 31 2 144115188075857197 1224979098644774927 2322 2 1 1224979098644774924 4 0 31 2 1224979098644774924 1224979098644774919 500 3 352 1224979098644774924 1 4 0 31 2 1224979098644774926 0 912 3 72057594037927948 1 0 2133 2 1224979098644774928 15526786 3 0 5 0 1 4 212 1224979098644774924 1224979098644774912 0 2133 2 1224979098644774929 72057594037927939 4 0 31 2 1224979098644774929 1 500 3 352 1224979098644774924 1 4 0 31 2 1224979098644774926 0 912 3 72057594037927948 1 0 2133 2 1224979098644774928 16777215 3 0 5 0 500 3 352 1224979098644774924 0 4 0 31 2 1224979098644774926 0 910 3 72057594037927948 1 0 2133 2 1224979098644774928 8947848 3 0 3 0 3 0 921 2 72057594037927948 1224979098644774928 923 2 72057594037927948 5635920 31 2 1224979098644774926 0 730 2 1 1224979098644774916 926 2 72057594037927948 1 925 2 72057594037927948 2 2120 3 1224979098644774930 1224979098644774923 100 500 3 5 1224979098644774930 72057594037927948 2323 2 7 1224979098644774924 910 3 72057594037927949 7 0 2121 3 1224979098644774931 1224979098644774916 20 700 2 4 1 730 2 4 1224979098644774931 926 2 72057594037927949 4 925 2 72057594037927949 3 921 2 72057594037927949 1224979098644774928 1 3 213 1224979098644774924 1224979098644774913 4 0 31 2 72057594037927936 1 910 3 72057594037927949 216172782113784137 0 5 0 910 3 72057594037927949 216172782113784138 0 3 0 700 2 5 4 729 2 5 300 926 2 72057594037927949 5 925 2 72057594037927949 3 921 2 72057594037927949 1224979098644774928 911 2 72057594037927936 6 921 2 72057594037927936 16777215 922 2 72057594037927936 208 2120 3 1224979098644774931 1224979098644774916 25 730 2 4 1224979098644774931 926 2 72057594037927936 4 729 2 5 14000 730 2 5 100 925 2 72057594037927936 5 2122 3 1224979098644774932 1224979098644774924 2 939 4 72057594037927950 -1 3 1224979098644774932 729 2 5 480 730 2 5 350 926 2 72057594037927950 5 729 2 5 1000 730 2 5 1000 925 2 72057594037927950 5 947 2 72057594037927950 0 2120 3 1224979098644774930 1224979098644774923 116 500 3 5 1224979098644774930 72057594037927950 2106 2 1224979098644774916 50 2105 2 1224979098644774923 1 3 0 3 0 2133 2 144115188075857192 -1 2133 2 144115188075857193 -1 2133 2 144115188075857194 -1 2133 2 144115188075857195 -1 2133 2 144115188075857196 -1 4 0 32 2 1224979098644774914 -1 4 0 2120 3 1224979098644774933 144115188075857184 1 2173 2 1224979098644774934 1224979098644774933 2173 2 1224979098644774917 144115188075857184 2120 3 1224979098644774935 1224979098644774917 11 31 2 1224979098644774934 1224979098644774935 2133 2 1224979098644774916 185 910 3 72057594037927936 216172782113784156 0 921 2 72057594037927936 16777215 730 2 1 1224979098644774916 729 2 1 98 926 2 72057594037927936 1 925 2 72057594037927936 2 2106 2 1224979098644774916 28 730 2 1 1224979098644774916 729 2 1 100 4 0 31 2 144115188075857184 123 912 3 144115188075857192 216172782113784581 0 5 0 31 2 144115188075857184 185 912 3 144115188075857192 216172782113784582 0 5 0 912 3 144115188075857192 216172782113784526 0 3 0 4 0 31 2 144115188075857181 1 921 2 144115188075857192 15526786 5 0 921 2 144115188075857192 16777215 3 0 730 2 1 1224979098644774916 926 2 144115188075857192 1 925 2 144115188075857192 2 2106 2 1224979098644774916 25 730 2 1 1224979098644774916 2122 3 1224979098644774932 144115188075857184 2 939 4 72057594037927950 -1 3 1224979098644774932 729 2 5 480 730 2 5 350 926 2 72057594037927950 5 729 2 5 1000 730 2 5 1000 925 2 72057594037927950 5 947 2 72057594037927950 0 2133 2 144115188075857344 72057594037927950 4 0 2323 2 3 1224979098644774933 4 0 31 2 144115188075857181 2 912 3 144115188075857193 3 0 921 2 144115188075857193 15526786 5 0 1 4 212 1224979098644774933 1224979098644774912 0 2133 2 1224979098644774929 72057594037927939 4 0 31 2 1224979098644774929 1 912 3 144115188075857193 3 0 921 2 144115188075857193 16777215 923 2 144115188075857193 5635920 5 0 910 3 144115188075857193 3 0 921 2 144115188075857193 8947848 923 2 144115188075857193 8947848 3 0 3 0 730 2 1 1224979098644774916 926 2 144115188075857193 1 925 2 144115188075857193 2 2106 2 1224979098644774916 25 730 2 1 1224979098644774916 2122 3 1224979098644774932 1224979098644774933 2 939 4 72057594037927950 -1 3 1224979098644774932 729 2 5 480 730 2 5 350 926 2 72057594037927950 5 729 2 5 1000 730 2 5 1000 925 2 72057594037927950 5 947 2 72057594037927950 0 2133 2 144115188075857345 72057594037927950 4 0 2120 3 1224979098644774933 144115188075857184 2 2173 2 1224979098644774934 1224979098644774933 2173 2 1224979098644774917 144115188075857184 2120 3 1224979098644774935 1224979098644774917 11 31 2 1224979098644774934 1224979098644774935 2323 2 3 1224979098644774933 4 0 31 2 144115188075857181 3 912 3 144115188075857194 3 0 921 2 144115188075857194 15526786 5 0 1 4 212 1224979098644774933 1224979098644774912 0 2133 2 1224979098644774929 72057594037927939 4 0 31 2 1224979098644774929 1 912 3 144115188075857194 3 0 921 2 144115188075857194 16777215 923 2 144115188075857194 5635920 5 0 910 3 144115188075857194 3 0 921 2 144115188075857194 8947848 923 2 144115188075857194 8947848 3 0 3 0 730 2 1 1224979098644774916 926 2 144115188075857194 1 925 2 144115188075857194 2 2106 2 1224979098644774916 25 730 2 1 1224979098644774916 2122 3 1224979098644774932 1224979098644774933 2 939 4 72057594037927950 -1 3 1224979098644774932 729 2 5 480 730 2 5 350 926 2 72057594037927950 5 729 2 5 1000 730 2 5 1000 925 2 72057594037927950 5 947 2 72057594037927950 0 2133 2 144115188075857346 72057594037927950 4 0 2120 3 1224979098644774933 144115188075857184 3 2173 2 1224979098644774934 1224979098644774933 2173 2 1224979098644774917 144115188075857184 2120 3 1224979098644774935 1224979098644774917 11 31 2 1224979098644774934 1224979098644774935 2323 2 3 1224979098644774933 4 0 31 2 144115188075857181 4 912 3 144115188075857195 3 0 921 2 144115188075857195 15526786 5 0 1 4 212 1224979098644774933 1224979098644774912 0 2133 2 1224979098644774929 72057594037927939 4 0 31 2 1224979098644774929 1 912 3 144115188075857195 3 0 921 2 144115188075857195 16777215 923 2 144115188075857195 5635920 5 0 910 3 144115188075857195 3 0 921 2 144115188075857195 8947848 923 2 144115188075857195 8947848 3 0 3 0 730 2 1 1224979098644774916 926 2 144115188075857195 1 925 2 144115188075857195 2 2106 2 1224979098644774916 25 730 2 1 1224979098644774916 2122 3 1224979098644774932 1224979098644774933 2 939 4 72057594037927950 -1 3 1224979098644774932 729 2 5 480 730 2 5 350 926 2 72057594037927950 5 729 2 5 1000 730 2 5 1000 925 2 72057594037927950 5 947 2 72057594037927950 0 2133 2 144115188075857347 72057594037927950 4 0 2120 3 1224979098644774933 144115188075857184 4 2173 2 1224979098644774934 1224979098644774933 31 2 1224979098644774934 1224979098644774935 2323 2 3 1224979098644774933 4 0 31 2 144115188075857181 5 912 3 144115188075857196 3 0 921 2 144115188075857196 15526786 5 0 1 4 212 1224979098644774933 1224979098644774912 0 2133 2 1224979098644774929 72057594037927939 4 0 31 2 1224979098644774929 1 912 3 144115188075857196 3 0 921 2 144115188075857196 16777215 923 2 144115188075857196 5635920 5 0 910 3 144115188075857196 3 0 921 2 144115188075857196 8947848 923 2 144115188075857196 8947848 3 0 3 0 730 2 1 1224979098644774916 926 2 144115188075857196 1 925 2 144115188075857196 2 2106 2 1224979098644774916 25 730 2 1 1224979098644774916 2122 3 1224979098644774932 1224979098644774933 2 939 4 72057594037927950 -1 3 1224979098644774932 729 2 5 480 730 2 5 350 926 2 72057594037927950 5 729 2 5 1000 730 2 5 1000 925 2 72057594037927950 5 947 2 72057594037927950 0 2133 2 144115188075857348 72057594037927950 3 0 3 0 3 0 3 0 3 0 3 0 2133 2 144115188075857349 -1 4 0 32 2 1224979098644774914 -1 1 2 88 1224979098644774914 2133 2 1224979098644774915 72057594037927936 4 0 1073741855 2 1224979098644774915 5 32 2 144115188075857181 0 2122 3 1224979098644774932 1224979098644774914 2 939 4 72057594037927936 -1 3 1224979098644774932 729 2 1 655 730 2 1 350 926 2 72057594037927936 1 729 2 1 1000 730 2 1 1000 925 2 72057594037927936 1 910 3 72057594037927936 216172782113784527 0 921 2 72057594037927936 16777215 729 2 1 550 730 2 1 285 926 2 72057594037927936 1 925 2 72057594037927936 2 2133 2 1224979098644774916 280 729 2 1 707 2133 2 1224979098644774936 270 729 2 4 590 729 2 6 400 730 2 6 400 729 2 8 710 4 0 1073741855 2 1224979098644774914 240 1073741855 2 1224979098644774914 123 31 2 1224979098644774914 185 2106 2 1224979098644774916 35 2106 2 1224979098644774936 35 911 2 72057594037927936 212 730 2 1 1224979098644774916 730 2 4 1224979098644774936 926 2 72057594037927936 4 925 2 72057594037927936 6 910 3 72057594037927936 216172782113784528 16 921 2 72057594037927936 0 926 2 72057594037927936 1 925 2 72057594037927936 2 5 0 2133 2 1224979098644774937 0 6 3 1224979098644774938 2 11 528 3 1224979098644774939 1224979098644774912 1224979098644774938 30 2 1224979098644774939 0 527 3 1224979098644774940 1224979098644774939 1 1073741857 3 1224979098644774940 1 18 33 3 1224979098644774940 18 21 2147483679 2 1224979098644774940 15 2106 2 1224979098644774916 35 2106 2 1224979098644774936 35 4 0 31 2 1224979098644774937 0 1073741855 2 1224979098644774914 241 1073741857 3 1224979098644774940 18 21 1073741855 2 1224979098644774940 8 31 2 1224979098644774940 12 2147483679 2 1224979098644774940 18 2147483679 2 1224979098644774939 2 2147483679 2 1224979098644774939 3 2133 2 1224979098644774941 1 4 0 33 3 1224979098644774940 18 21 1073741855 2 144115188075857386 0 31 2 144115188075857386 3 2133 2 1224979098644774941 0 3 0 31 2 1224979098644774941 1 1540 2 1224979098644774942 1224979098644774914 6 3 1224979098644774943 0 1224979098644774942 1541 3 1224979098644774944 1224979098644774914 1224979098644774943 30 2 1224979098644774944 0 527 3 1224979098644774945 1224979098644774944 1 4 0 31 2 1224979098644774945 20 2133 2 1224979098644774945 19 5 0 31 2 1224979098644774914 241 31 2 1224979098644774945 9 2133 2 1224979098644774945 12 3 0 2133 2 1224979098644774946 1224979098644774940 4 0 31 2 1224979098644774946 20 2133 2 1224979098644774946 19 5 0 31 2 1224979098644774914 241 31 2 1224979098644774946 9 2133 2 1224979098644774946 12 3 0 31 2 1224979098644774945 1224979098644774946 2120 3 1224979098644774947 132 1224979098644774937 500 3 5 1224979098644774947 1224979098644774944 2105 2 1224979098644774937 1 3 0 32 2 1224979098644774937 1 948 1 144115188075857349 730 2 8 1224979098644774936 926 2 144115188075857349 8 729 2 7 1000 730 2 7 950 925 2 144115188075857349 7 2133 2 1224979098644774920 1224979098644774937 6 3 1224979098644774948 0 1224979098644774920 2120 3 1224979098644774947 1224979098644774948 132 520 3 1224979098644774949 5 1224979098644774947 527 3 1224979098644774950 1224979098644774949 1 4 0 31 2 1224979098644774950 20 2320 2 3 216172782113784529 5 0 31 2 1224979098644774950 19 2320 2 3 216172782113784530 5 0 2325 2 3 1224979098644774949 3 0 931 2 144115188075857349 3 3 0 1 3 211 1224979098644774940 1224979098644774912 2133 2 1224979098644774951 72057594037927936 4 0 30 2 1224979098644774951 0 5 0 2133 2 1224979098644774951 1224979098644774939 3 0 2133 2 1224979098644774920 1224979098644774937 6 3 1224979098644774948 0 1224979098644774920 2120 3 1224979098644774947 1224979098644774948 132 520 3 1224979098644774949 5 1224979098644774947 31 2 1224979098644774949 1224979098644774951 927 2 144115188075857349 1224979098644774948 2133 2 1224979098644774920 0 3 0 5 0 911 2 72057594037927936 212 730 2 1 1224979098644774916 730 2 4 1224979098644774936 926 2 72057594037927936 4 925 2 72057594037927936 6 4 0 1073741855 2 1224979098644774914 271 31 2 1224979098644774914 200 31 2 1224979098644774940 1 2320 2 8 216172782113784528 5 0 2325 2 8 1224979098644774939 3 0 910 3 72057594037927936 8 16 921 2 72057594037927936 0 926 2 72057594037927936 1 925 2 72057594037927936 2 3 0 3 0 3 0 3 0 3 0 902 1 999999
-62.000000  202 2071 1 1224979098644774912 415 1 1224979098644774913 402 2 1224979098644774914 1224979098644774913 404 2 1224979098644774915 1224979098644774913 4 0 31 2 144115188075856383 0 4 0 31 2 1224979098644774912 144115188075857187 1 2 86 1224979098644774915 2133 2 1224979098644774916 72057594037927937 1073741855 2 1224979098644774916 5 32 2 144115188075857181 0 402 2 1224979098644774914 1224979098644774913 902 1 0 4 0 31 2 144115188075856367 4 900 1 36 5 0 1 1 53 3 0 5 0 31 2 1224979098644774912 144115188075857188 902 1 0 900 1 7 5 0 31 2 1224979098644774912 144115188075857189 2133 2 144115188075857197 1 902 1 0 900 1 9 5 0 31 2 1224979098644774912 144115188075857190 2133 2 144115188075857197 2 902 1 0 900 1 9 5 0 31 2 1224979098644774912 144115188075857191 2133 2 144115188075857197 3 902 1 0 900 1 9 5 0 2133 2 1224979098644774917 0 402 2 1224979098644774914 1224979098644774913 458 2 1224979098644774918 1224979098644774914 2133 2 1224979098644774919 -1 2133 2 1224979098644774920 116 6 3 1224979098644774921 100 1224979098644774920 540 3 5 1224979098644774921 1224979098644774912 2121 3 1224979098644774922 1224979098644774921 100 2133 2 1224979098644774923 346 6 3 1224979098644774924 74 1224979098644774923 2173 2 1224979098644774925 1224979098644774924 31 2 1224979098644774925 1224979098644774918 1 2 249 1224979098644774924 2133 2 1224979098644774926 72057594037927936 31 2 144115188075857197 1224979098644774926 2106 2 1224979098644774922 1 2147483678 2 1224979098644774922 0 2133 2 1224979098644774919 1224979098644774924 2133 2 1224979098644774923 0 3 0 4 0 2133 2 144115188075856476 0 2133 2 144115188075856383 1 404 2 144115188075856477 1224979098644774913 402 2 144115188075856478 1224979098644774913 412 1 1224979098644774924 389 2 18 1224979098644774919 2147483679 2 1224979098644774924 1224979098644774919 405 2 1224979098644774913 1224979098644774919 1 2 86 1224979098644774919 2133 2 1224979098644774927 72057594037927936 4 0 1073741855 2 1224979098644774927 22 1073741855 2 1224979098644774927 20 31 2 1224979098644774927 21 1 3 209 1224979098644774919 0 5 0 1 3 209 1224979098644774919 1 3 0 1 1 98 2133 2 144115188075857184 1224979098644774919 3 0 902 1 0 2133 2 144115188075857181 1 900 1 9 2133 2 1224979098644774917 1 2133 2 1224979098644774920 0 3 0 31 2 1224979098644774917 1 5 0 4 0 31 2 1224979098644774912 144115188075857192 2133 2 144115188075856476 0 2133 2 144115188075856383 1 404 2 144115188075856477 1224979098644774913 402 2 144115188075856478 1224979098644774913 405 2 1224979098644774913 144115188075857184 389 2 18 144115188075857184 1 2 86 144115188075857184 2133 2 1224979098644774927 72057594037927936 4 0 1073741855 2 1224979098644774927 20 31 2 1224979098644774927 21 1 3 209 144115188075857184 0 5 0 1 3 209 144115188075857184 1 3 0 1 1 98 2133 2 144115188075857181 1 5 0 31 2 1224979098644774912 144115188075857193 2133 2 144115188075856476 0 2133 2 144115188075856383 1 404 2 144115188075856477 1224979098644774913 402 2 144115188075856478 1224979098644774913 2120 3 1224979098644774928 144115188075857184 1 405 2 1224979098644774913 1224979098644774928 389 2 18 1224979098644774928 1 2 86 1224979098644774928 2133 2 1224979098644774927 72057594037927936 4 0 1073741855 2 1224979098644774927 20 31 2 1224979098644774927 21 1 3 209 1224979098644774928 0 5 0 1 3 209 1224979098644774928 1 3 0 1 1 98 2133 2 144115188075857181 2 5 0 31 2 1224979098644774912 144115188075857194 2133 2 144115188075856476 0 2133 2 144115188075856383 1 404 2 144115188075856477 1224979098644774913 402 2 144115188075856478 1224979098644774913 2120 3 1224979098644774928 144115188075857184 2 405 2 1224979098644774913 1224979098644774928 389 2 18 1224979098644774928 1 2 86 1224979098644774928 2133 2 1224979098644774927 72057594037927936 4 0 1073741855 2 1224979098644774927 20 31 2 1224979098644774927 21 1 3 209 1224979098644774928 0 5 0 1 3 209 1224979098644774928 1 3 0 1 1 98 2133 2 144115188075857181 3 5 0 31 2 1224979098644774912 144115188075857195 2133 2 144115188075856476 0 2133 2 144115188075856383 1 404 2 144115188075856477 1224979098644774913 402 2 144115188075856478 1224979098644774913 2120 3 1224979098644774928 144115188075857184 3 405 2 1224979098644774913 1224979098644774928 389 2 18 1224979098644774928 1 2 86 1224979098644774928 2133 2 1224979098644774927 72057594037927936 4 0 1073741855 2 1224979098644774927 20 31 2 1224979098644774927 21 1 3 209 1224979098644774928 0 5 0 1 3 209 1224979098644774928 1 3 0 1 1 98 2133 2 144115188075857181 4 5 0 31 2 1224979098644774912 144115188075857196 2133 2 144115188075856476 0 2133 2 144115188075856383 1 404 2 144115188075856477 1224979098644774913 402 2 144115188075856478 1224979098644774913 2120 3 1224979098644774928 144115188075857184 4 405 2 1224979098644774913 1224979098644774928 389 2 18 1224979098644774928 1 2 86 1224979098644774928 2133 2 1224979098644774927 72057594037927936 4 0 1073741855 2 1224979098644774927 20 31 2 1224979098644774927 21 1 3 209 1224979098644774928 0 5 0 1 3 209 1224979098644774928 1 3 0 1 1 98 2133 2 144115188075857181 5 5 0 31 2 1224979098644774912 144115188075857349 2072 1 1224979098644774929 2120 3 1224979098644774930 1224979098644774929 132 520 3 1224979098644774931 5 1224979098644774930 30 2 1224979098644774931 0 1 4 210 1224979098644774931 1224979098644774913 1224979098644774915 1 1 98 3 0 902 1 0 900 1 9 3 0 3 0
-63.000000  64 2071 1 1224979098644774912 2072 1 1224979098644774913 4 0 31 2 1224979098644774913 0 2133 2 144115188075857186 1224979098644774912 3 0 2133 2 1224979098644774914 116 6 3 1224979098644774915 100 1224979098644774914 540 3 5 1224979098644774915 1224979098644774912 2121 3 1224979098644774916 1224979098644774915 100 2120 3 1224979098644774917 1224979098644774916 116 520 3 1224979098644774918 5 1224979098644774917 4 0 31 2 1224979098644774913 0 947 2 1224979098644774918 1 5 0 947 2 1224979098644774918 0 3 0 3 0 4 0 31 2 144115188075857192 1224979098644774912 4 0 31 2 1224979098644774913 0 947 2 144115188075857344 1 5 0 947 2 144115188075857344 0 3 0 3 0 4 0 31 2 144115188075857193 1224979098644774912 4 0 31 2 1224979098644774913 0 947 2 144115188075857345 1 5 0 947 2 144115188075857345 0 3 0 3 0 4 0 31 2 144115188075857194 1224979098644774912 4 0 31 2 1224979098644774913 0 947 2 144115188075857346 1 5 0 947 2 144115188075857346 0 3 0 3 0 4 0 31 2 144115188075857195 1224979098644774912 4 0 31 2 1224979098644774913 0 947 2 144115188075857347 1 5 0 947 2 144115188075857347 0 3 0 3 0 4 0 31 2 144115188075857196 1224979098644774912 4 0 31 2 1224979098644774913 0 947 2 144115188075857348 1 5 0 947 2 144115188075857348 0 3 0 3 0
-61.000000  198 2124 1 1000 520 3 1224979098644774912 358 144115188075857186 520 3 1224979098644774913 359 144115188075857186 520 3 1224979098644774914 360 144115188075857186 520 3 1224979098644774915 361 144115188075857186 2133 2 1224979098644774916 0 4 0 70 1 42 4 0 71 1 200 4 0 70 1 29 2105 2 1224979098644774915 50 5 0 2105 2 1224979098644774915 5 3 0 2133 2 1224979098644774916 1 5 0 71 1 208 4 0 70 1 29 2106 2 1224979098644774915 50 5 0 2106 2 1224979098644774915 5 3 0 2133 2 1224979098644774916 1 5 0 71 1 205 4 0 70 1 29 2105 2 1224979098644774914 50 5 0 2105 2 1224979098644774914 5 3 0 2133 2 1224979098644774916 1 5 0 71 1 203 4 0 70 1 29 2106 2 1224979098644774914 50 5 0 2106 2 1224979098644774914 5 3 0 2133 2 1224979098644774916 1 3 0 5 0 71 1 200 4 0 70 1 29 2105 2 1224979098644774913 50 5 0 2105 2 1224979098644774913 5 3 0 2133 2 1224979098644774916 1 5 0 71 1 208 4 0 70 1 29 2106 2 1224979098644774913 50 5 0 2106 2 1224979098644774913 5 3 0 2133 2 1224979098644774916 1 5 0 71 1 205 4 0 70 1 29 2105 2 1224979098644774912 50 5 0 2105 2 1224979098644774912 5 3 0 2133 2 1224979098644774916 1 5 0 71 1 203 4 0 70 1 29 2106 2 1224979098644774912 50 5 0 2106 2 1224979098644774912 5 3 0 2133 2 1224979098644774916 1 3 0 4 0 31 2 1224979098644774916 1 729 2 23 1224979098644774912 730 2 23 1224979098644774913 926 2 144115188075857186 23 729 2 23 1224979098644774914 730 2 23 1224979098644774915 925 2 144115188075857186 23 500 3 358 144115188075857186 1224979098644774912 500 3 359 144115188075857186 1224979098644774913 500 3 360 144115188075857186 1224979098644774914 500 3 361 144115188075857186 1224979098644774915 3 0 415 1 1224979098644774917 411 1 1224979098644774918 458 2 1224979098644774919 1224979098644774918 2133 2 1224979098644774920 0 4 0 71 1 1 4 0 1073741855 2 144115188075856383 1 31 2 1224979098644774918 3 405 2 1224979098644774917 -1 389 2 17 2 403 2 1224979098644774917 2 2133 2 144115188075857181 0 2133 2 144115188075856383 0 3 0 902 1 0 5 0 31 2 144115188075856383 1 31 2 144115188075856476 1 2133 2 144115188075856383 0 2133 2 144115188075856476 0 902 1 0 900 1 9 5 0 31 2 144115188075856383 1 31 2 144115188075856476 -1 405 2 1224979098644774917 -1 389 2 17 2 403 2 1224979098644774917 2 2133 2 144115188075857181 0 2133 2 144115188075856383 0 902 1 0 900 1 9 5 0 4 0 1 3 78 1224979098644774917 0 4 0 31 2 144115188075856472 0 2133 2 1224979098644774920 1 3 0 5 0 4 0 31 2 144115188075856472 1 2133 2 1224979098644774920 1 3 0 3 0 4 0 31 2 1224979098644774920 0 1 3 78 1224979098644774917 1 4 0 31 2 144115188075856474 0 2133 2 1224979098644774920 1 3 0 5 0 4 0 31 2 144115188075856474 1 2133 2 1224979098644774920 1 3 0 3 0 4 0 31 2 1224979098644774920 0 401 1 1224979098644774917 404 2 1224979098644774921 1224979098644774917 2133 2 1224979098644774922 346 6 3 1224979098644774923 74 1224979098644774922 2147483679 2 1224979098644774923 1224979098644774921 2173 2 1224979098644774924 1224979098644774923 4 0 32 2 1224979098644774924 11 2106 2 1224979098644774924 11 3 0 31 2 1224979098644774924 1224979098644774919 520 3 1224979098644774925 352 1224979098644774923 1 4 212 1224979098644774923 1224979098644774917 0 2133 2 1224979098644774926 72057594037927939 4 0 31 2 1224979098644774926 1 31 2 1224979098644774925 0 2133 2 1224979098644774920 1 500 3 352 1224979098644774923 1 2133 2 1224979098644774922 0 5 0 31 2 1224979098644774926 0 31 2 1224979098644774925 1 2133 2 1224979098644774920 1 500 3 352 1224979098644774923 0 2133 2 1224979098644774922 0 3 0 3 0 3 0 4 0 31 2 1224979098644774920 1 2133 2 144115188075857182 1 3 0 31 2 144115188075857182 1 2370 1 1224979098644774927 2121 3 1224979098644774928 1224979098644774927 144115188075857183 30 2 1224979098644774928 1 2133 2 144115188075857182 0 902 1 0 900 1 9 2370 1 144115188075857183 3 0

Title: Re: [Tutorial] Creating new unit section
Post by: DanyEle on December 18, 2014, 07:13:32 am
That's the Module System, sir. Basically the human-intelligible code posted by Gokiller is translated into machine language(what you posted). It is not suggested to modify the machine code, as it can lead to several problems.
Title: Re: [Tutorial] Creating new unit section
Post by: Mercuri on December 18, 2014, 09:16:44 am
DanyEle said that you need to download the Module System and edit them, not the .txt that you find in your module folder. ^^
Title: Re: [Tutorial] Creating new unit section
Post by: Incognitoandahalf on January 05, 2015, 04:24:38 am
ya I'm working on it, problem is I'm working with a mod so atm so I would have to convert it backwards somehow if thats possible or just go back and enter everything in again which is not ideal.
Title: Re: [Tutorial] Creating new unit section
Post by: usnavy30 on January 12, 2015, 02:24:39 am
Very nice tutorial Gokiller! Thank you so much, this was just what I was looking for. I'll add ya to the credits list if you don't mind.  :D
Title: Re: [Tutorial] Creating new unit section
Post by: Phoen!x on February 21, 2015, 10:39:19 am
Nice guide !
Title: Re: [Tutorial] Creating new unit section
Post by: Ivkolya on March 05, 2015, 10:49:42 pm
All works fine, thank you very much, very usefull!
Title: Re: [Tutorial] Creating new unit section
Post by: Gokiller on March 17, 2015, 11:32:22 am
Even though it's been a while. Thanks for the positive feedback on the tutorial.

Continued experimenting with the Singleplayer possibilities on NW, once I get somewhere I might put something up regarding that as well.
Title: Re: [Tutorial] Creating new unit section
Post by: Fraser on March 21, 2015, 02:47:33 pm
Anyone have a picture of the end result of this as the image is broken?
Title: Re: [Tutorial] Creating new unit section
Post by: usnavy30 on March 21, 2015, 03:46:06 pm
Anyone have a picture of the end result of this as the image is broken?
Yes (please note I moved the Tab position around after taking this picture)
Fort York in background (Militia tab is now centered below Specialists)
(https://www.fsegames.eu/forum/proxy.php?request=http%3A%2F%2Fcloud-4.steamusercontent.com%2Fugc%2F37486252377962445%2F05EAD77B8998729E2DBA04FF970F72AE781AEEE5%2F&hash=df9003e196ab4b779c879106f0a00f0d59753593)
[close]
Title: Re: [Tutorial] Creating new unit section
Post by: Dazzer on December 28, 2015, 07:58:45 pm
one thing: how to remove it?  :D
Title: Re: [Tutorial] Creating new unit section
Post by: usnavy30 on December 28, 2015, 10:04:05 pm
one thing: how to remove it?  :D
Comment out the code you put in, just simple reverse process.
Title: Re: [Tutorial] Creating new unit section
Post by: greatscot on April 16, 2016, 11:57:41 am
Need some help with this, when i build module it works fine but there's no new tab in game :/
(I changed Bydanders to More)

module_Strings
Spoiler
("infantry", "Infantry"),
  ("cavalry", "Cavalry"),
  ("more", "More"),
  ("specialists", "Specialists"),
  ("ranker", "Ranker"),
  ("equipment", "Equipment:"),
  ("random", "Random"),
  ("howitzer", "Howitzer"),
  ("cannon", "Cannon"),
[close]

module_presentations:
Spoiler
(else_try),
        (eq,":object","$g_presentation_obj_select_more"),
          (assign, "$g_multiplayer_select_presentation_unit_type",troop_select_type_more),
          (presentation_set_duration, 0),
          (start_presentation,"prsnt_multiplayer_item_select"),
[close]

module_constants:
Spoiler
troop_select_type_infantry  = 1
troop_select_type_cavalry   = 2
troop_select_type_artillery = 3
troop_select_type_more  = 4
[close]

module_scripts:
Spoiler
(assign,":unit_type",troop_select_type_artillery),
       (else_try),
     (is_between, ":troop_no", "trp_british_infantry2","trp_british_highlander"), # Brits
   
      (assign,":unit_type",troop_select_type_more), (try_end),
     
    (assign,reg0,":unit_type"),
[close]

As I said, I build the module and get no errors whatsoever.

Help would be appriciated
Thank you :D
Title: Re: [Tutorial] Creating new unit section
Post by: greatscot on April 25, 2016, 08:43:03 pm
Bump.
Title: Re: [Tutorial] Creating new unit section
Post by: usnavy30 on April 25, 2016, 09:28:37 pm
The module_presentations needs additional code below for each tab created. This seemed to be overlooked.

Code
        (create_mesh_overlay, reg0, "mesh_white_plane"),
        (overlay_set_color, reg0, 0x000000),
        (overlay_set_alpha, reg0, 0xD0),
        (position_set_x, pos1, 370),
        (position_set_y, pos1, 610),
        (overlay_set_position, reg0, pos1),
        (position_set_x, pos1, 5500),
        (position_set_y, pos1, 1600),
        (overlay_set_size, reg0, pos1),
You may want to move the tab around to suit your needs. The first position_set_x (370) and position_set_y (610) determines where the tab is located on the presentation.
Title: Re: [Tutorial] Creating new unit section
Post by: cwca on June 12, 2016, 01:23:12 pm
hi, I have tried your tutorial; its great! however, when I try to assign my own units to the "bystanders" selection I made, it only shows one unit, while the rest I assigned to it are all over growing the "infantry" selection tab! please help
Title: Re: [Tutorial] Creating new unit section
Post by: pengbuster on July 31, 2017, 09:52:47 am
Have a minor issue with this, the background of the button shows up in the nation selection screen instead of the troop screen. Any way to fix this?
Spoiler
(https://steamuserimages-a.akamaihd.net/ugc/853848077989558277/D9699F48ABCD5BE3481BEECC6364CA8879CDE5FB/)
[close]
Spoiler
(https://steamuserimages-a.akamaihd.net/ugc/853848077989558383/40847063C764096AC2082D8B6C4B5B87CD2970EF/)
[close]
Title: Re: [Tutorial] Creating new unit section
Post by: Gokiller on August 03, 2017, 04:36:17 pm
Seeing another post of yours with some screenshots, I assume you managed to fix the issue. Could you share what was wrong?
Title: Re: [Tutorial] Creating new unit section
Post by: pengbuster on August 05, 2017, 04:17:47 am
I pasted the background in the wrong area, underneath the section where youre choosing your nation instead of the regiment select
Title: Re: [Tutorial] Creating new unit section
Post by: Gokiller on August 06, 2017, 10:29:27 am
Right, glad you managed to figure it out yourself. :)
Title: Re: [Tutorial] Creating new unit section
Post by: Ivkolya on June 23, 2018, 11:57:59 am
I have a related to this tutorial question - how can be changed number of available regiments per section? As example, 8 units instead of 6. I think, I need to change vertical size of some "white_plane" (and maybe change font size), but in module_presentations there are plenty of them:)
Title: Re: [Tutorial] Creating new unit section
Post by: Koxxus on June 23, 2018, 01:21:16 pm
I have a related to this tutorial question - how can be changed number of available regiments per section? As example, 8 units instead of 6. I think, I need to change vertical size of some "white_plane" (and maybe change font size), but in module_presentations there are plenty of them:)

If you wont get the answer, ask Hinkel from N&S.
Title: Re: [Tutorial] Creating new unit section
Post by: Ivkolya on June 23, 2018, 01:41:37 pm
Thank you, I will :)
Title: Re: [Tutorial] Creating new unit section
Post by: Coldstreamer on June 21, 2021, 03:40:30 pm
I seem have to missed something here.  For the grenadier unit here, it has Vistula pants attached to it?  But I don't want those, I want the custom ones you can see in the darker colour behind it.  See the image below, any help is welcome.  I've tried to see if I can remove the pants, but can't find where to do that..  I've also noticed my uniforms seems to be glowing, as if it doesn't react to the shaders or lighting attached to it..

(https://steamuserimages-a.akamaihd.net/ugc/1711912631076235807/F25D98C6D13B13D781F2EC7F7510609899593BB5/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false)