Newbie Modding Questions

Do you want to help out with Freeciv development? Then check out this forum.
Eusebio Ptolomeu
Posts: 29
Joined: Sat Oct 07, 2017 1:51 am

Re: Newbie Modding Questions

Post by Eusebio Ptolomeu »

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?
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: Newbie Modding Questions

Post by cazfi »

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.
User avatar
Corbeau
Elite
Posts: 1293
Joined: Mon Jan 13, 2014 11:13 pm

Re: Newbie Modding Questions

Post by Corbeau »

cazfi wrote: Mon Jun 26, 2023 8:14 pm
Corbeau wrote: Mon Jun 26, 2023 4:03 pmIf you'd like to take part in an active fork coding community
There's plenty of things to implement in freeciv itself, if one is ready to contribute ;-)

https://osdn.net/projects/freeciv/ticket/
It all depends on the level of the cntributor ;) For example, even in my wildest dreams there is no way in hell I'd be able to contribute to the code. Rulesets are my level. And since I'm doing rulesets, why not do it for the multiplayer community so I can play them with other people? :)
--
* 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...
_Rorr404
Posts: 27
Joined: Wed Oct 18, 2023 2:44 am

Re: Newbie Modding Questions

Post by _Rorr404 »

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?
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: Newbie Modding Questions

Post by cazfi »

_Rorr404 wrote: Wed Oct 18, 2023 2:48 am 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?
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+
_Rorr404
Posts: 27
Joined: Wed Oct 18, 2023 2:44 am

Re: Newbie Modding Questions

Post by _Rorr404 »

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.
Attachments
tokiponan.txt
(3.08 KiB) Downloaded 155 times
luhansk.txt
(3.11 KiB) Downloaded 145 times
donetsk.txt
(3.63 KiB) Downloaded 161 times
dagestan.txt
(2.89 KiB) Downloaded 144 times
alaskan.txt
(2.72 KiB) Downloaded 145 times
Post Reply