- Joined
- Jan 24, 2011
- Messages
- 4,896
Now that TNO is back and stabilizing ToTPP 1.4, I thought I’d start a thread for designers to run through some ideas about how they’d like to use lua.
I want to know if it would be possible to use lua to cut down on the tedious tasks in one of my projects.
I’ve been working on a multiplayer scenario that depicts the Allied strategic bombing campaign over Germany. It has gone through a few versions. The latest version was grand, but not much fun. The reason it wasn’t fun is that it became tedious due to the large number of units that had nothing to do with the air war.
I tried to simulate the German economy / bomber offensive against it by having this sequence:
-Events check to see if Germany controls a city in occupied territories (France, Denmark, etc.)
-Each turn, “raw materials” units spawn in those cities
-raw materials are brought to a central location/killed – this gives German civ money
-money is spent to buy expensive trade units which then trade with “industry” cities to fuel research
-research is entitled “production sequence” – researching it spawns “finished goods” unit
-finished goods unit is brought to central location/killed, this gives Luftwaffe civ money to buy aircraft
By forcing a deficit on the Luftwaffe, I forced the player to go through this industrial sequence to keep the lights on and buy more aircraft.
Did it work? Yes. Was it fun? No. It made a scenario that was supposed to be about the air campaign instead a scenario where maybe 10 minutes was spent in the air, and 50-60 was spent moving around rail cars.
Again, could lua be used to automate tedious tasks? Specifically:
1.
-If TNO does add transport capabilities for air units to carry air units (bombs), then I’d want bombers to carry bomb units. Loading them up would be a tedious task. Imagine trying to put 1-3 bombs on each of 30-50 bombers about to leave. It would take forever. It wouldn’t be fun.
-Is it possible to have a scrip that basically:
@IF
Bomber in City
@And
Doesn’t have a bomb attached
@THEN
Create (# of) Bomb Unit(s) and attach to bomber?
So, basically any time that a bomber is in a friendly city at the start of a turn, it gets loaded with a bomb automatically, and all the player has to do is take off and go destroy something.
2.
-Is it possible to abstractly represent the French Resistance (and also create a real need for the German player to build ground units, but not necessarily have to move them each turn) by doing something like this:
@IF
Unit type=German Army
Threshold=100
@And
Location [map coordinate box, like an area in France--but any of the 100 units could be anywhere in the box so long as 100 are somewhere in the box]
@THEN
Give Money
Who=German
How much=$10,000
BUT
@IF
Unit type=German Army
Threshold=80
@And
Location [map coordinate box, like an area in France]
@THEN
Give Money
Who=German
How much=$8,000 (less money because less German army units to keep resistance at bay)
Basically, making it so that the Allies have a reason to attack German army units and the Germans have a reason to build them and station them in France (or wherever).
3.
-Is it possible to automate the movement of certain units every turn before the player touches them? I would want the game to check for a unit (like a train) and move it along a certain path to its destination without making the player interact with it to save time.
If #1 is possible, then it makes sense to incorporate bomb-carrying bombers into this scenario. If it isn’t, then that feature would be “cool” but will also make the scenario a pain to play.
If #2 is possible, then I can basically use it to simulate the entire economy without having to have a million units move around (I could check for factories, sub pens, whatever I want).
If #3 is possible, then I can still have opportunities for Allied fighter bombers to attack trains without making the movement of those trains too burdensome for the Germany player.
TNO has gone to tremendous trouble to give us this tool so I would love to understand it better and incorporate it!
I want to know if it would be possible to use lua to cut down on the tedious tasks in one of my projects.
I’ve been working on a multiplayer scenario that depicts the Allied strategic bombing campaign over Germany. It has gone through a few versions. The latest version was grand, but not much fun. The reason it wasn’t fun is that it became tedious due to the large number of units that had nothing to do with the air war.
I tried to simulate the German economy / bomber offensive against it by having this sequence:
-Events check to see if Germany controls a city in occupied territories (France, Denmark, etc.)
-Each turn, “raw materials” units spawn in those cities
-raw materials are brought to a central location/killed – this gives German civ money
-money is spent to buy expensive trade units which then trade with “industry” cities to fuel research
-research is entitled “production sequence” – researching it spawns “finished goods” unit
-finished goods unit is brought to central location/killed, this gives Luftwaffe civ money to buy aircraft
By forcing a deficit on the Luftwaffe, I forced the player to go through this industrial sequence to keep the lights on and buy more aircraft.
Did it work? Yes. Was it fun? No. It made a scenario that was supposed to be about the air campaign instead a scenario where maybe 10 minutes was spent in the air, and 50-60 was spent moving around rail cars.
Again, could lua be used to automate tedious tasks? Specifically:
1.
-If TNO does add transport capabilities for air units to carry air units (bombs), then I’d want bombers to carry bomb units. Loading them up would be a tedious task. Imagine trying to put 1-3 bombs on each of 30-50 bombers about to leave. It would take forever. It wouldn’t be fun.
-Is it possible to have a scrip that basically:
@IF
Bomber in City
@And
Doesn’t have a bomb attached
@THEN
Create (# of) Bomb Unit(s) and attach to bomber?
So, basically any time that a bomber is in a friendly city at the start of a turn, it gets loaded with a bomb automatically, and all the player has to do is take off and go destroy something.
2.
-Is it possible to abstractly represent the French Resistance (and also create a real need for the German player to build ground units, but not necessarily have to move them each turn) by doing something like this:
@IF
Unit type=German Army
Threshold=100
@And
Location [map coordinate box, like an area in France--but any of the 100 units could be anywhere in the box so long as 100 are somewhere in the box]
@THEN
Give Money
Who=German
How much=$10,000
BUT
@IF
Unit type=German Army
Threshold=80
@And
Location [map coordinate box, like an area in France]
@THEN
Give Money
Who=German
How much=$8,000 (less money because less German army units to keep resistance at bay)
Basically, making it so that the Allies have a reason to attack German army units and the Germans have a reason to build them and station them in France (or wherever).
3.
-Is it possible to automate the movement of certain units every turn before the player touches them? I would want the game to check for a unit (like a train) and move it along a certain path to its destination without making the player interact with it to save time.
If #1 is possible, then it makes sense to incorporate bomb-carrying bombers into this scenario. If it isn’t, then that feature would be “cool” but will also make the scenario a pain to play.
If #2 is possible, then I can basically use it to simulate the entire economy without having to have a million units move around (I could check for factories, sub pens, whatever I want).
If #3 is possible, then I can still have opportunities for Allied fighter bombers to attack trains without making the movement of those trains too burdensome for the Germany player.
TNO has gone to tremendous trouble to give us this tool so I would love to understand it better and incorporate it!