OSP Code QoL One Stop Tax Collection Mod - Collect taxes from all your holdings by visiting 1

TheMageLord

The Handyman Can
Knight at Arms
M&BWB
Best answers
0
NOTE: Apparently some people are having an issue where this causes a menu that won't close (see page 2 of this thread). I don't have time to look into it currently, so I'll just say "try at your own risk" for this one.

This is a rewrite of the tax collection menu to cycle through all your holdings and collect it all at once. All you have to do is visit any owned town or village and you'll get all taxes from all your villages/castles/towns.

To install, open up menus.txt and go to line 203 - this should be menu_center_tax. Highlight that line, and paste this in over it:
Code:
menu_center_tax 512 You_receive_the_accumulated_rents_and_taxes_of_your_fiefs,_amounting_to_{reg1}_denars. none 13 2319 1 3 2133 2 1224979098644774915 0 6 3 1224979098644774912 648518346341351443 648518346341351591 541 3 1224979098644774912 7 360287970189639680 521 3 1224979098644774913 1224979098644774912 47 521 3 1224979098644774914 1224979098644774912 48 2105 2 1224979098644774915 1224979098644774913 2105 2 1224979098644774915 1224979098644774914 501 3 1224979098644774912 47 0 501 3 1224979098644774912 48 0 3 0 2133 2 72057594037927937 1224979098644774915 1 3 936748722493063468 360287970189639680 1224979098644774915 1
Once this is done, you should be able to visit any of your holdings to collect taxes on all of them. I tested this and it works, so if you experience a problem (game crashing after you edit it) make sure you didn't accidentally paste over mno_continue or accidentally move mno_continue up to line 203.


