User avatar
bjfagan
General of the Army
Posts: 631
Joined: Sun Dec 30, 2007 11:03 pm
Location: Los Angeles, USA

Script Templates

Thu Jul 04, 2013 7:04 pm

For posting templates of the many scripts used in PON.

Soulstrider
Major
Posts: 222
Joined: Fri Sep 14, 2012 11:22 pm
Location: Northern Lusitania

Sat Jul 06, 2013 2:38 pm

Could someone tell me how you reduce/add a diplomat in a script?

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Sat Jul 06, 2013 10:26 pm

Good question soulstrider ;)

Can I have my diplomats for July 1879, please.

Code: Select all

SelectFaction = $CMN
SelectRegion = $Constantinople
 StartEvent = Graduates of the Istanbul School of Diplomacy July 1886|1|1|NULL|NULL|$Constantinople|NULL
Actions
SelectFaction = TUR
ChangeResStock = $merDiplomat;4
EndEvent


for taking away two it would be
ChangeResStock = $merDiplomat;-2
"I am here already.", said the hedgehog to the hare.

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Tue Jul 09, 2013 9:30 am

This script is to transfer the second fleet of purchased transportships from Portugal to Ottoman Empire (started transaction back in the old game). The first four lines of the actions section give Portugal 15 statefound and kills any Portuguese ships currently in Antalya. They should have gotten deleted with the first run of the script a few turns ago but just in case. Lines five and six take away 15 staefound from OE. lines seven to nineteen create a squadron of transportships of the older turcish steamer model, which gets fixed for one turn. Lines 20 and 21 select all fixed units in Antalya and convert four of them into sailship models (to match the actual models of the sold ships)


Code: Select all

SelectFaction = $CMN
SelectRegion = $Antalya

StartEvent = Portuguese ships for the Ottoman Empire (2nd run)|1|1|NULL|NULL|$Antalya|NULL

Actions
SelectFaction = $POR
  ChangeResStock = $merMoney;15
  SelectSubUnits = Region $Antalya;FactionTags POR;Domains $Naval
  AlterCuSubUnit = ApplytoList;Kill
SelectFaction = $TUR
ChangeResStock = $merMoney;-15
SelectRegion = $Antalya
 CreateGroup
  Posture = $Defensive
  SetKind = $Nav
  Entranch = 0
  FixType = 1
  SetName = Transports2
  Apply
  CreateUnit
  SetType = $uni_TUR_Tra2
  SUFlavorName = T09|T010|T011|T012|T013|T014|T015|T016
  SetLevel = 3
  Apply 
  SelectSubUnits = Region $Antalya;OnlyFixed
  AlterCuSubUnit = ApplyToList;probability 100;Attempts 4;Convert $mdl_TUR_TR01
EndEvent
"I am here already.", said the hedgehog to the hare.

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Cession of Kars

Wed Jul 10, 2013 4:15 pm

No diplomats being charged because nemethand already has a diplomat en route with a peace offer. A white peace is settled here, followed by the cession of Kars and the correction of the CP values in the formerly occupied regions.



Code: Select all

SelectFaction = $CMN
SelectRegion = $Kars

StartEvent = Ottomans cede Kars to Russia|1|1|NULL|NULL|$Kars|NULL

Actions
SelectFaction = $RUS
SettleWhitePeace = $TUR
SelectRegion = $Kars
ChangeRgnOwner = $TUR
SelectFaction = $RUS
SelectRegion = $Batumi
SetColonialPen = 0
SelectFaction = $RUS
SelectRegion = $Ankara
SetColonialPen = 0
SelectFaction = $RUS
SelectRegion = $Trabzon
SetColonialPen = 0
SelectFaction = $RUS
SelectRegion = $Malatya
SetColonialPen = 0
SelectFaction = $RUS
SelectRegion = $Erzurum
SetColonialPen = 0
SelectFaction = $RUS
SelectRegion = $Bitlis
SetColonialPen = 0
SelectFaction = $RUS
SelectRegion = $Diyarbakir
SetColonialPen = 0
SelectFaction = $RUS
SelectRegion = $Hakkari
SetColonialPen = 0
EndEvent
"I am here already.", said the hedgehog to the hare.

User avatar
Crixdaz
Sergeant
Posts: 92
Joined: Sun Sep 23, 2012 10:45 am
Location: Granada, Spain

Thu Jul 11, 2013 11:37 am

Those are the schemes for the 2 scripts for resolve the actual China-Japan conflict:

Script to transfer structures, some materials and settle peace:
SelectFaction = $CMN
StartEvent = Resolution of China-Japan conflict|1|1|Null|Null|Null|Null //Single execution

Actions

//Transfer of the rice paddies in Bangkok to Brazil
SelectFaction = $JAP
SelectRegion = $Bangkok
RemoveStructure = ByDefUID $Rice5;RANDOM;SINGLEFAC
SelectFaction = $BRZ
SelectRegion = $Bangkok
CreateStruc
SetType = $Rice5
SetName = Japan-Brazil Cooperation
Apply

SelectFaction = $JAP
SelectRegion = $Bangkok
RemoveStructure = ByDefUID $Rice6;RANDOM;SINGLEFAC
SelectFaction = $BRZ
SelectRegion = $Bangkok
CreateStruc
SetType = $Rice6
SetName = Japanese-brazilian friendship
Apply


//Transfer of the coal mine in Hokaido to the USA
SelectFaction = $JAP
SelectRegion = $Hokaido
RemoveStructure = ByDefUID $Coal1;RANDOM;SINGLEFAC
SelectFaction = $USA
SelectRegion = $Hokaido
CreateStruc
SetType = $Coal1
SetName = USA's coal mine of Hokaido
Apply

//Transfer of 300 coal to Japan
SelectFaction = $USA
ChangeResStock = $merCoal;-300
SelectFaction = $JAP
ChangeResStock = $merCoal;300

//Establish peace between Japan and the rest of powers
SelectFaction = $JAP
SettleWhitePeace = ALL

EndEvent


Script to transfer silk to Brazil during 20 turns:
SelectFaction = $CMN
StartEvent = Transfer of 8 units of Japan's Silk to Brazil|20|1|Null|Null|Null|Null //20 executions to achieve

Actions

SelectFaction = $JAP
ChangeResStock = $merSilk;-8
SelectFaction = $BRZ
ChangeResStock = $merSilk;8

EndEvent


I defined this scripts as schemes as I have no experience in scripting for this game. I've taken the general ideas in this thread by loki100. And the transfer of structure of this post by Sir Garnet. I've got some questions about this, as I don't know even how to execute them:
I've defined this scripts as schemes as I have no experience in scripting for this game. I've taken the general ideas in this thread by loki100. And the transfer of structure of this post by Sir Garnet. I've got some questions about this, as I don't know even how to execute them:

1-Exists some option to transfer an structure instead of removing it before and to create later again?
2-The rice paddies to transfer are in construction actually, this represent some trouble? can we set the time to finish the construcion of an structure when we create it? This last it's to avoid cheating, as we are skipping the construction time and it's not fair to the rest of players.
3-I've supposed that in the removal/creation of an structure the number after the name of the resource (for example: $Coal1) it's the position of the structure. As there exists various structures to exploit one resource. It's right or not?
4-I've divided the treaty into two scripts, as the first will be executed one time and the other 20 times. I've supposed that the second will execute 20 turns consecutive and then will finish. I'm right?

I'll be glad to read your suggestions to learn to fix those possible problems and learn also to execute it for testing it before the application to the game.

Thanks in advance.
Excuse my bad english, don't doubt to correct me ;)

User avatar
Sir Garnet
Posts: 935
Joined: Sat Jul 16, 2011 8:23 pm

Thu Jul 11, 2013 12:23 pm

Crixdaz wrote:Those are the schemes for the 2 scripts for resolve the actual China-Japan conflict:

1-Exists some option to transfer an structure instead of removing it before and to create later again?
Yes in theory, but not in practice.

