Talk:FOCS Scripting Details

From FreeOrionWiki
Revision as of 02:31, 12 September 2004 by 66.102.65.89 (Talk)

Jump to: navigation, search

Drek's notes

Geoff's most recent version of the effect's document looks great to me; a good, simple baseline for v.3.

If during the design process, it turns out we need some of the stuff from my old document that isn't present in Geoff's (like multiplication for meters or picking a game object from a list to spawn for random events) then it can be added back in when needed.

-This is meant for v0.3 only... certainly later we can add more effects and conditions and the like, as well as other things we previously discussed, like multiple effects phases and such.

For now, I suggest using Geoff's document. Everything seems clearly explained. There's little I would debate present in the document. And it's obvious he put a lot of work into it.

Important additions to the conditions:

  • For starlane hops and direct distance, distance of 0 means every object within the same system as the parent.
  • Empire no parameters. If present, every object in the parent object's empire.
I don't follow what you mean... -Geoff
  • Galaxy Every object is tested.
  • Region Every object in a given region is tested.
-No "regions" for v0.3.
  • Self (true or false) the source object itself. true = the source object is effected regardless of other conditions false = not effected regardless of other conditions. Usage: for example, there might many effects that only effect the source object. The only listed condition would be Self=true. Self counts as a distance condition.
  • There must be a test for Focus. For example, if primaryfocus is farming then fire effect.

(Hrm, going to edit Geoff's thingy to include all of the above stuff. Pretty much need all of it.)


For empire afflition there was a good idea on the forums to make it like unix file permissions. There'd be flags for friends, enemies, and self empire--an effect could operate on any or all of the above. In addition, we need a condition that references a specific empire, for the Homeworld special. (Human Homeworld only works for the Federation, Klingon Homeworld only works for the Klingon Empire, etc.)

-We can do more with this when there are diplomacy options. It is currently possible to restrict effects to work on objects owned by a specific empire.

Effects that can spawn, destroy (or conditions that test) an object or object type should accept a list of objects.

-Not necessary. A 0-turn duration object can be spawned which has multiple createobject effects which each create a single other type of object.

A CreateRandomObject would be cool as a sister to CreateObject. (for events). For example, an effect might be a 1% chance of creating an event each turn, chosen from a list.

-Can perhaps be done by same mechanism as above. Have an object with an effect with a 1% chance of firing that creates a 0-turn duration object that has a bunch of createobject effects that all have the same stacking number... a bit of a cludge though... A list would be good for a later version, but I think there's enough in v0.3 right now.

Er, another thing. Eventually, it would be cool to have the option to base "Chance" off of a meter value, for spawning events. For example, a high happiness might reduce the chance of a government effect spawning a random riot.

-I saw this in your stuff, but didn't think it worth including in v0.3.

Don't know if it's useful or not yet, but was thinking that any numeric value (for example, for an effect operating on a ship's hitpoints or a planet's meter) should accept dice notation. (2d6+2= two six sided dice plus 2)

-I'd have said the same for this, but since you already wrote it in... I did limit the randomness to modification values though (not condition parameters).