 |
|  |
 |
|
Harry Tuttle

|
 |
of the Hoople Heads
Mar 2003 time: 00:18
|
|
Ok folks, the Freeciv developers have taken to heart some of the ideas we had for Freeciv that had to do with creating a more scenario modding friendly version or add-on to the game.
In short, they have started work on a Freeciv Events language! 
So yes, in addition to all the other neat things about Freeciv it will, in a while, be possible to create events for the game, very similar to the kinds of events we have in Civ2 and Civ 2 ToT.
CapTVK and Vasc, proponents and designers of the game, have asked for our input as to what sort of events to include with Events language. The language will be in Lua.
To quote Cap's PM:
Now these threads can be used to post ideas about the events, but I think we can come up with some ideas pretty quickly here in this thread, just to make things simpler.
They already have a list of Civ2 MGE events, but we need a list of the Civ2 ToT events. If anyone can provide this it will be much appreciated! 
Also, and let your mind abound in the possibilities, we need some additional ideas for events. Yes, events beyond the constraints of the Civ engine!
-------------------------------------------------------------------
My ideas:
1) A schism (a civil war, ie. seperation of a civ's cities into two different civs) is created in Civ2 almost by chance when a capital city is captured. I propose an event that would designate any city in an empire to be that trigger. In fact, why not expand on that. Have the trigger be anything, from the death of a certain unit, to a tech discovered, to a certain date or game turn, to a specific city being captured. Also, in that event certain cities can be designated as being seceding cities, allowing for a true depiction of an historic Civil War.
2) In certain utilities made for Civ2 (Civswap) it is possible, upon an autosave for a seperate BAT file to be run, which switches out certain files in a directory. An event that would cause a program to be run on a computer would be wonderful.
3) Keystone triggers, similar to the events in Civ 2 ToT. Once numerous triggers have been satisfied a "keystone" trigger is tripped, causing an event. For example: "Brits capture New York, Brits capture Boston, Brits gain War Funds tech ---> Americans lose war, GAME OVER" This would simplify the events string and would free up time and space for scenario designers by making the triggers leading to GAME OVER much shorter and compact.
4) Creating mulitple spawn points for units when event is triggered.
5) A captured unit event. This has always been a pain when dealing with diplomats. Diplomats in civ2 can bribe just about anything as long as the bribing Civ has cash. How about an event that knows when a unit or Civ has been bribed. This trigger would allow other triggers to be satisfied.
6) A MACRO event that designates the overall path that a civ will take in war. Let's say: "Upon tech gained "Barbarosa", the German civ will attack these cities first, with these kinds of units only.
7) An event that will designate civ behavior during a certain time period, from tech to tech, unit killed, etc... For example: During Game Turn 10 - 20, Spanish civ will be passive. Game Turn 11-30 Spanish civ will be aggressive. This would depict doctrine during certain Monarchies.
In all, I think that an open tree structure would do well when creating the events. If it is possible, allow for a scenario designer to create his own triggers upon a large number of variables and allow a large number of possible outcomes. Examples of events that allow a designer to designate:
- Macro economic conditions (forest terrain gets +1 shield after "Saw Blade" tech acquired)
- Unit Spawn area polygons (Tiles 33, 10 by 55, 15)
- War Plan conditions (Attack Boston, Attack New York, with Musketeers)
...would be much appreciated. 
|
|
|  |
 |
|  |
 |
|
Vasc
|
 |