Crixdaz wrote:2-The rice paddies to transfer are in construction actually, this represent some trouble? can we set the time to finish the construcion of an structure when we create it? This last it's to avoid cheating, as we are skipping the construction time and it's not fair to the rest of players.
I assume it is possible but I don't have a certain answer as to how. Maybe prepare the script and run it when the structures complete?

Crixdaz wrote:3-I've supposed that in the removal/creation of an structure the number after the name of the resource (for example: $Coal1) it's the position of the structure. As there exists various structures to exploit one resource. It's right or not?
No, That is the level of the structure, of which there are up to 3 in many cases, but in the case of Rice only Level 1. For agriculture, Level 2 is often called Plantation and 3 is Exploitation.

There is an updated table for this in the revised draft manual but I don't have means right now to PDF it. The doc file listing resource structures is attached for modding reference.


Crixdaz wrote:4-I've divided the treaty into two scripts, as the first will be executed one time and the other 20 times. I've supposed that the second will execute 20 turns consecutive and then will finish. I'm right?
Not sure. There may need to be an evaluation test to see if there is enough Silk that turn, unless adequate stockpile is always manintained.
Attachments

[The extension doc has been deactivated and can no longer be displayed.]


User avatar
Jim-NC
Posts: 2981
Joined: Wed Feb 25, 2009 4:21 pm
Location: Near Region 209, North Carolina

Thu Jul 11, 2013 1:22 pm

Crixdaz wrote:Those are the schemes for the 2 scripts for resolve the actual China-Japan conflict:

Script to transfer structures, some materials and settle peace:


Script to transfer silk to Brazil during 20 turns:


I defined this scripts as schemes as I have no experience in scripting for this game. I've taken the general ideas in this thread by loki100. And the transfer of structure of this post by Sir Garnet. I've got some questions about this, as I don't know even how to execute them:
I've defined this scripts as schemes as I have no experience in scripting for this game. I've taken the general ideas in this thread by loki100. And the transfer of structure of this post by Sir Garnet. I've got some questions about this, as I don't know even how to execute them:

1-Exists some option to transfer an structure instead of removing it before and to create later again?
2-The rice paddies to transfer are in construction actually, this represent some trouble? can we set the time to finish the construcion of an structure when we create it? This last it's to avoid cheating, as we are skipping the construction time and it's not fair to the rest of players.
3-I've supposed that in the removal/creation of an structure the number after the name of the resource (for example: $Coal1) it's the position of the structure. As there exists various structures to exploit one resource. It's right or not?
4-I've divided the treaty into two scripts, as the first will be executed one time and the other 20 times. I've supposed that the second will execute 20 turns consecutive and then will finish. I'm right?

I'll be glad to read your suggestions to learn to fix those possible problems and learn also to execute it for testing it before the application to the game.

Thanks in advance.


Make sure to add in a diplomat charge to Japan. As a player (not moderator), I think it should be 2 diplomats as there is a treaty with Brazil and a treaty with America. As Sir Garnet says, the lines for set type should read "SetType = $Rice1", and "SetType = $Coal2" - which means a level 2 coal mine.

The 1st script will fire once. I believe that it would be best to wait for the Rice farm to be built, as I think it will cause problems if the script is run while they are building (the script creates fully built structures, not in process).
The 2nd script should fire 20 times in a row.
Remember - The beatings will continue until morale improves.
[SIGPIC][/SIGPIC]

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Thu Jul 11, 2013 2:20 pm

Here's the script for the transfer of Tripolis.
It's a bit clumsy to ensure that the colony can be divided into two parts. CP 101 for the turcish part is necsessary to prevent funny behaviour.
As nobody insisted on inflation upon purchases I left it with $merMoney. There's some ships yet to reach turcish ports and change ownership but since there is some time left to do it, I didn't include this here.


Code: Select all

SelectFaction = $CMN
SelectRegion = $Tripolitania

StartEvent = Drawing the borders in Lybia|1|1|NULL|NULL|$Tripolitania|NULL

Actions
SelectFaction = $ITA
ChangeResStock = $merDiplomat;-2
ChangeResStock = $merMoney;-6000
SelectRegion = $Tripolitania
ChangeRgnOwner = $TUR
SelectRegion = $Tripolitania
ChangeRgnOwner = $TUR
SelectRegion = $Misurata
ChangeRgnOwner = $TUR
SelectRegion = $Sirt
ChangeRgnOwner = $TUR
SelectRegion = $Amal
ChangeRgnOwner = $TUR
SetColStatus = $Tripolitania;2

SelectFaction = $TUR
SelectRegion = $Benghazi
ChangeRgnOwner = $ITA
SelectRegion = $Cyrenaica
ChangeRgnOwner = $ITA
SelectRegion = $Salloum
ChangeRgnOwner = $ITA
SetColStatus = $Benghazi;2
SetColStatus = $Salloum;2
SetColStatus = $Cyrenaica;2
SelectRegion = $Benghazi
SetColonialPen = 101
SelectRegion = $Cyrenaica
SetColonialPen = 101
SelectRegion = $Salloum
SetColonialPen = 101
ChangeResStock = $merMoney;6000
EndEvent
"I am here already.", said the hedgehog to the hare.

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

AI settings for multiplayer

Sun Jul 14, 2013 9:52 am

This snippet of the player discussion thread seemed good to be put into script repository to me.

Code: Select all

Thanks, so for manual purposes this is my summary:

(Under PBEM SETTINGS)
In multiplayer games or as an option in singleplayer the game can create  TRN files for all playable countries, allowing players to give orders  to those countries. Two items that can be put in a Z.opt file in  Settings are the following, which control whether the TRN files are  created and, if created, what happens if no orders are given - whether  the AI gives orders for that turn or no orders are given for that turn.  The // precedes comments to each line.

rulNoTurnFileForAI = 0   // 1 suppresses trn files for AI (faster but player can't take over), 0 creates turn files
aiDoTakeOver = 0   // 1 for the AI to take over the turn for nations without orders, 0 processes the turn without orders

The settings above create TRN files and do not have the AI issue orders when no orders have been submitted.
"I am here already.", said the hedgehog to the hare.

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

The Sarajevo Conference

Thu Jul 18, 2013 2:46 pm

This script is for the results of the Sarajevo conference. It exchanges the respective regions, as well as some buildings between Russia and Austria and executes the cashflow. Also I added peace with Greece and a white peace with Rumania, both for wich I have the warscore needed.

I never wrote a script of that length. I think that all workes out appropriately but please check the results, Austria and Russia.


Code: Select all

SelectFaction = $CMN
SelectRegion = $Sarajevo

StartEvent = The Sarajevo Conference|1|1|NULL|NULL|$Sarajevo|NULL

Actions
SelectFaction = $GRE
ChangeResStock = $merDiplomat;-1
SelectFaction = $RUS
ChangeResStock = $merDiplomat;-1
SelectFaction = $AUS
ChangeResStock = $merDiplomat;-3
ChangeResStock = $merGoods;-170
ChangeResStock = $merSteel;-120
ChangeResStock = $merCapital;-2870
SelectFaction = $TUR
ChangeResStock = $merGoods;170
ChangeResStock = $merSteel;120
ChangeResStock = $merCapital;2870

SelectFaction = $RUS
SelectRegion = $Boehmen
CreateStruc
SetType = $Gems2
SetName = Bohemian Finest
Apply

SelectRegion = $Przemyzl
ChangeRgnOwner = $AUS
RemoveStructure = ByDefUID $Oil2;RANDOM;SINGLEFAC


SelectFaction = $AUS
AddDiploItem = $TUR; 1
AddDiploItem = $RUS; 1
SelectRegion = $Przemyzl
CreateStruc
SetType = $Oil2
SetName = Galizien Erdöl
Apply

SelectRegion = $Boehmen
RemoveStructure = ByDefUID $Gems2;RANDOM;SINGLEFAC

SelectRegion = $Herzegovina
ChangeRgnOwner = $TUR
SelectRegion = $Bosna
ChangeRgnOwner = $TUR
SelectRegion = $Sava
ChangeRgnOwner = $TUR

