Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Will changing the order of the items (,starting at weapons,) break anything? I know about the stuff you cant reorganize at the top, I'm asking about the items past the final warning about changing orders.

I already went ahead and reorganized the armors and weapons and got a weird side effect. All Native items have +0 Morale bonus on them, desides stuff that already provided this, such as foods. Is it the placement in the file or is it because I reorganized them?
 
does everyone know the meaning of this error that code is from wfas but when i added it in my mod in show up like this  :???:  :?:
Code:
value ['pol_man_insult_1.wav', 20] is not a valid filename
 
Mispronounced said:
Will changing the order of the items (,starting at weapons,) break anything? I know about the stuff you cant reorganize at the top, I'm asking about the items past the final warning about changing orders.

I already went ahead and reorganized the armors and weapons and got a weird side effect. All Native items have +0 Morale bonus on them, desides stuff that already provided this, such as foods. Is it the placement in the file or is it because I reorganized them?

In Perisno I sorted all the items that come after horses into categories.
Didn't break anything.
Appearance of additional text is managed by the script game_get_item_extra_text.
See what ranges of items are used there and which key items you moved.
 
I added a helmet face for lord.and normalface textures is invisible.In lord hall and battle, lord face normal but in character menu lord helmet doesnt see.I must deleted af_override_fullhelm in modeule_presentation?
lEErEk.jpg

EditSolved. In module_scrips this and other flags remove head and helm.
(cur_tableau_set_override_flags, af_override_fullhelm|af_override_head|af_override_weapons),
 
Mispronounced said:
Will changing the order of the items (,starting at weapons,) break anything?

there are two things to keep in mind here:

1) Hardcoded stuff -> you can't do much here. You can remove them from the game (not used on troops or available on stores), but you need to keep them (ID #)
2) Rest -> you can change whatever you want, but to do that you also need to understand what you are doing. That means knowing how constants for ranges are used, and how the scripts/triggers use them
 
I added a arm for new kingdom look like:
module_meshes
  ("pic_arms_abbasi", 0, "pic_arms_abbasi", 0, 0, 0, 0, 0, 0, 1, 1, 1),
and I added mesh,material and texture.
ın presentation look like but doens't see in game.I opened new save.
(store_faction_of_troop, ":cmdr_faction", "$enlisted_lord"),
(try_begin),
(eq, ":cmdr_faction","fac_kingdom_1"),
(create_mesh_overlay, reg0, "mesh_pic_arms_swadian"),
(else_try),
(eq, ":cmdr_faction","fac_kingdom_2"),
(create_mesh_overlay, reg0, "mesh_pic_arms_vaegir"),
(else_try),
(eq, ":cmdr_faction","fac_kingdom_3"),
(create_mesh_overlay, reg0, "mesh_pic_arms_khergit"),
(else_try),
(eq, ":cmdr_faction","fac_kingdom_4"),
(create_mesh_overlay, reg0, "mesh_pic_arms_nord"),
(else_try),
(eq, ":cmdr_faction","fac_kingdom_5"),
(create_mesh_overlay, reg0, "mesh_pic_arms_rhodok"),
(else_try),
(eq, ":cmdr_faction","fac_kingdom_6"),
(create_mesh_overlay, reg0, "mesh_pic_sarranid_arms"),
(else_try),

(eq, ":cmdr_faction","fac_kingdom_9"),
(create_mesh_overlay, reg0, "mesh_pic_arms_abbasi"),
 
Ah, It was the quest and duplicate tutorial items that we're causing the problem. Thanks guys, I'll make sure to keep out a better eye for scripts like that.

