WB Coding Help for polishing a crusades mod

Currently viewing this thread:

Dear people,

I wouldn't usually directly bother in the forums as, most of times, questions got answers already, somewhere; I fear this isn't the case, so I'll ask for a small help to improve an old crusades mod: Sands Of Faith.

Despite it's older than many others, I personally consider it the best ever. After having played that module for hundreds of hours, I've noticed a minor bug and a small immersion-breaking dynamic. Such small issues in so many game hours make Sands Of Faith, in my opinion, the most polished module beside DLCs.

Here are what I'm looking for:

1. Is there a way to prevent a specific kind of parties from spawning in the game map? In Sands Of Faith there are mainly two kind of outlaws, Bedouins, which spawn on the lands, and Pirates, which spawn on the seas. Beside them there are, as usual, Deserters, and the issue is that Deserters spawn both on the lands and on the seas, resulting that in the latter case they get stuck in the water without the possibility to move as they don't have a ship. It's like if, in Vanilla Warband, you CTRL+T yourself in the middle of the ocean and then try to move: you can't.
Without having to code something special to make Deserters spawn only on the land or use ships, I suppose it would be easy to completely remove the Deserters parties from the Sands Of Faith's game world. Not a significant loss as there are yet many other outlaws parties.

2. Some mods feature a way to prevent lords from defecting, is there a possibility to easily add such function to Sands Of Faith? While it never happened to me that a lord from an existing kingdom defects, all the Muslim lords join the crusader states after their kingdoms get defeated, something which is normal, but a bit immersion breaking for a crusades mod. It would be nice that, when a kingdom is defeated, all of their lords are removed from the game (beside the case when some defeated kingdom's cities rebel against their new occupant, as it rarely happen in Sands Of Faith).

I'm looking, so, if are there any tips or tutorials on how to do these two things, as I would gladly put myself at work since Sands Of Faith is not only my favorite crusades module, but what I consider the best of all!
 
1. You need to have the module system (the source code) of the mod to make changes. Without it, it's too hard to make those changes.
2. Assuming you have a module system, an experienced WB modder would need an hour or two to make the changes. You could try to do it yourself and look for tutorials or ask questions, but if you are new to this, it may be too hard for you. So ask someone for help and name your firstborn after him or something.
 
Upvote 0
Dear MadVader, nice avatar picture!

Thank you very much for your answer. I've contacted the developer of Sands Of Faith, he's still active and he may still keep the Module System. Think: he once said me that Sands Of Faith was a solo project, imagine what could have done him if supported by a full squad of developers and artists!

Concerning specifically the second point, there's a feature in the mod that can be enabled/disabled: it's called "lords returning from exile". Has anyone ever heard of such feature? I've don't remember having seen it in other modules. It may come from the Diplomacy mod (as this one is implemented into Sands Of Faith). Maybe that it already does what we're looking for, giving to a player the choice of having lords defects or not?

I admit I've no experience in modding, unfortunately. I would be eager to learn but, from what you say, I fear these two issue could only be fixed by someone far more experienced than me.
 
Upvote 0
Developer told me that the Module System of the mod is available at the following link on the popular Nexus website: Sands Of Faith Files, labelled as "Miscellaneous".

I wonder now what could be the next steps to be taken! Maybe that there are tutorials specifically on how to modify parties' spawns and lords' behavior?
 
Upvote 0
Dear Eärendil Ardamírë,

you are very kind in pointing me to that thread! Truly, I've tried many times to modify games but then I always failed in front of cryptic and fragmented explanations. Following Lumos advice, instead, is plain and simple, and I count to be able of setting up my Module System in just a few days, making the required practice too for being more reactive whenever you all give me some new hints.

As said, I'm not a modder, but with my hundreds of Mount & Blade gameplay I get kind of obsessed with details and, the further I played, the more I get immediately unsatisfied whenever I tried a mod which contained some immersion breaking bugs, this to the point I ended up playing only Native, With Fire & Sword and Viking Conquest in single player (I play different modules in multiplayer: Napoleonic Wars and, lone fan made module, Anglo Zulu War Reloaded).
Sands Of Faith, in my opinion, is different from all the other modules I've tried (and I've extensively tried a lot of them)! It's immersive... No, it's The Immersion! I think it's worth the great time I need to learn modding just to make the appropriate fixes I consider important after an extensive testing.

