If anyone is interested, here's a description of how the actual scripting is going. Also, if any scripters have any ideas on how to solve any of the problems encountered, I'd like to know!
My goal right now is to create a system that can depict realistic and complex military campaigns, taking place at the same time-scale as the historic campaigns. A large army moving through enemy territory might send out scouts as it goes. Small enemy bands might hover behind it picking off stragglers or ambushing foragers, trying to whittle down the force or prevent it from replenishing its supplies.
I think all of this is possible to script. However, it will probably make for a more slow-paced game than Native, when at times there is relatively little for player characters to do. Players might have to be prepared to spend some time watching the action unfold around them. Hopefully the action will at least be interesting to watch. Consider this all something of an experiment!
I received the Python files a little early, and spent a few weeks experimenting with hiding, ambushing, and camping.
In order to allow the AI to make complex decisions that are part of a larger strategic plan, AI parties have three different kinds of behavior -- tactical (the AI's reaction to immediate threats), operational (representing logistical, route-planning, or other somewhat less immediate decisions), and strategic (meaning the party's overall goal).
Most of my work so far has been done on the tactical AI. I set the spotting range for the game'e internal engine to zero. This means that spotting, and decisions to pursue and flee, are now handled by the scripts. In order to avoid too stiff a penalty to FPS, I spread out the spotting routines so that the engine only handles spot checks for a handful of parties at a time.
Both the player and the AI parties have the opportunity to hide if they see an enemy. The AI will make this decision if it has a good chance of hiding. Ideally, I'd like the parties to hide if they calculate that they have a better chance of hiding then escaping, but I can't get the speed of the relative parties that would allow me to do this.
Bandits and other parties will also go on ambush themselves -- scouting for a bit of good terrain on an elevated hill (elevation now affects spotting) and hiding there, waiting for enemies to come by, and then charging down on them.
If one side in a battle has not been spotted, then it gets to ambush the opponent. These work, sort of. The enemy marches in column past your position, without charging or attacking. (However, they do turn to look at you as they march). If you attack, they will eventually realize your presence and react. Sometimes it doesn't feel quite right, but sometimes it yields fun results -- like when you charge a column of horsemen, and they start to react only a second or so before you slam into them.
In theory, the player should also be able to be ambushed -- although I have not tried out of a way to keep the player himself from running off and attacking the ambushing force by himself while the rest of his party plods on, unaware of the danger. I could presumably keep a one-way barrier between the player and the enemy until such time as the ambush is sprung, to block both missile fire and movement. Any thoughts on this would be much appreciated.
At some point, I would like to add in a version of Extended Gameplay's morale. It seems to work really well, and one big advantage of an ambush should be the morale impact on the defenders.
I would really like to be able to add baggage animals to forces on the battlefield, particularly the columns of troops who get ambushed. I was able to do this in an earlier version about a year or so ago, but unfortunately now I cannot get the spawn_horse operation to work. I also do not know if I can get riderless horses to move.
I would also like to do nighttime camp attacks, but I have not yet figured out a good way to implement them. I don't think spawn_agent works yet, or presumably I could have characters spawn near a tent or campfire as they wake up. However, this would take a lot of work, and it also should be very difficult for a player to pull off successfully. I intend to attach a lot of penalties to moving at night -- you might have troops will get lost, for example -- so that the default behavior should be to camp and fast forward through the hours of darkness.
I have also introduced forced marching and fatigue to the world map. Parties that flee from another party or pursue another party will move much more quickly, but will also begin to tire out. Fatigued parties will rest, and at night they will camp.
Anyway, I am fairly satisfied with these scripts, for the time being. I am now moving on to the basics of the strategic and operational systems, but I will be returning to the tactical stuff later as the game moves along.
My goal right now is to create a system that can depict realistic and complex military campaigns, taking place at the same time-scale as the historic campaigns. A large army moving through enemy territory might send out scouts as it goes. Small enemy bands might hover behind it picking off stragglers or ambushing foragers, trying to whittle down the force or prevent it from replenishing its supplies.
I think all of this is possible to script. However, it will probably make for a more slow-paced game than Native, when at times there is relatively little for player characters to do. Players might have to be prepared to spend some time watching the action unfold around them. Hopefully the action will at least be interesting to watch. Consider this all something of an experiment!
I received the Python files a little early, and spent a few weeks experimenting with hiding, ambushing, and camping.
In order to allow the AI to make complex decisions that are part of a larger strategic plan, AI parties have three different kinds of behavior -- tactical (the AI's reaction to immediate threats), operational (representing logistical, route-planning, or other somewhat less immediate decisions), and strategic (meaning the party's overall goal).
Most of my work so far has been done on the tactical AI. I set the spotting range for the game'e internal engine to zero. This means that spotting, and decisions to pursue and flee, are now handled by the scripts. In order to avoid too stiff a penalty to FPS, I spread out the spotting routines so that the engine only handles spot checks for a handful of parties at a time.
Both the player and the AI parties have the opportunity to hide if they see an enemy. The AI will make this decision if it has a good chance of hiding. Ideally, I'd like the parties to hide if they calculate that they have a better chance of hiding then escaping, but I can't get the speed of the relative parties that would allow me to do this.
Bandits and other parties will also go on ambush themselves -- scouting for a bit of good terrain on an elevated hill (elevation now affects spotting) and hiding there, waiting for enemies to come by, and then charging down on them.
If one side in a battle has not been spotted, then it gets to ambush the opponent. These work, sort of. The enemy marches in column past your position, without charging or attacking. (However, they do turn to look at you as they march). If you attack, they will eventually realize your presence and react. Sometimes it doesn't feel quite right, but sometimes it yields fun results -- like when you charge a column of horsemen, and they start to react only a second or so before you slam into them.
In theory, the player should also be able to be ambushed -- although I have not tried out of a way to keep the player himself from running off and attacking the ambushing force by himself while the rest of his party plods on, unaware of the danger. I could presumably keep a one-way barrier between the player and the enemy until such time as the ambush is sprung, to block both missile fire and movement. Any thoughts on this would be much appreciated.
At some point, I would like to add in a version of Extended Gameplay's morale. It seems to work really well, and one big advantage of an ambush should be the morale impact on the defenders.
I would really like to be able to add baggage animals to forces on the battlefield, particularly the columns of troops who get ambushed. I was able to do this in an earlier version about a year or so ago, but unfortunately now I cannot get the spawn_horse operation to work. I also do not know if I can get riderless horses to move.
I would also like to do nighttime camp attacks, but I have not yet figured out a good way to implement them. I don't think spawn_agent works yet, or presumably I could have characters spawn near a tent or campfire as they wake up. However, this would take a lot of work, and it also should be very difficult for a player to pull off successfully. I intend to attach a lot of penalties to moving at night -- you might have troops will get lost, for example -- so that the default behavior should be to camp and fast forward through the hours of darkness.
I have also introduced forced marching and fatigue to the world map. Parties that flee from another party or pursue another party will move much more quickly, but will also begin to tire out. Fatigued parties will rest, and at night they will camp.
Anyway, I am fairly satisfied with these scripts, for the time being. I am now moving on to the basics of the strategic and operational systems, but I will be returning to the tactical stuff later as the game moves along.