The Ultimate Introduction to Modding | Starting out? Read this!

Users who are viewing this thread

David Dire said:
I've been modding Warband or a few months now, and until a couple days ago I never used the module system. I got everything set up, and know how to mod with it and add scipts and the such, however, (noob question), I have no idea how to make the game use the .py and .pyc files instead of the normal .txt files. Any help?
I don't quite understand what you mean. The game always uses the text files; run build_module.bat (after correctly setting up module_info.py) to compile the .py files into their corresponding text file versions.
The *.pyc files are irrelevant and get deleted after a successful compiler run.

 
Lumos said:
Are you:
- Compiling to the correct directory?
- Compiling correctly?
- Running the correct mod?
Actually, I may have made a compiling error. I'm currently away from home so I'm not sure, but I'll get back to you if so. Thanks.
 
Well, i found out why it keeps saying that the cleaver is undefined.

Every time i manually add each item to the ID_Items(well adding them all) and then running the batch file, it for some reasons deleates everything i just typed and replaces it with the original id_item list which doesnt work.

Do the items in ID_Items need to be in any particular order?

So , is there any way to make the batch file stop replacing the ID_Items file everytime i gave each item a value?
 
thats exactly what the compiler is supposed to do, it overwrites all the ID files to keep them up to date, if it isnt adding cleaver to ID_items, then its not recognizing it as an item or you're misspeling it.
it is in almost no circunstance necessary to manually edit the ID files, if you got comp errors because they didnt update, just  compile once again and that is supposed to fix it
 
Its not just the cleaver it doesnt recognise, it wont recognise any item which is not apart of its random list which it keeps overwriting over the id_items with.

I dont know where or why the compiler is using this random list as default, as it has no weapons whatsoever on it and only random bits of native and modded armor.

The correct ID_Items list which i had to manually change has around 720 items.
The list the batch file keeps creating is around 380.

https://www.dropbox.com/s/yr4k1v48ilskdxm/Current%28Error_%20Module%20system%28Need%20help%20fixing%29.zip?dl=0
-There is the module system if you want to see what i mean.

And i can run the batch file as many times as i want but it will keep on saying the cleaver is undefined, so it clearly is not correcting anything on its own for some reason.
 
The biggest question then becomes are you compiling the items file properly?
Open up
Code:
build_module.bat
. It should have, amongst other stuff, a lot of "python process <filename>" lines. You're either missing the "python process items.py" line, or you keep referencing newly-added items before they're compiled. If the line's in there, take it and put it as the FIRST "python process" entry in the list. Files are compiled in the sequence of the lines in this file; moving it to the top of the block will ensure that items get processed first, before everything else, and that should fix it.

IF IT DOESN'T get fixed, you're not compiling the correct items file. You may be editing an items file in a different folder, and compiling some old one or something.
 
It still doesnt work

python process_init.py
python process_items.py
python process_global_variables.py
python process_strings.py
python process_skills.py
python process_music.py
python process_animations.py
python process_meshes.py
python process_sounds.py
python process_skins.py
python process_map_icons.py
python process_factions.py
python process_scenes.py
python process_troops.py
python process_particle_sys.py
python process_scene_props.py
python process_tableau_materials.py
python process_presentations.py
python process_party_tmps.py
python process_parties.py
python process_quests.py
python process_info_pages.py
python process_scripts.py
python process_mission_tmps.py
python process_game_menus.py
python process_simple_triggers.py
python process_dialogs.py
python process_global_variables_unused.py
python process_postfx.py

Thats the order i have it in

And i cant be editing another items file, as i keep opening the one in the same folder and it keeps telling me it needs to be replaced everytime i run the batch file,even though it is persistent on keeping the broken list.But if i am, is there any way to check?
To see what files the batch file is actually using?

Just for the record, i fixed this issue by remaking the entire faction i was working on, and this problem was never truly fixed.
 
Uh... I'm getting a "can't open file" or something" error! What do I do?
You must be sure to have Read/Write permissions to your ModSys folder, and to your new mod's folder, of course. You can try running the build_module.bat as an admin, it may work - I haven't tried it, I don't know. However, putting the ModSys folder on the Desktop or in My Documents is bound to fix the problem.
Moved my  module to the desktop. And it began to work!! Ty much for this.
there is much easyer way than original python installing. Install the portable python and change the beginings of strings in build_module.bat like this


Translated your guide for russian community
 
This is an incredibly useful guide, however when I try to execute the build module it comes up with
Traceback (most recent call last) :
Files "process_init.py, line 2, in <module>
and proceeds to go to all files inside the source code files despite me putting in module.info to export to my module?
Thanks
EDIT: Problem resolved, some bug with the party_set_marshall having to be changed to party_set_marshal. Thanks anyway.
 
I absolutely know that. That's why I mentioned in passing that you really should check out what's in header_operations. That file is your Bible, your Harry Potter, and your... er... most favourite book in the world. It is the Word of God, the saintly archive of modding. Search within, and you'll find the single operation that does what you want it to do. Literally three lines of code at most. Seek.
 
I'm using a Mac, with Mavericks OS.  How do I set the path for python?  Not sure if I should path to Applications/Python 2.7, or to the Launcher within the application folder.
I have tried pathing to Applications/Python 2.7, but it comes up with the file undetected error.
Would appreciate any help, thanks.
 
Cable said:
I'm using a Mac, with Mavericks OS.  How do I set the path for python?  Not sure if I should path to Applications/Python 2.7, or to the Launcher within the application folder.
I have tried pathing to Applications/Python 2.7, but it comes up with the file undetected error.
Would appreciate any help, thanks.
Read this. It can help you
 
Back
Top Bottom