A collection of heads

For topics that do not fit in another sub-forum.

Moderators: Oberlus, Oberlus

Message
Author
yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

A collection of heads

#1 Post by yandonman » Sat Nov 23, 2013 7:47 am

This is just me daydreaming a bit about a game mechanic I would like to see. It would add some interesting depth to the late game.

What to do with the emperor when you take over an empire?

When you capture the capitol of an empire, a dialog box would pop up offering you a choice of what to do with the emperor of that empire.

a) Execute him and place his head on a spike at his former capitol. Enemies within 4 starlanes would cower in fear, reducing their shields by 1 and weapons by 1. This malus is cumulative if the range of the heads on the spikes overlap.
HeadOnASpike.jpg
HeadOnASpike.jpg (14.03 KiB) Viewed 1793 times
b) Interrogate him and get a small empire wide bonus based on 10% of one of the emperor's natural bonuses. For example, a Trith emperor might give a +5 detection range bonus, based off of Trith's natural Great Detection Range: +50 bonus. You then mount his head on your trophy wall, which would likely show up on the top panel: a skull for each head you've taken. Hovering over the skulls would list the bonuses you've accrued. Bonuses are cumulative.
ACollectionOfHeads.jpg
ACollectionOfHeads.jpg (16.2 KiB) Viewed 1793 times
c) Offer him a place in your empire. The emperor would become your lieutenant, or more accurately, a lord in your feudal system.
  • The lieutenant/lord would effectively act as your ally.
  • You can assign ships, fleets and planets to him and the lieutenant/lord would have control of those assets (this would be done via an additional right click menu option on ships/fleets/planets)
  • You can revoke control of any asset, so long as it is supply connected to your capitol.
  • The lieutenant/lord's capitol is the first planet that is assigned to him. If no planets are assigned to him, the first ship assigned to him.
  • Any PP generated from a planet under control of lieutenant/lord would go to him, but you could tax him.
  • The lieutenant/lord could produce ship if he has a shipyard, and can build one if he has a planet.
  • You control PP assignment to him via a special production project, which you can prioritize like any other production project. You also control the PP allocation to him and the tax on him from this project.
  • You can kill the lieutenant/lord at any time, so long as his capitol is supply connected to your capitol.
  • The lieutenant/lord can "roll" for a defection at any time, forming a new empire with the assets he controls.
    • The roll has a success ratio equal to the sum of his controlled assests' hull+weapons+shields+population divided by the sum of assets' hull+weapons+shields+population in your empire that are not under his control.
    • If the roll fails, there is a 50% chance for the lieutenant/lord to die, otherwise a status message "A defection attempt failed".
    • The 2nd failed defection roll, chance of death is 75%.
    • The 3rd failed defection roll, chance of death is 100%
FuedalLord_Production.jpg
FuedalLord_Production.jpg (55.45 KiB) Viewed 1793 times
Last edited by yandonman on Sat Nov 23, 2013 4:42 pm, edited 1 time in total.
Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: A collection of heads

#2 Post by eleazar » Sat Nov 23, 2013 12:14 pm

yandonman wrote:b) Interrogate him and get a small empire wide bonus based on 10% of one of the emperor's natural bonuses. For example, a Trith emperor might give a +5 detection range bonus, based off of Trith's natural Great Detection Range: +50 bonus. You then mount his head on your trophy wall, which would likely show up on the top panel: a skull for each head you've taken. Hovering over the skulls would list the bonuses you've accrued. Bonuses are cumulative.
That's kinda odd, since in life the "Trith" emperor was unable to apply the Trith detection bonus to any non-Trith planets. Many/most of the species bonuses are written up as a result of who they are, not some secret technique that can be stolen.

Still i think the core of your idea: "You should get something special and unique for capturing a capitol" rings true.
yandonman wrote:c) Offer him a place in your empire. The emperor would become your lieutenant, or more accurately, a lord in your feudal system.
...
That would totally make sense if we implemented some sort of leader system.

User avatar
Dilvish
AI Lead, Programmer
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: A collection of heads

#3 Post by Dilvish » Sat Nov 23, 2013 5:59 pm

yandonman wrote:When you capture the capitol of an empire, a dialog box would pop up offering you a choice of what to do with the emperor of that empire.
I like the idea a lot. The dialog and choices might be a little ways down the road, but the main gist of this could be implemented immediately via a special added to the capitol planet via the Imperial Palace building just before it self destructs upon capture. The special could be randomly selected from a set of possibilities, and the sitrep could even hint at the possibility of getting a choice/dialog in the future (and at that time maybe sometimes it should still be a random trigger). Messages like

