Modifying the United Nations Rule Set

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
User avatar
Steve R.
Posts: 33
Joined: Thu May 21, 2015 7:40 pm
Location: Morehead City, NC
Contact:

Modifying the United Nations Rule Set

Postby Steve R. » Thu Sep 09, 2021 3:04 am

I would like to modify the United Nations ruleset, assuming that is possible. I now nothing about making modifications to a ruleset. The following webpage, Rulesets appears to be a good starting point, but there is no reference to "Wonders". There is this subcategory: Buildings.ruleset, which states: "Improvements, Wonders, Small Wonders, and Special buildings like Coinage are defined here. See Editing Buildings for more information. " (emphasis added). Going to Editing Buildings did not display any useful information/examples.

I would like to have the following features added to the United Nations wonder:
  • You get an embassy in every nation.
  • You can force a cease-fire for a specific number of turns.
Last edited by Steve R. on Thu Sep 09, 2021 7:27 pm, edited 2 times in total.

Ignatus
Elite
Posts: 490
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: Modifying the United Nations Rule Set

Postby Ignatus » Thu Sep 09, 2021 8:08 am

Steve R. wrote:You get an embassy in every nation.

That is an effect. Effects are defined in effects.ruleset file. Look at standard civ2 ruleset and add to your one lines for UN like it has for "Marco Polo's Embassy" (you need one or two sections depending on game version).
You can force a cease-fire for a specific number of turns.

Sorry, not yet possible. One has been developing a patch for it but I have not heared of any results.

User avatar
Steve R.
Posts: 33
Joined: Thu May 21, 2015 7:40 pm
Location: Morehead City, NC
Contact:

Re: Modifying the United Nations Rule Set

Postby Steve R. » Thu Sep 09, 2021 12:02 pm

Editing effects is located here.
----------------------------------------------------------------------------------------------------------------
United Nations effect, unaltered from the effects.ruleset file.

Code: Select all

[effect_united_nations]
type    = "Unit_Recover"
value   = 2
reqs   =
    { "type", "name", "range"
      "Building", "United Nations", "Player"
    }

---------------------------------------------------------------------------------------------------------------
To have multiple effects, would the approach below be the correct method to establish embassies?

Code: Select all

[effect_united_nations]
type    = "Unit_Recover"
value   = 2
reqs   =
    { "type", "name", "range"
      "Building", "United Nations", "Player"
    }

[effect_united_nations]
type    = "Have_Embassies"
value   = 1
reqs   =
    { "type", "name", "range"
      "Building", "United Nations", "Player"
    }