Where do you edit the length of this list?

Users who are viewing this thread

I'm trying to add a few items to the "Golden Century" version of the 16th Century mod, and I've managed to get the new items to show up in the cheat menu, but I can't for the life of me find where to increase the value to make them show up in this menu. Just for context, this is in the part where you can create custom troops. I was hoping they were just basically using the cheat menu for this, but it seems like they're not. Any ideas? Picture of the menu, again for context.

7OiqPhD.png


P.S. Sorry if this thread is in the wrong place. New to the forum!
 
Do you have the source code of your target mod?
Maybe. Do you need that to change this part? I was a bit afraid of that.I was able to find this, which looks like it. Note that this is probably for the original mod, but it has the same custom unit function: https://www.nexusmods.com/mountandblade/mods/3971?tab=files&file_id=1000000216

Does that mean you have to recompile to change this value? Cuz I'm completely new to modding warband and was hoping for a simple number change somewhere...
 
You can check which item is the last one at the list and move your items before that one. That can however break other scripts in case the items are sorted in a specific way.
Yeah, I also thought of that solution but it is a temporary one. There are a bunch of random "NO USE" boots at the end of the list that I could change to be mine, but again it is a temporary solution. There's only like 20 of them, and the Golden Century version of the mod already includes over 100 new items that aren't in the menu, most likely cause of the guy who made the submod didn't know to update the length of the list.
 
Okay, I've been studying the source code and I think I've definitely find where it's defined. However, I can't find this function (if it is one. I'm a C# programmer, not python, so it might just be a variable, but it sounds like a function.)

(assign, reg5, "$cheat_find_item_range_begin"),
(store_add, reg6, "$cheat_find_item_range_begin", 96),
(val_min, reg6, "itm_items_end"),
(val_sub, reg6, 1),

It does seem to use the cheat menu, but that one already finds all the items though...
 
I've definitely found it. It's defined by that variable "itm_items_end" in the ID_items.py, which in the original version seems to be set to 1374. Now I just need to find where that variable is in the compiled mod. Is that possible to do? Maybe with a hex editor or something?
 
Back
Top Bottom