Thanks again for the courtesy of you all, I'll immediately post again as soon as I'll have my Module System up and running!
 
Upvote 0

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
The important thing at modding is to be patient. At the beginning everything is complicated and it might frustrate you that things are complicated but it gets easier with experience and time. And for problems you have the forum. Happy modding :grin:
 
Upvote 0
Here I am:grin:
I've set up the Module System thanks to the tutorial. It was very easy and now I have full access to all the .py files of the Sands Of Faith source code. With the bat file, as you know, I can compile the module without getting any error!

I admit to have already gave a look to... Ok, I've read most of the .py files and studied them because I was too curious! It's so good to see words rather than a a universe of numbers! Thank you again for your help!

However I fear there's no clue on how many parties of a certain kind are supposed to spawn on the map, and that would be the first thing to be modified (to solve the first issue I've mentioned originally in this thread).
 
Upvote 0

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
Good process, you now enter the next level of modding! Now I am not going to directly point you to the solution since you wouldn't learn something then. Be assured however that I am doing this not to mock you but to give you a better start here for the long run.

There is one GitLab which hosts an important file, a documented header_operations.py. header_operations.py contains all operations which you can use at the Module System, this documented version explains most of them. You can either copy paste it directly into your Module System or keep it separately. For the beginning, just keep it separately.

There are two boards which contain valuable informations, tutorials and codes, the board Documentation & Tutorials and the board Open Source Code and Kits. Additional there are two threads with a wild collection of things, the Forge Scrape Yard and the Vault of Knowledge, Library of Scripts and Kits. Both are not structured the best but contain a lot of little information details and scripts as well. At those four places, try to think of useful keywords to search for the solution of your problems and you will find often enough informations.
Another useful thing might be the new Modding Guide but I am still working a lot on it, so it is incomplete while still informative. You can find it here: https://forums.taleworlds.com/index.php?threads/modding-guide-m-b-warband.438092/

For now that might however be an information overflow for you, so we concentrate on your tasks at hand. You have now two things which you want to achieve.

1) You want to deactivate the spawning of Deserters. You need to figure out first, at which places they get mentioned in the Module System. Now you should first look if there are special troops which are only appearing at the deserter parties. Then you check in module_troops what their troop id is and search for that id at the other files. Try to locate all positions at which they appear.

2) You want to deactivate the deserting of Lords. Go now to the Forge Scrap Yard and look for the keywords "desert", "deserting", "defect" or "defection". Try to make use of the informations which you find.

Report back when you are stuck at one of the two tasks and we give you further hints :grin:
 
Last edited:
Upvote 0
You're, again, very kind! Your hints revealed themselves very valuable.
I've yet discovered many solutions to prevent lords from changing faction. I will investigate this matter further later, however, as I'll try now to focus myself on preventing Deserters from spawning.

I've found that the sea raiders who spawn on the water with their ships in Sands Of Faith have their own spawn point, located into "the_ocean". Highwaymen spawn on "the_highlands" and so on. Maybe that I'll be able to make Deserters spawn on the land only?
For now I've understood, however, that the matter seems tricky, as it looks like Deserters spawn everywhere, not like the outlaws which have their own defined areas based on the terrain type (and they also station around their lairs).
It may be that Deserters have to be completely deactivated as their wide spawn location (the whole map) could be hard coded, or I may be able to assign them certain terrains...

Let's see! Thanks again and I'll make sure to let you know soon!
 
Upvote 0
Top Bottom