DoaNE will be soon open source

M07

Prince
Joined
Mar 29, 2009
Messages
514
Location
Canada
Hello everyone,

I know that a lot of modders asked me a lot to have the source code of DoaNE and we always said no.

But after the last request of Lib.Spi't, we have reconsider the question and I will make the code open source.

I will do it in the same time than my release in January.

We just would like that, if some modders want to modify the DoaNE version, please try to keep the French translation.

Merry chrismas to all of you ;)
 
I see Lib.Spi't once again obstructed my plan. I too planned to bring up this topic once again, but I guess I was too slow :p

I think it's a great move. The modding community works best with open source where modders from different mods help each other and share code without making the mods identical. The best example of this is likely the Russian translator, who showed up for M:C. He left, but he did make me add Russian support to the DLL. RoM copied my work, expanded on the idea and it now supports all sorts of languages, including some Asian ones. Despite being totally different mods, they shared the same problem with reading text xml files, which mean they can share the code to solve the problem as well. Another reason why open source is important is that it allows bugs to be fixed by anybody, not just the original modder.

I would dare to say that open source makes DoaNE a real mod. Closed source mods tend to die out and be forgotten a whole lot easier than open source mods and looking at the still active mods (bts and colo), the trend moves towards having a public svn/git server where people can get the newest development version if they like. DoaNE is doing great despite being closed source (so far), but who knows what the future will bring?

Access to the source code makes me more interested in DoaNE. Being able to play, notice a feature I didn't pay attention to before and have the ability to read the source makes it more interesting than just the gameplay. It also mean if I encounter a bug (unlikely, DoaNE seems pretty stable) I have a chance to look into it myself, which mean a bug report could be "line X should say...". It also unlocks the ability to profile to see if the sourcecode can be made faster, though I wouldn't classify DoaNE as slow (certainly not compared to last release of col2071 :lol:). Open source really brings out a lot of options, but time will tell if I get around to actually use them. It all depends on how hooked I get on the next release and how well M:C can do temporally without me.

We (the M:C modders) have talked many times about the ability to put multiple types of yields into a single cargo slot. It's an awesome feature, which works very well in DoaNE. I have wanted to copy paste it multiple times, but recently I have reached the conclusion that I wouldn't do that, even if I could because it should be based on a JIT array in M:C. I still wouldn't mind reading the DoaNE code for this, even if I don't plan to copy paste it.

We just would like that, if some modders want to modify the DoaNE version, please try to keep the French translation.
I see no reason why it should be removed. It would be extra work and it will not restrict non-French speaking modders. Still it's valid to mention as some people come up with the strangest ideas once in a while.

Not translating new strings due to lack of French skills is a different issue, which could be hard to avoid, but a few untranslated strings can't justify removing the translation. That would be downright silly.
 
Hello guys,

I am glad to see it makes you happy. :)
It also mean if I encounter a bug (unlikely, DoaNE seems pretty stable)
Don't worry, bugs exists in my code. More you develop, more you will have bugs in your project.
It also unlocks the ability to profile to see if the source code can be made faster, though I wouldn't classify DoaNE as slow
My plan for the next version of DoaNE, was to clean the code and make it faster.
Even if the mod is not slow, it is for sure perfectible.

One question, in your team, do you play together or you just play in solo?
 
We are spread around all over the place making playing together a tricky issue, the subject has been brought up a few times in the past, but has never come to fruition.
Arf, it is too bad.

I would be glad to play with you on the next version of DoaNE. I will let you time to get used to this version, but i think it could be funny.

I already play with Dazio to DoaNE and it is really great :)
 
One question, in your team, do you play together or you just play in solo?
Yes and no. RaR works well in network games and the same goes for RaRE. Sadly M:C will desync right away in network games because Kailric started the mod without knowing anything about this issue. To be fair, it's completely undocumented and I'm not sure if I had figured it out on my own without prior experience with network syncing in games. I do plan to fix this eventually, but it's not the top priority.

When I first started modding, I worked on RaR. Less than a week after gaining access, I found and fixed a desync problem nobody ever encountered while playing. I found it simply by reading the code. That was back in the odd days where I was both a really inexperienced modder and a really experienced on at the same time :crazyeye:

I still haven't figured out how to define my own network packages though. I have the impression that it is possible and that doing that will allow sending more complex data, like strings. If anybody knows how to do that, then please tell :)

If you ask if I personally play with people I found the forum, then the answer is no. I only play with people I know in the offline world as well. Oh and I play with myself to debug desync issues. Not sure if that counts.
 
RaR works well in network games and the same goes for RaRE. Sadly M:C will desync right away in network games because Kailric started the mod without knowing anything about this issue. To be fair, it's completely undocumented and I'm not sure if I had figured it out on my own without prior experience with network syncing in games. I do plan to fix this eventually, but it's not the top priority.
Ah ah, it remember me before, when DoaNE was totally broken in MP games cause of that. If I have time I will write a little documentation on it.

I have the impression that it is possible and that doing that will allow sending more complex data, like strings. If anybody knows how to do that, then please tell
He he, I know but it is a secret. :D Just kidding.
You can do that in python, thanks to the CvEventManager.py file.

For example, for the seaway name i have to send the name written by a player to all other players :

