Page 1 of 1

New Command & feature: Scorched Earth Rule

Posted: Wed Oct 24, 2007 5:18 pm
by Pocus
Scorched Earth Rule is enabled faction by faction, within the script (so can be disabled or altered at any given turn)

This is a factional rule which give these benefits to the faction having it, when an enemy take over a region with structures (only, countryside don't trigger it, code limitation for now)

SupplyLossPercent: A % loss of supply and ammo which will be burned before the opponent take it. The loss is calculated as follow:
100 - (Dice(PercentSupplyLoss div 2) + PercentSupplyLoss div 2)

Ex1: 80%. Means that between 40 and 80% of the supply is lost.
Ex2: 120: Means that 60 and 120% of the supply is lost, limited to 100%: it means that half of the time it will be 100% though.

PercentPillageChance: The % chance that the region is pillaged.

PercentDepotBurn: % chance that a depot, any level is burnt instead of being captured.

PercentFortBurn: % chance that a fort of level 1 only is burnt instead of being captured.


PercentVillageBurn: % chance that a city of level 1 only is burnt instead of being captured. (Note: Redoubt in NCP are in truth city of level 1)




Rafiki Helper for the Wiki:

Code: Select all

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// SET SCORCH EARTH INFOS
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function TScriptEngine.SetScorchEarthInfos(Params : TStringList) : integer;
begin
  Result := 0;
  if not (Params.Count in [1, 9]) then
  begin
    Inc(Result);
    Log(['=> SetScorchEarthInfos, Syntax is either SetScorchEarthInfos = SupplyLossPercent|PillageChance|DepotBurnChance|FortBurnChance|VillageBurnChance|PlaceHolder1|PlaceHolder2|PlaceHolder3|PlaceHolder4 OR SetScorchEarthInfos = NULL']);
    Exit;
  end;
  if cuFaction = nil then
  begin
    Log(['=> SetScorchEarthInfos command, no faction selected']);
    Inc(Result);
    Exit;
  end;
  if Params.Count = 1 then
    cuFaction.SetScorchEarthInfos(0, 0, 0, 0, 0)
  else
    cuFaction.SetScorchEarthInfos(STI(Params[1]), STI(Params[2]), STI(Params[3]), STI(Params[4]), STI(Params[5]));
  Log(['SetScorchEarthInfos', cuFaction.Name, 'SupplyLossPercent:', Params[1], 'PillageChance:', Params[2], 'DepotBurnChance:', Params[3], 'FortBurnChance:', Params[4], 'VillageBurnChance:', Params[5]]);
end;

Posted: Wed Oct 24, 2007 8:32 pm
by Rafiki
Nice :)

Is this NCP only, or is it in AACW (perhaps from 1.07f) as well?

Posted: Wed Oct 24, 2007 8:55 pm
by Clovis
and which is the event syntax enabling or disabling it?

Posted: Thu Oct 25, 2007 10:29 am
by Pocus
AACW will have it for the next patch, but I'm unsure you should use it, well I will leave the modders the responsability of that (perhaps at a very low 'scorch earth' level...).

Syntax: You enable it by issuing the command (SetScorchEarthInfos and associated parameters) in an event or in setup, as for all others commands. You disable it by typing SetScorchEarthInfos with 0 for all parameters, or no parameters at all.

Posted: Wed May 21, 2008 3:49 pm
by Pocus
bump, this command is moved from an internal forum to general modding.

Posted: Fri Nov 21, 2008 1:09 pm
by lodilefty
After much bug hunting, we have found that this command applies to 'the other guy'....

To be clear: It appears that if you want the units of Faction "A" to burn forts more often, you need to increase that factor for Faction "B".

Makes sense to me: Scorched Earth is a policy set by defenders!!! :)

Posted: Sat Nov 22, 2008 4:32 pm
by Pocus
yes because in this case this is not faction A that burns the fort, depot or village, but faction B, practicing scorched earth policy.

Posted: Mon Feb 02, 2009 5:39 pm
by lodilefty
Pocus wrote:If I remember the code, the scorch rule burn level 1 city (that you call them village or settlement is a pure flavor thing for the code). Not the rest.

And yes, you can add structures with the syntax I gave you. Setup = 1 big event.


Hmmm.

With these setup strings in almost all WIA scenarios and campaigns:

SetScorchEarthInfos 0|0|0|50|50|x|x|x|x

