IrakliBeridze
Recruit
How to install ????? help me please
Am I stupid or are there no instructions in this threat?mauromagno said:Following the instructions
Habsburg said:I have no idea what to do.
Thanks!kalarhan said:Habsburg said:I have no idea what to do.
you can read the entire thread (posts), that should take you to some discussions and code examples on how to use the art assets from the OP (original post). The OP was more about sharing the resources (icons), each modder can use them in different ways.
you can also check the tutorial section or ask on the Q&A thread to learn more about modding and coding Warband.
Habsburg said:So there is no way to just, you know, replace some files and code lines to implement those amazing map Icons?
Corbul said:Sorry to necro the thread, but I can't figure out squat of what we're supposed to do to install these
Slawomir of Aaarrghh said:This pack contains only resources - BRF's + textures. No scripts included.
Read againNPC99 said:Corbul said:Sorry to necro the thread, but I can't figure out squat of what we're supposed to do to install these
They’re replacement meshes for the native ones in map_icons.py. Read the module system documentation:
The module system uses Python lists to represent collections of game objects. ( A python lists starts with a '[', includes a list of objects seperated by commas, and ends with a ']' ) If you open and view any of the module files you'll see that it contains such a list. For example module_map_icons.py contains:
map_icons = [
("player",0,"player", 0.2, snd_footstep_grass),
("player_horseman",0,"player_horseman", 0.2, snd_gallop),
("gray_knight",0,"knight_a", 0.2, snd_gallop),
("vaegir_knight",0,"knight_b", 0.2, snd_gallop),
("peasant",0,"peasant_a", 0.2,snd_footstep_grass),
("khergit",0,"khergit_horseman", 0.2,snd_gallop),
("axeman",0,"bandit_a", 0.2,snd_footstep_grass),
("woman",0,"woman_a", 0.2,snd_footstep_grass),
("town",mcn_no_shadow,"City", 0.9,snd_footstep_grass),
]
Here map_icons is declared as a Python list and every element in the list is the declaration for a specific map icon object. In this example, ("player",0,"player", 0.2, snd_footstep_grass) is such an object. We call such objects tuples. Tuples, like lists, contain elements seperated by commas (but they start and end with parentheses). The structure of each tuple object is documented at the beginning of the module file. For map icons, each tuple object contains:
1 ) name of the icon,
2 ) icon flags,
3 ) Mesh name,
4 ) Mesh scale,
5 ) sound id.
So, for the first tuple ("player",0,"player", 0.2, snd_footstep_grass)
1 ) name of the icon = "player"
2 ) icon flags = 0
3 ) Mesh name = "player"
4 ) Mesh scale = 0.2
5 ) sound id = snd_footstep_grass
You can work out the structure of game objects for each module system file in this way, by reading the documentation at the beginning and matching that with the contents of the list.
Extracted from https://forums.taleworlds.com/index.php/topic,11422.0.html
Janycz said:Many scripts for this osp(battlefields):
Code:("dedal_battlefield_a",mcn_no_shadow,"dedal_battlefield_a", 0.15, 0), ("dedal_battlefield_b",mcn_no_shadow,"dedal_battlefield_b", 0.15, 0), ("dedal_battlefield_c",mcn_no_shadow,"dedal_battlefield_c", 0.15, 0), ("dedal_battlefield_d",mcn_no_shadow,"dedal_battlefield_d", 0.15, 0),
Code:(1, [ (try_for_parties, ":party"), (party_slot_eq, ":party", slot_party_type, spt_battlefield_icon_on_map), (party_get_slot, ":hours", ":party", slot_num_hours_battle_icon_on_map), (val_add, ":hours", 1), (try_begin), (ge, ":hours", 24), #24 - how many hours will be visible icon (party_clear, ":party"), (remove_party, ":party"), (else_try), (party_set_slot, ":party", slot_num_hours_battle_icon_on_map, ":hours"), (try_end), (try_end), ]),
Code:("draw_battle_icon", [ (store_script_param, ":party_no", 1), (set_spawn_radius, 0), (spawn_around_party, ":party_no", "pt_battlefield"), (assign, ":battlefield", reg0), (assign, ":icon", "icon_dedal_battlefield_a"), (store_random_in_range, ":rand", 0, 3), (try_begin), # (eq, ":rand", 0), # (assign, ":icon", "icon_dedal_battlefield_a"), # (else_try), (eq, ":rand", 1), (assign, ":icon", "icon_dedal_battlefield_b"), (else_try), (eq, ":rand", 2), (assign, ":icon", "icon_dedal_battlefield_c"), (else_try), (eq, ":rand", 3), (assign, ":icon", "icon_dedal_battlefield_d"), (try_end), (party_set_icon, ":battlefield", ":icon"), (party_set_slot, ":battlefield", slot_num_hours_battle_icon_on_map, 0), (party_set_slot, ":battlefield", slot_party_type, spt_battlefield_icon_on_map), (party_set_flags, ":battlefield", pf_is_static|pf_always_visible|pf_no_label, 1), ]),
insert into the begin of the script 'game_event_battle_end':
Code:(store_script_param_1, ":root_defender_party"), (store_script_param_2, ":root_attacker_party"), (call_script, "script_draw_battle_icon", ":root_attacker_party"),
for example:
Code:("game_event_battle_end", [ (store_script_param_1, ":root_defender_party"), (store_script_param_2, ":root_attacker_party"), (call_script, "script_draw_battle_icon", ":root_attacker_party"), #other operations ... ... ]),
I know that but where is the question really, i took a peek at module_constants and don't understand where to place it and i have no idea where to define 'slot_num_hours_battle_icon_on_map'!Janycz said:@ᚱᛟᛒᛟ you have to define the slot 'slot_num_hours_battle_icon_on_map' and the constant 'spt_battlefield_icon_on_map'.
ᚱᛟᛒᛟ said:i took a peek at module_constants and don't understand where
I know where to define it but i cant figure out what to define it "correctly" so i dont get a bunch of errors and it wont workkalarhan said:ᚱᛟᛒᛟ said:i took a peek at module_constants and don't understand where
anywhere, altho for readability sake you should keep things together (party slots on the party section, etc). Not like it matters to the game, just to you (the coder).
see this https://forums.taleworlds.com/index.php/topic,12620.0.html