Have in-game clock show the day of the week?

Users who are viewing this thread

And a quick redirect to http://forums.taleworlds.com/index.php/topic,186006.msg4453012.html#msg4453012 :smile:
I was looking for a tweak that added to the in-game clock the hour of the day.
I was able to find that here >>> http://forums.taleworlds.com/index.php/topic,116397.msg2861263.html#msg2861263

After finding it, I also starting looking for a tweak that would show the day of the week (Monday, Tuesday, etc.)

Does anyone know of such a tweak or how I could add this on my own?
Thanks for any help, and a preemptive 'screw you' to any trolls.      but noone on TW is like that :wink:
 
You'll need to use the module system.
Code:
  ("january_reg1_reg2", "January {reg1}, {reg2}, {reg3} O'Clock {s2}"),
 ...
  ("monday", "Monday"),
First, modify all the existing strings to contain an extra string placeholder, {s2} and the hour if you so desire.
Then, insert new strings for days of the week yourself.
Code:
...
      (assign, reg1, ":cur_day"),
      (assign, reg2, ":cur_year"),
      #this gets the hour of the day
      (store_mod, reg3, ":num_hours", 12),
      (val_add, reg3, 1),
      #this get the day of the week
      (val_mod, ":cur_day", 7),
      (val_add, ":cur_day", "str_monday"),
      (str_store_string, s2, ":cur_day"),
      #and this simplifies existing code
      (val_add, ":cur_month", "str_reg1_denars"),
      (str_store_string, s1, ":cur_month"),
      (set_result_string, s1),
I haven't tested this, but it should work.
 
Thanks for a thorough response. You're obviously not a troll  :wink:

But on a serious tone, I have a few questions to ask.

The most important, is that when I build the module, the python cmd window that opens says:
'python' is not recognized as an internal or external command, operable program or batch file.
a bunch of times, and then says:
Could Not Find C:\Program Files\Mount&Blade\ModuleSystem\*.pyc

I don't know why this is happening, and if it is already solved on another thread a redirection to it would be invaluable.

My other question is about the code.

The first part, where you say to add {s2}: where should I add the ("monday", "Monday"), and the rest of the days. Plus, would I need to add the list of the days for each month?

And for the code to add to (script_game_get_date_text), should I put that at the bottom of that section?

Sorry to flood you with so many questions, but I have never done anything in the Module System other than trying to copy what people are saying to put into it.
 
I followed the tutorial on TaleWolrds, but it didn't work.
So I went to the Python tutorial on their docs and it still didn't work.

I have Python 27; might I need a different version of it?
 
When I saw it said 26 in the tutorial, I changed it to 27 to match my Python folder, so that wasn't a problem.

I also tried renaming the folder (and I did change the value to 26 to match it), but that didn't work either.

I guess I'm doomed to not being able to use the ModuleSystem for Mount&Blade..... good thing I never use it :wink:
 
K, for the day of the week script, instead of saying the day, it says "The door is locked" :wink:

For my inexperience, I think I'm just gonna mess around with the code and see if I can screw it up fix it on my own.

(Just noticed they had a language filter. When did that get added?)

Edit: I'm editing this as I work with the script.

Anyways, I just messed up by putting the ("monday", "Monday") string only under December. After adding it to all the months, Monday showed up. However, when the day changed, the entire Date/Clock/Day part disappeared leaving only the Time (morning, noon, etc.). I'm gonna see if adding a ("tuesday", "Tuesday") string and the appropriate script will help.

BTW, will changing the order of the strings (Monday Tuesday Wednesday, Friday Saturday Sunday, etc) change the order the days begin in. Because I might want to change whether the game starts on Monday or Tuesday, etc.

Edit 2: Ok, I have still not been able to get the day to work properly. On a few occasions, it has shown a few months dates (febuary blah blah blah, with march blah blah blah next to it), ONLY the day and not the date, has made the clock disappear, and I don't know why it wont work.

A further explanation would help, by showing in a little more detail just exactly what code needs to be added and exactly where.
 
I don't know if you managed to make it work, but in case you couldn't I had made a script of my own.
http://forums.taleworlds.com/index.php/topic,186006.0.html

This works in native without problem, but if you are using a mod you should check that {s2} is not being used because when I tried to use it with floris mod, it interfered because of this. If you are using a mod just check, and if it is using the string then choose another one.
 
Back
Top Bottom