Stargates

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
Gargamel
Space Floater
Posts: 33
Joined: Tue Feb 22, 2011 4:54 am

Stargates

#1 Post by Gargamel »

Just some random thoughts I have. Bear with me as my brain fart evolves here.

Obviously, in my mind at least, they are based on Stargate (SG-1, Atlantis, SGU, etc, that universe).

I think it would be cool to include (as an option during galaxy creation) ancient stargates, a couple few of them, scattered around the galaxy. Discoverable like ancient ruins and the like.

If you discover one, and haven't researched the tech yet, you'd get a significant bonus towards unlocking the tech (50%?). Of course you'd still need to get the pre reqs, but once you get there, it will be much easier to get.

If you don't have the tech, you could still set the focus to stargate 'send', but you would have no control over which of the pre made random stargates you'd end up at. You wouldn't have the ability to set it to 'receive' yet though, so controlling where you end up is still random. And after using the stargate, there would be like a 5 turn cool down before you could use it again. That way it wouldn't be that good for invasion, just random exploration.

And maybe there could be a feature that would be added to a lower tech level, that would allow the 'send' and 'receive' focus. Discovering a gate would have the bonus applied to this tech. The normal gate tech would still be required to build new gates.

If you, or an enemy, sent a ship through a gate without having a 'receiving' gate set, it would be random between the preplaced gates. This may cause you to have a 'backdoor' in defenses, but once you have two gates established, and can set the direction of the gates, those two (or more) gates would be considered 'connected'. Just like in the SG world, if you maintain an active gate, incoming connections would be refused, so you could 'lock' the backdoor.

Once you unlock the tech that allows you to build gates, it would allow you to turn off the random part of it, automatically refusing connections from gates you do not control. Any of the premade gates that you control would act like normal gates at this point.

And while these may provide a sort of beachhead to the player that discovers one first, it wouldn't be connected to the supply lines (unless it would be normally), so you could send troops, but not help it's production.

Just some random thoughts to add some variety to the game.

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Stargates

#2 Post by LienRag »

Another old idea that's still quite interesting...

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: Stargates

#3 Post by The Silent One »

Go at it, then :wink:
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

User avatar
labgnome
Juggernaut
Posts: 833
Joined: Mon Mar 02, 2015 5:57 pm

Re: Stargates

#4 Post by labgnome »

Gargamel wrote: Mon Apr 24, 2017 4:13 pmI think it would be cool to include (as an option during galaxy creation) ancient stargates, a couple few of them, scattered around the galaxy. Discoverable like ancient ruins and the like.
Would you have them as their own building or done as something that could be uncovered from ancient ruins?
If you discover one, and haven't researched the tech yet, you'd get a significant bonus towards unlocking the tech (50%?). Of course you'd still need to get the pre reqs, but once you get there, it will be much easier to get.
That sounds like an interesting idea.
If you don't have the tech, you could still set the focus to stargate 'send', but you would have no control over which of the pre made random stargates you'd end up at. You wouldn't have the ability to set it to 'receive' yet though, so controlling where you end up is still random. And after using the stargate, there would be like a 5 turn cool down before you could use it again. That way it wouldn't be that good for invasion, just random exploration.
This might be a less good idea requiring a re-wording of the stargates themselves.
And maybe there could be a feature that would be added to a lower tech level, that would allow the 'send' and 'receive' focus. Discovering a gate would have the bonus applied to this tech. The normal gate tech would still be required to build new gates.
Fleshing out technology around the stargates might be something for the current re-working of the technology tree.
If you, or an enemy, sent a ship through a gate without having a 'receiving' gate set, it would be random between the preplaced gates. This may cause you to have a 'backdoor' in defenses, but once you have two gates established, and can set the direction of the gates, those two (or more) gates would be considered 'connected'. Just like in the SG world, if you maintain an active gate, incoming connections would be refused, so you could 'lock' the backdoor.
This also would require a substantial re-work of the stargates, especially since they require a "receive" focus to be set to receive at all.
All of my contributions should be considered released under creative commons attribution share-alike license, CC-BY-SA 3.0 for use in, by and with the Free Orion project.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Stargates

#5 Post by Ophiuchus »

