Multiple same-class prerequisits for a unit?

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Multiple same-class prerequisits for a unit?

Post by Alien Valkyrie »

Corbeau wrote:
Caedo wrote:
Corbeau wrote:Interesting. However, what happens if you get all those techs from your allies, start building stuff, and then one of the techs in the middle is lost due to negative bulbs? Does the whole structure collapse?
You can't lose a tech that's a root_req for a tech you currently have, so if you have negative bulbs, you'd lose Mobile Warfare first, then Automobile, then Combustion etc.
Oh? Does that mean that, if I set the whole tree so that ALL reqs are also root_reqs, then when a tech is lost due to negative bulbs it will no longer be random? Only highest techs can be lost? That would be excellent!
Every technology can have only one root_req, unfortunately.
~ AVL
User avatar
JTN
Elite
Posts: 473
Joined: Wed Jan 30, 2013 12:15 am

Re: Multiple same-class prerequisits for a unit?

Post by JTN »

Caedo wrote:
Corbeau wrote:Oh? Does that mean that, if I set the whole tree so that ALL reqs are also root_reqs, then when a tech is lost due to negative bulbs it will no longer be random? Only highest techs can be lost? That would be excellent!
Every technology can have only one root_req, unfortunately.
2.6 will let Corbeau do what they want; there are ruleset settings for whether tech loss can open up holes in the tech tree. (patch #4789)

(Also whether you can gain such techs, without having to use root_reqs: patch #4415.)
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: Multiple same-class prerequisits for a unit?

Post by Corbeau »

Caedo wrote:
Corbeau wrote:Oh? Does that mean that, if I set the whole tree so that ALL reqs are also root_reqs, then when a tech is lost due to negative bulbs it will no longer be random? Only highest techs can be lost? That would be excellent!
Every technology can have only one root_req, unfortunately.
Hm, maybe fulfilling the goal - loss of only top techs - is still doable. An interesting mathematical challenge ;)
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Multiple same-class prerequisits for a unit?

Post by cazfi »

Corbeau wrote:
Caedo wrote:
Corbeau wrote:Oh? Does that mean that, if I set the whole tree so that ALL reqs are also root_reqs, then when a tech is lost due to negative bulbs it will no longer be random? Only highest techs can be lost? That would be excellent!
Every technology can have only one root_req, unfortunately.
Hm, maybe fulfilling the goal - loss of only top techs - is still doable.
I think that's what experimental ruleset tries to do.
gm1530
Posts: 27
Joined: Fri Mar 29, 2013 11:48 am

Re: Multiple same-class prerequisits for a unit?

Post by gm1530 »

Corbeau wrote:Also, another motive for this is preventing a backward stone-age nation receiving one tech and then being able to build armour. Yes, they could receive all three, but with penalties and random tech loss when bulbs go into negative, stuff would get more realistic.
http://gna.org/patch/?5944
morphles
Posts: 3
Joined: Sat Apr 11, 2015 7:50 pm

Re: Multiple same-class prerequisits for a unit?

Post by morphles »

Generalized req is something I was asking about, about a year ago now. And I somehow got the impression that they were comming in 2.6 now I hear that that is not happening. Which is very sad.

In addition to that, I belive reqs "vectoring" could use an extension overal. Currently it is only possible to specify requirements like so: "[some stuff AND'ed] NOT [some stuff OR'ed]", and you can't have some effect/building allowed by one or the other thing. Suppose you could have unit that is available if you have building in a city, OR some wonder in any of your cities (OR maybe some tech).

Alternatively, most awesome option would be to have something like can_build(city, thing) lua function, that could process all kinds of stuff (though doign some things in lua is crazy complicated currently, for example checking if/what wonders player has) and would allow tons of flexibility. Though obviously this makes AI stuff cracy complicated, possibly some "AI hinting" lua functions could help, still everything would be very complext with regards to AI. On the other hand, maybe it would be possible to simply allow mark ruleset as multiplayer only/no AI and don't sweat so much about it? I think such marking is basically possible, set AI fill 0 in ruleset and dissalow changing of that option, this should make it alsmos AI'less ruleset :) though server admin could probably toggle that using server console at run time, still...
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Multiple same-class prerequisits for a unit?

Post by Alien Valkyrie »

morphles wrote:In addition to that, I belive reqs "vectoring" could use an extension overal. Currently it is only possible to specify requirements like so: "[some stuff AND'ed] NOT [some stuff OR'ed]", and you can't have some effect/building allowed by one or the other thing. Suppose you could have unit that is available if you have building in a city, OR some wonder in any of your cities (OR maybe some tech).

Alternatively, most awesome option would be to have something like can_build(city, thing) lua function, that could process all kinds of stuff (though doign some things in lua is crazy complicated currently, for example checking if/what wonders player has) and would allow tons of flexibility. Though obviously this makes AI stuff cracy complicated, possibly some "AI hinting" lua functions could help, still everything would be very complext with regards to AI. On the other hand, maybe it would be possible to simply allow mark ruleset as multiplayer only/no AI and don't sweat so much about it? I think such marking is basically possible, set AI fill 0 in ruleset and dissalow changing of that option, this should make it alsmos AI'less ruleset :) though server admin could probably toggle that using server console at run time, still...
We had a discussion about this not too long ago in this thread I made, coming to the conclusion that it's not only a problem for the AI, but also for all kinds of automated documentation.
~ AVL
Post Reply