source code for [Variant maker] Don't send me PM for how to add it to your mod.

Users who are viewing this thread

rucchi

Knight
I release  module systems for variant maker.

This source code is version 1.0 Final. (This mod includes source code.)
If you have some questions, please tell me in this thread.

Don't send me a PM for how to add some feature to your mod.

You can use it free. You have not to request the permission to use it.
But I said over and over again, If you use for your mod(not this variant),


Please do it yourself.

Q: I can't compile it.
A: Check your path in module_info.py

Q: How to get rid of your logos when your game starts and in start menu?
A: remove pic_***.dds from textures folder.
and
"game_start" in module_presentations.py
Code:
        (create_mesh_overlay, reg0, "mesh_title_window"),
        (position_set_x, pos1, 0),
        (position_set_y, pos1, 0),
        (overlay_set_position, reg0, pos1),
coment out
Code:
#        (create_mesh_overlay, reg0, "mesh_title_window"),
#        (position_set_x, pos1, 0),
#        (position_set_y, pos1, 0),
#        (overlay_set_position, reg0, pos1),
change your code in module_presentations.py, and remove pic_mb_warrior_3.dds in textures folder
Code:
("game_escape",prsntf_read_only,mesh_load_window,[
     (ti_on_presentation_load,
      [
        (presentation_set_duration, 999999),
        (set_fixed_point_multiplier, 1000),
        (troop_get_slot, ":banner_spr", "trp_player", slot_troop_banner_scene_prop),
        (try_begin),
          (neq, ":banner_spr", 0),
          (troop_get_slot, ":map_flag_type", "trp_player", slot_troop_custom_banner_map_flag_type),
          (val_max, ":map_flag_type", 0),
          (val_add, ":map_flag_type", custom_banner_flag_map_types_begin),
          (try_begin),
            (eq, ":map_flag_type", "mesh_custom_map_banner_01"),
            (create_mesh_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_square", "trp_player"),
          (else_try),
            (eq, ":map_flag_type", "mesh_custom_map_banner_02"),
            (create_mesh_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_short", "trp_player"),
          (else_try),
            (create_mesh_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_default", "trp_player"),
          (try_end),
          (position_set_x, pos1, -300),#20
          (position_set_y, pos1, 0),
          (overlay_set_position, "$g_presentation_obj_18", pos1),
          (position_set_x, pos1, 200),#200
          (position_set_y, pos1, 200),
          (overlay_set_size, "$g_presentation_obj_18", pos1),
        (try_end),
        ]),
     ]),

Q: How to get rid of heraldry from my armor?
A: In module_items.py, You restore source code same as native.
For example 1,
Code:
["padded_leather", "Padded Leather", [("new_padded_leather",0)], itp_merchandise| itp_type_body_armor  |itp_covers_legs|itp_civilian,0,
 454 , weight(12)|abundance(100)|head_armor(0)|body_armor(27)|leg_armor(10)|difficulty(0) ,imodbits_cloth ,
 [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_custom_banner", "tableau_padded_leather", ":agent_no", ":troop_no")])]],
Modify "new_padded_leather"
to "padded_leather"

Modify "imodbits_cloth , [(ti_on_init_item, ...., ":troop_no")])]],"
to "imodbits_cloth ],"
For example 2
Code:
["leather_jerkin", "Leather Jerkin", [("leather_jerkin",0)], itp_merchandise| itp_type_body_armor |itp_civilian |itp_covers_legs ,0,
 321 , weight(6)|abundance(100)|head_armor(0)|body_armor(23)|leg_armor(6)|difficulty(0) ,imodbits_cloth , [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_custom_banner", "tableau_leather_jerkin", ":agent_no", ":troop_no")])]],
In case of mesh name is same as native,
Modify "imodbits_cloth , [(ti_on_init_item,....":troop_no")])]],"
to "imodbits_cloth] ,"
If you use "Item editor", change mesh name and remove trigger.
 
drdoom151 said:
Err ruchi, do you want me to include this in my FAQ or should I link to this thread?

Cheers
DrDoom151
Because people who just wants to play is not interesting in source code. I thinked this topic should separate from general FAQ.
 
GeorgianCrusader said:
thanks for little info about removing logos but 1 logo still remains
change your code in module_presentations.py, and remove pic_mb_warrior_3.dds in textures folder
Code:
("game_escape",prsntf_read_only,mesh_load_window,[
     (ti_on_presentation_load,
      [
        (presentation_set_duration, 999999),
        (set_fixed_point_multiplier, 1000),
        (troop_get_slot, ":banner_spr", "trp_player", slot_troop_banner_scene_prop),
        (try_begin),
          (neq, ":banner_spr", 0),
          (troop_get_slot, ":map_flag_type", "trp_player", slot_troop_custom_banner_map_flag_type),
          (val_max, ":map_flag_type", 0),
          (val_add, ":map_flag_type", custom_banner_flag_map_types_begin),
          (try_begin),
            (eq, ":map_flag_type", "mesh_custom_map_banner_01"),
            (create_mesh_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_square", "trp_player"),
          (else_try),
            (eq, ":map_flag_type", "mesh_custom_map_banner_02"),
            (create_mesh_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_short", "trp_player"),
          (else_try),
            (create_mesh_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_default", "trp_player"),
          (try_end),
          (position_set_x, pos1, -300),#20
          (position_set_y, pos1, 0),
          (overlay_set_position, "$g_presentation_obj_18", pos1),
          (position_set_x, pos1, 200),#200
          (position_set_y, pos1, 200),
          (overlay_set_size, "$g_presentation_obj_18", pos1),
        (try_end),
        ]),
     ]),
 
When you made MOD using my source code, I think of the mod is [Variant]. But in case of add many features,  It maybe no so. You can use it free, but people don't want to be thinked that your MOD is[Variant],  must not use it.
AND I don't guarantee to release and update my source code in the future.

By the way
SantasHelper said:
A. World Map
How do we build such a texture for our mod ? How did you do it ?
B. fields and cows
C. Fire arrows
A. World Map
I made map texture taking screenshot from the topmost. at this time I changed my source code, It became don't show map icon
Code:
      (try_for_parties, ":cur_party"),
        (try_begin),
            (eq, ":cur_party", "p_spawn_points_end"),
            (party_set_flags, ":cur_party", pf_disabled, 0),
        (else_try),
            (party_set_flags, ":cur_party", pf_disabled, 1),
        (try_end),
      (try_end),
After taked screenshot, don't save your player. "p_spawn_points_end" is in center of the world (0,0). You can know center of the world.
And then, I joined many pictures by useing photo shop. At this time I put "p_spawn_points_end" on  center of my texture. After that, you must adjust your texture and your sorce code  as fit each other's position exactly.
It is very hard and tired to do.
B,C,D
I didn't explain my source code how it work. If you wanted, You must know yourself how it work. I will only help to make your [valiant] mod. If you want a part of this source code, I did't prohibit to do, Do it yourself.
 
It is not mean that I don't want to use this source code other mod. If I did'nt want it. I would not release this. It is simply tired to me explain how it works one by one, I have no time to do so for other's MOD.
 
THank you for some informations.
SantasHelper said:
I couldn't  use "go out" to get Lezalit out of Rolf, because Lezalit party wasn't visible as attached party in town (it was attached inside Rolf party... so only Rolf was visible)
You can "go out" a party from other party. Did you try right click "contxt menu"?

To attach to other party is not bug. This is for "give and take" foods and troops.

SantasHelper said:
and also get the banner setting more easy to access.
I will revamp it by using "companion selecter". It shows companion's banner at the same time.
 
SantasHelper said:
The problem I reported in the bug thread is that after attaching, there was a sequence that caused a crash.
I'm not sure I follow the give/take food/trrops. isn't that done by talking ?
or do you mean that companions parties can do it by themselves ?
In any case, it's the "enter city command icon" I had used....on the order map
I didn't try context menu. you mean the same menu used for seing encyclopaedia notes ?
On your computer, when you did after attaching, Is it always become crush to desktop(CTD) ?
On my computer, It works well.
If you did't try "context menu", try right click on companion unit, and select "menu".
 
I just want to know if I may ask a question about 2 features in your source?

If no, thanks for your time. Am I then allowed to ask in the forge?
If yes, please continue reading the spoiler.

First off... Superb mod.
This is a small piece of master work you've manage to make.
Congrats to the mod and the Sub Forum.

Now then... To the question at hand.
I was wondering a bit about the "battle_mini_map".
This feature is splendid and I would like to use this feature in a personal mod (maybe I'll release it, it depends on different factors.)

However, I was just wondering if there is an easy way to implement this feature into the original "battle presentation"
The things I'm interested in are the "Horse Healthbar" and the green "kill/ frag counter" in the bottom left corner of the screen.

I've been trying since you released the source to get it to work but I can't.
Also I find it a bit hard to find all the essential things to get it to work.

I've gotten so far that I could see it all, but not just specifically those 2 features.
Also in battle I have to "backspace" my way through, first your presentation and then the original one.
And as I get to the original one, the counter and horse health bar disappears.

So I'm wondering if you have the time to spare to explain what I have to do to get it working.
Remember that my goal is just to have the killcounter and horse health bar in the original battle presentation.

Thanks for your time.
 
Hi, SantasHelper.
Important thing is, whether you could let Lezalit go out from Rolf.
Right click unit and select "Menu" > "attached parties menu" > "go out"
In the same way, "Select other companion party">"select Rolf">"attached parties menu">"go out"
 
Hi,NaglFaar
I can't answer about you want, But I can give some advices for you.
I guess you failed to connect in your source code. In my source code for mini map, there are some "slot" , slot_troop_honorable, and slot_agent_kill_count. how these works, check it.

In the end, It is necessary to be patient to transplant source code from my MOD. moreover even I did't remember how it works.
 
NaglFaar said:
Ok, thanks for your time.

I'll give it a shot in the forge.
But you are okay with me trying to do this?
Yes of course. You can use my source code free, But take care of yourself.
 
zomg. i just want to say this. thanks for making this killer mod AND releasing the source codes.

you are like a coding god of awesome..

:grin:
 
I added a FAQ.
Q: How to get rid of heraldry from my armor?
A: In module_items.py, You restore source code same as native.
For example 1,
Code:
["padded_leather", "Padded Leather", [("new_padded_leather",0)], itp_merchandise| itp_type_body_armor  |itp_covers_legs|itp_civilian,0,
 454 , weight(12)|abundance(100)|head_armor(0)|body_armor(27)|leg_armor(10)|difficulty(0) ,imodbits_cloth ,
 [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_custom_banner", "tableau_padded_leather", ":agent_no", ":troop_no")])]],
Modify "new_padded_leather"
to "padded_leather"

Modify "imodbits_cloth , [(ti_on_init_item, ...., ":troop_no")])]],"
to "imodbits_cloth ],"
For example 2
Code:
["leather_jerkin", "Leather Jerkin", [("leather_jerkin",0)], itp_merchandise| itp_type_body_armor |itp_civilian |itp_covers_legs ,0,
 321 , weight(6)|abundance(100)|head_armor(0)|body_armor(23)|leg_armor(6)|difficulty(0) ,imodbits_cloth , [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_custom_banner", "tableau_leather_jerkin", ":agent_no", ":troop_no")])]],
In case of mesh name is same as native,
Modify "imodbits_cloth , [(ti_on_init_item,....":troop_no")])]],"
to "imodbits_cloth] ,"
 
Hi, I'm new and I love your mod.

I have two questions.
Which files of the Module System are original and which of them are custom?
Is the new codes marked in the *.py files?
 
Adirio said:
Hi, I'm new and I love your mod.

I have two questions.
Which files of the Module System are original and which of them are custom?
Is the new codes marked in the *.py files?
Hi, Adirio.
I don't know which file of module system I modified. If you want to know, search difference between original and this mod by application.
 
Back
Top Bottom