Hey guys. Question.
Or two.
First. How do I conditionally disable buildings in a ruleset?
for instance, forcing the player to pick between two different Wonders. Having one constructed disables the other for the player. Or something like that. I recall Oracle and Hanging Gardens being mutually exclusive under certain rules but I don't remember how.
And I am working with 2.5.10
Other question?
Can I make the game post custom strings under specific circumstances? Like, triggering a certain effect has a notification printed to the messages log.
Thanks guys!
Two questions on Rulesets
- GriffonSpade
- Elite
- Posts: 578
- Joined: Mon Apr 29, 2013 4:41 pm
Re: Two questions on Rulesets
In 2.5, you can negate their building requirements and their effects both, but not technically obsolete them.drakeraider wrote:Hey guys. Question.
Or two.
First. How do I conditionally disable buildings in a ruleset?
for instance, forcing the player to pick between two different Wonders. Having one constructed disables the other for the player. Or something like that. I recall Oracle and Hanging Gardens being mutually exclusive under certain rules but I don't remember how.
And I am working with 2.5.10
Other question?
Can I make the game post custom strings under specific circumstances? Like, triggering a certain effect has a notification printed to the messages log.
Thanks guys!
In 2.6, the obsolete_by becomes a table that works like effects.ruleset.
For the description of how to negate, see here: http://freeciv.wikia.com/wiki/Editing_Effects (The set isn't finished for full release, but this page has enough to work with)
Edit:Fixt
Last edited by GriffonSpade on Fri Feb 16, 2018 10:46 pm, edited 1 time in total.
Re: Two questions on Rulesets
Are you sure? I have this in my ruleset which I still haven't tested so I'm not sure if it really works as intended:GriffonSpade wrote:In 2.5, you can only make them negate each other's effects in effects.ruleset. They'll still be buildable.
Code: Select all
[building_manufaktur]
name = _("Manufaktur")
genus = "Improvement"
reqs =
{ "type", "name", "range", "negated"
"Tech", "Monarchy", "Player", FALSE
"Tech", "Industrialization", "Player", TRUE
"Building", "Factory", "City", TRUE
}
--
* 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...
* 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...
- GriffonSpade
- Elite
- Posts: 578
- Joined: Mon Apr 29, 2013 4:41 pm
Re: Two questions on Rulesets
/facepalm. Yeah, I forgot about negated in the Reqs in buildings. Was thinking strictly about obsolete_by and effects. Never entered my mind to block it on the other end.Corbeau wrote:Are you sure? I have this in my ruleset which I still haven't tested so I'm not sure if it really works as intended:GriffonSpade wrote:In 2.5, you can only make them negate each other's effects in effects.ruleset. They'll still be buildable.
reqs =
{ "type", "name", "range", "negated"
Re: Two questions on Rulesets
Variant2 ruleset does that.drakeraider wrote:I recall Oracle and Hanging Gardens being mutually exclusive under certain rules but I don't remember how.
-
- Posts: 27
- Joined: Sat Feb 03, 2018 11:49 pm
Re: Two questions on Rulesets
Corbeu, are you intending on transferring your ruleset to 2.6? I am building my personal on top of yours, because I like how you handled combat and upkeep. But I'm a huge fan of Culture gameplay, so I would love to see a version for the next gen.
Back on topic, thank you everyone for your help on this, I'm going to try it out right away. Also. Is there any discovery on the Printed strings or messages?
Back on topic, thank you everyone for your help on this, I'm going to try it out right away. Also. Is there any discovery on the Printed strings or messages?
Re: Two questions on Rulesets
You would probably need to use Lua scripting for that; there are only a few places where the ruleset lets you specify messages (e.g. the Philosophy Bonus_Tech hack).drakeraider wrote:Can I make the game post custom strings under specific circumstances? Like, triggering a certain effect has a notification printed to the messages log.
Re: Two questions on Rulesets
Answered heredrakeraider wrote:Corbeu, are you intending on transferring your ruleset to 2.6? I am building my personal on top of yours, because I like how you handled combat and upkeep. But I'm a huge fan of Culture gameplay, so I would love to see a version for the next gen.
--
* 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...
* 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...