Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
kalarhan said:
this has being done on a few mods, including this OSP: http://forums.taleworlds.com/index.php/topic,323422.0.html

How about instead of doing it over again, you start from that and include more features?

(and Viking Conquest RE is also adding this idea)  :wink:

I've got lots of ideas, including a new story-line! :grin:
I just need more time and wish.

An excellent OSP, btw. I may use some of its code for my mod. Thank you. :smile:

When I use troop_raise_attribute and troop_raise_skill, the attribute and skill points raise automatically as well. How can I get rid  of this?
And almost similar question. I want to make the player start from level 30. I add some xp to him to do this. But when I added 300000 xp, only 30000 were added. And here I also want to get rid of those attribute and skills points.
Unfortunately I have not found such information on the forum.
Maybe you know?
 
vitali-attila said:
When I use troop_raise_attribute and troop_raise_skill, the attribute and skill points raise automatically as well. How can I get rid  of this?

I am busy working on VC RE tests  :mrgreen:, but here are some thoughts:

Code:
troop_raise_skill                        = 1521  # (troop_raise_skill, <troop_id>, <skill_id>, <value>),
                                                 # Increases troop skill by the specified value. Value can be negative. See header_skills.py for reference. When used on non-hero troop, will affect all instances of that troop.
this operation changes the character stats, not the available points. You can increase or decrease the skill, so use store_skill_level first to check what was the old value

new value: 7
old value: 4
increase: 7-4 = 3

I don't recall a operation to change available skill points (or stats, or wp).

I add some xp to him to do this. But when I added 300000 xp, only 30000 were added.
check your operation. You have add_xp_to_troop and party_add_xp, they do different things  :wink:
 
Hi guys , a quick question , Is it possible to change the height of a jump in game ,like pressing space bar and  you character could power jump and slide a bit. I changed the jump animation , yet it looks very much the same height as it was .
 
litdum said:
But there were this animations i want to add in older versions as you said. Maybe they can be added again. Which module_system version should I search for this? or Do you know the codes?
----Is it realy impossible? :sad:

Well animation tags is hardcoded but self animations are not
the only animation with are hardcoded and require the same name (so far i touched) were the shield up down normal defence animations with are in skeletons.BRF
ordionarry you can change animation and change the frames of the animation
but you cant change the functionality of it
for example if you do new runing animation with wont move legs forward moving animation still go forward and no matter legs move or not
another example is slash right animation
no matter what direction your sword go defence from this animation is required to be used defend from right
some animations for weapons could be taken of for example if you dont have muskets in the mod there is 2 musket animations low thrust and up thrust so low one i use for sarisas while the hi one i use for the spear overhead attack
to set up animation to be used on one item or another you have to go items_header.py (well at least for the item animations)
 
rgcotl said:
litdum said:
But there were this animations i want to add in older versions as you said. Maybe they can be added again. Which module_system version should I search for this? or Do you know the codes?
----Is it realy impossible? :sad:

Well animation tags is hardcoded but self animations are not
the only animation with are hardcoded and require the same name (so far i touched) were the shield up down normal defence animations with are in skeletons.BRF
ordionarry you can change animation and change the frames of the animation
but you cant change the functionality of it
for example if you do new runing animation with wont move legs forward moving animation still go forward and no matter legs move or not
another example is slash right animation
no matter what direction your sword go defence from this animation is required to be used defend from right
some animations for weapons could be taken of for example if you dont have muskets in the mod there is 2 musket animations low thrust and up thrust so low one i use for sarisas while the hi one i use for the spear overhead attack
to set up animation to be used on one item or another you have to go items_header.py (well at least for the item animations)
As I understood I need an animation like this to change for using papa's bow animations as mounted :
["reload_crossbow_horseback", 0, amf_priority_reload|amf_use_weapon_speed|amf_play,
  [1.6, "anim_human", combat+1800, combat+1877, arf_blend_in_8|arf_make_custom_sound, pack2f(0.27, 0.94)],
],
and I need to assign it to bow items from items_header.py.
But I am already using this "reload_crossbow_horseback" animation for crossbows and this is the only horseback animation i could find in module_animations.py to be able to use instead of "(original)ready_bow" animation while mounted.
  Even I could succes to do that. Does it conflict with "(original)ready_bow" animation? Because it will continuou using "(original)ready_bow" animation as well. Even so If i can find another "horseback" animation that I can replace with papa's bow animation, I will try this. Do you know any other animation like musket animation(not using)&that I can change to do this&which is horseback?
 
well i seriosly dont know is ready_bow_horseback is taken totally out
it could be still hardcoded just newer used
maybe it is posibile to bring it back in the header animations.py
but i newer tested that ...
 
rgcotl said:
well i seriosly dont know is ready_bow_horseback is taken totally out
it could be still hardcoded just newer used
maybe it is posibile to bring it back in the header animations.py
but i newer tested that ...
Actually Even If it is possible, I cannot find how to add these animations on my own. Because i do not know about "header" files much. Is there a good and clear tutorial about them?
 
Short Q,

Since I've added Towns and Castles to be recruitable, I've placed different 'types' of recruits, and used the faction cultures in script.py.
Only problem is, since there are only 5 tiers of defined troops in the scripts, using that would mean that I'll be seeing noble 'recruits' guarding the town walls, which spoiled the immersion alittle for me.

This is what I tried:

from scripts.py