Code: Select all

You have captured the Imperial Palace of X!  Due to the ferocity of the defense during the final assault, your local generals immediately executed the X Emperor without even consulting you.  Nearby warlords and other leaders are quaking in fear
(might only apply to enemy empires below a certain size).

I would kind of like the interrogation one to result in transfer of a tech -- I think that's currently possible.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12474
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: A collection of heads

#4 Post by Geoff the Medio » Sat Nov 23, 2013 6:16 pm

Dilvish wrote:You have captured the Imperial Palace of X! Due to the ferocity of the defense during the final assault, your local generals immediately executed the X Emperor without even consulting you. Nearby warlords and other leaders are quaking in fear
Please no referring to the player in the second person.

yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

Re: A collection of heads

#5 Post by yandonman » Sat Nov 23, 2013 10:32 pm

Would CaptureResult have to be modified to take a generic effectsgroup?

Code: Select all

enum CaptureResult {
    INVALID_CAPTURE_RESULT = -1,
    CR_CAPTURE,    // object has ownership by original empire(s) removed, and conquering empire added
    CR_DESTROY,    // object is destroyed
    CR_RETAIN      // object ownership unchanged: original empire(s) still own object
};

Code: Select all

2013-11-23 14:25:52,057 ERROR Client : C:\Users\Landon\Downloads\FreeOrion\FreeOrion_Win32_MSVS2010_SDK_1_Sept_2012\FreeOrion_VS2010_SDK\FreeOrion\default\buildings.txt:75:24: Parse error.  Expected Condition here:
BuildingType
    name = "BLD_IMPERIAL_PALACE"
    description = "BLD_IMPERIAL_PALACE_DESC"
    buildcost = 10
    buildtime = 8
    captureresult = And [
                        ^
        destroy
        effects = AddSpecial "CONC_CAMP_MASTER_SPECIAL"
    ]
    location = And [
        OwnedBy TheEmpire Source.Owner

OR

Code: Select all

2013-11-23 14:35:38,497 ERROR Client : C:\Users\Landon\Downloads\FreeOrion\FreeOrion_Win32_MSVS2010_SDK_1_Sept_2012\FreeOrion_VS2010_SDK\FreeOrion\default\buildings.txt:76:16: Parse error.  Expected Condition here:
    name = "BLD_IMPERIAL_PALACE"
    description = "BLD_IMPERIAL_PALACE_DESC"
    buildcost = 10
    buildtime = 8
    captureresult = [
                Destroy
                ^
                GenerateSitRepMessage
                    message = "EFFECT_GATEWAY_VOID_DESTROY"
                    parameters = [
                        tag = "buildingtype" data = "BLD_GATEWAY_VOID"
                        tag = "planet" data = Source.PlanetID

2013-11-23 14:35:38,954 ERROR Client : GetEffectsAndTargets couldn't get BuildingType BLD_SHIPYARD_BASE

Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

User avatar
Dilvish
AI Lead, Programmer
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: A collection of heads

#6 Post by Dilvish » Sun Nov 24, 2013 3:08 am

yandonman wrote:Would CaptureResult have to be modified to take a generic effectsgroup?
Hmm, my bad, sounds like the Palace is perhaps not the best way to approach it. We could key it off the Archives, with a trigger something like

Code: Select all

activation = Not Or [
    ProducedByEmpire Source.Owner
    HasSpecial OVERTHROW_BONUS_BLOCKER_SPECIAL
  ]
and then when triggered in addition to adding the bonus special it also adds that blocker special. Of course, I'm not sure that buildings like the archives really have their ProducedByEmpireID attribute set to their starting owner, but that's probably a lot simpler to fix than expanding the CaptureResult operation.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

Re: A collection of heads

#7 Post by yandonman » Sun Nov 24, 2013 4:53 am

Palace was the right first thought, and ideally the mechanic would end up hooked up to the Palace (as it's the right place to put it).

I'm experimenting with the Not ProducedByEmpire Source.Owner...
Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

Re: A collection of heads

#8 Post by yandonman » Sun Nov 24, 2013 8:24 am

Head on a spike aspect. First pass.


'Activation = Not ProducedByEmpire Source.Owner' off of archives worked for this. Not perfect (not sure how a 2nd capitol is handled), but workable.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

Re: A collection of heads

#9 Post by yandonman » Thu Nov 28, 2013 1:57 am

The "Not HasSpecial X" does not appear to work. The planet "Throne of Heaven, Honeydew II" has the special "HEAD_ON_A_SPIKE_SPECIAL", per the logs, but the GenerateSitRepMessage gets executed every time after the planet is captured. Am I missing something obvious?

Code: Select all


2013-11-27 17:20:20,977 DEBUG Client :  ... Planet 28: Throne of Heaven, Honeydew II  at: Honeydew owner: 3 created on turn: -32768 specials: (HEAD_ON_A_SPIKE_SPECIAL, 33)   Meters: Target Population: Cur: 24 Init: 24  Target Industry: Cur: 18.192 Init: 18.192  Target Research: Cur: 7 Init: 7  Target Trade: Cur: 0 Init: 0  Target Infrastructure: Cur: -5 Init: 0  Target Happiness: Cur: 20 Init: 20  Max Shield: Cur: 1 Init: 1  Max Defense: Cur: 6 Init: 6  Max Troops: Cur: 7 Init: 7  Population: Cur: 24 Init: 24  Industry: Cur: 13 Init: 13  Research: Cur: 7.2 Init: 7.2  Trade: Cur: 0 Init: 0  Infrastructure: Cur: 1 Init: 1  Happiness: Cur: 20 Init: 20  Shield: Cur: 1 Init: 1  Defense: Cur: 1 Init: 1  Troops: Cur: 2.9999 Init: 2.9999  Rebel Troops: Cur: 0 Init: 0  Supply: Cur: 2 Init: 2  Stealth: Cur: 0.01 Init: 0.01  Detection Range: Cur: 50 Init: 50   species: SP_EAXAW  ResourceCenter focus: FOCUS_INDUSTRY last changed on turn: 33 type: terran original type: terran size: large rot period: 0.712712 axis tilt: 13.9558 buildings: 32, 33, 34, 137 last attacked on turn: 32
2013-11-27 17:20:20,977 DEBUG Client :  * * * * * * * * * * * (new effects group log entry)
2013-11-27 17:20:20,977 DEBUG Client : ExecuteEffects effectsgroup: 
EffectsGroup
    scope =
        And [
            Planet
            OwnedBy affiliation = TheEmpire empire = Source.Owner
            Contains condition =
                Source
        ]
    activation =
        And [
            Not
                ProducedByEmpire empire_id = Source.Owner            Not
                HasSpecial name = "HEAD_ON_A_SPIKE_SPECIAL"
        ]
    effects = [
        AddSpecial name = "HEAD_ON_A_SPIKE_SPECIAL"
        GenerateSitRepMessage
            message = "HEAD_ON_A_SPIKE_MESSAGE" icon = icons/sitrep/empire_eliminated.png
            parameters = tag = empire data = Source.ProducedByEmpireID
            affiliation = AnyEmpire    ]

Code: Select all

BuildingType
    name = "BLD_CULTURE_ARCHIVES"
    description = "BLD_CULTURE_ARCHIVES_DESC"
    buildcost = 200
    buildtime = 1
    tags = "ANTIQUATED"
    location = Not All
    effectsgroups = [
        EffectsGroup          // These bonuses given to anyone
            scope = And [
                Planet
                OwnedBy TheEmpire Source.Owner
                Contains Source
            ]
            effects = [
                SetTargetResearch Value + 5
                SetTargetIndustry Value + Target.Population / 2
            ]
            
        EffectsGroup
            scope = And [
                Planet
                OwnedBy TheEmpire Source.Owner
                Contains Source
            ]
            activation = And [
                Not ProducedByEmpire Source.Owner
                Not HasSpecial "HEAD_ON_A_SPIKE_SPECIAL"
            ]
            effects = [
                AddSpecial "HEAD_ON_A_SPIKE_SPECIAL"
                GenerateSitRepMessage
                    message = "HEAD_ON_A_SPIKE_MESSAGE"
                    icon = "icons/sitrep/empire_eliminated.png"
                    parameters = [
                        tag = "empire" data = Source.ProducedByEmpireID                        
                    ]                    
            ]
            
        EffectsGroup
            scope = Source
            activation = Random probability = 0.02
            effects = CreateField type = "FLD_ION_STORM"
                    x = UniverseCentreX + Random(1.25,1.5)*UniverseCentreX*sin(CurrentTurn)
                    y = UniverseCentreY + Random(1.25,1.5)*UniverseCentreY*cos(CurrentTurn)
                    size = 50
                    
        EffectsGroup
            scope = Source
            activation = Random probability = 0.01
            effects = CreateField type = "FLD_MOLECULAR_CLOUD"
                    x = UniverseCentreX + Random(1.25,1.5)*UniverseCentreX*sin(CurrentTurn)
                    y = UniverseCentreY + Random(1.25,1.5)*UniverseCentreY*cos(CurrentTurn)
                    size = 120
    ]
    icon = "icons/building/archive.png"
Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12474
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: A collection of heads

#10 Post by Geoff the Medio » Thu Nov 28, 2013 2:20 am

Activation conditions test the source object, which is a building, but the scope selects the planet on which the building is located. The special is added to the planet, not the building, and thus won't be found by the activation condition.

User avatar
Dilvish
AI Lead, Programmer
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: A collection of heads

#11 Post by Dilvish » Thu Nov 28, 2013 3:07 am

Ah yeah, I guess I hadn't fully thought through the suggestion above. So perhaps this might work?

Code: Select all

            activation = And [
                Not ProducedByEmpire Source.Owner
                ContainedBy And [
                        Planet Source.PlanetID
                        Not HasSpecial "HEAD_ON_A_SPIKE_SPECIAL"
                ]
            ]
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

Re: A collection of heads

#12 Post by yandonman » Thu Nov 28, 2013 3:11 am

Heh, I just moved the HasSpecial to the scope selection.

Code: Select all

 EffectsGroup
            scope = And [
                Planet
                OwnedBy TheEmpire Source.Owner
                Contains Source
                Not HasSpecial "HEAD_ON_A_SPIKE_SPECIAL"
            ]
            activation = Not ProducedByEmpire Source.Owner                
            effects = [
                AddSpecial "HEAD_ON_A_SPIKE_SPECIAL"
                GenerateSitRepMessage
                    message = "HEAD_ON_A_SPIKE_MESSAGE"
                    icon = "icons/sitrep/empire_eliminated.png"
                    parameters = [
                        tag = "empire" data = Source.ProducedByEmpireID                        
                    ]
            ]
Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

User avatar
Dilvish
AI Lead, Programmer
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: A collection of heads

#13 Post by Dilvish » Thu Nov 28, 2013 3:16 am

Good thinking! :D
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Dilvish
AI Lead, Programmer
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: A collection of heads

#14 Post by Dilvish » Tue Dec 31, 2013 1:59 am

Sorry for the delay in following up on this. It looks to me like the main scope clause (applying to ships) should have an extra constraint to prevent it from applying to Monsters (they're not going to be cowering in fear over someone's head on a spike).

I was thinking that an extra clause

Code: Select all

OwnedBy AnyEmpire
(supplementing the current OwnedBy clause) should do the trick, but in double checking the Condition::EmpireAffiliation code it looks like AnyEmpire formerly excluded unowned objects but has been changed to always return true. A quick check of scripting makes it look like it is quite often still used with the intent to exclude unowned objects, though, so I'm not sure if I'm misreading something or what. I just used it myself in fact to try give movement to unowned ships taken over by a Psionic Snowflake -- I had tested to make sure it didn't seem to mess anything up but I didn't have an actual test case with a Psionic Snowflake; it's now looking to me like the scripting I had added won't be doing anything at all. Geoff -- any input?
**edit* on looking further at Condition::EmpireAffiliation, I see that the check for Unowned() does still appear, just higher up in the method, so it looks fine for the use I proposed above (and that it gets in a lot of places). I'll test out the script some with that change made to it.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Dilvish
AI Lead, Programmer
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: A collection of heads

#15 Post by Dilvish » Tue Dec 31, 2013 5:24 am

Two more thoughts. (A) I think should be dealt with, and (B) is just an idea or two.
A) it looks like there isn't any way for the spike-on-head special to get removed, and once in place the ongoing effects of the special don't care who owns the planet -- if the original owner recaptures the planet then they get the full benefit of the special. It seems to me that the operation of the special (at least most of it) should be tied to the planet being owned by a conqueror. If the original owners recapture their planet, the special could be removed, or perhaps it could have a different clause apply with some other effect (or be replaced by a new special with that other effect). It really seems to me like one or the other of those should happen on recapture. Although plain removal would be the easiest, I think I favor replacing it or just having different clauses that would apply.

B) The reduction of enemies shields, structure and attack is powerful enough to really require that it be non-stacking (like you made it), but it seems to me like it would be even more fun if there were some kind of stacking effect also. At first I thought of a minor benefit for the conqueror, like maybe a stacking +1 planetary troops empire-wide due to increased morale (something defensive so it doesn't really contribute to steamrolling). But then I thought about a countering effect, instead of that or in addition to that, where all the non-conqueror populated planets got a stacking +2 or +4 defensive troops due to said fear. That seems to me like a nice counterbalance to the steamroller effect. The last little empire surrounded by one or two conquerors would have a hecka lotta defensive troops :D
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply