patchFreeciv - Patches: patch #3926, Make it easier for users to...

 
 
Show feedback again

patch #3926: Make it easier for users to locally add a custom nation to the default set

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Tue 28 May 2013 09:41:11 PM UTC  
 
Category: rulesetsPriority: 5 - Normal
Status: Need InfoPrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: 2.5.0,2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 05 Oct 2013 02:55:23 PM UTC, comment #4:

>> Perhaps we could make this a bit easier with minimal efforts by
>> having nationlist.ruleset *include "extranations.ruleset"
> How is creating local copy of extranations.ruleset fundamentally > different from creating local copy of nations.ruleset?

nations.ruleset is ruleset-specific, so you have to copy it to e.g. ~/.freeciv/2.5/classic/nations.ruleset and modify, and again for experimental, multiplayer, ... (with the file being potentially different each time since it could contain ruleset specifics, e.g. starting government). (I've tested this.)

Whereas an extranations.ruleset included from nationlist.ruleset you could copy once to ~/.freeciv/2.5/default/extranations.ruleset and then add your nation, and it would be available in any ruleset that uses our nationlist.ruleset (classic, experimental, multiplayer, civ2civ3, plus potentially third-party rulesets).

> But it is not possible to include a nation that has already been
> included. [...]

This case (which I hadn't thought of) is actually already trivial if you know how -- just copy into ~/.freeciv/2.4/nation/cornish.ruleset and start hacking, and this will override the system cornish.ruleset. (Because the search path is searched anew for every file.)

Jacob Nevins <jtn>
Project Administrator
Sat 01 Jun 2013 04:33:35 PM UTC, comment #3:

But it is not possible to include a nation that has already been included. This means that if one wants to change a single, existing nation (if one wishes to, say, make one's hometown the default capital or change the list of eligigble leaders) one cannot include default/nationlist.ruleset unless one makes the changes to the default data for that nation, leading to the kind of copying I understood jtn as wanting to avoid.

Micke <mss_8734>
Thu 30 May 2013 01:37:58 PM UTC, comment #2:

> Would it be a great deal of work to add something overriding
> existing definitions? Something like
> ‘*override_with "my_local_nation.ruleset"’ which one can add
> after including the default nation list.


Nothing prevents including addition nations to nations.ruleset after one has included default/nationlist.ruleset.

> Perhaps we could make this a bit easier with minimal efforts by
> having nationlist.ruleset *include "extranations.ruleset", the
> supplied version of which would be blank except for some
> explanatory comments.


How is creating local copy of extranations.ruleset fundamentally different from creating local copy of nations.ruleset? All the same search path issues would be present, I think. (You'd need to place it as ~/.freeciv/default/extranations.ruleset, or worse, separately for each ruleset ~/.freeciv/classic/extranations.ruleset, ~/.freeciv/experimental/extranations.ruleset... )

Marko Lindqvist <cazfi>
Project Administrator
Thu 30 May 2013 01:19:20 PM UTC, comment #1:

Would it be a great deal of work to add something overriding existing definitions? Something like
‘*override_with "my_local_nation.ruleset"’ which one can add after including the default nation list.

Micke <mss_8734>
Tue 28 May 2013 09:41:11 PM UTC, original submission:

It's quite common for people starting out playing with Freeciv modding to want to add a new nation to their copy of Freeciv, for use with the default ruleset / tilesets / etc.

But this is not very easy; in particular, it involves either modifying the system copies of some default ruleset files, or taking copies of them and hacking them in the user directory.

Perhaps we could make this a bit easier with minimal efforts by having nationlist.ruleset *include "extranations.ruleset", the supplied version of which would be blank except for some explanatory comments. That way there's a clear place to edit -- either by creating a local copy in a user directory, overriding the blank stock one, or editing the system file in-place -- and a locally modded copy won't miss out on any changes made by us in newer versions.

Would also need something for flags -- I guess "extraflags.spec" and "extrashields.spec", or something?

This is intended as a quick fix to make it easier for people to add nations locally. It's not intended to deliver (and doesn't) the ability to package up a new nation as an installable modpack that plays nicely with default data / other modpacks; I think that requires new facilities in Freeciv itself, and should be the subject of another ticket if pursued.

I haven't tested this idea; maybe it has some fatal flaw.

Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by mss_8734 (Posted a comment)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup