Difference between revisions of "Talk:FOCS Scripting Details"

From FreeOrionWiki
Jump to: navigation, search
Line 11: Line 11:
 
*  For starlane hops and direct distance, distance of 0 means every object within the same system as the parent.
 
*  For starlane hops and direct distance, distance of 0 means every object within the same system as the parent.
  
* 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 (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.
 +
 
 +
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, all contained by the same byteIn 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.)
 +
 
 +
Effects that can spawn, destroy (or conditions that test) an object or object type should accept a list of objects.
 +
 
 +
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.
 +
 
 +
 
  
 
Er, another thing.  Eventually, it would be cool to have the option to base "Chance" off of a meter value, for spawning events.
 
Er, another thing.  Eventually, it would be cool to have the option to base "Chance" off of a meter value, for spawning events.
  
 
Thanks!
 
Thanks!

Revision as of 23:58, 11 September 2004

Drek's note

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.

For now, I suggest using Geoff's document as is. 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.

Couple minor additions to the conditions:

  • For starlane hops and direct distance, distance of 0 means every object within the same system as the parent.
  • 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.

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, all contained by the same byte. 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.)

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

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.


Er, another thing. Eventually, it would be cool to have the option to base "Chance" off of a meter value, for spawning events.

Thanks!