Aslan Stark
Private
Posts: 29
Joined: Thu May 09, 2013 8:19 pm

Stack of doom took 497,000 prisoners....do i get them back?

Thu Jun 06, 2013 5:41 am

sooooo i got destroyed by the stack of doom. which pisses me off because even with penalties they got me and i dont think i want to play the game for a few days but the enemy basically took a whole army of mine as prisoners.... how can i get them back? also if they are prisoners, does that mean the pool of troops is still the same? what i mean is now that i lost these men, can i just recruitment them again or they are gone forever :(

User avatar
Kensai
Posts: 2712
Joined: Mon Sep 19, 2011 4:54 pm
Location: Freiburg, Germany

Thu Jun 06, 2013 10:11 am

First of all, do not freak out. POWs happen. :)

Second, no, you won't be getting them back unless you use a custom solution we are using in our 24-nation multiplayer where we have created a script to give back POWs six months after hostilities end as officers and conscripts, ie soldiers back in the force pool, ready to be recreated as units. Now, this is not possible to implement in a single player game unless you somehow load the AI's turn and peek inside (as you probably did to know they had 497K of prisoners).

Here is a template of script you can adapt to your own needs.

Code: Select all

SelectFaction = $CMN
SelectRegion = $Amsterdam
StartEvent = 1873 Late June Prisoner Return from Brazil-Dutch War|4|1|NULL|NULL|NULL|NULL
Conditions
TurnIndex = 0;2;4;6;8;10;12;14;16;18;20 //4 installments at monthly intervals
Actions
SelectFaction = $BRZ
ChgPrisoners = $TAI ; -61
ChgPrisoners = $CHI ; -27
ChgPrisoners = $OMA ; -79
ChgPrisoners = $HOL ; -828
ChangeResStock = $merConscript;21
ChangeResStock = $merOfficer;2
SelectFaction = $HOL
ChgPrisoners = $BRZ ; -85
ChgPrisoners = $GBR ; -19
ChgPrisoners = $CHI ; -19
ChgPrisoners - $KOR ; -10
ChangeResStock = $merConscript;186
ChangeResStock = $merOfficer;21
SelectFaction = $GBR
ChangeResStock = $merConscript;5
SelectFaction = $KOR
ChangeResStock = $merConscript;3
SelectFaction = $CHI
ChgPrisoners = $BRZ ; -7
ChangeResStock = $merConscript;10
ChangeResStock = $merOfficer;1
EndEvent


Some general suggestions.

  • If you play alone with the AI, for fair play do it both for your nation and your rival.
  • To find how many conscripts need to be returned divide the number of the prisoners by 100.
  • To find how many officers need to be returned divide the number of the prisoners by 3200.
  • Now, think how many turns you want the event to fire. This is important, as if too many conscripts and officers come back at once, they will probably be wasted as they will surpass the ability of the returning nation to absorb them (there is an inherent turnover for each nation). In our example, the event runs for 4 turns, in alternate months. So the numbers you extracted above will need to be further divided by 4.


Now, study the above example and tell me what you think the script will do and if you can calculate the initial POWs the above nations had. This is a real example from our MP game. Sorry if I sound pedantic here, but I sincerely want to convince you all players to learn the AGEOD scripting language for yourselves. Once mastered, you will be able to fix almost all issues. More information here.
Care to unify Germany as Austria? Recreate the Holy Roman Empire of the 20th Century:
Großdeutschland Mod
Are you tough enough to impersonate the Shogun and defy the Westerners? Prove it:
Shogun Defiance Mod (completed AAR)

User avatar
Random
AGEod Veteran
Posts: 779
Joined: Fri May 21, 2010 4:10 pm

Thu Jun 06, 2013 3:34 pm

Now, study the above example and tell me what you think the script will do and if you can calculate the initial POWs the above nations had. This is a real example from our MP game. Sorry if I sound pedantic here, but I sincerely want to convince you all players to learn the AGEOD scripting language for yourselves. Once mastered, you will be able to fix almost all issues. More information here.

OK, now comes the dumb question that I do not recall ever seeing an answer to whenever PON scripts are thrown around.

Where do they actually go?

Are they written into the console and run with the game turn?

Are they written into the Plugin_VGNCommon.sct file to run when the game is loaded?

Are they written into some other file?

Is the location dependent on the type of script?

All the above may be blinding glimpses of the obvious to the Enlightened but some of us pedestrian solo players don't have a clue about scripts and the AGEOD wiki presumes some level of basic knowledge.

Thanks in advance for any guidance.

-C

User avatar
loki100
AGEod Guard of Honor
Posts: 2401
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Thu Jun 06, 2013 5:10 pm

They need to go into a text file that is in turn referenced in the .scn database. So you can create a completely new file, link it to the database and use that. Or, and this is what I do make use of the existing directory (look in events) and just add your new event at the end of a file that seems appropriate. So when I wrote a script to kickstart a stalled German unification, I put it at the end of the file that has all the existing scripts. Helps me to find it back.

The game will then find it (look in the logs and you'll see it checks every possible event each turn) and run it for you. I sometimes delete them after they have fired and keep the original text in a word-type document in case I want to adapt it for another time.
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
Random
AGEod Veteran
Posts: 779
Joined: Fri May 21, 2010 4:10 pm

Thu Jun 06, 2013 7:18 pm

@loki100

Thanks anyway , but you completely lost me. I have no idea how to link text files to the *.scn files, themselves being incomprehensible with regards to plain text. As for adding text to the *.sct files as you seem to suggest appears a better option but still potentially ugly in the execution. I have successfully scripted a couple of things, turned off Sudden Death using the Plugin_VGNCommon.sct file for example but it's looking to be more trouble than it's worth to do more.

I had thought that editing WW1G files was a trial but editing PON to fix game anomalies is a nightmare of repeated frustration by comparison.

-C

User avatar
loki100
AGEod Guard of Honor
Posts: 2401
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Thu Jun 06, 2013 10:30 pm

sorry, should have been clearer.

the easiest way is to open the vgn/events directory. I personally then select which ever of the existing text files best suits what I want to do (so given I am playing Italy, most often that file). Open it up, go to the end and create the script you want. I often will copy one that is close to what I want to do and then amend that.

the game engine will then pick up and run the script as part of the next turn.

You can do some pretty complex stuff but most of the changes I have made are simple transfers of provinces or attempts to redeem key event chains. So I took the one around the 1878 Bulgarian revolt, changed the trigger from giving Russia a CB to forcing war, altered the end date and then let things take their course - at the end of which I have a Balkans all primed for the chaos and wars of the turn of the century.

If you look around, esp in tjhe huge multiplayer game there are a number of scripts. Equally if you try something and it doesn't work, post it here. People will help/advise. But I share Kensai's basic view, learning a little bit of scripting of events is essential to really enjoy PoN.
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

Gen. Monkey-Bear
Lieutenant Colonel
Posts: 262
Joined: Wed Jun 15, 2011 5:35 am
Location: The San Francisco Bay Area

Fri Jun 07, 2013 2:55 am

If I may, I also have a question on the topic. I think I read in the Wiki that it is better to mod with the Excel files instead of directly into the .scn files . . . is that true, or did I somehow misunderstand? Because if it is, then my questions are 1) What excel files? :bonk: and 2) How do I do that?

User avatar
Kensai
Posts: 2712
Joined: Mon Sep 19, 2011 4:54 pm
Location: Freiburg, Germany

Fri Jun 07, 2013 12:30 pm

The .scn procedure loki100 describes is the ideal one, if you want to keep reference of everything, but not the easiest one. I personally throw (copy/paste) my scripts in the Plugin1850GC folders and they get referenced and run next turn. After you process the turn always read the latest log in the Scripts folder. If things did not go as you planned, rerun the turn with corrections in the script.

This implies you always keep a backup of the last turn before you run custom scripts. ;)
Care to unify Germany as Austria? Recreate the Holy Roman Empire of the 20th Century:
Großdeutschland Mod
Are you tough enough to impersonate the Shogun and defy the Westerners? Prove it:
Shogun Defiance Mod (completed AAR)

User avatar
Random
AGEod Veteran
Posts: 779
Joined: Fri May 21, 2010 4:10 pm

Fri Jun 07, 2013 7:11 pm

Thanks to Loki100 and Kensai for the clarifications. Was not complaining; PON is an absolutely absorbing game and so very deep in scope and range. However, a player may reach a point in their PON universe that the historical events no longer apply or something counter-factual within current situation fires and so the game needs some help from time to time.

Being a regular reader of the huge multi-player game threads and seeing the constant: Problem? Here's a script for that! while being unable to effectively write similar fixes was hugely frustrating at times but now at least I have solid ideas about how to proceed. So the above is a great help even if it did hijack the thread. Thanks again.

We now return you to your regularly scheduled all-conquering, invincible and horrific Stack of Doom thread...

-C

User avatar
loki100
AGEod Guard of Honor
Posts: 2401
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Fri Jun 07, 2013 8:24 pm

I think that summarises the issue very well. Some of the need for scripting is picking up on the rough edges of this superb and engrossing game. But most is connected with making the world emerging in your particular game make sense. Its inevitable once you move into mid-game that events and constraints that make sense in our world rather break down in the world that emerges in a particular game.
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

Aslan Stark
Private
Posts: 29
Joined: Thu May 09, 2013 8:19 pm

Tue Jun 11, 2013 4:26 am

Sorry of the long reply time but i had a busy week.... is their like a tutorial for us new players to learn the script because i am too scared i will corrupt the file and destroy my game :(

User avatar
loki100
AGEod Guard of Honor
Posts: 2401
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Tue Jun 11, 2013 7:02 am

Aslan Stark wrote:Sorry of the long reply time but i had a busy week.... is their like a tutorial for us new players to learn the script because i am too scared i will corrupt the file and destroy my game :(


very unlikely, the worst a poorly written script will do is to make the game crash after it has completed the turn processing.

Best is to find an event that already exists, say a province transfer, copy that, simplify it (you will probably not want 'conditions' or probability), amend it to do what you think it should do, and see if it works. The AGE Wiki is good for what the various syntax alllow you to do but mostly you want to make something relatively simple occur. As an eg in my game there was a long running, pretty pointless war between GB and Prussia (it was clear neither was really attacking the other), so I wrote a script just to impose peace. I ended an equally long drawn out Russo-Turkish war by imposing a peace and a province transfer.

The opening bit of code, best is to make it as simple as possible so something like this:

SelectFaction = $ITA
SelectRegion = $Suez
StartEvent = build_canals||1|1|NULL|NULL|$Suez|NULL

Ie its for Italy, it involves Suez, its called build_canals (sorting out a Suez problem), keep the rest of the syntax as |1|1|NULL|NULL|$location code|NULL and it should simply fire the once, do what you need and thats it.
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

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

Tue Jun 11, 2013 7:25 am

Kensai, Loki - how about kindly working out an introduction that explains the basics of how to use a script step by step for script repository intro purposes?

Even though it is the clean way to do it, personally I don't like fooling around with existing events if only due to potential mistakes and game updates changing things, or new event files due to the linking step, so I use the PlugIn file and a separate file noting all custom scripts run in a game for reference. My scripting knowledge is tenuous, and ephemeral unless specifically and clearly recorded (which is the reason fore collecting info).

User avatar
Kensai
Posts: 2712
Joined: Mon Sep 19, 2011 4:54 pm
Location: Freiburg, Germany

Thu Jun 13, 2013 8:56 am

You mean in the Wiki or our MP thread? Wiki is better. It is time to do this, I have been postponing this for ages. Tell me, what do you want to see first.

I am restarting my old effort. Now seriously.
Care to unify Germany as Austria? Recreate the Holy Roman Empire of the 20th Century:
Großdeutschland Mod
Are you tough enough to impersonate the Shogun and defy the Westerners? Prove it:
Shogun Defiance Mod (completed AAR)

User avatar
Random
AGEod Veteran
Posts: 779
Joined: Fri May 21, 2010 4:10 pm

Fri Jun 14, 2013 12:30 am

Successfully ran my first customized PON script to fix a minor but vexing anomalous colonial situation. What had happened was that region Akouge was a full French colonial territory but since it had a British Mission and Depot (from decades old British colonial actions) it still displayed the Union Jack. Mostly harmless but still irritating.

The pleasure derived when the little script fired exactly as written caused far greater satisfaction than is probably healthy but it's all good. Just wanted to say thanks to all you PON script writers out there for sharing your ideas and techniques.

-C

User avatar
Franciscus
Posts: 4571
Joined: Fri Apr 20, 2007 8:31 pm
Location: Portugal

Fri Jun 14, 2013 1:02 am

Beware...before you realize, instead of playing you will be enjoying yourselves in making events and debugging existing ones...and then, there will be no turning back...

...believe me, I know what I am talking about, I used to be a player... :bonk: :mdr: :wacko:

User avatar
Franciscus
Posts: 4571
Joined: Fri Apr 20, 2007 8:31 pm
Location: Portugal

Fri Jun 14, 2013 1:08 am

Gen. Monkey-Bear wrote:If I may, I also have a question on the topic. I think I read in the Wiki that it is better to mod with the Excel files instead of directly into the .scn files . . . is that true, or did I somehow misunderstand? Because if it is, then my questions are 1) What excel files? :bonk: and 2) How do I do that?


It is indeed true for serious modding...

The files are here:
http://www.ageod-forum.com/showthread.php?5358-Official-Files-for-modding&p=42555&viewfull=1#post42555

And also the devishly instructions and tools to turn excel files to scripts...

But I fear that the PON DB available there is not uptodate...

Regards

Gen. Monkey-Bear
Lieutenant Colonel
Posts: 262
Joined: Wed Jun 15, 2011 5:35 am
Location: The San Francisco Bay Area

Fri Jun 14, 2013 2:01 am

It is indeed true for serious modding...

The files are here:
http://www.ageod-forum.com/showthrea...ll=1#post42555

And also the devishly instructions and tools to turn excel files to scripts...


I suspected those were the ones. Thanks very much, Franciscus. And I suppose that this should also be of much help to me: http://www.ageod.net/agewiki/Modding_Campaigns_and_Scenarios

This is some tough stuff!

Return to “Pride of Nations”

Who is online

Users browsing this forum: No registered users and 26 guests