I would expect:
0 supply burned [may not matter in WIA "simple supply" system]
0 chance to pillage
0 chance a depot is burned
50% chance a fort is burned
50% chance that a level 1 village or city [indian village?, city?] is burned

yet, I see almost always forts are burned, and I cannot recall a village ever being burned

Is this actually WAD in WIA???

Posted: Mon Feb 02, 2009 6:07 pm
by Primasprit
lodilefty wrote:[...]50% chance that a level 1 village or city [indian village?, city?] is burned

Any level 1 city.

yet, I see almost always forts are burned, and I cannot recall a village ever being burned

Is this actually WAD in WIA???
Should work for WIA. If you have serious doubts and can provide me a test turn as saved game I can double-check however. :)

Cheers
Norbert

Posted: Mon Feb 02, 2009 6:12 pm
by lodilefty
OK. I'll generate a test, setting the village burn to 100 to be sure...

To be clear, 'burned' means destroyed, removed from map, correct?

Posted: Mon Feb 02, 2009 6:29 pm
by Primasprit
lodilefty wrote:[...]To be clear, 'burned' means destroyed, removed from map, correct?

Yes.

Test case

Posted: Tue Feb 03, 2009 2:40 pm
by lodilefty
Primasprit wrote:Any level 1 city.

Should work for WIA. If you have serious doubts and can provide me a test turn as saved game I can double-check however. :)

Cheers
Norbert


Test scenario:
SetScorchEarthInfos 0|0|0|50|100|x|x|x|x

Attached.
[ATTACH]5939[/ATTACH]

Execute turn.

Stanton not burned [but it is only irregulars attacking]
Ft Constitution is burned [WAD]
Painted Post not burned [village, attacked by regular and irregular force]

Posted: Tue Feb 03, 2009 7:14 pm
by Primasprit
lodilefty wrote:Test scenario:
SetScorchEarthInfos 0|0|0|50|100|x|x|x|x

Attached.
[ATTACH]5939[/ATTACH]

Execute turn.

Stanton not burned [but it is only irregulars attacking]
Ft Constitution is burned [WAD]
Painted Post not burned [village, attacked by regular and irregular force]

Problem found and fixed. (A cakewalk thanks to your test-turn.) :)

Thanks much for spotting!

Cheers
Norbert

Posted: Wed Feb 04, 2009 10:57 am
by Pocus
Should be 'gingerbreadwalk' when applying to you Norbert :)

Posted: Thu Feb 05, 2009 1:04 pm
by Hobbes
lodilefty wrote:Hmmm.

With these setup strings in almost all WIA scenarios and campaigns:

SetScorchEarthInfos 0|0|0|50|50|x|x|x|x

I would expect:
0 supply burned [may not matter in WIA "simple supply" system]
0 chance to pillage
0 chance a depot is burned
50% chance a fort is burned
50% chance that a level 1 village or city [indian village?, city?] is burned

yet, I see almost always forts are burned, and I cannot recall a village ever being burned

Is this actually WAD in WIA???


Now I see this! :)

Posted: Thu Feb 05, 2009 1:11 pm
by Primasprit
Pocus wrote:Should be 'gingerbreadwalk' when applying to you Norbert :)

Delicious&Nutritious! Image

Posted: Thu Feb 05, 2009 1:21 pm
by lodilefty
To clarify: the scorching of level 1 City will still require 'non-irregulars'


So, depending on parameters, Indians, Couriers, etc. will cause burning of settlements and Indian villages, but not a level 1 city.

'Regular' troops [includes Mititia, Provincials] will additionally be able to cause burning of Level 1 cities.

...and a friendly reminder: if you want your IND side to be 'burning things', you need to set the parameters for the other faction....

Posted: Thu Feb 05, 2009 5:42 pm
by Hobbes
lodilefty wrote:To clarify: the scorching of level 1 City will still require 'non-irregulars'


So, depending on parameters, Indians, Couriers, etc. will cause burning of settlements and Indian villages, but not a level 1 city.

'Regular' troops [includes Mititia, Provincials] will additionally be able to cause burning of Level 1 cities.

...and a friendly reminder: if you want your IND side to be 'burning things', you need to set the parameters for the other faction....


I hear you man ;)

AIRole_Raider

Posted: Mon Feb 16, 2009 2:19 pm
by lodilefty
Another question:

Is the setting for Scorched Earth superceded by AIRole_Raider in the leader models?

It appears that a high value for that parameter leads to burning everything [forts, villages, level 1 cities].....