patchFreeciv - Patches: patch #3923, Allow multiple partisan unit types.

Show feedback again

patch #3923: Allow multiple partisan unit types.

Submitted by:  Micke <mss_8734>
Submitted on:  Mon 27 May 2013 09:31:03 PM UTC  
Category: rulesetsPriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: 

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Mon 03 Jun 2013 11:00:03 PM UTC, comment #3:

> 0 units without any problems except a lua script error in the
> lattermost case.

This belongs to new ticket, but either the lua script should be fixed or maybe ruleset sanity checking should prevent one from having a ruleset with partisan effect, but no partisan unit - that's certainly not something ruleset author meant to have.

Marko Lindqvist <cazfi>
Project Administrator
Fri 31 May 2013 03:58:11 PM UTC, comment #2:

The updated version handles 2, 1 or 0 units without any problems except a lua script error in the lattermost case.

(file #18037)

Micke <mss_8734>
Tue 28 May 2013 05:05:34 PM UTC, comment #1:

I finally remembered why this wouldn't work: there is no guarantee that a given ruleset requires the player on whose behalf partisans are generated to be able to build partisans (e.g. the Classic ruleset only requires that Guerilla Warfare be known in range World, rather than by the player). Unless I am misreading best_role_unit_for_player(), if a player wouldn't be able to build a unit directly, that player would not be granted any partisans, or there could be an issue with LUA script handling (and it would probably trigger a null utype assert in unit_virtual_create() if neither of the above caused issues). The above notwithstanding, if there is a test case demonstrating this speculation as wrong, it should not block the patch.

I suspect that using "Partisan" and "PartisanTech" in a matter similar to "Hut"/"HutTech" or "BarbarianBuild"/"BarbarianBuildTech", etc. would allow safe partisan selection without these potential issues: players granted partisans but unable to build partisans directly could be granted the "Partisan" unit, and players capable of building any of the "PartisanTech" units could be granted the most advanced partisan.

Emmet Hikory <persia>
Project Member
Mon 27 May 2013 09:31:03 PM UTC, original submission:

The supplied diff alters one line in server/unittools.c and the help text for the "Partisan" role in several ruleset unit definitions.
This allows rulesets to define more than one partisan unit type.
Tested with trunk revision 22904.

Micke <mss_8734>


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

Attach File(s):

Attached Files
file #18037:  partisans.diff added by mss_8734 (5kB - text/x-diff)
file #18017:  partisans.diff added by mss_8734 (4kB - 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 persia (Posted a comment)
  • -unavailable- added by mss_8734 (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.


    Error: not logged in



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 31 May 2013 03:58:11 PM UTCmss_8734Attached File-=>Added partisans.diff, #18037
    Mon 27 May 2013 09:31:03 PM UTCmss_8734Attached File-=>Added partisans.diff, #18017
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup