Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
KaiserStalker said:
I'd like to do a total conversion, but I can't find the world map files...can someone help me?
map.txt
It's in your Mod folder in warband.

for moving parties, Module_Parties wich is in your Module system files.
 
Taran3 said:
I tried adding some new skins and therefore I added a new choice in the choose gender menu.
The problem is that despite the startup screen showing my character as male (boy growing out of childhood etc.) npcs refer to my character as madam.

I did add (assign,"$character_gender",tf_male),
What did I miss?
The troop_set_type operation, which does the actual gender assignment.
 
Somebody said:
Taran3 said:
I tried adding some new skins and therefore I added a new choice in the choose gender menu.
The problem is that despite the startup screen showing my character as male (boy growing out of childhood etc.) npcs refer to my character as madam.

I did add (assign,"$character_gender",tf_male),
What did I miss?
The troop_set_type operation, which does the actual gender assignment.

And for dialogs and menus that use string with format {my lord/my lady} will result my lady  as your skin id is more than 0.

You have 2 options to fix it:
option 1 : Do the reg11 assignment at the menu or dialog :
Code:
(troop_get_type, reg11, "trp_player), (val_and, reg11, tf_female),
and replace {my lord/my lady} with : {reg11?my lady:my lord}.
option 2:At any menu, and dialog, set your troop type  to tf_male and change it back to your skin ID before jumping to mission, so your spawned agent use correct race, and the dialog and menu (addresing to troop, not agent) will show correct gender.

Both options will consume much time to do. I did the 2nd option for my mods.
 
Hey, everyone... I'm doing my first scene ever, it's a pretty important (capital) city, and one of the "selling points" (hurr-durr) of my mod is realistic cities, and I've been working on it since yesterday, since I'm not quite used to the scene making process yet. Anyways, I've been wondering: how many scene props should I (not) place on a scene? Also, if I remember correctly, scene props can be lodded, right? I'm having a feeling I'll need to lod the buidlings a lot. :smile:
Here's a few pictures to proudly show off like a little child  illustrate the cause for such worries:
bCcjiBS.jpg
dmzmU7R.jpg
'Tis so barren because it's still in alpha. I'll add some kind of crap beside the buildings... Weeds, tiny bushes, perhaps, firewood, market stalls, etc. And I'll place all the buildings inside, of course.
What do you think? Is creating such scenes a feat of insanity? Once again, this city will not have any fake houses in it, and each and every street will be explorable. I'm also going to optimise it for roofwalking, since I love doing that since I started playing the original M&B.

But yeah, advice for scening and polycounts, help please. IIRC the amount of polygons is not important as long as your colmeshes are low-poly, right?
(I also underlined my first two questions so they are more visible, I couldn't see them when I looked for them. Staring at buildings and wall segments is so... tiresome...)
 
first of all there is no real limit for polys. It depends at your PC mainly. I often make scene or models with 200.000 polys, but use low poly collisions to hold the game stable, this works quite well for me.
 
Hey, I'm trying to detect the moment when players switch to empty hands (server side). I'm using the trigger "ti_on_item_unwielded" to detect when an item has been unwielded and then I wanted to use the "agent_get_wielded_item" command to see if the item is -1 (empty hands). However when I have only a single sword equipped and I sheath my weapon I get the current weapon I just sheathed rather than the expected -1 code for no weapon. This is my code:

Code:
	  (ti_on_item_unwielded, 0, 0, [], #Trigger when an items unwielded (check if its -1 for empty hands)
	  [
		(try_begin),
			(multiplayer_is_server),
			(store_trigger_param_1, ":agent_no"),
			(agent_get_player_id, ":cur_player", ":agent_no"),
			(agent_get_wielded_item, ":item_num", ":agent_no", 0),
			(assign, reg0, ":item_num"),
			(str_store_string, s0, "@Item unwielded: {reg0}"),
			(multiplayer_send_string_to_player, ":cur_player", multiplayer_event_show_server_message, s0),
		(try_end),
	  ]),

When I sheath my weapon with a shield then afterwards put away my shield the value does indeed come back as -1, so I can only conclude there is a delay between the trigger event being called and the weapon actually being put away, any suggestions on how to get round this? Or alternatively a better implementation.

If there isn't I will just poll to check for the state but obviously I would prefer to have it be event driven if I can.
 
First of all, it's late night here (01:11 at the time of posting) which means I could probably be posting bullcrap, but since your trigger doesn't work, I'd delay the consequences by half a second (or a similar value) and use that delayed consequences block to check for the wielded item. I've found that, as odd as it is, some operations do require at least a frame to pass between their execution, so this may just be what you need.
 
So the two zeroes after the ti_* are rendered absolutely useless? I would've figured it for the refire one, but... the delay interval is not used as well? I have been living in a lie...
Thanks for the tip, I think I've got some code to fix. :grin:
 
cmpxchg8b said:
Rearm works, delay doesn't.
Wait, what? I can't seem to get it. Let's have an example for the slow group (i.e. me).  Let's say we've got a ti_on_agent_hit trigger, with 5, 10 as delay and rearm intervals, with code in the conditions block as well as the consequences. So, when an agent gets hit, the code in the conditions doesn't execute, the consequence code is executed immediately, the 5-second delay interval is forsaken, and this trigger (and every other ti_on_agent_hit? No?) will not do anything until the 10-second rearm interval passes. Did I get it correctly this time?
 
Almost.
The conditions block is executed, and if it fails nothing else happens. If it succeeds, the consequences blocks is executed immediately, and this particular trigger will not fire anymore until the rearm interval is over.
 
The_dragon said:
is there eny way to loop through registers? ( reg0 , reg1, reg2...)
If you use WSE, then you can do it with :
register_get                  = 3000 #(register_get, <destination>, <index>), #Stores the value of register <index> into <destination>
register_set                  = 3001 #(register_set, <index>, <value>), #Sets the value of register <index> to <value>
 
This is mostly for cmpxchg8b, but anyone else can respond as well:
Did you ever figure out exactly what pack4f does?  You've stated that pack2f is for sound levels in %.  Any recent revelations since your post dealing with these?
 
They both do the same thing, define at what % of the animation a sound is played. If more than 2 values are needed, pack4f is used instead of pack2f.
How many and what sounds are actually played is almost entirely hardcoded.
 
I was wondering if anyone could tell me where the mesh for the native bullet that is visually seen coming from the Flintlock Pistol (or any item with itp_type_pistol for that matter) is located. I think it is in Commonres but i cannot locate it. I plan on replacing it, so either the specific brf file it is in or the actual name of the missile would be helpful. I have spent several hours checking the forums\Commonres folder for this, and am beginning to wonder if its even in there. Perhaps there is a better way to replace the bullet. Any insight appreciated.
 
How can i do that the round wont end in battle mode when all the AI enemies are dead? when they are dead i want to another kind of bots to spawn and dont let the round end only if the players die. Any help?
 
Status
Not open for further replies.
Back
Top Bottom