FreeOrion

Forums for the FreeOrion project
It is currently Mon Jun 18, 2018 7:43 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Sat Feb 24, 2018 11:23 am 
Offline
Space Kraken

Joined: Sat Dec 10, 2011 5:46 am
Posts: 123
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-6.4, boost-1.65.0
Ubuntu Server 18.04.0 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 2018-06-14.3f22a75 0.4.8 RC1
Donates are welcome: BTC: 14XLekD9ifwqLtZX4iteepvbLQNYVG87zK


Top
 Profile  
 
PostPosted: Sat Feb 24, 2018 3:50 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4645
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


Top
 Profile  
 
PostPosted: Fri Mar 16, 2018 11:25 am 
Offline
Space Kraken

Joined: Sat Dec 10, 2011 5:46 am
Posts: 123
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-6.4, boost-1.65.0
Ubuntu Server 18.04.0 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 2018-06-14.3f22a75 0.4.8 RC1
Donates are welcome: BTC: 14XLekD9ifwqLtZX4iteepvbLQNYVG87zK


Top
 Profile  
 
PostPosted: Fri Mar 16, 2018 1:35 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12220
Location: Munich
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.


Top
 Profile  
 
PostPosted: Fri Mar 16, 2018 4:38 pm 
Offline
Space Kraken

Joined: Sat Dec 10, 2011 5:46 am
Posts: 123
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-6.4, boost-1.65.0
Ubuntu Server 18.04.0 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 2018-06-14.3f22a75 0.4.8 RC1
Donates are welcome: BTC: 14XLekD9ifwqLtZX4iteepvbLQNYVG87zK


Top
 Profile  
 
PostPosted: Fri Mar 16, 2018 6:49 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4645
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


Top
 Profile  
 
PostPosted: Fri Mar 16, 2018 7:14 pm 
Offline
Space Kraken

Joined: Sat Dec 10, 2011 5:46 am
Posts: 123
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-6.4, boost-1.65.0
Ubuntu Server 18.04.0 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 2018-06-14.3f22a75 0.4.8 RC1
Donates are welcome: BTC: 14XLekD9ifwqLtZX4iteepvbLQNYVG87zK


Top
 Profile  
 
PostPosted: Sat Mar 17, 2018 5:53 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4645
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.

Quote:
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


Top
 Profile  
 
PostPosted: Sat Mar 17, 2018 7:31 am 
Offline
Space Kraken

Joined: Sat Dec 10, 2011 5:46 am
Posts: 123
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.

Quote:
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-6.4, boost-1.65.0
Ubuntu Server 18.04.0 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 2018-06-14.3f22a75 0.4.8 RC1
Donates are welcome: BTC: 14XLekD9ifwqLtZX4iteepvbLQNYVG87zK


Top
 Profile  
 
PostPosted: Sat Mar 17, 2018 7:59 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4645
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


Top
 Profile  
 
PostPosted: Sat Mar 17, 2018 8:19 am 
Offline
Space Kraken

Joined: Sat Dec 10, 2011 5:46 am
Posts: 123
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-6.4, boost-1.65.0
Ubuntu Server 18.04.0 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 2018-06-14.3f22a75 0.4.8 RC1
Donates are welcome: BTC: 14XLekD9ifwqLtZX4iteepvbLQNYVG87zK


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group