So you have to do that:
Code:
def __init__(self):
		....
		self.Events={
			....
			CvUtil.EventCreateSeaway: ('CreateSeaway', self.__eventCreateSeawayApply, self.__eventCreateSeawayBegin),

def __eventCreateSeawayBegin(self, px, py):
		popup = CyPopup(CvUtil.EventCreateSeaway, EventContextTypes.EVENTCONTEXT_ALL, True)
		popup.setUserData((px, py))
		popup.createEditBox(u"", 0)
		popup.setEditBoxMaxCharCount( 19, 26, 0 )
		popup.addButton(localText.getText("TXT_KEY_MAIN_MENU_OK", ()))
		popup.launch(False, PopupStates.POPUPSTATE_IMMEDIATE)

	def __eventCreateSeawayApply(self, playerID, userData, popupReturn):
		iButton = popupReturn.getButtonClicked()
		if iButton == 0:
			'Create Seaway'
			px = userData[0]
			py = userData[1]
			player = gc.getPlayer(playerID)
			plot = CyMap().plot(px, py)

			seawayName = popupReturn.getEditBoxString(0)
			if (len(seawayName) == 0):
				return
			if (len(seawayName) > 30):
				seawayName = seawayName[:30]

			player.addSeaway(plot, seawayName)# Here it is a C++ call with a string in parameter. TADA!! :)

If you ask if I personally play with people I found the forum, then the answer is no. I only play with people I know in the offline world as well.

Ohh, it too sad.
What I propose you, is to play together one day with DoaNE 5.0. I think I deserve it, don't you think? :)

Oh and I play with myself to debug desync issues. Not sure if that counts.
Ah Ah, not sure indeed.
 
Ah ah, it remember me before, when DoaNE was totally broken in MP games cause of that. If I have time I will write a little documentation on it.
I wrote this at some point, but I never got started writing real documentation. I think I know how it works, but going from that to writing something other people can learn from... well I never got around to do that.
http://forums.civfanatics.com/showthread.php?t=525430

For example, for the seaway name i have to send the name written by a player to all other players :
So basically you just create the event, open a popup window in __eventCreateSeawayBegin and whenever somebody press a button, it calls __eventCreateSeawayApply on all computers?

If so, then it is once again one of those wonderful undocumented features in the exe. I wonder if I can use this system with no popup to generate network traffic without the need for a popup window. That could be useful for the yield/traderoute GUI we have talked about a while ago for M:C.

What I propose you, is to play together one day with DoaNE 5.0. I think I deserve it, don't you think? :)
I will lose big time. Never play a game against its creator. People learned that the hard way with me :lol:

I don't really play against human players. I do play coop against the AI occasionally though. This evens out the unfairness of skills and luck with the map and events.
 
I would certainly be up for a game some time, once my brain stops melting out my ears from the latest version of the game! :D

It was always those damn Era goals that got me!

I want to expand!! Oh damn now I have to make twenty soldiers to meet the era goal.... :aargh:

Hmm... maybe I need to download DoaNE again and have another play! (or try and find where ever it is buried on my old hardrive!
 
Are you placing the code on GitHub so folks can submit bug fixes via pull request?

One thing I can't figure out which I suspect is hardcoded into the DLL is the CyCity.canTrain() function - I'm trying to mod the mod so that I can train warships (frigates) in the colonies. Nothing in the xml indicates that I can't... so I'm guessing that there's something the DLL that is blocking this?
 
Are you placing the code on GitHub so folks can submit bug fixes via pull request?
I placed M:C on GitHub and then we later decided to move to SourceForge because GitHub has a 1 GB limit for free accounts while SourceForge has the limit "anything reasonable for the project". I'm not sure what they define as reasonable, but I have seen 7 GB of game graphics being reasonable. This mean using SourceForge allows us to add all the graphics without considering server space while GitHub doesn't provide that freedom. GitHub is more feature rich, which mean it really is a tradeoff.

I fully support placing the code on a public git server. It makes it easier to keep their local copy up to date while adding content of their own. At the same time if those modifications are also on public git servers, they can easily be merged back into DoaNE, meaning it is a two way transfer of improved code.
 
It was always those damn Era goals that got me!

I want to expand!! Oh damn now I have to make twenty soldiers to meet the era goal....

He he, i understand but it one a the feature I love in this mod, to have eras and try to be the first one to reach it :)
 
Are you placing the code on GitHub so folks can submit bug fixes via pull request?
My code is since a long time in Bitbucket., in case you don't know it is GIT repository. But currently it is a private repository.

One thing I can't figure out which I suspect is hardcoded into the DLL is the CyCity.canTrain() function - I'm trying to mod the mod so that I can train warships (frigates) in the colonies. Nothing in the xml indicates that I can't... so I'm guessing that there's something the DLL that is blocking this?
Shame on me, it is hard coded : see the code below :
Code:
switch(eUnit) {
			case UNIT_FRIGATE:
			case UNIT_SHIP_OF_THE_LINE:
			case UNIT_MAN_O_WAR:
				return false;
		}
 
My code is since a long time in Bitbucket., in case you don't know it is GIT repository. But currently it is a private repository.


Shame on me, it is hard coded : see the code below :
Code:
switch(eUnit) {
			case UNIT_FRIGATE:
			case UNIT_SHIP_OF_THE_LINE:
			case UNIT_MAN_O_WAR:
				return false;
		}

Thanks. I suppose I can just make a copy of the unit that can be manufactured in the colonies.

I think it makes some historical sense to allow colonies to build warships. One of the largest warships of the era, the Santísima Trinidad (almost 5000t), was built in Havana (and was the flagship of the Spanish against the English in the American Revolutionary War)

https://en.wikipedia.org/wiki/Spani...la_Santísima_Trinidad#Design_.26_construction
 
I think it makes some historical sense to allow colonies to build warships. One of the largest warships of the era, the Santísima Trinidad (almost 5000t), was built in Havana (and was the flagship of the Spanish against the English in the American Revolutionary War)

https://en.wikipedia.org/wiki/Spani...la_Santísima_Trinidad#Design_.26_construction

We agreed about that, but you can see in your link that this ships was launched the 3 March 1769 and the Colonization game ends in 1776. So we may consider it but only at the end of the game.
 
Top Bottom