User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

New Command & feature: Scorched Earth Rule

Wed Oct 24, 2007 5:18 pm

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;
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Rafiki
Posts: 5811
Joined: Thu Aug 24, 2006 9:19 am
Location: Oslo, Norway

Wed Oct 24, 2007 8:32 pm

Nice :)

Is this NCP only, or is it in AACW (perhaps from 1.07f) as well?
[CENTER]Latest patches: AACW :: NCP :: WIA :: ROP :: RUS :: PON :: AJE
Visit AGEWiki - your increasingly comprehensive source for information about AGE games
[SIGPIC][/SIGPIC]
[/CENTER]

User avatar
Clovis
Posts: 3222
Joined: Wed Nov 09, 2005 7:43 pm
Location: in a graveyard
Contact: Website

Wed Oct 24, 2007 8:55 pm

and which is the event syntax enabling or disabling it?

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Thu Oct 25, 2007 10:29 am

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.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Wed May 21, 2008 3:49 pm

bump, this command is moved from an internal forum to general modding.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Fri Nov 21, 2008 1:09 pm

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!!! :)
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]
[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]

[CENTER]Rules for new members[/CENTER]
[CENTER]Forum Rules[/CENTER]

[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Sat Nov 22, 2008 4:32 pm

yes because in this case this is not faction A that burns the fort, depot or village, but faction B, practicing scorched earth policy.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Mon Feb 02, 2009 5:39 pm

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???
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Mon Feb 02, 2009 6:07 pm

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

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Mon Feb 02, 2009 6:12 pm

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?
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Mon Feb 02, 2009 6:29 pm

lodilefty wrote:[...]To be clear, 'burned' means destroyed, removed from map, correct?

Yes.

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Test case

Tue Feb 03, 2009 2:40 pm

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]
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Tue Feb 03, 2009 7:14 pm

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

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Wed Feb 04, 2009 10:57 am

Should be 'gingerbreadwalk' when applying to you Norbert :)
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Thu Feb 05, 2009 1:04 pm

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! :)

User avatar
Primasprit
Posts: 1614
Joined: Mon Jun 19, 2006 7:44 pm
Location: Germany

Thu Feb 05, 2009 1:11 pm

Pocus wrote:Should be 'gingerbreadwalk' when applying to you Norbert :)

Delicious&Nutritious! Image

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Thu Feb 05, 2009 1:21 pm

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....
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Thu Feb 05, 2009 5:42 pm

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 ;)

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

AIRole_Raider

Mon Feb 16, 2009 2:19 pm

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].....
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 13 guests