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: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 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.

 

(Jump to the original submission Jump to the original submission)

Sun 13 Jul 2014 11:10:54 AM UTC, SVN revision 25526:

Update svn:ignore after patch #4782, patch #4753, and patch #3926.

(Browse SVN revision 25526)

Jacob Nevins <jtn>
Project Administrator
Mon 09 Jun 2014 08:23:44 PM UTC, SVN revision 25112:

Added data directory "override" containing empty files of the types needed for
creating custom nations. They are included from respective main files, and user can
simply place their own files with real nations earlier in the data path, overriding
the empty ones.

Requested by Jacob Nevins

See patch #3926

(Browse SVN revision 25112)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 05 Jun 2014 11:37:22 PM UTC, comment #7:

- Updated against svn
- Updated the nationlist.ruleset comment about adding new local nations

(file #20933)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 03 Jun 2014 08:55:22 PM UTC, comment #6:

Thanks.

Might be worth also tweaking the words in nationlist.ruleset to point at these new files as an alternative, where currently it says:

Jacob Nevins <jtn>
Project Administrator
Tue 03 Jun 2014 01:50:23 AM UTC, comment #5:

I remember being strongly against this for it being fundamentally flawed, but after thinking it through myself and coming to same conclusion semantically different way made me supporter of the idea. The main difference is that I now don't expect user to find the files to be overridden and start hacking them (actions that require almost equal skill to adding nation without this change) but just to drop the replacements in place.

Attached patch adds data/override -directory containing empty nation.ruleset (included from default/nationlist.ruleset), flags.spec, flags-large.spec, shields.spec, and shields-large.spec (all included from respective .spec files).

(file #20916)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
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 AdministratorIn charge of this item.
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:
   

Attached Files
file #20933:  NationOverride-2.patch added by cazfi (6kB - text/x-diff)
file #20916:  NationOverride.patch added by cazfi (5kB - text/x-diff)

 

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

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 09 Jun 2014 08:24:01 PM UTCcazfiStatusReady For Test=>Done
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Thu 05 Jun 2014 11:37:22 PM UTCcazfiAttached File-=>Added NationOverride-2.patch, #20933
    Tue 03 Jun 2014 01:50:23 AM UTCcazfiAttached File-=>Added NationOverride.patch, #20916
      StatusNeed Info=>Ready For Test
      Planned Release2.5.0,2.6.0=>2.6.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup