Module System Overhaul

Users who are viewing this thread

Autolykos said:
Okay, thanks for the info. Then I'll probably continue to maintain the vanilla version. The new Tournament code is functional, btw (and I found a bug in WARP along the way)...

Would appreciate it if you could report when WRECK takes issue with my code; some bugs are subtle and quick to break things...

Yeah, I can re-WRECK it after you release your new version(s). Tournament changes sound super cool, and I'm loving all the little tweaks. Especially dig the re-implementation of Zendar and friends.

I'll be sure to report any bugs I find, no problem.
 
Double post to report a bug:

It doesn't effect compilation or gameplay (I think) but WRECK found a couple of missing (try_end)'s in simple_triggers, at the trigger for "# Taking denars from player while resting in not owned centers". Just add the two (try_end) things at the end.

Also, the opening quest is bugged. After the merchant takes ou to his house, you can't start the normal convo. He tells you to surrender or die, and that's it. I'm looking for the source now, I'm not sure where it is though. Might be the way the constants for startup_merchant are set up.
 
Can I change Faction Relations at start, like making Constant wars, no diplomatic changes. Like in The Last Days mod, or no one is thinking about that ?
 
Blackburn99 said:
Can I change Faction Relations at start, like making Constant wars, no diplomatic changes. Like in The Last Days mod, or no one is thinking about that ?

I'm afraid that's not an option, and I'm not sure it will be since it's just a bit too far from native. You can go ahead and ask your questions about that process, if you want to do it yourself, in the modding Q&A thread that's stickied above, that's the best place to find help around here.
 
New update, with the improved tournament system (see changelog in OP) and some bugfixes.

mercury19 said:
It doesn't effect compilation or gameplay (I think) but WRECK found a couple of missing (try_end)'s in simple_triggers, at the trigger for "# Taking denars from player while resting in not owned centers". Just add the two (try_end) things at the end.
Thanks a lot, found it. Had a (try_begin) where a (try_end) should be.

mercury19 said:
Also, the opening quest is bugged. After the merchant takes ou to his house, you can't start the normal convo. He tells you to surrender or die, and that's it. I'm looking for the source now, I'm not sure where it is though. Might be the way the constants for startup_merchant are set up.
Already spotted that one, but thanks; reordering module_dialogs broke it. Should be fixed now.
 
Autolykos said:
Warband Module System Overhaul
Changelog:

