Is it possible for a future game to allow modders to experiment with more complicated campaigns?
For example, it might be fun to have advanced sieges, more variable foraging and skirmishing between armies in a single region, and minor factions. Units could require different resources (ie, manpower, elite troops, gold).
A script language would include operations similar to the following. I realize that this is a pretty ambitious request, but with tools like those modders can create some fairly ambitious strategic games.
Parse units
Parse provinces
Parse armies
Get/set unit info
Get/set province info
Override function that determines if an army retreats, and if so what casualties it sustains
Override function that determines if provinces fall to an occupying army
Place new armies
Create new faction properties
Thanks for your consideration!
Any possibility of a campaign modding script language?
Moderators: rbodleyscott, Slitherine Core, Gothic Labs
-
rbodleyscott
- Field of Glory 2

- Posts: 28411
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Any possibility of a campaign modding script language?
All this can be modded with the existing script language.
Richard Bodley Scott


Re: Any possibility of a campaign modding script language?
Ah! My apologies. The scripting language looks very closely tied to the tactical game and I don't see a way to, for example, parse the armies or override the retreat logic. But I'll take a second look.
-
rbodleyscott
- Field of Glory 2

- Posts: 28411
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Any possibility of a campaign modding script language?
The entire campaign system is written in the scripting language and makes very little use of the in-built tactical game functions, except for the actual battles. So there is nothing to stop you doing anything you like with it - it may be a large task however, to make substantial alterations.Nijis wrote:Ah! My apologies. The scripting language looks very closely tied to the tactical game and I don't see a way to, for example, parse the armies or override the retreat logic. But I'll take a second look.
Not sure what precisely you mean by "parse the armies".
Get/set unit info and province info functions are in CampaignTools.BSF.
Any changes to the retreat logic would require you to mod the campaign scripts, in particular the Invasion() function.
Any mods should be made to clones of the script files In a clone of the campaign "campaign" folder, not in the main build. You can create such a campaign clone in the editor, and it will be saved in My Documents/My Games/PSCAMP/Campaigns.
The file structure for custom campaigns is not identical to that in the main build. You can find a chart of it near the end of the following document:
http://www.slitherinebravo.net/GameWiki ... tub_engine
Script files placed in the correct place in the clones campaign will automatically over-ride the vanilla ones.
Richard Bodley Scott


Re: Any possibility of a campaign modding script language?
Sorry, I had not seen CampaignTools and other scripts in the main data folder, and was going off what were in the separate campaign folders' scripts. They do include most of what I'd want to attempt. Thanks again!