Because stargates are probably IMHO the single most powerful technology (you can send your complete Fleet from one end of the galaxy to the other in a single turn), one thing i would like to see is a clue that there is incoming traffic. So in case of invasion you get to do an extra turn to respond - maybe there would be even a way to counter the stargate before the enemies can get through. So maybe the attacker has to combine stealth, imperial stockpile, disruption and stargates for a super effective surprise attack.

In the most basic form this would show a field around a system where there is a stargate with incoming focus (and maybe it should take some turns to establish the receiving possibilites in a system).

Back to the OP
Gargamel wrote: Mon Apr 24, 2017 4:13 pm If you discover one, and haven't researched the tech yet, you'd get a significant bonus towards unlocking the tech (50%?). Of course you'd still need to get the pre reqs, but once you get there, it will be much easier to get.
..
And maybe there could be a feature that would be added to a lower tech level, that would allow the 'send' and 'receive' focus. Discovering a gate would have the bonus applied to this tech. The normal gate tech would still be required to build new gates.
Not sure the bonus to building stargate tech is good/necessary. Having the lower techs to make use of existing stargates is more interesting.
Gargamel wrote: Mon Apr 24, 2017 4:13 pm If you don't have the tech, you could still set the focus to stargate 'send', but you would have no control over which of the pre made random stargates you'd end up at. You wouldn't have the ability to set it to 'receive' yet though, so controlling where you end up is still random. And after using the stargate, there would be like a 5 turn cool down before you could use it again. That way it wouldn't be that good for invasion, just random exploration.

If you, or an enemy, sent a ship through a gate without having a 'receiving' gate set, it would be random between the preplaced gates. This may cause you to have a 'backdoor' in defenses, but once you have two gates established, and can set the direction of the gates, those two (or more) gates would be considered 'connected'. Just like in the SG world, if you maintain an active gate, incoming connections would be refused, so you could 'lock' the backdoor.
I think this is all scriptable without too much effort but the 'connected' idea. One way to solve:
Stargates are eligable for random exit if and only if:
  • receiving stargate planet is either unowned or owned by your empire
  • receiving stargate is not set to send focus
  • you did not set an incoming focus on one of your stargates
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Stargates

#6 Post by LienRag »

The Silent One wrote: Tue Jun 11, 2019 5:32 pm Go at it, then :wink:
I'm not certain that you'd like the result if I were to touch your codebase... and as you're the Graphic guys I'm positive that you don't want me to touch FreeOrion's graphics!


I don't see the use for "owned" stargates able to allow an enemy invasion? If we limit that to "neutral" stargates and allow fleet going through a neutral stargate to go only towards other neutral stargates or towards receiving stargates of their owner Empires, it seems to me that it solves the problem (or more precisely makes it non-existent).

Since fleet going through these neutral stargates, at least at the beginning of the game, would find themselves out of supply, it raises the strategic interest of Organic Hulls, fuel parts, and Ramscoop - which is a good thing imho.
It would certainly raise the usefulness of tankers as proposed here but TheSilentOne is right that it would be micromanagement hell and I can't find a way for it not to be...

And I approve everything Ophiuchus wrote so far on this topic, if it matters to anyone.

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Stargates

#7 Post by Oberlus »

