I've been taking a look at the link about the Lua resources provided by cazfi. I haven't the chance to put it into practice yet, but reading the list let me give a very rough idea of how to implement the "revolting cities" feature.
If I'm not mistaken, there are no specific Lua commands to transfer ownership of a city from one player to the other, so this wouldn't be possible in a direct manner. One way to achieve this transfer of ownership, ina very indirect manner, would be to do so:
1- Find a city which has been in disorder for some time (I think the find and city modules would be useful here).
2- Try to read all that is possible about this city (name, tile, size, buildings and any unit which is homed to this city) and store it for later use.
3- Destroy the city.
4-Create a new city (after creating a new player, of course) using all the data gathered by the last step, also add a government center to this city. The edit feature would be useful here).
5- Take all units homed in the older city, make this new city these unit's new home city, and transport them to this new city.
Of course, this method is a little more convoluted than a simple "transfer ownership" would be, and I have the feeling it wouldn't be very efficient memory-wise, maybe. But in terms of gameplay, it should give roughly the same results in terms of gameplay, wouldn't it?
Newbie Modding Questions
Re: Newbie Modding Questions
One thing you should do, now that you have a clearly defined need for an addition to the lua API ( method to transfer city from a player to another ), is to open a ticket about it -> https://osdn.net/ticket/newticket.php?group_id=12505
With the current freeciv versions you may need to use the method you described, but we should make it better for the future versions.
With the current freeciv versions you may need to use the method you described, but we should make it better for the future versions.
Re: Newbie Modding Questions
It all depends on the level of the cntributorcazfi wrote: ↑Mon Jun 26, 2023 8:14 pmThere's plenty of things to implement in freeciv itself, if one is ready to contribute
https://osdn.net/projects/freeciv/ticket/


--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
Re: Newbie Modding Questions
I have recently been working on some nations for Freeciv 21, how would I go about making a request to add them to standard Freeciv?
Re: Newbie Modding Questions
Officially; By opening a ticket on https://osdn.net/ticket/newticket.php?group_id=12505 , but osdn has constant network problems at the moment. If it doesn't work, this forum is as good a place as any. Some people provide patches via github pull requests.
Note that freeciv21 is GPLv3+ licensed. Freeciv is GPLv2+, so requires ability to distribute content as GPL2. Be sure to submit only your own work, or things that you've got permission from the author to relicense under GPLv2+
Re: Newbie Modding Questions
Most of them were created by someone else, although the few that are created by me I will be willing to upload. (So far I got, Alaska, Dagestan, Donetsk, Luhansk, Toki Pona) and I am thinking of doing 9 more (Ambazonia, ASEAN, Ido, Novial, Titan, West Florida, East Florida, Manchukuo, and Taiping) I did complete a nation for Ubuntu but then I realized it was copyrighted.
Edit 1: And yes I was doubtful of using osdn because it looked broken.
Edit 2: Attached completed nations without flags.
Edit 1: And yes I was doubtful of using osdn because it looked broken.
Edit 2: Attached completed nations without flags.
- Attachments
-
- tokiponan.txt
- (3.08 KiB) Downloaded 35 times
-
- luhansk.txt
- (3.11 KiB) Downloaded 36 times
-
- donetsk.txt
- (3.63 KiB) Downloaded 32 times
-
- dagestan.txt
- (2.89 KiB) Downloaded 35 times
-
- alaskan.txt
- (2.72 KiB) Downloaded 37 times