Removing items from character creation?

正在查看此主题的用户

Adorno

Bedroom Assassin
Archduke
I wish to remove some items - crossbow/horses - from being given when you create a character.
Is there a way to do that? And would I need the module system? (please not).


(I searched, but perhaps not hard enough)
 
Adorno 说:
I wish to remove some items - crossbow/horses - from being given when you create a character.
Is there a way to do that? And would I need the module system? (please not).


(I searched, but perhaps not hard enough)

Possible, only with module system but extreemly easy. No knowledge is needed. Just one finger to press delete button :wink:

In case you want to give it a shot it's in the beginning of module_game_menus.py (not esxact beginning but after all the text you see when you create a character. There will be lines like:
(troop_add_item, "trp_player","itm_leather_boots",imod_ragged),

Just delete them.
 
Adorno,

Do not delete anything, do this instead...

First, find these lines in module_game_menus.py (from line #1631 to 1640)

插入代码块:
           (try_begin),
             (eq, "$background_type", cb_noble),
             (jump_to_menu, "mnu_auto_return"),
#normal_banner_begin
             (start_presentation, "prsnt_banner_selection"),
#custom_banner_begin
#             (start_presentation, "prsnt_custom_banner"),
           (else_try),
             (change_screen_return, 0),
           (try_end),

After these lines, add these ones...

插入代码块:
# Adorno's custom equipment

(troop_clear_inventory, "trp_player"), # Clears players inventory
(troop_add_item, "trp_player","itm_smoked_fish", 0),	# Add some food
(troop_add_item, "trp_player","itm_bread", 0), # Add some food
(troop_add_item, "trp_player","itm_sword_medieval_c", imod_masterwork), # Add a masterwork sword	
(troop_add_item, "trp_player","itm_tab_shield_heater_cav_b", imod_lordly), # Add a lordly shield
...
# Adorno's custom equipment

You can equip yourself with whatever you want. :wink:


 
5000 denars. No way!  :smile:

But it still requires the module system and python. You make it sound so easy but it won't let me create a new module  :sad:
I've followed the tutorial step-by-step, very carefully, and read the "Topic: How to fix "Python not recognized..." 
but pressing 'build_module' still gives the "not recognized, dumbass!" error. (I've downloaded Python 3.0 for windows).

I simply can't figure it out.


This is the tutorial:
http://forums.taleworlds.com/index.php/topic,5408.0.html
 
At first I followed the tutorial by Armagan and added python30 at the end of 'path'. That didn't work.
Then I followed 'Topic: How to fix "Python not recognized..." and added a new one - now called 'Python      C:\Python30'

...  :neutral:

EDIT: Got it working! Seems I left out a ';' or '\' Sorry for the trouble :oops:

Now on to part 2 *deep breath:neutral:
 
Bah, I've prepared a rather lengthy tutorial for you but it seems you've already managed to run it. Well, I'm posting it anyway.  :mrgreen:

Adorno 说:
5000 denars. No way!  :smile:

But it still requires the module system and python. You make it sound so easy but it won't let me create a new module  :sad:
I've followed the tutorial step-by-step, very carefully, and read the "Topic: How to fix "Python not recognized..." 
but pressing 'build_module' still gives the "not recognized, dumbass!" error. (I've downloaded Python 3.0 for windows).

I simply can't figure it out.


This is the tutorial:
http://forums.taleworlds.com/index.php/topic,5408.0.html

Don't despair so easily!  :smile:

1. Now, first of all, download & install Python 2.6.1, not 3.0. If you've installed 3.0, then uninstall it. :smile:

You need this one -> http://www.python.org/ftp/python/2.6.1/python-2.6.1.msi

If you're on Win XP...

- Right click on 'My Computer', select Properties.

- Select 'Advanced' tab and click on 'Environment Variables'.

- In the 'System Variables' window, double click on 'Path'. Add the path to Python at the beginning of the path list like this...

C:\Python26;%SystemRoot%\system32;%SystemRoot%;...

- Just to be sure that the new path is read it's a good idea to reboot the system at this point.


2. Create a copy of 'Mount&Blade\Modules\Native' folder and rename it as, say 'Test'.

3. Create a new folder in 'Test' and rename it as 'ModuleSystem' or 'ModSys' etc. and extract all the module system files into that folder. The directory tree should look like this...

Mount&Blade\
      --->Modules\
              ---->Native\
              ---->Test\
                      ---->ModSys\

4. Open \ModSys\module_info.py using a text editor (Notepad etc.) and change the export_dir to '../'

export_dir = "../"

5. Modify and add the lines above to module_game_menus.py file.

6. Run build_module.bat

If you still get the "not recognized" message there are a few workarounds that you may use.



 
Damned, you got me working  :smile:
Thanks. That's not at all like the official tutorial!

I don't understand:
Lord Kinlar 说:
4. Open \ModSys\module_info.py using a text editor (Notepad etc.) and change the export_dir to '../'

export_dir = "../"

5. Modify and add the lines above to module_game_menus.py file.
You mean insert the line: 'export_dir = "../"' somewhere in the  module_game_menus.py file. But where?




What's wrong with Python 3.0?

 
Adorno 说:
I don't understand:
Lord Kinlar 说:
4. Open \ModSys\module_info.py using a text editor (Notepad etc.) and change the export_dir to '../'

export_dir = "../"

5. Modify and add the lines above to module_game_menus.py file.
You mean insert the line: 'export_dir = "../"' somewhere in the  module_game_menus.py file. But where?

No. The line...

export_dir = "../"

goes into \ModSys\module_info.py.

export_dir is a constant and tells the module system where to place the output files. There's already a default path there, but if you change it to "../", the MS will place the output files one directory above, which is 'Test' in this case. It's quite practical actually. '../' represents a relative path, you may as well use a full path, such as 'C:/Program Files/Mount&Blade...'.



Adorno 说:
What's wrong with Python 3.0?

Well, it basically gave me lots of error messages. Have you tried building a module with it yet?

 
Adorno, are you still there?  :smile:

I'm gonna get myself a cup of tea, I'll be around if you have any other questions.  :smile:
 
Yeah, I'm here  :smile: thinking like mad. This is worse than my math exam! Give me some time...

Lord Kinlar 说:
Adorno 说:
What's wrong with Python 3.0?
Well, it basically gave me lots of error messages. Have you tried building a module with it yet?
I thought it worked, but when it finally found Python it was just a series of error messages  :neutral:

Now it works with Python 2.6.
The thing is I've already made a mod using Item Editor and Troop Editor - as well as other edits (map and factions).
So I'm hoping I can just replace those files in the new mod and begin editing with Python... hopefully.
 
Adorno 说:
The thing is I've already made a mod using Item Editor and Troop Editor - as well as other edits (map and factions).
So I'm hoping I can just replace those files in the new mod and begin editing with Python... hopefully.

Do not replace any of the files of your current game!

If you want the mod you've been playing to stay untouched, then do this instead...

1. Download WinMerge (a very useful editor to compare text files)

http://winmerge.org/

2. Run WinMerge.

3. You need to open the two text files side by side. So,

Click on File->Open

Choose the file for the left pane: <drive>:\Mount&Blade\Modules\<Your mod>\menus.txt
Choose the file for the right pane: <drive>:\Mount&Blade\Modules\Test\menus.txt <- The one generated by the MS.

then click 'OK'.

The program will show you all the lines that differ from each other.

Find the line that starts with "mno_begin_adventuring". Copy the whole line in the right window (from Test\menus.txt) and paste it on top of the same line in the left window.


Ps. You don't need to change any other file. Modifying menus.txt should suffice.
 
Yeah, well it didn't work  :smile:
So I suppose all editing is done in the ModuleSystem from now on  :neutral:


EDIT: Thanks, I'll give WinMerge a try.

EDIT2: It fixes a few things but mostly it's all screwed up. Like: all towns are hostile and have food for 400000000 days, and other crazy stuff.

I take it, I should edit everything in the module system from now on and not edit the files directly, just using notepad.
I'll have to play around a little. Thanks for getting me started  :smile:
 
Adorno 说:
EDIT2: It fixes a few things but mostly it's all screwed up. Like: all towns are hostile and have food for 400000000 days, and other crazy stuff.

I'm not sure what went wrong, but if you haven't modified anything other than the line below in menus.txt, then the game should work fine. This line has nothing to do with the things you mentioned.

mno_begin_adventuring  0  Become_an_adventurer_and_ride_to_Calradia.  700...


BTW, the files generated by the MS for 1.010 don't seem 100% compatible with 1.011. That may be the problem. One particular variable seems to be placed differently in 1.011 and that difference effects all the other variables in the game. M&B v1.010 works fine with the current MS though.
 
Well, I've made a new introduction, the 5. line where it says "you arrive at Calradia".
Other than that, I've changed map, parties, troops, item_kinds1 and conversation. So it's quite a lot  :smile:
 
后退
顶部 底部