Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
The_dragon said:
@xaliber yes, the knock rider off horse code interferes with the native code.
I think that if you add '(agent_is_human, ":agent_no"),' before '(assign, ":initial_courage_score", 5000),', it should fix the issue.
Native code spawns only troop agents (not horses; actually it does spawn horses, but the trigger ti_on_agent_spawn won't fire for them because they spawn with their rider), and the devs forgot to put additional checks (because 'hey... it works, so let it this way').
The code that you added spawns a horse each time it's rider needs to be thrown off. The horse spawning triggers native code that wasn't designed to support horses agents, so that's why you get those errors.
Interesting (and I don't understand why this happens) is the fact that you should get an error on 'store_character_level' operation, because the horse's troop id is -1, which is an invalid troop id, but as I can see, you got no error regarding the troop id.

Much, much appreciated! After a few testing, it works excellently without errors. Thanks, The_dragon. :smile: Learning the Warband's code is curious...

Would you mind if I ask additional question? Would it be possible to count the rider's Riding skill in addition to random chance to check whether they are knockable or not?

I tried using this

Code:
	  (store_random_in_range,":chance",0,60), ### Decrease this number (60) for higher chances of knocking riders off (and vice-versa).
	  (agent_get_troop_id,":victim_agent",":victim_agent"),				## Xaliber's edit
	  (store_skill_level,":riding","skl_riding",":victim_agent"),				## Xaliber's edit
	  (val_mul,":riding",6),										## Xaliber's edit
	  (val_add,":chance",":riding"),									## Xaliber's edit
	  (ge,":chance", ":orig_damage"), ### If damage dealt is over or equal to the ":chance" number, knock-off occurs.

But it always produce these... horrendous errors

gZETZJN.jpg

Reus said:
xaliber said:
(whew, is there a documentation somewhere I can find what the errors supposed to mean?
http://forums.taleworlds.com/index.php?topic=6575.msg96347#msg96347

Winter posted a couple.

Thanks, Reus! It's bookmarked now.
 
Is dynamically changing a hex code as simple as something like:
store mul, :colour, 0xFF0000, 00
? Can hexadecimals be stored in local variables as long as the 0xFF prefix is there?

I'm basically trying to assign a colour using separate RGB hex elements. I'm sure I've seen someone do it elsewhere but can't for the life of me find where it is.
 
I've tried searching the forum but came up empty...

How "mod-able" is the Custom Battle mode? Can I add new menus/options, modify AI behavior within the mission templates, have AI "parties" (in a sense) spawn alongside the player, add custom scenes etc?
I've been working on some mod content, but with Bannerlord around the corner I do not know if it is worth implementing a full-blown mod. Especially because most of my ideas revolve mostly around battles and visuals  :lol:

I do suppose I could completely change how "New Game" works, with various options and then spawning the player into specific battle scenes....
 
wrwlf said:
I've tried searching the forum but came up empty...

How "mod-able" is the Custom Battle mode? Can I add new menus/options, modify AI behavior within the mission templates, have AI "parties" (in a sense) spawn alongside the player, add custom scenes etc?
I've been working on some mod content, but with Bannerlord around the corner I do not know if it is worth implementing a full-blown mod. Especially because most of my ideas revolve mostly around battles and visuals  :lol:

I do suppose I could completely change how "New Game" works, with various options and then spawning the player into specific battle scenes....

You can mod it at will. Yes. Yes. Yes. Yes. Etc: probably yes :XD
Start here: module_presentations.py, mst: game_custom_battle_designer
 
This one had it too, don't know where the download link went off to though. Entire OP was deleted.

http://forums.taleworlds.com/index.php/topic,136521.0.html
 
The_dragon said:
Put ":victim_troop_id" instead of ":victim_agent" like this:
(agent_get_troop_id,":victim_troop_id",":victim_agent"), ## Xaliber's edit
(store_skill_level,":riding","skl_riding",":victim_troop_id"), ## Xaliber's edit

Thanks again, The_dragon! It works nicely, except when I dismount from my horse... my attack does no damage to the AIs. The AIs still can kill each other though (and they can kill me), but I can't deal any damage to them if unmounted. :???:

Tried adding this:
  (store_random_in_range,":chance",0,60), ### Decrease this number (60) for higher chances of knocking riders off (and vice-versa).
  (agent_get_troop_id,":victim_troop_id",":victim_agent"),
  (troop_is_mounted,"victim_troop_id"),
  (store_skill_level,":riding","skl_riding",":victim_troop_id"),
  (val_mul,":riding",6),
  (val_add,":chance",":riding"),
  (ge,":eek:rig_damage", ":chance"), ### If damage dealt is over or equal to the ":chance" number, knock-off occurs.

But it gives me another error so I think it's not the way to go... mind if I ask for direction once again?
 
I have a quick question for more experience modders: Do you have any tips and tricks that I can use to quickly find item meshes. Say I wanna find a specific weapon mesh (this for example):

Code:
["flintlock_pistol", "Flintlock Pistol", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary ,itcf_shoot_pistol|itcf_reload_pistol, 230 , weight(1.5)|difficulty(0)|spd_rtng(38) | shoot_speed(160) | thrust_damage(45 ,pierce)|max_ammo(1)|accuracy(65),imodbits_none, [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15)])]]

I now have to go through each weapon_meshes_*.brf file to find that particular mesh by name of (in this case) flintlock_pistol. Is there a quicker way to do this?
 
Two quick questions,

1) How do you exactly 'save' a scene? What I did was follow the scening video tutorial by getting the terrain code and pasted on the "ruins" multiplayer map. I then delete the sceneobj file (multi_scene_1). I was able to get the edited terrain on the "ruins" map, but I have no idea how to pernamently save it afterwards. Since there is a missing multi_scene_1 file, my edited scene was lost.

2) I take it to make a singleplayer battle scene, entry points should be 0 for the player/allies and 32 for the opposing faction?
 
Kalarhan: Thanks. I fixed that script now with that change.

NEW QUESTION.

I would like to have a better understanding of the ITP flags and what they do.
Is this detailed in an article/guide somewhere?

In particular: ITP_unique.
How is this different from itp_no_pick_up_from_ground?
In BW, Itp-unique seems to have been assigned to all items one should be able to loot.
Examples: special warpainted bodies and siege stones.

With the new itp_no_pick_up_from_ground, what is the functionality of ITP-unique.

I am also very curious about itp_crush_through.
I am looking for a flag for sledgehammers that will prevent the weapon from being parried by little weapons.
It's frustrating to use a very slow weapon and get parried by someone's seax.
 
gdwitt said:
What's the secret formula for interpreting OPCODE errors? Are they numbers from headeroperations with some algorithm to make it hard to find?

lol no. The OPCODE error is the one from header_operations.py. Just remember that you can apply two codes in some cases, like (neg|is_between and that it is zero-based. There is no secret code.

you commented the validation...
Code:
#(gt, ":item", "itm_items_end"),
 
Status
Not open for further replies.
Back
Top Bottom