Latest Human Player Victory

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.
Post Reply
Message
Author
o01eg
Space Kraken
Posts: 166
Joined: Sat Dec 10, 2011 5:46 am

Latest Human Player Victory

#1 Post by o01eg » Sat Feb 24, 2018 11:23 am

I suppose to add new victory type. It would be an analogy for VICTORY_ALL_ENEMIES_ELIMINATED but considers only human players.

It has no sense for single-player game but could be useful for multi-player games. As different games require different settings it should be configurable through options or game rules (not sure what will be better).

It especially would be useful after merging https://github.com/freeorion/freeorion/pull/2001 when people could early leave a game.
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 0.4.8
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

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

Re: Latest Human Player Victory

#2 Post by Dilvish » Sat Feb 24, 2018 3:50 pm

o01eg wrote:It has no sense for single-player game but could be useful for multi-player games. As different games require different settings it should be configurable through options or game rules (not sure what will be better).
It does indeed sound very useful for multiplayer games. It should just be flat-out disabled for single player games, but for the multiplayer games it seems very much to me like a game-rule sort of thing. I haven't really looked into game-rule-persistence, I assume there is a way for a contra-default preference to be saved long term?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

o01eg
Space Kraken
Posts: 166
Joined: Sat Dec 10, 2011 5:46 am

Re: Latest Human Player Victory

#3 Post by o01eg » Fri Mar 16, 2018 11:25 am

Dilvish wrote:I haven't really looked into game-rule-persistence, I assume there is a way for a contra-default preference to be saved long term?
I've just got idea it possible with customized universe generator script if it will look to some persistence storage. I'm going to check if there enough API exposed to python to read and write game rules.
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 0.4.8
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

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

Re: Latest Human Player Victory

#4 Post by Geoff the Medio » Fri Mar 16, 2018 1:35 pm

o01eg wrote:I'm going to check if there enough API exposed to python to read and write game rules.
Python should be able to read game rules...

https://github.com/freeorion/freeorion/ ... r.cpp#L775

But not create or set them, I think. I did have vague ideas about letting setup scripts be selectable and having parameters that could be implemented as rules and shown in the UI.

o01eg
Space Kraken
Posts: 166
Joined: Sat Dec 10, 2011 5:46 am

Re: Latest Human Player Victory

#5 Post by o01eg » Fri Mar 16, 2018 4:38 pm

Geoff the Medio wrote: https://github.com/freeorion/freeorion/ ... r.cpp#L775

But not create or set them, I think. I did habe vague ideas about letting setup scriptsbe selectable and having parameters that could be implemented as rules and shown in the UI.
What if let python set game rules?
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 0.4.8
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

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

Re: Latest Human Player Victory

#6 Post by Dilvish » Fri Mar 16, 2018 6:49 pm

o01eg wrote:What if let python set game rules?
What is the situation where you'd want to have python actually setting game rules? It seems strange to me if they would not be set at the time of game start, along with the galaxy settings.

Letting them generally be scriptable, or something like that, could easily make sense in the future if we were going to support multi-stage campaigns or something like that, but I'm not really seeing the use just now.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

o01eg
Space Kraken
Posts: 166
Joined: Sat Dec 10, 2011 5:46 am

Re: Latest Human Player Victory

#7 Post by o01eg » Fri Mar 16, 2018 7:14 pm

Dilvish wrote:
o01eg wrote:What if let python set game rules?
What is the situation where you'd want to have python actually setting game rules? It seems strange to me if they would not be set at the time of game start, along with the galaxy settings.
First we don't have UI for this. Second what if I want to restrict rules on my server?
Dilvish wrote: Letting them generally be scriptable, or something like that, could easily make sense in the future if we were going to support multi-stage campaigns or something like that, but I'm not really seeing the use just now.
I ignore game rules from players and set desired values in C++ code: https://github.com/o01eg/freeorion/comm ... 319ef6R798
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 0.4.8
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

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

Re: Latest Human Player Victory

#8 Post by Dilvish » Sat Mar 17, 2018 5:53 am

o01eg wrote:First we don't have UI for this.
Ah, wow, you really do not play single player at all, huh? It does look like the GameRule UI has not made it into the multiplayer galaxy setup screen, but it is part of the single player galaxy setup and I would think that it should not be too much work to have it appear for multiplayer also.
I ignore game rules from players and set desired values in C++ code
Ah, OK, and while that approach could keep working for you, it could be a bit more convenient for you to be able to configure rules via python changes (or via changing some config files that would not require recompiling) rather than c++ changes. That makes sense, sure.

I'll mention an idea-- there could be an extra config file (perhaps a python type config file, or perhaps just an xml or something else) which could specify, for each game type, any further constraints on game rule settings, simply a way to further restrict game rule values more tightly than the standard constraints. Not necessarily dictating an exact set of rules, although that could be possible by fully constraining the allowed rule values.

That is probably more complex than what you really need right now, though, so I'll understand if you don't want to hassle with it.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

o01eg
Space Kraken
Posts: 166
Joined: Sat Dec 10, 2011 5:46 am

Re: Latest Human Player Victory

#9 Post by o01eg » Sat Mar 17, 2018 7:31 am

Dilvish wrote:Ah, wow, you really do not play single player at all, huh? It does look like the GameRule UI has not made it into the multiplayer galaxy setup screen, but it is part of the single player galaxy setup and I would think that it should not be too much work to have it appear for multiplayer also.
I've seen it and use for testing some game rules but I think there should be support for server-side restrictions.
Ah, OK, and while that approach could keep working for you, it could be a bit more convenient for you to be able to configure rules via python changes (or via changing some config files that would not require recompiling) rather than c++ changes. That makes sense, sure.

I'll mention an idea-- there could be an extra config file (perhaps a python type config file, or perhaps just an xml or something else) which could specify, for each game type, any further constraints on game rule settings, simply a way to further restrict game rule values more tightly than the standard constraints. Not necessarily dictating an exact set of rules, although that could be possible by fully constraining the allowed rule values.

That is probably more complex than what you really need right now, though, so I'll understand if you don't want to hassle with it.
Python could read options DB. And any changes with rules python could do in the universe generation script.
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 0.4.8
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

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

Re: Latest Human Player Victory

#10 Post by Dilvish » Sat Mar 17, 2018 7:59 am

o01eg wrote:Python could read options DB. And any changes with rules python could do in the universe generation script.
yes, of course it could. And that might solve your personal issue just fine and be suitable for you to use on the server you run. But it seems like c++ code reading the options DB and restricting game rules prior to galaxy setup would also let you avoid having to recompile any time you change your server Rules (though perhaps you'd also need to have the server also do a stage of rule verification against its own options DB).

It doesn't really seem right to me for FO in general, though, to be modifying Game Rules during the universe creation stage, which comes after the stage in which players normally choose their settings and game rules. That would seem to me to just needlessly set the stage for confusion.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

o01eg
Space Kraken
Posts: 166
Joined: Sat Dec 10, 2011 5:46 am

Re: Latest Human Player Victory

#11 Post by o01eg » Sat Mar 17, 2018 8:19 am

A little on-topic: I've added game rule to require winner player to be in the alliance. So in the 2-human-players case there will be choice for players to make alliance and get 0.5 points or defeat enemy and get 1 point (or will be defeated and get 0 points) if there any external point system across multiple freeorion games.
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 0.4.8
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

Post Reply