#Cultures

    (faction_set_slot, "fac_culture_1",  slot_faction_tier_1_troop,
    (faction_set_slot, "fac_culture_1",  slot_faction_tier_2_troop,
    (faction_set_slot, "fac_culture_1",  slot_faction_tier_3_troop,
    (faction_set_slot, "fac_culture_1",  slot_faction_tier_4_troop,
    (faction_set_slot, "fac_culture_1",  slot_faction_tier_5_troop,


I've added this along:
    (faction_set_slot, "fac_culture_1", slot_faction_recruit_tier_1_troop,
    (faction_set_slot, "fac_culture_1",  slot_faction_recruit_tier_2_troop,
    (faction_set_slot, "fac_culture_1",  slot_faction_recruit_tier_3_troop,


Now, once I build the module, got a flood of errors about this one, and knowing that life is not that easy, I've traced the problem about and eventually sniffed into the constants.py, which
I'm assuming that to add this new "slot" in the script, I'll need to add the 'slot_faction_recruit_tier_1/2/3_troop' with a new numbers, 151-153.

So..... started the game, tried to recruit 'nobles', the game menu dialog script seems to work alright, but I did not get any 'noble' recruits. I'd believe something's wrong in the scripts.py, but I've checked, I've changed to recruit  slot_faction_recruit_tier_3_troop, so nothing wrong should happen here.

I suspect it's the module_constants.py, I take it that it's a bad idea to add new slots in the faction slots? Or for that matter, adding to any other slots?

And no, no link to Ultimate introduction to Modding ......... I have enough of those.

 
Adding new faction slots or slots in general is fine, you just need to make sure the numbers aren't being used by other "similar" slots (faction, party/center, troop etc), which is why they're always in order to help prevent accidental overlap.

The troops assigned to those slots are only meaningful to the player when he recruits from villages. Other lords and garrisons use "party templates", and by putting noble troops in template C, they're excluded from garrisons and merchant caravans (which only use A and B).

Forgot that castle guards get their troop IDs from the tier slots.  :oops: In that case, search the entire module system for slot_faction_tier_5_troop and make sure any guard scripts you come across read from tier 4 instead.
 
A question again :grin:. I had added alive horses as scene_props with these codes:
Code:
  ("horse_courser",sokf_invisible,"courser","0",[(ti_on_init_scene_prop,
[
(store_trigger_param_1, ":instance_no"),
(prop_instance_get_position, pos1, ":instance_no"),
(set_spawn_position, pos1),
(spawn_horse,"itm_courser")
])]),

    ("horse_hunter",sokf_invisible,"hunter","0",[(ti_on_init_scene_prop,
[
(store_trigger_param_1, ":instance_no"),
(prop_instance_get_position, pos1, ":instance_no"),
(set_spawn_position, pos1),
(spawn_horse,"itm_hunter")
])]),
Now i wonder if it is possiple to add a troop as a scene_prop. Because I am trying to add town walkers to arenas as viewers. Is it possible?
 
jacobhinds said:
Adding new faction slots or slots in general is fine, you just need to make sure the numbers aren't being used by other "similar" slots (faction, party/center, troop etc), which is why they're always in order to help prevent accidental overlap.

The troops assigned to those slots are only meaningful to the player when he recruits from villages. Other lords and garrisons use "party templates", and by putting noble troops in template C, they're excluded from garrisons and merchant caravans (which only use A and B).

Forgot that castle guards get their troop IDs from the tier slots.  :oops: In that case, search the entire module system for slot_faction_tier_5_troop and make sure any guard scripts you come across read from tier 4 instead.

That certainly would remove the hassle the extra slots for my 'nobles'. Thanks. The tier 4 troop is used in escape from towns scenario though, but thats negligible.

Although, talking to town guards gives me that usual 'surrender of die' dialog, which is odd, because I did not change any fundamentals on the tier troop script except for a different troop in the  slot_faction_tier_#_troop,
 
Town/village walkers are deliberately avoiding the AI mesh and actually walking to the edge of it as soon as they can. They often don't seem to be going anywhere in particular.

_Ozuh.jpg


I've made a couple of minor edits to town walker code (allowing a custom troop to be part of the try_for_agents in the walker scripts) but I can't imagine why that would affect it so drastically. It's possible this happened much longer ago as I haven't checked town walkers recently.
 
jacobhinds said:
Town/village walkers are deliberately avoiding the AI mesh and actually walking to the edge of it as soon as they can. They often don't seem to be going anywhere in particular.

_Ozuh.jpg


I've made a couple of minor edits to town walker code (allowing a custom troop to be part of the try_for_agents in the walker scripts) but I can't imagine why that would affect it so drastically. It's possible this happened much longer ago as I haven't checked town walkers recently.

This happens alot in my own mod too, though it was inherited from Brytenwalda. Ive not had a chance to look into why so i cant help you there other than to say it seems to be a widespread problem.
 
Is the order over which operations like try_for_agents loop over the ids specified?

I noticed stutter with PBOD 0.92 (can't use WSE on linux obviously) and large battle size, narrowed it down to some quadratic complexity code, and changed it to spread out the computation over several more frequent trigger calls; however my code for that relies on that iteration happening in a stable always increasing order.
 
produno said:
Into walls still.
Surely they're still attempting to avoid the mesh, but if there's no ground to walk on, because every little space has been covered by the AI mesh, then do they actually clip through the walls to avoid it?
 
Status
Not open for further replies.
Back
Top Bottom