Haugerud15328
Recruit
Hey guys. Some months ago I made post about a new module system (oxidsys) but I realized at some point that this was simply too big and complicated for me with my experience and amount of time. So I settled on something smaller scale that I felt would still be nice, basically a subset of what oxidsys was supposed to do.
Essentially I've made a fairly simple Python module that acts as an extension to the modsys. It allows you to write your module scripts in separate modular files in a new but still familiar syntax.
Here's an example of the "game_get_total_wage" script translated.
If you want to learn more you can check out the readme on my github repository. https://github.com/AustinHaugerud/mb_ext_script
I'll upload some binaries soon since no-one probably wants to try to build the module from source themselves, but for now feedback just based on first impressions would be appreciated if you have time.
Thanks
Update: You can look at the releases here https://github.com/AustinHaugerud/mb_ext_script/releases . Make sure your Python version matches.
Essentially I've made a fairly simple Python module that acts as an extension to the modsys. It allows you to write your module scripts in separate modular files in a new but still familiar syntax.
Here's an example of the "game_get_total_wage" script translated.
Code:
assign :total_wage 0;
party_get_num_companion_stacks :num_stacks p.main_party;
try_for_range :i_stack 0 :num_stacks;
party_stack_get_troop_id :stack_troop p.main_party :i_stack;
party_stack_get_size :stack_size p.main_party :i_stack;
call_script script.game_get_troop_wage :stack_troop 0;
val_mul reg.0 :stack_size;
val_add :total_wage reg.0;
try_end;
assign reg.0 :total_wage;
set_trigger_result reg.0;
If you want to learn more you can check out the readme on my github repository. https://github.com/AustinHaugerud/mb_ext_script
I'll upload some binaries soon since no-one probably wants to try to build the module from source themselves, but for now feedback just based on first impressions would be appreciated if you have time.
Thanks
Update: You can look at the releases here https://github.com/AustinHaugerud/mb_ext_script/releases . Make sure your Python version matches.