LienRag wrote: Wed Jun 12, 2019 11:48 pmI'm not certain that you'd like the result if I were to touch your codebase... and as you're the Graphic guys I'm positive that you don't want me to touch FreeOrion's graphics!
It does not work like that. If you are really interested into doing something (either for yourself o for FreeOrion's community), you wil do it on your own copy of the FreeOrion project. Then you'll be free to submit (do "pull requests") your work to the FreeOrion project, and the FreeOrion project owners would review, correct if necessary, and accept or reject your contribution.
In no way would you be "touching their codebase or graphics".

So, by all means, go ahead and try by yourself your ideas. Most probably one of two things will happen: you'll fine it too difficult or insufficiently rewarding so you will not finish anything, or you will finish some contribution and the FreeOrion community will gain another valuable contributor.

FWI, FreeOrion is deeply understaffed. Right now I think FO has surplus of designers (like me) and lack of implementators.

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: Stargates

#8 Post by The Silent One »

LienRag wrote: Wed Jun 12, 2019 11:48 pmI'm not certain that you'd like the result if I were to touch your codebase... and as you're the Graphic guys I'm positive that you don't want me to touch FreeOrion's graphics!
Expanding on what Oberlus said: if you have a fun idea (which I think this is), you should try to have a go at it. Only once in a blue moon you will find someone who will do it for you. But, if people see you're putting in hard work and but have run into troubles, they will offer their assistance. I can hear your enthusiasm, but you need to put it into action.

That being said, this specific idea sounds like not-too-bad of a starting project, probably requiring mostly or only the use of FOCS. For how to use FOCS, there are many examples as well as a tutorial: https://freeorion.org/index.php/FOCS_Scripting_Tutorial. Also you should familiarise yourself with the structure of the content folder ("default") and especially the scripting folder ("default/scripting"). Create your own local FreeOrion repo and start trying out stuff.
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Stargates

#9 Post by LienRag »

Thank you for pointing me to FOCS tutorial, I didn't understand that modifying game mechanisms was possible without C++ (and a good knowledge of the existing codebase).
I'll try to experiment with it then, and let you know if I succeed doing so.

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Stargates

#10 Post by LienRag »

So, it took me a lot of time to understand how FOCS work, and again a lot more time to find where the FOCS code for the Stargates was (apparently it's in focus.macros which itself is in the Common sub-directory of Species - not exactly where I expected it to be).

Once found it's quite easy to understand so I was able to write the FOCS code for the "wild" stargates mentioned in the OP (well, a simplified version of it at least).
Obviously it didn't work (I think that I inverted origin and destination) and since it's a little while ago that I wrote it I can't even understand my own code now.

So I made an even simpler version where the code stays in the focus.macros (modified as such) :

Code: Select all

HAS_INDUSTRY_FOCUS
'''        Focus
            name = "FOCUS_INDUSTRY"
            description = "FOCUS_INDUSTRY_DESC"
            location = Planet
            graphic = "icons/focus/industry.png"
'''

HAS_RESEARCH_FOCUS
'''        Focus
            name = "FOCUS_RESEARCH"
            description = "FOCUS_RESEARCH_DESC"
            location = Planet
            graphic = "icons/focus/research.png"
'''

HAS_INFLUENCE_FOCUS
'''        Focus
            name = "FOCUS_INFLUENCE"
            description = "FOCUS_INFLUENCE_DESC"
            location = Planet
            graphic = "icons/focus/influence.png"
'''

HAS_GROWTH_FOCUS
'''        Focus
            name = "FOCUS_GROWTH"
            description = "FOCUS_GROWTH_DESC"
            location = Or [
                And [
                    Homeworld name = Source.Species
                    Not HasTag name = "SELF_SUSTAINING"
                ]
                HasSpecial name = "POSITRONIUM_SPECIAL"
                HasSpecial name = "SUPERCONDUCTOR_SPECIAL"
                HasSpecial name = "MONOPOLE_SPECIAL"
                HasSpecial name = "SPICE_SPECIAL"
                HasSpecial name = "FRUIT_SPECIAL"
                HasSpecial name = "PROBIOTIC_SPECIAL"
                HasSpecial name = "ELERIUM_SPECIAL"
                HasSpecial name = "CRYSTALS_SPECIAL"
                HasSpecial name = "MINERALS_SPECIAL"
		HasSpecial name = "ARRAKIWHEAT_SPECIAL"
            ]
            graphic = "icons/focus/growth.png"
'''

HAS_ADVANCED_FOCI
'''        Focus
            name = "FOCUS_PROTECTION"
            description = "FOCUS_PROTECTION_DESC"
            location = OwnerHasTech name = "DEF_ROOT_DEFENSE"
            graphic = "icons/focus/protection.png"

        Focus
            name = "FOCUS_LOGISTICS"
            description = "FOCUS_LOGISTICS_DESC"
            location = OwnerHasTech name = "SHP_INTSTEL_LOG"
            graphic = "icons/focus/supply.png"

        Focus
            name = "FOCUS_STOCKPILE"
            description = "FOCUS_STOCKPILE_DESC"
            location = OwnerHasTech name = "PRO_GENERIC_SUPPLIES"
            graphic = "icons/focus/stockpile.png"

        Focus
            name = "FOCUS_STEALTH"
            description = "FOCUS_STEALTH_DESC"
            location = Or [
                Contains Building name = "BLD_PLANET_CLOAK"
                And [
                    Contains Building name = "BLD_TRANSFORMER"
                    OwnerHasTech name = "DEF_PLANET_CLOAK"
                ]
            ]
            graphic = "icons/focus/stealth.png"

        Focus
            name = "FOCUS_BIOTERROR"
            description = "FOCUS_BIOTERROR_DESC"
            location = Or [
                Contains Building name = "BLD_BIOTERROR_PROJECTOR"
                And [
                    Contains Building name = "BLD_TRANSFORMER"
                    OwnerHasTech name = "GRO_BIOTERROR"
                ]
            ]
            graphic = "icons/focus/bioterror.png"

        Focus
            name = "FOCUS_STARGATE_SEND"
            description = "FOCUS_STARGATE_SEND_DESC"
            location = Or [
                Contains Building name = "BLD_STARGATE"
		HasSpecial name = "ANCIENT_WORMHOLE_GATE_SPECIAL"
		Species name = "SP_NYMNMNAN"
                And [
                    Contains Building name = "BLD_TRANSFORMER"
                    OwnerHasTech name = "CON_STARGATE"
                ]
            ]
            graphic = "icons/focus/stargate_send.png"

        Focus
            name = "FOCUS_STARGATE_RECEIVE"
            description = "FOCUS_STARGATE_RECEIVE_DESC"
            location = Or [
                Contains Building name = "BLD_STARGATE"
		HasSpecial name = "WORMHOLE_EXIT_SPECIAL"
		Species name = "SP_ACIREMAN"
                And [
                    Contains Building name = "BLD_TRANSFORMER"
                    OwnerHasTech name = "CON_STARGATE"
                ]
            ]
            graphic = "icons/focus/stargate_receive.png"

        Focus
            name = "FOCUS_PLANET_DRIVE"
            description = "FOCUS_PLANET_DRIVE_DESC"
            location = Or [
                Contains Building name = "BLD_PLANET_DRIVE"
                And [
                    Contains Building name = "BLD_TRANSFORMER"
                    OwnerHasTech name = "CON_PLANET_DRIVE"
                ]
            ]
            graphic = "icons/building/planetary_stardrive.png"

        Focus
            name = "FOCUS_DISTORTION"
            description = "FOCUS_DISTORTION_DESC"
            location = Or [
                Contains Building name = "BLD_SPATIAL_DISTORT_GEN"
                And [
                    Contains Building name = "BLD_TRANSFORMER"
                    OwnerHasTech name = "LRN_SPATIAL_DISTORT_GEN"
                ]
            ]
            graphic = "icons/focus/distortion.png"

        Focus
            name = "FOCUS_DOMINATION"
            description = "FOCUS_DOMINATION_DESC"
            location = And [
                HasTag name = "TELEPATHIC"
                OwnerHasTech name = "LRN_PSY_DOM"
            ]
            graphic = "icons/focus/psi_domination.png"
'''
and the Specials are just near-empty shells :
ANCIENT_WORMHOLE_GATE_SPECIAL.focs.txt

Code: Select all

Special
    name = "ANCIENT_WORMHOLE_GATE_SPECIAL"
    description = "ANCIENT_WORMHOLE_GATE_SPECIAL_DESC"
    stealth = 0
    spawnrate = 1.0
    spawnlimit = 10
    location = And [
        Planet
        Not Capital

    ]
    graphic = "icons/specials_huge/solid_core.png"

#include "/scripting/common/priorities.macros"
WORMHOLE_EXIT_SPECIAL.focs

Code: Select all

Special
    name = "WORMHOLE_EXIT_SPECIAL"
    description = "WORMHOLE_EXIT_SPECIAL_DESC"
    stealth = 0
    spawnrate = 1.0
    spawnlimit = 20
    location = And [
        Planet
        Not Capital
	Not WithinStarlaneJumps jumps = 3 condition = And [
            System
            Contains And [
                Planet
                OwnedBy affiliation = AnyEmpire
            ]
	        
    ]
    
       
    graphic = "icons/specials_huge/nova_boom.png"

#include "/scripting/common/priorities.macros"
Here are the added entries in en.txt stringtable :

Code: Select all

ANCIENT_WORMHOLE_GATE_SPECIAL
Ancient Wormhole Gate

ANCIENT_WORMHOLE_GATE_SPECIAL_DESC
Ancient gate, presumably of Precursors technology, marking an entrance to a wormhole

WORMHOLE_EXIT_SPECIAL
Wormhole Exit

WORMHOLE_EXIT_SPECIAL_DESC
Wormhole exit. Anything entering a wormhole somewhere in the Galaxy can exit here.
I tested it and it works, and also is quite interesting imho. Obviously the impact to the game varies a lot with the position of Entrances and Exits.

For coherence with the rest of the Ancients discoveries using the Gates would need a Xenoarcheology building but I like the idea of dropping a colony ship on an empty Exit and immediately launching an invasion force through it. In the first test game I hadn't put the three starlane jumps from homeworld limit and there was an exit one jump behing the enemy Sly homeworld at the opposite of the Galaxy, it took me some time to put a stealth Colony ship on it but when I did it was game over for the Sly, quite funny manoeuvre.

You may have noticed that in the "focus.macros" there is another condition that allows for sending/receiving fleets.
I wanted to also test how it would affect the game to have "unable to colonize" species being able to send (for one of them) and to receive (for the other) so I just copy-pasted existing species and added a suffix to their name in order to have a separate FOCS file for them (acireman and nymman, then).
In the test game I ran they didn't spawn, so I'll have to run another one.
I do believe that it may be possible to just give the Nymm this ability rather than having to develop an entire new race. For the Acirema, though their fluff is very adapted to this ability, I'm not that sure, since they are already a quite powerful Specie. Maybe the fact that they have the ability to Receive but not to Send would make them less unbalancing ? Since that means that their shipyards would not be able to Send the fleets created there...

If we retain these "sending of receiving" Species it would be better rather than having to name everyone of them in the Focus macro to have a tag "Sending" and a tag "Receiving" that would be checked in the focus.macros but I don't know how to do it.

These Specials and Species were supposed to be a part of a wider design of pre-Stargate technology wormholes movement (I was thinking of actual Space Worms that would also allow wormhole movement), including some that would, as in the original post, allow random transportation to unexplored parts of the Galaxy, but I don't think that I'll have time and energy to implement them soon.

So I do believe that these two specials (and the modified focus macro) should be included as is¹ in the next test release of the game, as they are playable and enjoyable as they are.

Note that I used for the Specials two existing icons, which fit well imho.

¹ Or without the reference to Nymman and Acireman, it's not that important

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Stargates

#11 Post by LienRag »

Is there a reason for this forum to be in "General discussion" rather than in "Other game design" ?

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Stargates

#12 Post by Ophiuchus »

Please put up a PR (and link it here), so i can look at the code in a sensible way.

From skimming here I can see you have a typo: Species name = "SP_NYMNMNAN" - they are called SP_NYMNMN
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Stargates

#13 Post by LienRag »

Ophiuchus wrote: Fri Apr 30, 2021 6:35 pm Please put up a PR (and link it here), so i can look at the code in a sensible way.

From skimming here I can see you have a typo: Species name = "SP_NYMNMNAN" - they are called SP_NYMNMN
On which {not Microsoft-owned} site should I make the PR ?

It's not a typo, it's a new Specie (similar to the Nymnmn but with the Send focus available).
I didn't include the FOCS file for this Specie since right now it's just for testing how it affects the game, if I have time I will work on a full-fledged Specie (or maybe we can agree to just give the Nymnmn the Send focus) rather than this cheap ripoff.

My work here is under GPL-3, I forgot to mention it. It's the right license for FreeOrion content if I remember correctly ?

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Stargates

#14 Post by Ophiuchus »

LienRag wrote: Fri Apr 30, 2021 7:27 pm On which {not Microsoft-owned} site should I make the PR ?
In that case you probably need to find somebody to do it for you (i.e. somebody else). Or we talk again when we move away from github*. Or if microsoft sells it. Whatever comes first.

edit1: * we won't move away from github if they keep it mostly the way it is now
Last edited by Ophiuchus on Sat May 01, 2021 9:09 am, edited 1 time in total.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Stargates

#15 Post by LienRag »

Works for me.

Post Reply