For future reference (and in case anyone wants to add this to their mod once the 1.003 module system is out), the python code for this would be something like this:
  (
    "center_tax",mnf_disable_all_keys,
    "You receive the accumulated rents and taxes of your fiefs, amounting to {reg1} denars.",
    "none",
    [
        (str_clear, s3),
        (assign, ":total_tax", 0),
        (try_for_range, ":center_no", centers_begin, centers_end),
          (party_slot_eq, ":center_no", slot_town_lord, "trp_player"),
          (party_get_slot, ":accumulated_rents", ":center_no", slot_center_accumulated_rents),
          (party_get_slot, ":accumulated_tariffs", ":center_no", slot_center_accumulated_tariffs),
          (val_add, ":total_tax", ":accumulated_rents"),
          (val_add, ":total_tax", ":accumulated_tariffs"),
          (party_set_slot, ":center_no", slot_center_accumulated_rents, 0),
          (party_set_slot, ":center_no", slot_center_accumulated_tariffs, 0),
        (try_end),
        (assign, reg1, ":total_tax"),
        (call_script, "script_troop_add_gold", "trp_player", ":total_tax"),

      ],
The part I actually modified is in blue.
 

fisheye

Grandmaster Knight
Best answers
0
Good idea.

Hmm, how about integrating this into the "pay your troops" menu so that you conveniently receive your revenues just as you need to spend them to pay your troops?

After all, you somehow have a magic banking system to simultaneously pay all garrisons in far-off lands, so logic dictates that the magic banking system should be able to send money from far-off lands to you.

*magic pigeons, fly, fly with your banker's writs of note!"
 

TheMageLord

The Handyman Can
Knight at Arms
M&BWB
Best answers
0
That's certainly possible, but the payday never actually coincides with the taxes from the village being ready. I always have to wait a few days before getting the taxes from villages. So the only way it would collect them for you on payday is if you were a few days behind on collecting and the payday came before you did.

Isn't it magical enough to stop off at your little castle near Tulga and suddenly collect taxes from your holdings over by Tihr? :smile:
 

KON_Air

Master Knight
M&BWB
Best answers
0
I think somebody did collecting taxing taxes via dialouges too. Becuase I clearly rememer translating a C script to Python as a trigger then a dialouge :razz:

Edit; Here it is, I guess he was going to add some more stuff then just magick banks :razz:
http://forums.taleworlds.com/index.php/topic,43105.0.html

Edit2: Wait he did a mod, too :razz:
http://forums.taleworlds.com/index.php/topic,43456.msg1164756.html#msg1164756
 

fisheye

Grandmaster Knight
Best answers
0
Heh heh collecting taxes by dialogs.

Would be interesting to institute "collecting revenues by means of fist-in-face"

Borcha: "It's tax day! Uh oh. Reveran says they had a bad week, only 23 dinars."
*travel to Reveran*
******slap*
Town Elder: "Aaargh! My teeth!"
Player: "You gonna pay half of what you owe me tomorrow, and I'll be adding two points, compounded for every day that it's late, capish?"
 

KON_Air

Master Knight
M&BWB
Best answers
0
Dude, the first thing I'll do with the module system will be coding a "Medieval Tax Extortion System".
 

TheMageLord

The Handyman Can
Knight at Arms
M&BWB
Best answers
0
I didn't even realise there was another tax mod, but that one looks like it wouldn't be very convenient - only in Praven, and you have to find the tax man to get the taxes (no offense intended to ssallen). It also isn't for 1.003.
This one lets you just go to any village castle or town you own and bam, taxes. And you can easily stick it in your text files without the module system.

A villager extortion mod would be funny. Add in the capability to run a protection racket on town merchants and you're in business. You can already charge a toll to caravans, why not a "Give me money or I'll burn your store down" fee?  :twisted:

While we're on that, a kidnapping mod! Kidnap the girl and ransom her back to the town. Then the local hero meets you at the village and gives you money.
 

jocan2003

Recruit
Best answers
0
TheMageLord said:
A villager extortion mod would be funny. Add in the capability to run a protection racket on town merchants and you're in business. You can already charge a toll to caravans, why not a "Give me money or I'll burn your store down" fee?  :twisted:

While we're on that, a kidnapping mod! Kidnap the girl and ransom her back to the town. Then the local hero meets you at the village and gives you money.
There is so many idea that come from the *quest*, I.E.: The ability to train your troops in the trainning field maybe? like when yu train the peasant! you against a certain number of troop you choose and you have to knock them out like the peasant.

Ability to force a lord to turn against his king for a set number of time by kidnaping his girl, since he doesnt have the choice the king wouldnt be upset.

Ability to send spy to destroy food stocks in a town\castle.

Send a messager to buy stuff for you in town ( when he reach the town the trade window appear so you can choose what to buy then he come back ) ( could get ambushed pursued killed by ennemy lord looter raider etc.

When you get friendship to 99 with a lord a chance to turn him to fight for you against his king or simply make him join you and protect your fiefs.

Pay a blacksmith to make a certain kind of item for you and it take time and cost a bit more since its  aspecial order ( To hell finding a bunch of 10 Heraldic mail with tabbard for those that follow you and finding well 10 of each of what you need to make a nice companion army :grin: )

Possibility to pay blacksmith to upgrade weapon\armor

and so on and so on.
 

italiano

Grandmaster Knight
Best answers
0
After all, you somehow have a magic banking system to simultaneously pay all garrisons in far-off lands, so logic dictates that the magic banking system should be able to send money from far-off lands to you.
Well you wouldn't be paying them, someone would be paying them on your behalf from whatever amount of your treasury you keep there. In my mod you don't collect taxes at all, they're just added, since it doesn't make much sense for you to have to collect them, and then pay the people in the place you collected the taxes. I just use the player's gold amount as a global treasury.
 

Monk

Recruit
Best answers
0
I'd like to send out the other lords to collect my taxes for me.  Why do it yourself when you can order someone else to do it for you!  Man, I can't wait for the modding tools.
 

Monk

Recruit
Best answers
0
Yeah, I was more or less referring to the quest you can get to collect taxes for lord X.  It would seem potentially possible to add that into the game so once you are the marshal, for example, you can ask them to go collect taxes for you as payback. =)  To be honest though, I'd love if there were lesser lords and things of that nature so you could see a development in the game's characters.  Death could really happen etc.  I know there are some mods with this idea so I'm hoping to someday see them come to fruition.  I'd love more options in the political game of M&B...but for now I'll get back to conquering the world.
 

Scion

Master Knight
Best answers
0
If making lords being able to collect your taxes, you should also implement them not always paying you back.

I guess that's when you would trigger the "go collect lord X's debt to me" quest to another lord  :lol:
 

Beelzeboss666

Banned
Best answers
0
TheMageLord said:
-edit- YIKES! I just got a very very big glitch in this after a while (the first few weeks it worked fine...) and apparently it was being caused by not setting up my total_tax as 0 at the beginning of the script. So if you made this change before this edit, go back and change it again. I always assumed it reset all the :variable stuff to 0 after the script ended, but apparently not... (I got a couple million credits lol).

This is a rewrite of the tax collection menu to cycle through all your holdings and collect it all at once. All you have to do is visit any owned town or village and you'll get all taxes from all your villages/castles/towns.

To install, open up menus.txt and go to line 203 - this should be menu_center_tax. Highlight that line, and paste this in over it:
Code:
menu_center_tax 512 You_receive_the_accumulated_rents_and_taxes_of_your_fiefs,_amounting_to_{reg1}_denars. none 13 2319 1 3 2133 2 1224979098644774915 0 6 3 1224979098644774912 648518346341351443 648518346341351591 541 3 1224979098644774912 7 360287970189639680 521 3 1224979098644774913 1224979098644774912 47 521 3 1224979098644774914 1224979098644774912 48 2105 2 1224979098644774915 1224979098644774913 2105 2 1224979098644774915 1224979098644774914 501 3 1224979098644774912 47 0 501 3 1224979098644774912 48 0 3 0 2133 2 72057594037927937 1224979098644774915 1 3 936748722493063468 360287970189639680 1224979098644774915 1
Once this is done, you should be able to visit any of your holdings to collect taxes on all of them. I tested this and it works, so if you experience a problem (game crashing after you edit it) make sure you didn't accidentally paste over mno_continue or accidentally move mno_continue up to line 203.


For future reference (and in case anyone wants to add this to their mod once the 1.003 module system is out), the python code for this would be something like this:
  (
    "center_tax",mnf_disable_all_keys,
    "You receive the accumulated rents and taxes of your fiefs, amounting to {reg1} denars.",
    "none",
    [
        (str_clear, s3),
        (assign, ":total_tax", 0),
        (try_for_range, ":center_no", centers_begin, centers_end),
          (party_slot_eq, ":center_no", slot_town_lord, "trp_player"),
          (party_get_slot, ":accumulated_rents", ":center_no", slot_center_accumulated_rents),
          (party_get_slot, ":accumulated_tariffs", ":center_no", slot_center_accumulated_tariffs),
          (val_add, ":total_tax", ":accumulated_rents"),
          (val_add, ":total_tax", ":accumulated_tariffs"),
          (party_set_slot, ":center_no", slot_center_accumulated_rents, 0),
          (party_set_slot, ":center_no", slot_center_accumulated_tariffs, 0),
        (try_end),
        (assign, reg1, ":total_tax"),
        (call_script, "script_troop_add_gold", "trp_player", ":total_tax"),

      ],
The part I actually modified is in blue.
I thank you for the simple fact you write this
open up menus.txt and go to line 203
 

samthunder

Recruit
Best answers
0
I just used this little tweak, but I have an error I need help with.  After collecting my first round of taxes (2800 denars :grin:), the very next town I went to gave me the same message "You have gotten the accumulated taxes from your fiefs etc" but it said 0 denars and the continue button.  This lead to an infinite loop sorta problem where the window won't close no matter how many times I click continue.  Did I do something wrong?  I'll have to reload my last save and try again but in the meantime.....
 

automaly

Recruit
Best answers
0
Having the same issue.  If I have taxes waiting, it tell me that I've collected them (though the amount suggests it's only collecting for that village/castle), then it repeats that I've collected 0 denars and won't allow me to exit the dialog.  I don't have this problem with castles or towns, just villages.
 

Mordachai

Squire
Best answers
0
fisheye said:
Hmm, how about integrating this into the "pay your troops" menu so that you conveniently receive your revenues just as you need to spend them to pay your troops?
This is on my short-list of things to do.  It would be much nicer, I think, to have a single point in time where you can see your earnings vs. expenditures, and avoid having to dicker with going to a town or castle.  Also - the mods I've seen don't allow you to collect at a Castle, only at a village or town, which is kind of bizarre. 

It gets really weird in SOD, where this feature is included (sorry, no idea if this code came from here, or another author), but if you give your villages and towns to your nobles as fiefs, and keep all of the castles, then you cannot collect taxes (or pay for your castles). :razz:

Anyway, I'd love to have a single display of income vs. outcome. :cool:
 

Kleidophoros

Marquis
M&BWBVC
Best answers
0
Also - the mods I've seen don't allow you to collect at a Castle, only at a village or town, which is kind of bizarre. 
In Custom Commander mod you get the taxes whenever its due, even in the world map travelling. maybe you can ask the maker dude?
http://forums.taleworlds.com/index.php/topic,46178.0.html