Version 2:
- Startup Quest should work again
- New Tournament System
-> Code is completely rewritten to be more readable and changeable
-> uses WARP instead of the previous hack scripts for sorting and shuffling
-> Your (and your compaions') initial equipment now tries to match what you currently use
-> You can always pick among the sets available in this town
-> Betting system is now mostly based on level and renown of all participants, and uses an actual betting pool
- -> That way, large bets have diminishing returns; they will also tip off local townsfolk for following rounds
- -> All in all, the betting system feels less predictable and should be less exploitable
- -> slot_town_player_odds and the scripts maintaining it are now obsolete and have been removed (was a kludge anyway)
- Fixed bug in warp_array_copy
- Fixed syntax error in "payment for rest" trigger (thanks to mercury19 for spotting it)
Wow that was fast thanks a lot i'll do some testing on it (again you are doing a good job!!)
any idea on what u are going to do next ? (maybe adding more stuff or something else ?)


 
imado552 said:
any idea on what u are going to do next ? (maybe adding more stuff or something else ?)
Thanks! The next things on my list are a better system for merchant inventories and battle morale.
Either what jacobhinds wrote, once I had a bit of time to figure out how and why it works, or my own solution; I have an idea inspired by electric fields which should at the same time feel intuitive and allow for tactical depth (e.g. troops may rout if cut off or locally overwhelmed, even if their army as a whole is stronger). It would have the disadvantage that it still requires the two nested (try_for_agents) loops and some geometry, so performance scales roughly as badly as in vanilla (don't know how much room for optimization there is).
I generally don't want to add completely new stuff, I only fix things that are already in the system (and maybe flesh them out a little where I can't resist).
 
Autolykos said:
np :smile:!
Autolykos said:
The next things on my list are a better system for merchant inventories and battle morale.
we need them both but the later the most since native battle moral is **** to be honest so that would be good to do!
Autolykos said:
I have an idea inspired by electric fields which should at the same time feel intuitive and allow for tactical depth (e.g. troops may rout if cut off or locally overwhelmed, even if their army as a whole is stronger).
that would be great if you can add that since this will allow strategies to be more then get the high point spam archers and arrows XD, so flanking tactics and such will be more important (so cavalry aren't only for hunting down fleeing enemies anymore)
Autolykos said:
It would have the disadvantage that it still requires the two nested (try_for_agents) loops and some geometry, so performance scales roughly as badly as in vanilla (don't know how much room for optimization there is).
we can always do testing !
Autolykos said:
I generally don't want to add completely new stuff, I only fix things that are already in the system
ah i see!
Autolykos said:
(and maybe flesh them out a little where I can't resist).
can you focus more on this part XD
 
@autokylos, no problem and oh thank god I was never going to figure that out  :razz:

Also if I may offer a suggestion, I feel that this osp would fit well with the concept your going for:

https://forums.taleworlds.com/index.php/topic,170996.0.html

It's the "Ethnic Troops" míni mod, jut changed up the face codes for basic troops a bit to make them less generic (and most importantly imo removed the whitewash from the Sarranids)

I'll get the new update WRECKed a bit later today
 
mercury19 said:
imado552 said:
mercury19 said:
I'll get the new update WRECKed a bit later today
can't wait for that !

It's all good to go, same link on the first page, whichever post I linked it on
thanks dude i really love you !!(no homo XD)
Edit : i think you should add this since its gonna be really helpful https://forums.taleworlds.com/index.php/topic,361448.0.html
this will allow you to be able to put prisoners from your party to your castle or garrison troops from your party (with masses rather then keep on clicking 50 times to transfer 50 prisoners it takes you only one click!
 
Nemchenk's Faces are a complete no-brainer. I've already used them in personal projects, they look great, they don't add complexity, they're in.

Leonion's Exchange Screen hack is really useful, but looks a bit dangerous to me. Piggybacking his script on game_get_troop_wage was definitely clever, and probably necessary - but it is bound to conflict with other modifications of troop wages, and it will make everyone who tries to understand the code go WTF? :shock:
For now, I prefer to leave it up to the individual modder how many clever tricks they want in their code. Especially if they rely on assumptions about code we don't have access to (like, when the game_* scripts are called). Maybe when they've been around for a while and are shown to be safe and stable.
(I also play with the idea of forking my project into a minimal, classic and extended version, and Leonion's Exchange Screen will definitely go in the latter - together with Narf's Armors and More Horses. But I won't start with that until the classic version is basically finished and only needs bugfixes and maintenance).

@Mercury19: Are you ok with me putting a link to the WRECKed Module System in the OP?
 
And the next version is up, with a prototype of my morale system (to be compared against jacobhinds). It allowed me to obsolete a bunch of scripts and agent slots. Performance is comparable to vanilla, but now it actually does something.
jacobhinds' system clearly has better performance in large battles; the question is whether the difference in strategic depth is noticeable enough to be worth it - maybe I'll put both in and make them optional, or switch when the battle size crosses a limit.
I also mitigated stuttering by spreading the calculation out. Previously, the whole batch got calculated every three seconds. Now, I call the trigger ten times per second, but only calculate morale for one troop in fifty each time (This actually feels more responsive, even if it does fewer calculations).

I also integrated Nemchenk's better faces and startup merchants. And while I was at it, I built different town walkers for all six factions, made sure the merchants of each town have the right faces, and adjusted their clothes. Also, all Sarranid lords and ladies now have dark skin.
If the faction was modeled after the Sassanid Empire, they should look a bit more Aryan - the old Khergit faces are pretty close IMHO. But we have the dark skin texture, it's currently unused, and it gives them a distinctive look. And just because Sassanids are Persians doesn't mean Sarranids can't look like Moors. It's a fantasy world, after all.

Finally, I've discovered two unused Vaegir Helmet Meshes that fit in perfectly (A half-mask and an open Nobleman Helmet). The latter looks pretty good on Guards and Knights, so I've used it to replace the Lamellar Helmet (which looks a bit too "barbaric" for high-end troops, IMHO). I also changed a few names with the cheaper helmets, to make them a bit more descriptive (previously, I regularly had to start up OpenBRF to pick helmets for eastern troops).
 
Autolykos said:
And the next version is up, with a prototype of my morale system (to be compared against jacobhinds). It allowed me to obsolete a bunch of scripts and agent slots. Performance is comparable to vanilla, but now it actually does something.
jacobhinds' system clearly has better performance in large battles; the question is whether the difference in strategic depth is noticeable enough to be worth it - maybe I'll put both in and make them optional, or switch when the battle size crosses a limit.
I also mitigated stuttering by spreading the calculation out. Previously, the whole batch got calculated every three seconds. Now, I call the trigger ten times per second, but only calculate morale for one troop in fifty each time (This actually feels more responsive, even if it does fewer calculations).

I also integrated Nemchenk's better faces and startup merchants. And while I was at it, I built different town walkers for all six factions, made sure the merchants of each town have the right faces, and adjusted their clothes. Also, all Sarranid lords and ladies now have dark skin.
If the faction was modeled after the Sassanid Empire, they should look a bit more Aryan - the old Khergit faces are pretty close IMHO. But we have the dark skin texture, it's currently unused, and it gives them a distinctive look. And just because Sassanids are Persians doesn't mean Sarranids can't look like Moors. It's a fantasy world, after all.

Finally, I've discovered two unused Vaegir Helmet Meshes that fit in perfectly (A half-mask and an open Nobleman Helmet). The latter looks pretty good on Guards and Knights, so I've used it to replace the Lamellar Helmet (which looks a bit too "barbaric" for high-end troops, IMHO). I also changed a few names with the cheaper helmets, to make them a bit more descriptive (previously, I regularly had to start up OpenBRF to pick helmets for eastern troops).
that's what i like to hear ! i liked what you did with the betting system that was a nice touch i'll download the files and do some testing on small battles (100-)and huge battles(350+)and get back to you if i encountered anything!
mercury19 said:
Awesome! New WRECK version is up as well.
thanks that is very helpful for guys like me !
 
ok i've done some testing and the moral system seems to be working i just fought a fight with a group of deserters 130 with my high level 180 (then 210) cavalry so its seems like they do root (i tried other battles as well )
EYEbtCt.jpg
but i found something strange just let the pictures tells you
HGs0Zy5.jpg
wk7yXJG.jpg

and just for flavor XD
Don't i look Kinda Cool here!!
DToZY5c.jpg
 
Yeah, the party morale display gets a bit wonky when large numbers are involved. They are occasionally clamped to the 0..100 range mid-calculations, so they don't always add up. I think it always was that way, but I'll look into it, maybe it's fixable.
Also, morale of troops in the Manhunter and Bandit tree is modified by your honor, similar to how faction troops get a morale bonus/penalty from relations (so your Knights Errant should get a bonus from high honor; that may be why their individual morale is higher than your party morale).

On a related note, I've been playing around with a simplified morale system inspired by what jacobhinds did (but even more barebones, using team slots instead of global variables and with a slightly different formula), and the performance gain is impressive. I can run 200 vs 200 battles on my ancient laptop without an issue (as long as I keep the graphics settings low and stay away from the action), which was pretty much impossible before (I used to get three seconds of smooth playing, interrupted by 3-4 seconds of stuttering).

The dynamics are a bit different, though. With the complex system, you can have neat stuff like troops breaking and running just because you charge at them, individual parts of the battle line breaking while other parts hold, or even both sides breaking at different places (this is especially noticeable in chaotic cavalry skirmishes).
In the simple system, you'll always need some fighting and dying before anything happens at all. Then, a few heavily wounded troops will try to leg it, which will usually turn into a complete rout rather quickly if you don't do something about it ASAP.
 
Back
Top Bottom