Another question: is it safe to remove duplicate items? By that, I mean items marked _DUPLICATE by Lavs compiler. (I'm assuming the tutorial duplicate items are hardcoded)
 
Can someone please help me understand a couple things about lords and convincing them join your faction/cause?

1. This code:
Code:
		(try_begin),
			(neq, ":liege", "trp_player"),
			(neq, ":liege", "$supported_pretender"), #player is advocate for pretender
			(val_div, ":argument_strength", 2),
			(val_div, ":argument_appeal", 2),
			(val_div, ":result_for_argument", 2),
		(try_end),
I suspect it halves your chances of convincing a lord to join your cause if you're part of a rebellion for a claimant. Is this correct? Is this all it does? I want to know how drastic modifying or removing it would be.

2. This code:
Code:
		(store_skill_level, ":player_persuasion_skill", "skl_persuasion", "trp_player"),
		(try_begin),
			(gt, ":result_for_argument", 0),
			#make sure player is the one making the overture

			#if player has 0 persuasion, ":result_for_argument" will be multiplied by 3/10.
			(store_add, ":player_persuasion_skill_plus_5_mul_066", ":player_persuasion_skill", 5),
			(val_mul, ":player_persuasion_skill_plus_5_mul_066", 2),
			(val_div, ":player_persuasion_skill_plus_5_mul_066", 3),

			(val_mul, ":result_for_argument", ":player_persuasion_skill_plus_5_mul_066"),
			(val_div, ":result_for_argument", 10),
		(else_try),
			(lt, ":result_for_argument", 0),
			(store_sub, ":ten_minus_player_persuasion_skill", 10, ":player_persuasion_skill"),
			(val_mul, ":result_for_argument", ":ten_minus_player_persuasion_skill"),
			(val_div, ":result_for_argument", 10),
		(try_end),
I'm trying to wrap my head around how it works. I want to make higher Persuasion more effective in the whole 'convincing lords to join you' equation, so what would be the most straight-foward way to do this?

3. I want to make your relation with the lord you're trying to convince matter a lot more (at least, a lot more than it apparently seems to). I presume "troop_get_relation_with_troop" has something to do with this, but I'm not seeing how in the actual 'convincing lord' calculation? Is there a way I could crowbar it in (such as, make it check if lord relation is +25 or more, then multiply your chances by 33%)?

Thanks!
 
Hey guys, can I ask a question? I wanted to add more bushes to battlefields, via flora data file, but I have zero experienccec with this. So, any insight, info or a tutorial I could read? I want just more bushes and/or trees, Native ones, not like Polished Landscapes. Thank you!
 
        So I'm trying to make a switch to bot on death script for a single player scenario.  The first portion of code gets your players ID and the second finds your allies agent ID. Then I use the player_control_agent operation but I get an error that says invalid player ID or something like that.  I was wondering what Floris, and 1257 AD used to switch to bot on death in single player?  Any help is much appreciated.       

                (try_begin),
(try_for_agents, ":cur_agent_p"),
(agent_is_alive, ":cur_agent_p"),
(agent_is_human, ":cur_agent_p"),
(neg|agent_is_non_player, ":cur_agent_p"),
(agent_get_player_id, ":player", ":cur_agent_p"),
(try_end),


    (try_begin),
        (try_for_agents, ":cur_agent"),
        (agent_is_alive, ":cur_agent"),
        (agent_is_human, ":cur_agent"),
        (agent_is_non_player, ":cur_agent"),
(agent_get_team ,":player_team", ":cur_agent_p"),
        (agent_get_team ,":cur_team", ":cur_agent"),
        (eq, ":cur_team", ":player_team"),
        #(agent_get_position, pos1, ":cur_agent"),
(player_control_agent, ":player", ":cur_agent"),

(display_message, "@change unit."),
 
Abdmzn said:
How can I apply the specular effect on weapons??

Refer to native similar items and their material for shader, flags, spec value...
Each material has (most of the time) potentially 3 types of textures: diffuse, specular & bump. Specular map exists only when there are shiny parts and non shiny parts. Shader must correspond to what map you included or not.
 
snouz said:
Abdmzn said:
How can I apply the specular effect on weapons??

Refer to native similar items and their material for shader, flags, spec value...
Each material has (most of the time) potentially 3 types of textures: diffuse, specular & bump. Specular map exists only when there are shiny parts and non shiny parts. Shader must correspond to what map you included or not.
I did that but it didn't work : /

Edit:Aha! I see! I forgot to do the flags!
 
I was wondering how to properly get your players ID in Single Player. I have used the player_get_agent_id operation but it doesn't seem to work right. Any help is much appreciated!
 
elcapo29 said:
I was wondering how to properly get your players ID in Single Player. I have used the player_get_agent_id operation but it doesn't seem to work right. Any help is much appreciated!
SP has no players at all, so all player related operations wont work there.
If you want to receive your agent's ID, use this;
Code:
get_player_agent_no                      = 1700  # (get_player_agent_no, <destination>),
                                                 # Retrieves the reference to the player-controlled agent. Singleplayer mode only.
 
Status
Not open for further replies.
Back
Top Bottom