Vatanperver
Recruit
Leonion said:Is script_give_center_to_faction_aux an engine script?Vatanperver said:I have a question about module system. Can anybody tell me how to find a list of game engine scripts used in module_scripts.py that are called by call_script? For example script_give_center_to_faction_aux.
In Lav's module system all engine scripts have a comment
https://forums.taleworlds.com/index.php?topic=324874.0This script is called from the game engine
kalarhan said:Vatanperver said:I have a question about module system. Can anybody tell me how to find a list of game engine scripts used in module_scripts.py that are called by call_script? For example script_give_center_to_faction_aux. I can kind of understand what it does but i don't know what it does.
install a decent text editor. I like Sublime Text (free). Notepad++ with explorer plugin. Atom. Python IDE. And so on. You can use a full folder search to locate anything inside all files at the same time. A example: CTRL+SHIFT+F "call_script,"
now: I have no idea what you are trying to say here. Operation "call_script" has nothing to do with "engine scripts". The first is a utility command that you (coder) can use in any file to execute a piece of code from module_scripts.py. The second is a hardcoded system call from the engine, that expects a certain script with a certain name, to do something. Some "engine scripts" are mandatory on the modsys, while others are optional (if you delete them the engine will use a default implementation instead). Like mentioned above all "engine scripts" should be marked with a comment on Lav's modys.
"script_give_center_to_faction_aux" -> there are a bunch of configurations that need to be done to change a center (like a town) from faction A to B. Update notes. Cancel quests. Achievements. AI related decisions. Update farmers. Update the bound centers (think a town with 3 villages). The script has that logic inside it. When you need to give a center to a faction (like after it was conquered on a siege), you can simple call it (and not think about all those bunch of things you need to do to make it happen).
script_give_center_to_faction is the base script. "script_give_center_to_faction_aux" has the "aux" to indicate it is a complementary script for the first.
Thanks for the answers. I am new to modding and module system and i actually don't know much about engine scripts or scripts in general. Not being a native speaker, also doesn't help.
What i tried to ask was where could i learn how to understand what those scripts do, is it written somewhere in module system or game directory and can i read the code it implements?
And also can i define my own scripts and if i can how, in which language, where?