[Freeciv-Dev] [patch #3322] Resource requirements
Update of patch #3322 (project freeciv): Status: Ready For Test = Done Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/patch/?3322 ___ 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] [patch #3322] Resource requirements
Follow-up Comment #3, patch #3322 (project freeciv): Hm, I see what you're saying, but there's no reason it should be limited to a terrain+resource combination. You could reasonably require other combinations of properties on a single tile: terrain, resources, specials, roads, bases, a city, ... e.g., Terrain(Mountains) + Resource(Gold) + Base(Gold mine). So rather than calling this Resource, I think it would be a new universal called something like Tile or TileProperties. Its argument would have a mini expression language for specifying combinations of things (possibly with some disambiguation syntax for the case where, say, a special and a resource have the same name). Off-hand, I don't see any reason in principle why such a thing couldn't be done; I think the most complicated aspect would be for those parts of the system that take apart requirements and try to analyse them, such as the AI (to work out how to meet them) and the on-line help. I think those things suggest that the expression language should only be additive (Lake AND Fish, but not Plains AND NOT Road), at least at first. Covering all tile properties with this is unlikely to be much more work than just Terrain+Resources. However... knowing how much effort we have available, I'm inclined to aim for the simple Resource universal first, because that should be easy and obvious, and gets you some capability before we get round to the complicated thing. ___ Reply to this item at: http://gna.org/patch/?3322 ___ 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] [patch #3322] Resource requirements
Follow-up Comment #5, patch #3322 (project freeciv): ; only lake fish reqs = { type, name, range Terrain, Lake (Fish), Adjacent } Do you plan to give city a bonus if it's adjacent to at least one Fish tile? I think tile bonus (such as increase to food/shield/trade) applied to every applicable tile adjacent to city center is more like what you are after: reqs = { type, name, range Resource, Fish, Local Terrain, Lake, Local CityTile, Center, Adjacent } As range here for Resource and Terrain requirements is Local (the tile itself) it's guaranteed that it's the same tile fulfilling both requirements. ___ Reply to this item at: http://gna.org/patch/?3322 ___ 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] [patch #3322] Resource requirements
Update of patch #3322 (project freeciv): Category:None = general Status:None = Ready For Test Planned Release: = 2.5.0 ___ Follow-up Comment #6: Untested patch (file #15841) ___ Additional Item Attachment: File name: ResourceReq.diff Size:12 KB ___ Reply to this item at: http://gna.org/patch/?3322 ___ 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] [patch #3322] Resource requirements
Follow-up Comment #7, patch #3322 (project freeciv): Wow! Thanks for your work. ___ Reply to this item at: http://gna.org/patch/?3322 ___ 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] [patch #3322] Resource requirements
URL: http://gna.org/patch/?3322 Summary: Resource requirements Project: Freeciv Submitted by: jtn Submitted on: Sat Jun 16 12:53:46 2012 Category: None Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: ___ Details: Effects can specify requirements of terrain, specials, bases, and roads, but not resources (wheat, gold, etc). This seems like an oversight that would be easy to fix. ___ Reply to this item at: http://gna.org/patch/?3322 ___ 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] [patch #3322] Resource requirements
Follow-up Comment #1, patch #3322 (project freeciv): Thanks. It would really expand the possibilities of what can be done. One of the reasons I wanted to do this was so that I could lower the output of some specials unless an appropriate facility is built in the city (which may have a tech requirement). ___ Reply to this item at: http://gna.org/patch/?3322 ___ 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] [patch #3322] Resource requirements
Follow-up Comment #2, patch #3322 (project freeciv): I can see two ways in which you would want to search for a resource; Just for itself, and for it on a terrain. e.g. ; Voting governments have a senate that may prevent war ; any fish reqs = { type, name, range Resource, (Fish), Adjacent } ; only lake fish reqs = { type, name, range Terrain, Lake (Fish), Adjacent } So which is more extensible? The first seems simpler but there is no way to get the information of the tile back. Putting a terrain req below it will match even if the terrain is in another square on any range other than CityCentre or Local (Am I correct on this?). As such, I recommend the second way. Even though it takes may take more reqs to define events, it seems a more powerful method. ___ Reply to this item at: http://gna.org/patch/?3322 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev