Build module tool

正在查看此主题的用户

Cjkjvfnby

Regular
Does same as build_module_check_tags.bat

Features:
Stop on first error.
Tip for error.
Count time of execution.
Does not modify module system.
upd. Open file in editor on error line (Notepad++, Sublime Text supported)

Installation:
Copy acrchive content to you module folder.

Settings:
Change path to you editor executable and uncomment line with it in ../script_compiler/settings.py

Usage:
Run compiler.bat
or start python script in IDE.

Traceback:
Traceback is information about error.
Usually you need third sting from end:
    File ".../module_scripts.py", line 351,
Common error has tip.
Missed coma between (...) and (....)

Known issues:
If launched via IDLE does not show text output.

插入代码块:
350: (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_15")
351: (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_18"),

========== Starting module process_init                  ==========
Initializing...
Module process_init compiled in 0.0199999809265 sec

========== Starting module process_global_variables      ==========
Error trace back:
Traceback (most recent call last):
  File "f:\projects\ScriptConvertor\source\main.py", line 43, in get_time
    mod = __import__(module)
  File "f:\projects\ScriptConvertor\source\process_global_variables.py", line 11
, in <module>
    from process_operations import *
  File "f:\projects\ScriptConvertor\source\process_operations.py", line 20, in <
module>
    from module_scripts import *
  File "f:\projects\ScriptConvertor\source\module_scripts.py", line 351, in <mod
ule>
    (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_
18"),
TypeError: 'tuple' object is not callable


Finished with error:
Missed coma between (...) and (....)
Press any key to exit. . .


project page:
https://github.com/Cjkjvfnby/mab_compiler
download page:
https://github.com/Cjkjvfnby/mab_compiler/zipball/master

update:
To add other error hanglers I need example of error and help message.
 
This will be very useful for me, I keep having to manually go through and look at all my errors. Thanks!
 
That looks pretty useful; can it give a useful error for mistakes in module_mission_templates?  Those are the worst, in terms of Module System's default error message; I remember having to hunt down errors there line-by-line in a few places before I got the hang of it.
 
xenoargh 说:
That looks pretty useful; can it give a useful error for mistakes in module_mission_templates?  Those are the worst, in terms of Module System's default error message; I remember having to hunt down errors there line-by-line in a few places before I got the hang of it.

yes.
 
Add feature:
If error: file opened in editor on error line. (only Notepad++ and Sublime Text are supported.)
Windows notepad does not have options to open on certain line and will never be supported. 

PS. To add new errors handlers i need example of mistake.
 
I use multiple skins/races on my mods so the dialogs and other string reports related to gender's messed up. I need to make sure that any :
(get_troop_type, ":type", ":troop_id"),
is followed by :
(val_and, ":type", 1),
Can you make the check done automatically, please. It will help much for any mods that has more than 2 skins.

Thanks and regards,

dunde
 
That should be an optional check IMHO - there are other ways to handle skins, besides such a check will spam lots of warnings for perfectly working Native code.
 
Ah, yes I do understand what Lav pointed. Not all mods arrange the troop type with male on even and female on odd and male on even number. And the check I need is useless for them. And native mods will produce tons of warning message if the check applied to it.
Never mind, I just found how to do it by modifying process_operations.py.
 
后退
顶部 底部