Effects Strike Back
Moderator: Oberlus
Effects Strike Back
The newest version of the effects document:
http://www.freeorion.org/wiki/index.php?title=Effects
Messy. Will probably require some re-writing.
Comments welcome. What sucks? What have I missed?
Examples of buildings, specials, techs etc. that use these effects forthcoming. Hopefully, it'll make more sense with the examples.
Effects are only a piece of the puzzle. Also need definitions for each actor type: what attributes do buildings, techs, special, events etc. possess? In particular, still need a method of spawning specials at galaxy generation.
http://www.freeorion.org/wiki/index.php?title=Effects
Messy. Will probably require some re-writing.
Comments welcome. What sucks? What have I missed?
Examples of buildings, specials, techs etc. that use these effects forthcoming. Hopefully, it'll make more sense with the examples.
Effects are only a piece of the puzzle. Also need definitions for each actor type: what attributes do buildings, techs, special, events etc. possess? In particular, still need a method of spawning specials at galaxy generation.
Hmm, it's all very theoretical.
to me, Visibility makes no sense. Why should any effect depend on whether i can see f.i. a planet or not?
Chance, why did you set the default to 101, it's a little bit odd. if you want the effect to be applied in every case, set default to 100.
I'm not sure if we can design a effect system that detailed without buildings/leader ... which use them. It's hard to get a feeling about it.
to me, Visibility makes no sense. Why should any effect depend on whether i can see f.i. a planet or not?
Chance, why did you set the default to 101, it's a little bit odd. if you want the effect to be applied in every case, set default to 100.
I'm not sure if we can design a effect system that detailed without buildings/leader ... which use them. It's hard to get a feeling about it.
Press any key to continue or any other key to cancel.
Can COWs fly?
Can COWs fly?
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
I think I'll post my suggestions / comment in the forum this time... the wiki isn't well-suited for ongoing discussions
This sounds like the effect works on everything in its scope on a given turn, or doesn't work at all (all or nothing). There should be a capacity for each object in the scope to independently have a chance for the effect to work on it, independent of whether the effect works on other objects that turn.
I'm undecided about the visibility criteria... I wouldn't say it makes "no sense" as noelte did, but I'm not sure when it would be useful...
I not sure the whole chance scale business is necessary...
Side Issue: Are planets actors? Properties of planets? Are ships? If not, I don't think buildings, techs, specials, etc. should be "Actors". Rather, planets, empires, stars, buildings etc. should be "game objects", which when created, also spawn an "Actor" which is a grouping of effects. Otherwise, you'll need separate conditions to check if a star has planets of a certain type to have an effect work on it. These wouldn't fall under "actor", however things like buildings would... which is confusing and complicated.
Diplomatic Affiliation: See above list for terminology for scope vs. conditions.
Is this for v0.3 only? If so, you should note that more clearly at the top.
Execute Priority: Should also say that meter-altering effects must have priority 0.
And effects work in a particular order, but where do fleet movement, building stuff and other non-effect things fall in that order? See my previous suggestions for phases: Meter-accumulation, Pre-movement, Post-movement.
(more to come)
This is confusing. What do you mean by "this includes information" and "each object containing the target" ? what is a "planet effect" and what does it mean to "also target" something?# a Target: the epicenter of an Effect’s scope. This includes information for each object containing the target: a planet Effect would also target the planet’s system and the empire that owns the planet.
"scope" should be all restrictions placed on what objects an effect should work on. One scope restriction would be the ownership: empire of target object only, allies of target empire, enemies of target's empire, objects of all empires indepednent of target's empire. Another would be distance based: Target object only, objects in system/fleet with target, planet or objects on planet with target object, objects within X distance of target, objects within Y starlane hops of target, any object in galaxy. There's no need to separate them into "scope" and "condition", and doing so is confusing.# a Scope, defining how far the Effect reaches
# Conditions, which exclude objects within Scope
Chance The percent chance that the effect occurs. Each turn, a random roll of 1-100 is made. If the results of this roll are lower than “Chance”, then the effect occurs. Defaults to: 101, meaning no random roll takes place. The effect always occurs if chance is set to “101”.
This sounds like the effect works on everything in its scope on a given turn, or doesn't work at all (all or nothing). There should be a capacity for each object in the scope to independently have a chance for the effect to work on it, independent of whether the effect works on other objects that turn.
Should read "If the stacking flag is set to false, repeated actions of that type of effect do not work in the same turn.". As written, it sounds like the second time an effect works on an object in a turn, the action of the first working is undone.If the stacking flag is set to False, then the Effect is canceled if another Effect with the same name has already operated on the target in the Current Turn.
I'm undecided about the visibility criteria... I wouldn't say it makes "no sense" as noelte did, but I'm not sure when it would be useful...
I not sure the whole chance scale business is necessary...
Should say "At least one actor of the type indicated by each of the effect's actor conditions must be contained in each object in the effect's scope for the effect to work. If no objects of the required type are contained, the effect will not work."At least one Actor with the True flag must be contained by the tested object, or the effect cancels.
Side Issue: Are planets actors? Properties of planets? Are ships? If not, I don't think buildings, techs, specials, etc. should be "Actors". Rather, planets, empires, stars, buildings etc. should be "game objects", which when created, also spawn an "Actor" which is a grouping of effects. Otherwise, you'll need separate conditions to check if a star has planets of a certain type to have an effect work on it. These wouldn't fall under "actor", however things like buildings would... which is confusing and complicated.
Diplomatic Affiliation: See above list for terminology for scope vs. conditions.
Is this for v0.3 only? If so, you should note that more clearly at the top.
Execute Priority: Should also say that meter-altering effects must have priority 0.
And effects work in a particular order, but where do fleet movement, building stuff and other non-effect things fall in that order? See my previous suggestions for phases: Meter-accumulation, Pre-movement, Post-movement.
(more to come)
Some effects could be penalties assigned to the enemy. (perhaps a Privateers Base wrecking Trade) Visibility just says, if I don't know that planet Foo exists, then neither does my Privateers/whatevers.noelte wrote: to me, Visibility makes no sense. Why should any effect depend on whether i can see f.i. a planet or not?
Yeah.Chance, why did you set the default to 101, it's a little bit odd. if you want the effect to be applied in every case, set default to 100.
I thought of the types of buildings, events, specials etc that I'd like to see, then invented the effects those actors require. Examples will help, I think.I'm not sure if we can design a effect system that detailed without buildings/leader ... which use them. It's hard to get a feeling about it.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Generic Effects:
Destroy Actor: So this can't destroy ships, plaents etc? I think it'd be much simpler to destroy game objects, and thus have their associated actors disappaer, rather than have the actor be the game object, but only certain kinds of game object, and not others.
Modify Meter:
Also, change all the references to "stockpiles" to "meters" or somesuch... it's confusing now.
Spawn Actor: Needs to be explained better. Actors have lots of data in them that needs to be set, which can't be done at design-time. Specifically, the target and scope/conditions of some actors' effects need to be game objects. I suggest having the scope/conditions of the spawn actor effect determine which objects the effect works for. For each object the spawn actor effect works for, an actor of random type from list is created with its target set to the object.
It might be simpler to have actors themselves be stackable, rather than the list of actors in a spawn actor event have stacking properties...
what's an "event" ?
state explicitly that this is not "ever object in the galaxy" but is rather "the galaxy itself"
what does it mean to have an actor "attached to the galaxy or some other object not contained by an empire" ? Isn't the actor supposed to be a game object like a building or special? It sounds like the conceptual confusion here supports my suggestion of separating game objects and actors in practice and design.
(You seem to be presuming / specifying stuff about the implimentation... so I assume my doing so to limited degree is a good idea.)
Region Effects: call "tangent" "adjacent". Tangent has a specific meaning in math that's not really applicable here.
In all scope listings, "Self" is misleading. If actors are buildings and tech and speials and such, they could be located at one place (or not place) and have a target elsewhere. This should be "target only".
Or maybe you mean a building's target is always where it is located? If so, this is unnecessarily restrictive... should go with actor and object separation.
Destroy Actor: So this can't destroy ships, plaents etc? I think it'd be much simpler to destroy game objects, and thus have their associated actors disappaer, rather than have the actor be the game object, but only certain kinds of game object, and not others.
Modify Meter:
This is confusing. Call it "modify current value / modify max value" or "current/max".Infrastructure True or False.
Also, change all the references to "stockpiles" to "meters" or somesuch... it's confusing now.
Spawn Actor: Needs to be explained better. Actors have lots of data in them that needs to be set, which can't be done at design-time. Specifically, the target and scope/conditions of some actors' effects need to be game objects. I suggest having the scope/conditions of the spawn actor effect determine which objects the effect works for. For each object the spawn actor effect works for, an actor of random type from list is created with its target set to the object.
It might be simpler to have actors themselves be stackable, rather than the list of actors in a spawn actor event have stacking properties...
for now, the only galaxy effects are those used to spawn and destroy events.
what's an "event" ?
state explicitly that this is not "ever object in the galaxy" but is rather "the galaxy itself"
what do you mean by "usually" ? Can't the target be set to anything?The target of an Empire Effect is usually the empire containing the effect’s Actor. If the Actor is attached to the galaxy or a some other object not contained by an empire, then the target is usually “none”. If the target is “none” then the only scope possible is “Galactic”.
what does it mean to have an actor "attached to the galaxy or some other object not contained by an empire" ? Isn't the actor supposed to be a game object like a building or special? It sounds like the conceptual confusion here supports my suggestion of separating game objects and actors in practice and design.
Too complicated. Just have a single scope per effect, but have a range of scopes to cover all possibilities, as I've suggested above. (self, allies inc. self, allines not inc. self, enemies, all empires, etc.)A single Empire Effect can have multiple scopes (for example, an Effect could be set to both “Self” and “Neighbors”):
(You seem to be presuming / specifying stuff about the implimentation... so I assume my doing so to limited degree is a good idea.)
Region Effects: call "tangent" "adjacent". Tangent has a specific meaning in math that's not really applicable here.
Why would this need a default? Any why would it be good to have a default of 1? Why not random, or all ?Planet Slot The planet slot (1-10) to modify. Default is 1.
In all scope listings, "Self" is misleading. If actors are buildings and tech and speials and such, they could be located at one place (or not place) and have a target elsewhere. This should be "target only".
Or maybe you mean a building's target is always where it is located? If so, this is unnecessarily restrictive... should go with actor and object separation.
Thanks Geoff. I'll look over the document tommorrow and include some of your suggestions.
The difference between scope and conditions should be better explained. But they do need to be seprate concepts.
The word "Actor" is just shorthand. Instead of typing: "Buildings, events, racial picks, leader abilites, techs, government picks, blah blah blah", we can say "Actor".
But I see your point. Renaming that particular condition in the next revision to indicate that it can test for any game object, not just actors.
(Also, I've noticed a couple of conditions and one effect missing. Adding those in.)
An example of effects in action:
Spice (Planet Special)
Addictive to over half the known sentients in the galaxy, Spice brings big trade, at a cost of big trouble. Smugglers and junkies flock to the Desert worlds capable of supporting Spice.
Valuable Commodity: +10 Trade if this world has a Trade focus. Stackable.
Spice Smugglers: -10 Security on this planet
Spice Pirates: -10 Security to all planets in system
Spice Junkies: -5 Security to all systems within 3 starlane jumps
Unlock: Spice Guild and Exterminate Worms build projects for construction on this planet only,
Spice Guild (Building)
In an effort to control the ill-effects of Spice, the Spice Guild was founded from several former smuggler’s rings.
All of these effects are canceled if Spice special is lost.
Spice Tax: +5 Trade Empire-wide, not stackable
Exploiting Spice: +10 Trade if this world has a Trade focus
Guild Enforcers: +15 Security to all planets in system
Spice Guild Wars: 3% chance of spawning system event “Spice Wars” each turn. A security of 50 and above reduces this chance.
Unlock: Tech for research empire-wide, Unleashing the Mind's Potential
Spice Wars (Event)
Duration is ten turns, reduced by Security.
The leadership of the Spice Guild is thrown into turmoil. A war for control engulfs the system in bloody conflict.
Effect: -40 Security, Happiness, and Trade to all planets in system.
End of Spice Guild: 10% chance each turn of Spice Guild being destroyed.
If the Guild is lost/scrapped, the Spice Wars end
Exterminate Worms (Building)
After a lengthy and often dangeous effort, bounty hunters have succeeded in annhilating the worms responsible for creating Spice on planet X.
Effects: Destroy Self, Destroy Spice special on this planet
Unleashing the Mind's Potential (Tech)
Philosophers and freethinkers experimenting with Spice have discovered new layers of existance far above the mortal planes. While there is no way to interact with these far away places, gazing into these depthes has become a inspiration for scientists.
Effect:
Freethinking: Science +5 all planets, canceled if the empire has no Spice planet specials
Freethinking: -1 Security all planets, canceled if the empire has no Spice planet specials.
There are scopes available to planets (for instance) that are not available to empires. Where as conditions tend to be more generally useable.There's no need to separate them into "scope" and "condition", and doing so is confusing.
The difference between scope and conditions should be better explained. But they do need to be seprate concepts.
Buildings are still game objects. It doesn't really matter if effects are grouped together in one massive object, contained by the actual building object, or a seprate effect container: that's an implementation detail.Are planets actors? Properties of planets? Are ships? If not, I don't think buildings, techs, specials, etc. should be "Actors". Rather, planets, empires, stars, buildings etc. should be "game objects", which when created, also spawn an "Actor" which is a grouping of effects. Otherwise, you'll need separate conditions to check if a star has planets of a certain type to have an effect work on it. These wouldn't fall under "actor", however things like buildings would... which is confusing and complicated.
The word "Actor" is just shorthand. Instead of typing: "Buildings, events, racial picks, leader abilites, techs, government picks, blah blah blah", we can say "Actor".
But I see your point. Renaming that particular condition in the next revision to indicate that it can test for any game object, not just actors.
(Also, I've noticed a couple of conditions and one effect missing. Adding those in.)
An example of effects in action:
Spice (Planet Special)
Addictive to over half the known sentients in the galaxy, Spice brings big trade, at a cost of big trouble. Smugglers and junkies flock to the Desert worlds capable of supporting Spice.
Valuable Commodity: +10 Trade if this world has a Trade focus. Stackable.
Spice Smugglers: -10 Security on this planet
Spice Pirates: -10 Security to all planets in system
Spice Junkies: -5 Security to all systems within 3 starlane jumps
Unlock: Spice Guild and Exterminate Worms build projects for construction on this planet only,
Spice Guild (Building)
In an effort to control the ill-effects of Spice, the Spice Guild was founded from several former smuggler’s rings.
All of these effects are canceled if Spice special is lost.
Spice Tax: +5 Trade Empire-wide, not stackable
Exploiting Spice: +10 Trade if this world has a Trade focus
Guild Enforcers: +15 Security to all planets in system
Spice Guild Wars: 3% chance of spawning system event “Spice Wars” each turn. A security of 50 and above reduces this chance.
Unlock: Tech for research empire-wide, Unleashing the Mind's Potential
Spice Wars (Event)
Duration is ten turns, reduced by Security.
The leadership of the Spice Guild is thrown into turmoil. A war for control engulfs the system in bloody conflict.
Effect: -40 Security, Happiness, and Trade to all planets in system.
End of Spice Guild: 10% chance each turn of Spice Guild being destroyed.
If the Guild is lost/scrapped, the Spice Wars end
Exterminate Worms (Building)
After a lengthy and often dangeous effort, bounty hunters have succeeded in annhilating the worms responsible for creating Spice on planet X.
Effects: Destroy Self, Destroy Spice special on this planet
Unleashing the Mind's Potential (Tech)
Philosophers and freethinkers experimenting with Spice have discovered new layers of existance far above the mortal planes. While there is no way to interact with these far away places, gazing into these depthes has become a inspiration for scientists.
Effect:
Freethinking: Science +5 all planets, canceled if the empire has no Spice planet specials
Freethinking: -1 Security all planets, canceled if the empire has no Spice planet specials.
If we defined "Actor" by what it does instead of what it is, is an Actor an object that spawn and contain Effects? This comment is minor, as actors are also defined by their function: "Actors operate on the game world through Effects."drek wrote:The word "Actor" is just shorthand. Instead of typing: "Buildings, events, racial picks, leader abilites, techs, government picks, blah blah blah", we can say "Actor".
I could be a good idea (but I'm not sure it is the place) to define buildings, events, racial picks, leader abilites, techs, government picks, etc., at least relatively to the subject of effects.
I think Scope and Condition have very much in common. In fact, I think Scope is only a Condition, like "is inside a region defined by x,y,z..." (x,y,z... being positions, distances, maybe geometry). The way universe objects are stored (I assume it is not in a tree optimized for searching elements by their position, like a BSP tree) it is not more efficient to cull elements by position than by other conditions, like empire ownership or type (planet,system,ships,starlane). In other words, why do they need to be seprate concepts?
I'd kinda imagined that conditions were the conditions necessary for the target, and that Scope was the conditions necessary for the effects to be felt.
e.g. the 'Space Badger Stampede' can only take place on a planet (condition) with a space badger farming centre (more condition), but the effects are felt on all planets in the system (scope), unless they have an anti-badger-laser-deflection array installed (scope again).
Otherwise i agree that scope just seems to be a top level condition, and probably isnt worth keeping separate.
e.g. the 'Space Badger Stampede' can only take place on a planet (condition) with a space badger farming centre (more condition), but the effects are felt on all planets in the system (scope), unless they have an anti-badger-laser-deflection array installed (scope again).
Otherwise i agree that scope just seems to be a top level condition, and probably isnt worth keeping separate.
The COW Project : You have a spy in your midst.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
My conception is that there's no restrictions necessary on the target of an effect. The restrictions are a consequence of the restrictions on the scope of a given "spawnactor" effect.Daveybaby wrote:I'd kinda imagined that conditions were the conditions necessary for the target, and that Scope was the conditions necessary for the effects to be felt.
When a spawnactor effect "fires" on a game object in its scope, it creates actor(s) with effect(s) targeted on that game object. The scope of the spawnactor effect limits the possible targets of the new actor's effects.
The new actor's effects (and the effects of the old actor with the spawnactor effect that created the new actor) would have various restrictions on what they would fire on, which would be their scope / conditions.
Also, I think "target" might be better written as "source", as the "target" of an effect isn't necessarily in the effect's scope. The target/source is really only important for a) it's physical location (distance on game map, coolocated in system or fleet with other objects) and b) the empre that owns it. We might add other conditions that make the type of object that is the target important, I guess, but that seems needlessly complicated, when separate effect types would do the same job.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
It's kinda hard to make the distincton between implimentation and design for this... What I was writing there isn't any more implimentationy than what's in the wiki, is it?
To rephrase:
We don't need limitations ("conditions") on the types of objects that can be a source/target of a type of effect. The target/source is only indirectly related to what objects the effect will work on (the scope): by distance or empire affiliation.
When a "Spawn Actor" effect fires, the objects in its scope are possible sources/target for effects of the actor that is created.
To rephrase:
We don't need limitations ("conditions") on the types of objects that can be a source/target of a type of effect. The target/source is only indirectly related to what objects the effect will work on (the scope): by distance or empire affiliation.
When a "Spawn Actor" effect fires, the objects in its scope are possible sources/target for effects of the actor that is created.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
It might help to have a separate, clear & concise defintion of an actor, either in the effects section or in the main requirements doc. They don't seem to be of much importance at this point. Finding what they are and aren't requires some searching and piecing together of various references to them.