Lisboa, Portugal
May 2000 time: 05:18
|
|
Thanks for nicely summing it up Harry. 
You also made lots of interesting suggestions I will comment here. Before however, I would like to once again mention you can find the current work in progress Events scripting specification here:
http://www.freeciv.org/index.php/Events_specification
You can edit the "Talk" page to put your comments, questions or ideas here:
http://www.freeciv.org/index.php/Ta...s_specification
It is a Wiki, just like Wikipedia. If you can post on this board, you can easily edit there as well.
To make Freeciv Events more clear, because you use probably use different names for similar concepts...
In Freeciv Events:
* a "signal" is something like "unit_death", "city_conquered", "tech_discovered", etc.
* a "callback" is a function (i.e. list of actions or commands) invoked when that "signal" is emited.
* You may have several "callbacks" attached to a "signal".
* A "callback" can destroy itself. This is useful for something you wish to only happen once or twice for example.
* There is a mini database ('store' module), which you can use to store or retrieve numbers. It will be persistent across load/saves.
Now to the matter at hand...
quote: Originally posted by Harry Tuttle
My ideas:
1) A schism (a civil war, ie. seperation of a civ's cities into two different civs) is created in Civ2 almost by chance when a capital city is captured. I propose an event that would designate any city in an empire to be that trigger. In fact, why not expand on that. Have the trigger be anything, from the death of a certain unit, to a tech discovered, to a certain date or game turn, to a specific city being captured. Also, in that event certain cities can be designated as being seceding cities, allowing for a true depiction of an historic Civil War.
|
This is a very nice idea! We can make a schism action which can be triggered by any signal (e.g. city capture, unit death, tech discovered, etc).
quote: Originally posted by Harry Tuttle
2) In certain utilities made for Civ2 (Civswap) it is possible, upon an autosave for a seperate BAT file to be run, which switches out certain files in a directory. An event that would cause a program to be run on a computer would be wonderful.
|
I am not sure of the utility of this. In Freeciv the graphics format is veery flexible. You can define in the tilespec files exactly on which file and which rectangle some image is. Could you give an example where this feature would be useful?
quote: Originally posted by Harry Tuttle
3) Keystone triggers, similar to the events in Civ 2 ToT. Once numerous triggers have been satisfied a "keystone" trigger is tripped, causing an event. For example: "Brits capture New York, Brits capture Boston, Brits gain War Funds tech ---> Americans lose war, GAME OVER" This would simplify the events string and would free up time and space for scenario designers by making the triggers leading to GAME OVER much shorter and compact.
|
This is very interesting. I had not considered the usefulness of having something triggered by multiple signals. Using the current concept this is possible, although it could be easier. We will try to figure out some way to make it easier for you to write something like this.
quote: Originally posted by Harry Tuttle
4) Creating mulitple spawn points for units when event is triggered.
|
The idea we were having was to allow you to create a unit in any point of the map you wish, anytime you wish.
quote: Originally posted by Harry Tuttle
5) A captured unit event. This has always been a pain when dealing with diplomats. Diplomats in civ2 can bribe just about anything as long as the bribing Civ has cash. How about an event that knows when a unit or Civ has been bribed. This trigger would allow other triggers to be satisfied.
|
Also very interesting.
quote: Originally posted by Harry Tuttle
6) A MACRO event that designates the overall path that a civ will take in war. Let's say: "Upon tech gained "Barbarosa", the German civ will attack these cities first, with these kinds of units only.
7) An event that will designate civ behavior during a certain time period, from tech to tech, unit killed, etc... For example: During Game Turn 10 - 20, Spanish civ will be passive. Game Turn 11-30 Spanish civ will be aggressive. This would depict doctrine during certain Monarchies.
|
This sort of interaction would require messing with the AI behaviour. I will ask the people responsible for that.
quote: Originally posted by Harry Tuttle
In all, I think that an open tree structure would do well when creating the events. If it is possible, allow for a scenario designer to create his own triggers upon a large number of variables and allow a large number of possible outcomes. Examples of events that allow a designer to designate:
- Macro economic conditions (forest terrain gets +1 shield after "Saw Blade" tech acquired)
|
This will be possible in the next version using a different mechanism than Events. We call that Effects. Effects allow any government, nation, technology, or building to grant bonuses like that. We currently use it for building bonuses (think Colossus trade bonus or Marketplace bonus, etc) and are moving governments to use it as well.
quote: Originally posted by Harry Tuttle
- Unit Spawn area polygons (Tiles 33, 10 by 55, 15)
|
I am not sure I understand this concept very well. Like I said, we were thinking about allowing you to create a unit in a specific tile. How would something like this work?
quote: Originally posted by Harry Tuttle
- War Plan conditions (Attack Boston, Attack New York, with Musketeers)
|
Requires AI interaction, will ask. 
quote: Originally posted by Harry Tuttle
...would be much appreciated. |
We will try our best, even if it may take a while, since we work on our spare time, but we do it with passion, just like you do. Hopefully we will have something out before the summer. Thank you for all the nice ideas!
|
|
|  |
 |
|
Harry Tuttle

|
 |
of the Hoople Heads
Mar 2003 time: 00:18
|
|
Thanks for your response Vasc and also to everyone else who has contributed. Vasc I'll try to explain the items that you had questions on:
2) As with any game some users like to use utility programs to accomplish large tasks at once or to keep a running tally of units destroyed, etc, etc. While many of the features that Civ2 utilities perform are already incorporated into Freeciv there may come a time where tournament players or scenario designers might want to incorporate something beyond Freeciv's engine into the "gameplay experience". Creating a "callback" that can run a program on a desktop leaves the door open to addition, without having to edit the code. In this way Freeciv can be modulized for easy expansion, allowing for further additions, in case a scenario designer or tournament player wants to do something new and crazy.
Also, and I may be guessing here, but this sort of thing would allow for an easy way to increase the playability of Freeciv with other applications...
- Unit Spawn Polygons. This idea is a bit of a stretch, but in the Civ2 event engine an action that can be performed is "change terrain". This event changes the terrain in a four point diagonal polygon on the game board. All terrain within the four point coordinates, upon the event being triggered, is changed to the type of terrain specified. A Unit Spawn Polygon would create specified units within a four point area, creating multiple units, at once, without having to designate each tile that a unit will appear on. For example, if the scenario "Red Front" were remade for Freeciv, the German civ (played by the AI), would have whole armies of units created at once, instead of having each unit spawn point spelled out in the event file. This is just a quick and dirty expansion of the singular unit creation event.
|
|
|  |
 |
|
Vasc
|
 |
Lisboa, Portugal
May 2000 time: 05:18
|
|
Hello folks,
Lots of interesting ideas. I will try to elaborate some more by giving you an example of how this will work in practice using Freeciv events.
For example: imagine you wanted the first player to enter a certain hut in your scenario to get a free Armor unit and a custom text message:
code:
function my_callback(unit)
if unit.tile == find.tile(25, 22) then
create_unit(unit.owner, unit.tile, "Armor", FALSE, unit.homecity, 0)
notify.player(unit.owner, "Guderian's lost Panzer division joins you.")
end
end
signal_connect("hut_enter", "my_callback")
Using the specification at:
http://www.freeciv.org/index.php/Events_specification
signal_connect connects the my_callback callback function to the hut_enter signal. This means whenever a unit enters a hut, my_callback will be invoked.
create_unit is an action.
|
|
|  |
 |
|
Vasc
|
 |
Lisboa, Portugal
May 2000 time: 05:18
|
|
quote: Originally posted by Harry Tuttle
Vasc, what's the deal with huts? Are these random easter eggs on the game board? Can they be placed by a scenario designer? Can they be disabled? |
Huts aka villages are the goody huts we have had since the original Civilization where you usually get a free technology, free mercenary unit, free city, free gold, or unleashed a barbarian horde.
I used this as an example, because we intend to make their behaviour implemented as much as possible using only the events system instead of hard-coding it in C as we do now.
On Freeciv they can be randomly placed by the map generator, or selectively placed by a scenario designer on a custom map.
This is just one example of a signal you will be able to hook into and unleash an action. More signals could be start_turn, end_turn, unit_destroyed, city_destroyed, player_destroyed, tech_discovered, building_finished etc (I am just giving examples, but the final names may be different).
Last edited by Vasc on 01-05-2005 at 00:04
|
|
|  |
 |
|
Per
|
|
What AI behaviours would it be desirable to be able to script?
(Please do not go overboard on this one. The AI will not be scripted, that would be way too slow, but some goals and behaviour may opened up for modification by events.)
Right now I'm thinking:
- being able to set the 'AI personality'
- allow/freeze diplomacy for each AI player
- add desire to achieve a certain tech
- add desire to attack a certain city (for all units)
- add desire to build a certain building (for all cities)
|
|
|  |
 |
|
Per
|
|
I am under the impression that much of the AI's diplomacy with other players can be modified in civ2. How is this done?
More importantly - how can we do it better? (This can theoretically be scripted, since speed is not really an issue.)
|
|
|  |
 |
|
AGRICOLA
|
|
Canadian bush & Florida
Feb 2003 time: 00:18
|
|
One of the many weaknesses of CIV2 events is in the CREATEUNIT command for AI civs. I don't know if the command creates the unit(s) during the AI civ's turn or at the beginning of a player's turn. In either case, AI units are created stillborn, with no movement points. This deprives scen designers of the ability to launch a real AI surprise attack.
In his Rising Sun scen, Patine has tried to simulate the surprise Doolittle raid on Japan. To do so he has used events to created a stack of US naval units and bombers offshore of Tokyo. A Japanese player can locate and destroy the stack before the raid can be launched.
Another example are the German units in Red Front which are spawned on the pontoon bridge west of Stalingrad. They are immobile and subject to Soviet attacks before they themselves can attack the city.
1. Do SL scen designers consider it desireable to be able to create AI units with full movement, or have full movement as an option?
2. If the answer is yes, can Freeciv developers do the necessary programming?
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:18. Apolyton Time is 00:18. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|