WB Coding How to use slider for recruitment?

Users who are viewing this thread

DetektivAro

Recruit
So i started learning how to script bit by bit and was wondering if it is possible to use the sliders of hair colors, age, eye width etc. for recruitment. Being able to choose how much troops to recruit from a village.
 
Solution
How can i use the presentation slider? Is create_slider_overlay used for it or something else?
Firstly, get yourself an expanded version of header_operations.py, if you have not already done so (it is useful, as it provides insight into Warband commands); you may also check its WSE counterpart if you want to possess even more tools at your disposal. Secondly, acquire the latest version of Modding Guide to refer to when working with Warband engine. Thirdly, it is good practice to browse through the source code of many modules to see how things were scripted. You may want to skim through module_presentations.py of Native or another mod to learn stuff.

Personally, I recommend you reading game_custom_battle_designer...
So i started learning how to script bit by bit and was wondering if it is possible to use the sliders of hair colors, age, eye width etc. for recruitment. Being able to choose how much troops to recruit from a village.
Yes, it is possible. If you get, for example, 8 recruits to hire, a presentation slider might be scripted to select the total number of men to hire. It may be executed from a game menu, or called from.
 
Upvote 1
How can i use the presentation slider? Is create_slider_overlay used for it or something else?
Firstly, get yourself an expanded version of header_operations.py, if you have not already done so (it is useful, as it provides insight into Warband commands); you may also check its WSE counterpart if you want to possess even more tools at your disposal. Secondly, acquire the latest version of Modding Guide to refer to when working with Warband engine. Thirdly, it is good practice to browse through the source code of many modules to see how things were scripted. You may want to skim through module_presentations.py of Native or another mod to learn stuff.

Personally, I recommend you reading game_custom_battle_designer presentation; it is long but it deals with a variety of facets like tableaus, sliders, buttons, 2D meshes. Doing so will help you learn how to make presentations or adjust them to your needs; it will serve as a foundation for your future work. Then, you would have to tamper with recruit_volunteers game menu to enable new options.
 
Upvote 1
Solution
Back
Top Bottom