Rule set authors: Where do you want local DiplRel?

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Posts: 436
Joined: Wed Feb 20, 2013 4:50 pm

Rule set authors: Where do you want local DiplRel?

Postby sveinung » Thu Sep 05, 2013 6:16 pm

In trunk a new requirement type, DiplRel, has been added. It allows requiring a diplomatic relation from one player to another. The diplomatic relationship tested for are "Never met", "War", "Cease-fire", "Armistice", "Peace", "Alliance", "Team", "Gives shared vision", "Receives shared vision", "Hosts embassy", "Has embassy", "Hosts real embassy" or "Has real embassy". Note that while "War" is the same no matter what direction you test in an embassy is "Has embassy" in one direction and "Hosts embassy" in the other.

Who's relationship should be tested, and in what direction to test it, is not always obvious. Making a choice excludes other possible choices. Changing it after it has been part of Freeciv is not done lightly as it breaks backwards compatibility. I have therefore hesitated to blindly charge ahead and add support for local DiplRel everywhere. This is why no support have appeared in the many effects that use helper functions internally even if adding it would be easy.

If you wish to see a requirement vector support local DiplRel make a reply in this thread. Give the name of the effect (/other item) and what relationship it should apply to. If you have a better idea than something already suggested in this thread and the suggestion hasn't been implemented yet post a reply explaining why your idea is better. I promise that I will wait at least 7 days before beginning to implement a suggestion I first see here[1]. This gives people time to object. I don't promise that everything suggested will be implemented, even if everyone in the thread agrees how it should be done.

Already implemented
  • Extra (road, base, special) build requirements. From the player trying to build to the player owning the tile.
  • Action enablers actor requirements. From the actor owner to the target owner.
  • Action enablers target requirements. From the target owner to the actor owner.
  • The effect Unit_Bribe_Cost_Pct. From the target unit owner to the briber.

[1] Unless I already had the idea. It should also be clear that I have no control over what other people do.