This site is in archival mode. A replacement is being developed. In the meantime, please use the PBW2 Forums for community discussions. The replacement software for this site will use a unified account system with PBW2, and any newly created threads will carry over.
Posted: Tue Feb 04, 2014 2:13 am Post subject: How to get call names
I'm a newbie with modding so please bare with me if I do not understand some of it. My question is what files can I look in to find calls and stuff like that heres and example
Where do I find all this get/call tags? Is there a spacific file that has them all? It would be nice if someone did this for all the newbies out there like me [/code] Back to top
There are two primary sources, and you need to keep track of which you use for what. The "Modding.pdf" works when you're modding game elements like facilities, components, units, planets, and such.
Whenever you work on AI scripts, however, you need to reference "Script.pdf". The primary difference is that everything has the prefix "Sys_" on the front of it. Another difference is that variables can, and need to be declared before they can be used in scripts. Back to top
Okay, first of all, this only applies to scripts. If you are altering something, and you're not going to compile the result, it doesn't apply.
In the scripting language, you can't just up'n use a variable.
Set bool_this_here := FALSE
won't work if "bool_this_here" hasn't previously been "declared". Declaring is like introducing. Until the software knows "bool_this_here" exists as a variable, it can't employ it as a variable. Some languages are equipped to parse and handle new variables automatically and some are not. This language is not.
A variable can be boolean, long, real, list, or string. Each type is handled differently in memory, and when you declare the variable, that introduction lets the software know which kind to set up.
There are two fundamental types of variable: global and local. Script_AI_GlobalVariables.txt is where you can put any variable, when you prefer it to be global. Listing a variable in there with the others will make it available for use at any point, in any part of the AI's script.
Local variables are different. At the start of most functions, you'll find a statement "Vars", followed by a list of variable names and descriptors. Whatever is listed can be used within the function, and then won't be available anywhere else. It is "local". It comes into being when the function is called, and as soon as the function is finished, it gets erased.
Above "Vars" you'll find "Params". These are special variables, and usually there are only a few. Whatever is listed as a "Param" can be used throughout the function. "Param" values are special. They are "passed to" the function from the call statement. Appropriate values for every "Param" MUST be included (in order) in the parentheses following the call.
Now that turned out to be a lot of words. You won't need to know any of it, unless you go tinkering around in the scripts, trying to add new things. If you don't understand what I said directly, I suggest making another try after you've had a look at the scripts, and seen some examples of the "Vars" and "Params" lists. SE5_Script_pdf has some explanations too, but they are extremely brief, and one needs to know some programming jargon to have much chance.
Your question doesn't indicate you've been dealing with the scripts, so you may not need any of that at this time, anyhow. Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All logos and trademarks used on this site, all comments and stories posted for reading, all files hosted for download, and all art work hosted for viewing are property of their respective owners; all the rest copyright 2003-2010 Nolan Kelly.
Syndicate news: - Syndicate forums:
Page Generation: 0.48 Seconds