patchFreeciv - Patches: patch #4774, Unit flag to prevent barbarian...

 
 
Show feedback again

patch #4774: Unit flag to prevent barbarian appearance from huts

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Thu 05 Jun 2014 12:45:25 AM 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.

 

Sat 14 Jun 2014 11:29:51 PM UTC, comment #3:

> I don't think scripting interface should allow use of
> non-existing flags (that are most likely typo).

Indeed, it doesn't. That complicates this.

Jacob Nevins <jtn>
Project Administrator
Thu 05 Jun 2014 08:18:30 PM UTC, comment #2:

> a user flag "NoBarbs", and in rulesets where that's not
> defined, no unit gets this property.


I don't think scripting interface should allow use of non-existing flags (that are most likely typo). Maybe we could add something like "does_unit_type_flag_exist(string)" to check it before actual use, though.

Marko Lindqvist <cazfi>
Project Administrator
Thu 05 Jun 2014 03:02:56 AM UTC, comment #1:

Explicitly adding a NoBarbs UserFlag rather than enforcing this in the engine has the side effect of providing a nice place to document the feature in the units ruleset.

Emmet Hikory <persia>
Project Member
Thu 05 Jun 2014 12:45:25 AM UTC, original submission:

Currently, units with GameLoss flag cannot unleash barbarians from huts.

I've sometimes thought it might be useful if other units in custom rulesets could have this property (like CivIV Scout units).

Since hut behaviour is implemented in Lua, this doesn't need a new built-in flag; our default.lua could honour a user flag "NoBarbs", and in rulesets where that's not defined, no unit gets this property. So it's just a convention that this user flag has this behaviour, which ruleset authors can override.
(Should GameLoss units should continue to have this effect for general sanity, or do we explicitly add NoBarbs to existing GameLoss units?)

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 persia (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