Page 1 of 1
A Nice to Have!
Posted: Mon Jun 22, 2009 4:24 pm
by Hobbes
Hi folks, just a thought for the future.
It would be nice to be able to give a player the option to carry out an action depending on the location of a certain unit.
For example I would like to add an option to build a stockade in whatever region a certain engineer unit is in
(with a check for time of year and number of units in stack etc)
Or it could be used to convert battoemen into a bateaux. It could make certain special units more useful.
Currently this is not possible as you have to hardcode the location for many of the script instructions.
If EvalUnqUnit gave the location of the unit to the program in a variable such as $UnitLoc then
$UnitLoc could be used instead of having to hardcode the region.
Cheers, Chris
Posted: Mon Jun 22, 2009 5:29 pm
by PhilThib
Good thought

Posted: Sat Aug 22, 2009 10:10 am
by Hobbes
Another use could be to create envoy or missionary type units. If EvalUnqUnit x and Indian Village at $UnitLoc then give options x,y,z to player.
Cheers, Chris
Posted: Mon Aug 31, 2009 3:59 pm
by Pocus
To pass the variable region to an historical option would be rather hard I believe. I could certainly have the region where is located a given unit as a variable which would be used within the actions segment of the same event though, but that's not exactly what you want I believe.
Posted: Mon Aug 31, 2009 4:02 pm
by tagwyn
Pocus: Get to work on VGN - please!! L3
Posted: Mon Aug 31, 2009 4:08 pm
by Pocus
This can be useful for VGN Tag... rest assured, we are not losing focus!
Posted: Tue May 11, 2010 9:21 pm
by Hobbes
Pocus wrote:To pass the variable region to an historical option would be rather hard I believe. I could certainly have the region where is located a given unit as a variable which would be used within the actions segment of the same event though, but that's not exactly what you want I believe.
I missed this!

To have it available for option triggering would be very nice - but even if it were just available in the actions segment of an event it would be very useful! I just found another example in King William's War where Frontenac arrives by sea but I don’t want him to take control of New France until he is safely on shore in a structure. I can’t think of any way of doing this at the moment unless I specify a single region he has to arrive at (not good for AI). If I could just check that whatever region he happens to be in contains a structure that would be great.
But I only mention this again in case it can be useful for VGN as well.
Cheers, Chris
Posted: Thu May 13, 2010 10:38 am
by Hobbes
Another nice to have (for future games

) would be a counter that could be used with probabilities
So for example $Iroquois_WarWeariness could be modified by several events and used in an
event to see if Iroquois units would be fixed.
Probability $Iroquois_WarWeariness or maybe even Probability (50 + $Iroquois_WarWeariness)
I can see many uses for this.
Cheers, Chris
Posted: Thu May 13, 2010 11:35 am
by lodilefty
You do know that probability already has some modification capability?
http://www.ageod.net/agewiki/Probability
The "trick" is that we'll need more commands that can stuff a value into
esvIntVar(x)
So far, I've found that the following commands use the external variables:
- Probability
- CountCtrlAreas
- CountVP
- ChgFacEngagementPts
Posted: Thu May 13, 2010 12:12 pm
by Hobbes
That's very interesting Lodi, I had no idea about this!
I'm fairly confused though, how are values currently stored with this method?
It would save a lot of work if this was available.
Thanks, Chris
EDIT: I understand now - so we just need a method of directly assigning a value and then being able to increase or decrease it.
It would certainly be of great help to scenario designers.
Posted: Mon May 17, 2010 8:59 am
by Pocus
There is something that work well, for everything, even if this is just an imaginative way of using something

You have the possibility to modify and check numeric variables in the script engine with
ChgEventOccurs/SetEventOccurs/ EvalEvent
Consider the number of occurrence as your numeric variable ... modify it and then evaluate it. Possibilities are already vast with that!
Posted: Mon May 17, 2010 11:44 am
by Hobbes
I can’t really see how this can help if the value cannot be used by the Probability command.
If I have a situation where say an Indian Tribe has a 2% base chance of being released each turn but this can be increased by 1% after other events have occurred such as sending an envoy or arms – then I will need 3 events. One with the 2% chance and two others with a 1% chance that only activate after the events mentioned above.
It would be far simpler to have one event with :-
Probability (2 + EnvoyVal + ArmsVal)
Cheers, Chris
Posted: Sat May 22, 2010 4:59 pm
by Hobbes
Another nice to have. Variables would be very useful.
ChgFacEngagementPts (10 + FurTradeMichilimackinac + FurTradeHudsonsBay + FurTradeStevensPoint + FurTradeIllinois - PrintMoney)
Cheers, Chris
Posted: Sun May 23, 2010 7:02 pm
by Hobbes
And one last one. It's not possible to trigger an event if say one Indian leader dies. If they are all alive or all dead you can fire an event but not if one dies - using a single event. I suppose this is the same as requesting the ability to use an OR.
Cheers, Chris
Posted: Sun May 23, 2010 8:28 pm
by Hobbes
I thought that was it - but I have thought of one more thing. I'm really not asking for any of these changes for WiA - just thoughts for future games.
Control of some structures in King William's War give added benefts - Port Royal will give the French a higher chance of seeing Corsairs in the area, St. Ignace will benefit the fur trade. It's not easy to show these sort of benefits to the player - so an optional region tooltip would be useful.
Cheers, Chris
EDIT: I suppose you could change the name of a region to something like :-
Saint Ignace: Fur Trade
But a proper tooltip would give a better explanation of the benefits.
Fur Trade: Control of this region will increase your EP by 1 per turn
Posted: Sun May 23, 2010 11:16 pm
by lodilefty
Hobbes wrote:And one last one. It's not possible to trigger an event if say one Indian leader dies. If they are all alive or all dead you can fire an event but not if one dies - using a single event. I suppose this is the same as requesting the ability to use an OR.
Cheers, Chris
I'm sure you know the Poor man's "OR":
StartEvent;Event_ldr_Dead_1|1|0|NULL|NULL|NULL|NULL
Conditions
EvalUnqUnit = Leader1;NOT
Actions
ChgEvtOccurs = evt_nam_Trigger;MaxOccurs;1
EndEvent
StartEvent;Event_ldr_Dead_2|1|0|NULL|NULL|NULL|NULL
Conditions
EvalUnqUnit = Leader2;NOT
Actions
ChgEvtOccurs = evt_nam_Trigger;MaxOccurs;1
EndEvent
StartEvent;Event_ldr_Dead_3|1|0|NULL|NULL|NULL|NULL
Conditions
EvalUnqUnit = Leader3;NOT
Actions
ChgEvtOccurs = evt_nam_Trigger;MaxOccurs;1
EndEvent
StartEvent;evt_nam_Trigger|0|0|NULL|NULL|NULL|NULL
Conditions
Actions
What you want to do if any one leader dies
EndEvent
As long as we have this, it's hard to ask for Pocus time to do a new one....
Ugly. But so is the world.

Posted: Sun May 23, 2010 11:19 pm
by lodilefty
Hobbes wrote:I thought that was it - but I have thought of one more thing. I'm really not asking for any of these changes for WiA - just thoughts for future games.
Control of some structures in King William's War give added benefts - Port Royal will give the French a higher chance of seeing Corsairs in the area, St. Ignace will benefit the fur trade. It's not easy to show these sort of benefits to the player - so an optional region tooltip would be useful.
Cheers, Chris
EDIT: I suppose you could change the name of a region to something like :-
Saint Ignace: Fur Trade
But a proper tooltip would give a better explanation of the benefits.
Fur Trade: Control of this region will increase your EP by 1 per turn
I used a PopUp text message every 3 months to remind the GBR player of benefits to controlling certain provinces... It looks like Tutorial popups:
http://www.ageod.net/agewiki/GenPopUpText
Posted: Sun May 23, 2010 11:21 pm
by lodilefty
Hobbes wrote:I thought that was it - but I have thought of one more thing. I'm really not asking for any of these changes for WiA - just thoughts for future games.
Control of some structures in King William's War give added benefts - Port Royal will give the French a higher chance of seeing Corsairs in the area, St. Ignace will benefit the fur trade. It's not easy to show these sort of benefits to the player - so an optional region tooltip would be useful.
Cheers, Chris
EDIT: I suppose you could change the name of a region to something like :-
Saint Ignace: Fur Trade
But a proper tooltip would give a better explanation of the benefits.
Fur Trade: Control of this region will increase your EP by 1 per turn
Even better:
http://www.ageod.net/agewiki/AddDynGraphic
You put in a little furry creature icon, and you even get to put a tooltip on it!!!!
Posted: Mon May 24, 2010 7:13 am
by Hobbes
I've heard the poor mans OR mentioned but never really considered how it might work. Thanks for all the ideas!
Cheers, Chris
Posted: Tue May 25, 2010 10:30 am
by Pocus
I was going to mention the Dynamic Graphic thing, that would be cool to see in actual use!! A fur icon would be neat

As for using variables, I would like to add more on that yes. Let me add that to my todo list at least!
Posted: Sat May 29, 2010 3:31 pm
by Hobbes
Pocus wrote:I was going to mention the Dynamic Graphic thing, that would be cool to see in actual use!! A fur icon would be neat

As for using variables, I would like to add more on that yes. Let me add that to my todo list at least!
One more for the list. It would be nice to be able to add full text events that don't need a Param4 Location Id to display them. Some events take place off map - and if it is a full text event you would always want it to be displayed.
Cheers, Chris
Posted: Sat May 29, 2010 4:38 pm
by lodilefty
Hobbes wrote: 
One more for the list. It would be nice to be able to add full text events that don't need a Param4 Location Id to display them. Some events take place off map - and if it is a full text event you would always want it to be displayed.
Cheers, Chris
Insert a GenTextMsg in conditions.....
http://www.ageod.net/agewiki/GenTextMsg
Added advantage is that you can put this in twice, once for each side by designating different faction for each.
Also, note
http://www.ageod.net/agewiki/agewiki_images/a/a8/Guide_to_multiple_messages_in_events.pdf
as it gives clues how to generate extra messages, or how to avoid ye olde duplicate message..

Posted: Sat May 29, 2010 6:54 pm
by Hobbes
Aha - I didn't realise that a display type of 2 would generate a full text message.
Thanks Lodi!
