Craig_Sutter
Deity
Recently, I've been getting in Lua programming (at its most basic level). I've been working at doing code for various little tasks that my scenario necessitates. Most of this involves going through the various scenarios that come with the game and seeing how it is being used.
I've run across a bit of a difficulty doing this, though, because the code used is often used in a very complex way that involves multiple functions and is not easily transported to my own scenario or mod.
What I would like to initiate is a thread that involves little bits of code that people may use to do limited tasks. For instance, I have (with help) created a code that will add holy cities and religions to a scenario at game start. I think it might be useful for others to have. Rather than letting such snippets disappear into the archives, I would like to see them collected in one place so that people could see them and use them in their scenarios.
I'm hoping that anyone looking at this thread might quickly cut and paste a bit of code, with a brief explanation, that accomplished for them a very limited but useful task. Then I, and others, can take that and customize it for our own scenario if it is something we find of use.
I'll begin by posting my own contribution in the next post of this thread and see if this idea has legs or dies a slow death...
I've run across a bit of a difficulty doing this, though, because the code used is often used in a very complex way that involves multiple functions and is not easily transported to my own scenario or mod.
What I would like to initiate is a thread that involves little bits of code that people may use to do limited tasks. For instance, I have (with help) created a code that will add holy cities and religions to a scenario at game start. I think it might be useful for others to have. Rather than letting such snippets disappear into the archives, I would like to see them collected in one place so that people could see them and use them in their scenarios.
I'm hoping that anyone looking at this thread might quickly cut and paste a bit of code, with a brief explanation, that accomplished for them a very limited but useful task. Then I, and others, can take that and customize it for our own scenario if it is something we find of use.
I'll begin by posting my own contribution in the next post of this thread and see if this idea has legs or dies a slow death...