SelectFaction = $TUR
SelectRegion = $Riyadh
ChangeRgnOwner = $RUS
SelectRegion = $Qatif
ChangeRgnOwner = $RUS
SelectRegion = $Huluf
ChangeRgnOwner = $RUS
SelectRegion = $Halaban
ChangeRgnOwner = $RUS
SelectRegion = $Rub
ChangeRgnOwner = $RUS
SelectRegion = $Sharawrah
ChangeRgnOwner = $RUS
SetColStatus = $Riyadh;1
SettleWhitePeace = $RUM
SettleWhitePeace = $GRE
SelectRegion = $Krita
ChangeRgnOwner = $GRE
SelectRegion = $Dodecanese
ChangeRgnOwner = $GRE

EndEvent
"I am here already.", said the hedgehog to the hare.

User avatar
nemethand
Colonel
Posts: 315
Joined: Wed Dec 28, 2005 11:00 am
Location: Budapest

Thu Jul 18, 2013 10:30 pm

Citizen X wrote:This script is for the results of the Sarajevo conference. It exchanges the respective regions, as well as some buildings between Russia and Austria and executes the cashflow. Also I added peace with Greece and a white peace with Rumania, both for wich I have the warscore needed.

I never wrote a script of that length. I think that all workes out appropriately but please check the results, Austria and Russia.


Code: Select all

SelectFaction = $CMN
SelectRegion = $Sarajevo

StartEvent = The Sarajevo Conference|1|1|NULL|NULL|$Sarajevo|NULL

Actions
SelectFaction = $GRE
ChangeResStock = $merDiplomat;-1
SelectFaction = $RUS
ChangeResStock = $merDiplomat;-1
SelectFaction = $AUS
ChangeResStock = $merDiplomat;-3
ChangeResStock = $merGoods;-170
ChangeResStock = $merSteel;-120
ChangeResStock = $merCapital;-2870
SelectFaction = $TUR
ChangeResStock = $merGoods;170
ChangeResStock = $merSteel;120
ChangeResStock = $merCapital;2870

SelectFaction = $RUS
SelectRegion = $Boehmen
CreateStruc
SetType = $Gems2
SetName = Bohemian Finest
Apply

SelectRegion = $Przemyzl
ChangeRgnOwner = $AUS
RemoveStructure = ByDefUID $Oil2;RANDOM;SINGLEFAC


SelectFaction = $AUS
AddDiploItem = $TUR; 1
AddDiploItem = $RUS; 1
SelectRegion = $Przemyzl
CreateStruc
SetType = $Oil2
SetName = Galizien Erdöl
Apply

SelectRegion = $Boehmen
RemoveStructure = ByDefUID $Gems2;RANDOM;SINGLEFAC

SelectRegion = $Herzegovina
ChangeRgnOwner = $TUR
SelectRegion = $Bosna
ChangeRgnOwner = $TUR
SelectRegion = $Sava
ChangeRgnOwner = $TUR

SelectFaction = $TUR
SelectRegion = $Riyadh
ChangeRgnOwner = $RUS
SelectRegion = $Qatif
ChangeRgnOwner = $RUS
SelectRegion = $Huluf
ChangeRgnOwner = $RUS
SelectRegion = $Halaban
ChangeRgnOwner = $RUS
SelectRegion = $Rub
ChangeRgnOwner = $RUS
SelectRegion = $Sharawrah
ChangeRgnOwner = $RUS
SetColStatus = $Riyadh;1
SettleWhitePeace = $RUM
SettleWhitePeace = $GRE
SelectRegion = $Krita
ChangeRgnOwner = $GRE
SelectRegion = $Dodecanese
ChangeRgnOwner = $GRE

EndEvent


I am fine with the script, it contains what's been agreed regarding Russia.

Could the host also add the following script, please, to the above - only text, no start/end stuff:

SelectFaction = $SPA
SelectRegion = $La Havana
RemoveStructure = ByDefUID $Tobacco2;RANDOM;SINGLEFAC
SelectFaction = $RUS
SelectRegion = $La Havana
CreateStruc
SetType = $Tobacco2
SetName = Russian Tabak

SelectFaction = $RUS
ChangeResStock = $merDiplomat;-1

I hope Ojo still lurks around to confirm that the above is part of the consideration for the Spanish structures in Russia.

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Angry Samoans

Sun Jul 21, 2013 9:03 am

Here's a script to transfer the colony of Samoa from the US to Germany.

Code: Select all

SelectFaction = $CMN
SelectRegion = $Samoa

StartEvent = Angry Samoans|1|1|NULL|NULL|$Samoa|NULL

Actions
SelectFaction = $USA
ChangeResStock = $merDiplomat;-1
SelectFaction = $GER
ChangeResStock = $merDiplomat;-1
SelectRegion = $Samoa
ChangeRgnOwner = $USA
SetColStatus = $Samoa;2
EndEvent
"I am here already.", said the hedgehog to the hare.

User avatar
coolbean
Major
Posts: 224
Joined: Tue Feb 05, 2013 12:34 am
Location: USA

Mon Jul 22, 2013 1:58 am

Script to transfer Shanghai to the USA:
*Haven't had the opportunity to test it.


Code: Select all

SelectFaction = $CMN
SelectRegion = $Shanghai

StartEvent = Shanghai Transfer to the USA|1|1|NULL|NULL|$Shanghai|NULL

Actions
SelectFaction = $USA
SelectRegion = $Shanghai
ChangeRgnOwner = $CHI
EndEvent

User avatar
Jonathan Pollard
Major
Posts: 220
Joined: Mon May 26, 2008 4:01 am
Location: Federal Prison
Contact: Website

Mon Jul 22, 2013 11:34 pm

I tested the script of transfer of Shanghai to the USA, it worked but it also transferred the Chinese rice paddies to the USA. I did not intend to include my economic structures with the lease.
"Two suspects are in FBI custody after a truckload of explosives was discovered around the George Washington Bridge...the FBI...says enough explosives were in the truck to do great damage to the George Washington Bridge." Dan Rather of CBS News, 9/11/2001
[SIGPIC][/SIGPIC]

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Mon Jul 22, 2013 11:51 pm

Jonathan Pollard wrote:I tested the script of transfer of Shanghai to the USA, it worked but it also transferred the Chinese rice paddies to the USA. I did not intend to include my economic structures with the lease.




That can easily be fixed. In the script to the Sarajevo Treaty several buildings get destroyed for one side and then rebuild for the other to circumvent this. You only need to look up alias and level of your rice paddies and treat them the same way as the oilfield in Przemysl was treated.
"I am here already.", said the hedgehog to the hare.

User avatar
coolbean
Major
Posts: 224
Joined: Tue Feb 05, 2013 12:34 am
Location: USA

Sun Jul 28, 2013 7:45 pm

Jonathan Pollard wrote:I tested the script of transfer of Shanghai to the USA, it worked but it also transferred the Chinese rice paddies to the USA. I did not intend to include my economic structures with the lease.


Can you write up a script to transfer the rice paddies back to China? I would but am unfamiliar and won't have time this next week and a half to teach myself (18 final exams).

User avatar
Jonathan Pollard
Major
Posts: 220
Joined: Mon May 26, 2008 4:01 am
Location: Federal Prison
Contact: Website

Mon Jul 29, 2013 3:51 am

I tested the following script for the transfer of Shanghai while keeping Chinese rice paddies, and it worked. So it should be safe to include for the next turn. Good luck on your exams coolbean.

Code: Select all

SelectFaction = $CMN
SelectRegion = $Shanghai

StartEvent = Shanghai Transfer to the USA|1|1|NULL|NULL|$Shanghai|NULL

Actions
SelectFaction = $USA
SelectRegion = $Shanghai
ChangeRgnOwner = $CHI
Apply

SelectFaction = $USA
SelectRegion = $Shanghai
RemoveStructure = ByDefUID $Rice1;RANDOM;SINGLEFAC
SelectFaction = $CHI
SelectRegion = $Shanghai
CreateStruc
SetType = $Rice1
SetName = Chinese Rice
Apply

EndEvent
"Two suspects are in FBI custody after a truckload of explosives was discovered around the George Washington Bridge...the FBI...says enough explosives were in the truck to do great damage to the George Washington Bridge." Dan Rather of CBS News, 9/11/2001

[SIGPIC][/SIGPIC]

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Mon Jul 29, 2013 10:03 am

Jonathan Pollard wrote:I tested the following script for the transfer of Shanghai while keeping Chinese rice paddies, and it worked. So it should be safe to include for the next turn. Good luck on your exams coolbean.

Code: Select all

SelectFaction = $CMN
SelectRegion = $Shanghai

StartEvent = Shanghai Transfer to the USA|1|1|NULL|NULL|$Shanghai|NULL

Actions
SelectFaction = $USA
SelectRegion = $Shanghai
ChangeRgnOwner = $CHI
Apply

SelectFaction = $USA
SelectRegion = $Shanghai
RemoveStructure = ByDefUID $Rice1;RANDOM;SINGLEFAC
SelectFaction = $CHI
SelectRegion = $Shanghai
CreateStruc
SetType = $Rice1
SetName = Chinese Rice
Apply

EndEvent


Looks good. Needs the cost in diplomats implemented though.


SelectFaction = $USA
ChangeResStock = $merDiplomat;-1
SelectFaction = $CHI
ChangeResStock = $merDiplomat;-1
"I am here already.", said the hedgehog to the hare.

User avatar
coolbean
Major
Posts: 224
Joined: Tue Feb 05, 2013 12:34 am
Location: USA

Mon Jul 29, 2013 5:46 pm

Thanks guys!

User avatar
Jonathan Pollard
Major
Posts: 220
Joined: Mon May 26, 2008 4:01 am
Location: Federal Prison
Contact: Website

Tue Jul 30, 2013 4:21 pm

As part of a deal between Chinese and Ottoman businessmen, the Chinese goldmine in Cali is to be transferred to Ottoman ownership. The compensation for the goldmine will be scripted later. I tested the following script and it worked, so please include it with the processing of the next turn.

SelectFaction = $CMN
SelectRegion = $Cali
StartEvent = CHI transfers goldmine to Ottomans|1|1|NULL|NULL|$Cali|NULL
Actions
SelectFaction = $CHI
ChangeResStock = $merDiplomat;-1
SelectFaction = $TUR
ChangeResStock = $merDiplomat;-1

SelectFaction = $CHI
SelectRegion = $Cali
RemoveStructure = ByDefUID $Gold2;RANDOM;SINGLEFAC
SelectFaction = $TUR
SelectRegion = $Cali
CreateStruc
SetType = $Gold2
SetName = Cali's Finest
Apply
EndEvent
"Two suspects are in FBI custody after a truckload of explosives was discovered around the George Washington Bridge...the FBI...says enough explosives were in the truck to do great damage to the George Washington Bridge." Dan Rather of CBS News, 9/11/2001

[SIGPIC][/SIGPIC]

User avatar
bjfagan
General of the Army
Posts: 631
Joined: Sun Dec 30, 2007 11:03 pm
Location: Los Angeles, USA

Tue Jul 30, 2013 6:52 pm

Why can't the cost be part of this script? Also, don't forget the diplomat cost.

User avatar
Jonathan Pollard
Major
Posts: 220
Joined: Mon May 26, 2008 4:01 am
Location: Federal Prison
Contact: Website

Tue Jul 30, 2013 8:11 pm

Citizen X wants to accumulate some of the gold production and once sufficient gold is accumulated, use that as part of the payment, which is fine with me. I don't think there should be any diplomat cost because it's a deal that involves only private business interests, no state funds or state territory will be exchanged. If you think that private sector business deals should have a diplomat cost, you could run the script as is and if the moderator who is currently unavailable agrees with you, the diplomat cost can be deducted later.
"Two suspects are in FBI custody after a truckload of explosives was discovered around the George Washington Bridge...the FBI...says enough explosives were in the truck to do great damage to the George Washington Bridge." Dan Rather of CBS News, 9/11/2001

[SIGPIC][/SIGPIC]

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Tue Jul 30, 2013 11:03 pm

bjfagan wrote:Why can't the cost be part of this script? Also, don't forget the diplomat cost.


For practical reasons we decided to split the whole thing into several scripts. Part of the deal is the transfer of an Ottoman silkfarm, which is still under construction. So it will be transfered later, as will some amount of gold. But the goldmine will be transfered now. China found out that they can't make use of the output and we don't want to let it all go to waste. I am fine with diplomatic costs, should the decision be that way, but I think they should be payed for the entire deal (one each) and not per script.
"I am here already.", said the hedgehog to the hare.

User avatar
Jim-NC
Posts: 2981
Joined: Wed Feb 25, 2009 4:21 pm
Location: Near Region 209, North Carolina

Wed Jul 31, 2013 1:24 am

All transfers cost a diplomat (doesn't matter if any money changes hands or not). If you break the transfer into pieces, then the diplomats should only be charged once. It is incumbent on Jonathan to get repaid.

Please make sure that the costs are in the treaty (so that we can all see them from the beginning). I don't mind separate scripts, but I want all prices/payments to show up at the same time. In this case, we need to know what is being transferred for the sale.
Remember - The beatings will continue until morale improves.

[SIGPIC][/SIGPIC]

User avatar
Jonathan Pollard
Major
Posts: 220
Joined: Mon May 26, 2008 4:01 am
Location: Federal Prison
Contact: Website

Wed Jul 31, 2013 2:20 am

I've edited the script for the gold mine transfer to include the diplomat charge. The full terms of the deal are that in exchange for the immediate transfer of the gold mine, China will receive 180 gold in one or two future payments, plus the silk farm in China currently under construction by the Ottomans.
"Two suspects are in FBI custody after a truckload of explosives was discovered around the George Washington Bridge...the FBI...says enough explosives were in the truck to do great damage to the George Washington Bridge." Dan Rather of CBS News, 9/11/2001

[SIGPIC][/SIGPIC]

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Wed Jul 31, 2013 9:35 am

I kindly request forced peace as by the rules permitted. Bulgaria has lost all their key regions and their capital is taken. They have no army left and warscore is over 50. As a result I want to inherit Sofia as it is an objective of the Ottoman Empire.
Moderator?
"I am here already.", said the hedgehog to the hare.

User avatar
Jim-NC
Posts: 2981
Joined: Wed Feb 25, 2009 4:21 pm
Location: Near Region 209, North Carolina

Wed Jul 31, 2013 4:57 pm

If you offer them peace, can you currently claim it? If not does it simply require a certain war score, or does it not show up at all?
Remember - The beatings will continue until morale improves.

[SIGPIC][/SIGPIC]

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Wed Jul 31, 2013 8:34 pm

Jim-NC wrote:If you offer them peace, can you currently claim it? If not does it simply require a certain war score, or does it not show up at all?


No, it doesn't show up at all. And I am a bit unsecure if it ever becomes available. Thus my request - I don't want to be at war for ever.


(Just realised, that I put this into the wrong thread. Someone move it to "general" please)
"I am here already.", said the hedgehog to the hare.

User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Fri Aug 02, 2013 5:04 pm

Here is the Bulgarian peace script. To be executed when no objections came till Sunday, 4th.

Quite simple and tested.

Code: Select all

SelectFaction = $CMN
SelectRegion = $Bulgaria

StartEvent = Bulgaria inhereted back into Ottoman Empire|1|1|NULL|NULL|$Bulgaria|NULL

Actions
SelectFaction = $TUR
ChangeResStock = $merDiplomat;-1

SelectFaction = $BUL
ChangeResStock = $merDiplomat;-1

SettleWhitePeace = $TUR
SelectFaction = $TUR
SelectRegion = $Bulgaria
ChangeRgnOwner = $BUL
EndEvent

"I am here already.", said the hedgehog to the hare.

Return to “PON Conflict in Europe - Redux”

Who is online

Users browsing this forum: No registered users and 5 guests