Converting The Text Files Into Python Files

正在查看此主题的用户

I've been using the ini tweaks listed in another thread but I've reached the limits of what that offers and would like to take the next step. As is clearly seen the Python scripts are far more user friendly but The Official Module system doesn't seem to be able to read existing text files and only builds them from the default scripts included in the distribution.

I have searched in vain for a way to do this and have come up empty. I'm assuming that I'm just missing something here, so if someone could point me in the right direction I would appreciate it. Thanks.

- Ryan Paul Fialcowitz
 
You have to use the module system from the beginning or it'll overwrite all your work AFAIK
 
It's seems intensely counterproductive to use the text files rather the Python ones. Makes no sense from my perspective. And to not have a way of working directly or indirectly with the text files is. . .

I suppose I could fiddle with the Python files and then reapply ALL the tweaks but, seriously, I really shouldn't have to go to that much trouble.

- Ryan Paul Fialcowitz
 
RyanFialcowitz 说:
It's seems intensely counterproductive to use the text files rather the Python ones.

Correct.

RyanFialcowitz 说:
Makes no sense from my perspective.

Then why did you?

RyanFialcowitz 说:
And to not have a way of working directly or indirectly with the text files is. . .

Uneccessary and like you stated before counterproductive.

RyanFialcowitz 说:
I suppose I could fiddle with the Python files and then reapply ALL the tweaks but, seriously, I really shouldn't have to go to that much trouble.

You should have started out using the python scripts, besides it's doubtful that you have actually done much considering the limitations of directly editing the text files.

Overally my advice is start again using the python scripts you'll find you can do so much more, there was actually a text to python converter but it was heavily restricted on what files it could convert and it was for a much older game version.
 
Iberon 说:
Then why did you?

Because the ini tweak topic makes no mention of the fact that working with the Python files is actually possible. That and for the vast majority of the tweaks it's not obviously apparent how to implement them in Python.

Iberon 说:
You should have started out using the python scripts, besides it's doubtful that you have actually done much considering the limitations of directly editing the text files.

The plain fact of the matter is is that I shouldn't have to redo anything. For a game thats selling point is modability this is completely idiotic move. But in the long run starting over is preferable to any other course of action.

- Ryan Paul Fialcowitz
 
The .ini file and text file tweaks are just what they advertise, "tweaks". For any serious, heavy-duty modding you need the module system. The only reason that people sometimes tweak the text files directly is when they want to do simple Native tweaks. Sometimes it's easier to jiggle a few numbers here and there than to redistribute a whole new version of Native.
 
I agree with you mr. Ryan Paul Fialcowitz on this one, but it seems like you cant get what you need is reallity, but, there is but, you can find some mods that have included source codes inside when you download them, and they have lot of nice features, I will post this for example:

http://forums.taleworlds.com/index.php/topic,57911.0.html
http://www.mbrepository.com/file.php?id=1571
http://www.mbrepository.com/file.php?id=1139

you probably should scope around for some more mods with source included, and what you find should be fairly enough for creating your own mod for your own gameplay.

EDIT: Ah, almost forgot:

http://forums.taleworlds.com/index.php/topic,78411.msg2199754.html#msg2199754
 
I actually do both - modifying the python files and the text files.  In some cases it's easier to use the Troop Editor or the Item Editor to check a text file, then encode the needed changes into the corresponding python file. 

For example, I found that some of my troops in Hindustan were riding around without boots, while some missile troops were performing very badly. So I used the Troop Editor to check which troops lacked the 'guarantee boots' flag, or had 0 archery/throwing skills, then edited the corresponding entries in module_troops.py. 

To avoid having to type so much, I also use the Troop Editor to do my party_templates.txt file, then copy that to another folder.  Every time I compile the module system, I copy the modified party_templates.txt file to my module folder to make sure my changes stick.

Also, if you add or move parties or spawn points in the Map Editor, you'll be changing the parties.txt file. KT0 and HokieBT have come up with some very useful tools for this. 

http://forums.taleworlds.com/index.php/topic,69313.msg1797953.html#msg1797953
https://www.mbrepository.com/file.php?cid=3&id=1210
http://forums.taleworlds.com/index.php/topic,45772.0.html

 
后退
顶部 底部