[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #15, bug #13600 (project freeciv): Could you please add the change to the README file? (file #5874: NegatedREADME_13600.diff) ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #16, bug #13600 (project freeciv): NegatedREADME_13600.diff already committed as r15712. ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #17, bug #13600 (project freeciv): ups; I did not used the right directory ...; Yes, it is there! ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Update of bug #13600 (project freeciv): Status: Ready For Test = Fixed Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #10, bug #13600 (project freeciv): Correct. Now back to README.effects text. Do we agree on attached patch, where I have dropped reference to negated effect? (file #5874) ___ Additional Item Attachment: File name: NegatedREADME_13600.diff Size:0 KB ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #11, bug #13600 (project freeciv): Yes it's fine. What about a possible cleanup patch to use 'negated' and remove 'nreqs'? ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #13, bug #13600 (project freeciv): You are right; it can be don both ways and never change a running system! I think it's important that the possibility to do a negation of a reqirement this way is mentioned somethere (especially for ruleset authors and - within the rulesets - for builings). With the patch a hint can be found in the README file ... ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #3, bug #13600 (project freeciv): I debugged this and it turned out that problem was not in the fact that requirements are 'negated' but in their amount. There is hardcoded constant MAX_NUM_REQS = 4 and more reqs chokes the network code. This limitation is not even documented! ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #4, bug #13600 (project freeciv): Attached patch increases MAX_NUM_REQS to 10 and, more importantly, adds ruleset loading time check that it's not exceeded. This way user at least gets sensible error message immediately instead of weird crash later on. (file #5871) ___ Additional Item Attachment: File name: MaxReqsLimit_13600.diffSize:4 KB ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #5, bug #13600 (project freeciv): Thanks for your patch! I tested it and freeciv is runing now with the changed ruleset. The desired effect for the Hydro Plant is there ... Would it be possible to include a hint in the README.effects file (version2-nreqs_impr.patch.diff)? Does this mean that the nreqs fields in effects.ruleset can be implemented this way? I think this would be a cleaner way. (file #5873) ___ Additional Item Attachment: File name: version2-nreqs_impr.patch.diff Size:0 KB ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Update of bug #13600 (project freeciv): Status:None = Ready For Test Assigned to:None = cazfi ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #6, bug #13600 (project freeciv): Would it be possible to include a hint in the README.effects file ...effect or requirement is negated... What do you mean by negated effect? It seems to me that it should simple say that requirement is negated. ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #7, bug #13600 (project freeciv): If I understand the code right, the same functions are used for effects and buildings. So I could negate an effect in the effects 'reqs' part to implement the 'nreqs'. ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #8, bug #13600 (project freeciv): It's not negating the effect, but requirement of the effect. 'nreq' stands for 'negated requirements'. ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #1, bug #13600 (project freeciv): Going slightly off topic; it's on purpose so that you can build new kind of plant in a city that already has one. Otherwise player would be forced to sell old one before *starting* to build new one, meaning old plant would not be used in the process of building new one. ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
Follow-up Comment #2, bug #13600 (project freeciv): OK; but it should working, or? (it is not used at all in the ruleset ...) ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13600] ruleset requirement option: negated
URL: http://gna.org/bugs/?13600 Summary: ruleset requirement option: negated Project: Freeciv Submitted by: syntron Submitted on: Samstag 30.05.2009 um 22:05 Category: rulesets Severity: 2 - Minor Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Release: Operating System: None ___ Details: In the code there are the requirement options 'survives' and 'negated'. I tried to use the second one as follows (see also nreqs_impr.patch.diff): --- start buildings.ruleset --- [building_hydro_plant] name= _(Hydro Plant) genus = Improvement reqs= { type, name, range, negated Tech, Electronics, Player, 0 Building, Factory, City, 0 Special, River, Adjacent, 0 Building, Power Plant, City, 1 Building, Nuclear Plant, City, 1 Building, Solar Plant, City, 1 } graphic = b.hydro_plant graphic_alt = - --- stop buildings.ruleset --- If I understand the code right, this should restrict the creation of a hydro plant if another power plan was build in the city. The rules are read OK but than an assertion failt at requirements.c:385: universal_number (see nreqs_impr.log.txt) For the effect this (?) is done with nreqs ... ___ File Attachments: --- Date: Samstag 30.05.2009 um 22:05 Name: nreqs_impr.patch.diff Size: 2kB By: syntron http://gna.org/bugs/download.php?file_id=5850 --- Date: Samstag 30.05.2009 um 22:05 Name: nreqs_impr.log.txt Size: 1kB By: syntron http://gna.org/bugs/download.php?file_id=5851 ___ Reply to this item at: http://gna.org/bugs/?13600 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev