Jump to content

crazy_Baboon

Community Members
  • Posts

    97
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by crazy_Baboon

  1. Hi, I am trying to adapt 3D models from FlightGear and use them in 0ad. FlightGear models are stored in the .ac format, while 0ad uses collada .dae. In Blender 2.82, I have successfully imported an .ac model, but when i try to convert it to collada (.dae), the model appears to loose its texture: The .ac file in Blender: The converted .dae file in 0ad: Does anyone know why the texture is not showing in the collada .dae file? How do I fix this? Thanks!
  2. Hi, I was wondering... is there a mod in 0ad that features modern military warfare (heavy panzer, fighter jets, nukes... etc)? I remember there used to a great game called rise of nations, that would take you from pre-history to the 2000s.
  3. Hi, I have noticed the mouse movement is reversed in ALPHA24, compared to previous alphas and the alpha 24 scenario editor. Thanks! OS: Linux Ubuntu 18.04 Mouse: Several I have tested.
  4. Hi folks! I have designed a new map: Afrika Australis (Southern Africa). It is based on NASA blue marble map series. The map includes several biomes, ranging from sandy deserts to mountain climate and tropical basin - the biomes are based on https://www.gifex.com/fullsize-en/2010-01-11-11674/Biomes_of_Africa.html. The natural resource distribution is based on https://www.aljazeera.com/indepth/interactive/2016/10/mapping-africa-natural-resources-161020075811145.html, with most stone occurring on the west and most metal occurring on the east of the continent. Given the size of the continental shelf, expect brutal continental battles. Here are some screenshots: Download the map - featured in the screenshots above - here: Afrika_Australis.xmlAfrika_Australis.pmp For a more updated version of the map, please check https://gitlab.com/CrazyBaboon/0ad_maps This map was designed to work with Alpha 24. Let me know what you think of the map! Thanks! You can also have a look at my other 0ad maps, in my gitlab repo https://gitlab.com/CrazyBaboon/0ad_maps
  5. This map only makes sense as it is really: tropical Indonesia and temperate china - 2 biomes in a single map. The idea of having something like "desert Indonesia" does not appeal to me. Of course, the license of the map allows you to add whatever biomes you like! However, I am interested to do more regions of the world (with different biomes).
  6. This is a tropical naval map consisting of mainland Vietnam, Laos, Malaisia, Camboja together with Indonisia. All players start in large jungle islands with only wood as a primitive resource. To get metal and stone, the players need to go out in the sea and find these resources elsewhere. But beware of the animal beasts scattered all over these rich areas... If I remember well,. this is a giant map that can take up to 6 players. Despite the abundant vegetation, it runs smoothly on an old desktop from 2011. Also, If I remember, i adapted it from the Blue Marble NASA map series and its based on the ALPHA 24 version of 0ad (that is currently under development). Let me know what you think!
  7. Sorry guys, arc/phabricator appears to be ******** to me - maybe I dislike it even more than the regular gitlab/github workflow. It will take some time and head banging to do anything useful with it... Thanks @Nescio that's a pretty useful summary.
  8. Hi, @Angen Yep! Thanks @Nescio, I will have a look!
  9. Hi, I am new to phabricator and arcanist. I have an updated local clone of 0ad git repository. I am trying to apply some new revision, for example D375. Now, if I try arc patch D375 and I get: INFO Base commit is not in local repository; trying to fetch. Created and checked out branch arcpatch-D375. Checking patch binaries/data/mods/public/simulation/components/ProductionQueue.js... error: while searching for: Engine.PostMessage(this.entity, MT_ProductionQueueChanged, { }); // If this is the first item in the queue, start the timer if (!this.timer) { var cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); this.timer = cmpTimer.SetTimeout(this.entity, IID_ProductionQueue, "ProgressTimeout", g_ProgressInterval, {}); } } else { error: patch failed: binaries/data/mods/public/simulation/components/ProductionQueue.js:383 error: while searching for: // Unset flag that training is blocked cmpPlayer.UnBlockTraining(); } if (item.technologyTemplate) { // Mark the research as started. var cmpTechnologyManager = QueryOwnerInterface(this.entity, IID_TechnologyManager); cmpTechnologyManager.StartedResearch(item.technologyTemplate, true); } item.productionStarted = true; if (item.unitTemplate) Engine.PostMessage(this.entity, MT_TrainingStarted, {"entity": this.entity}); } // If we won't finish the batch now, just update its timer if (item.timeRemaining > time) { item.timeRemaining -= time; // send a message for the AIs. Engine.PostMessage(this.entity, MT_ProductionQueueChanged, { }); break; } if (item.unitTemplate) { var numSpawned = this.SpawnUnits(item.unitTemplate, item.count, item.metadata); error: patch failed: binaries/data/mods/public/simulation/components/ProductionQueue.js:718 error: while searching for: { // All entities spawned, this batch finished cmpPlayer.UnReservePopulationSlots(item.population * numSpawned); time -= item.timeRemaining; this.queue.shift(); // Unset flag that training is blocked cmpPlayer.UnBlockTraining(); error: patch failed: binaries/data/mods/public/simulation/components/ProductionQueue.js:747 error: while searching for: cmpSoundManager.PlaySoundGroup(template.soundComplete, this.entity); } time -= item.timeRemaining; this.queue.shift(); Engine.PostMessage(this.entity, MT_ProductionQueueChanged, { }); } } // If the queue's empty, delete the timer, else repeat it if (this.queue.length == 0) { this.timer = undefined; // Unset flag that training is blocked // (This might happen when the player unqueues all batches) cmpPlayer.UnBlockTraining(); error: patch failed: binaries/data/mods/public/simulation/components/ProductionQueue.js:794 error: while searching for: else { var cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); this.timer = cmpTimer.SetTimeout(this.entity, IID_ProductionQueue, "ProgressTimeout", g_ProgressInterval, data); } }; ProductionQueue.prototype.PauseProduction = function() { this.timer = undefined; this.paused = true; }; ProductionQueue.prototype.UnpauseProduction = function() { this.paused = false; var cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); this.timer = cmpTimer.SetTimeout(this.entity, IID_ProductionQueue, "ProgressTimeout", g_ProgressInterval, {}); }; ProductionQueue.prototype.OnValueModification = function(msg) { // if the promotion requirements of units is changed, error: patch failed: binaries/data/mods/public/simulation/components/ProductionQueue.js:813 Applying patch binaries/data/mods/public/simulation/components/ProductionQueue.js with 5 rejects... Rejected hunk #1. Rejected hunk #2. Rejected hunk #3. Rejected hunk #4. Rejected hunk #5. Patch Failed! Usage Exception: Unable to apply patch! Anyone can provide some help on this? Thanks!
  10. @Stan` Hum... I thought so, but similar errors happen to my patch: and that one is quite recent... git apply -p . D2399.diff --reject Checking patch libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp... error: while searching for: #include <float.h> #endif #ifdef WIN32 #define ecvt _ecvt #endif // WIN32 #ifndef SAFE_DELETE_ARRAY #define SAFE_DELETE_ARRAY(ptr) if (ptr != NULL) { delete [] ptr; ptr = NULL; } #endif template <class Char, class FloatType> void FloatToString(FloatType f, Char* sz) { error: patch failed: libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp:18 error: while searching for: int decimal, sign; // ecvt rounds the string for us: http://www.datafocus.com/docs/man3/ecvt.3.asp char* end = ecvt(f, digitCount, &decimal, &sign); if (sign != 0) (*buffer++) = '-'; int count = digitCount; error: patch failed: libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp:34 Applying patch libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp with 2 rejects... Rejected hunk #1. Rejected hunk #2. Is this process of "applying patches" any friendlier in SVN?
  11. ok. On a brand new 0ad git clone folder: I just tried git apply -p . D1592.diff --reject : D1592.diff:46: trailing whitespace. D1592.diff:88: trailing whitespace. D1592.diff:94: trailing whitespace. D1592.diff:127: trailing whitespace. D1592.diff:136: trailing whitespace. Checking patch libraries/source/spidermonkey/FixpsutilFreeBSD.diff... Applied patch libraries/source/spidermonkey/FixpsutilFreeBSD.diff cleanly. warning: squelched 1 whitespace error warning: 6 lines add whitespace errors. ok, this seems to have worked. Now moving on to git apply -p . D1593.diff --reject : Checking patch source/tools/atlas/AtlasObject/AtlasObjectImpl.cpp... error: while searching for: void AtObj::add(const char* key, const wxString& value) { add(key, value.wc_str()); } void AtObj::add(const char* key, const wchar_t* value) error: patch failed: source/tools/atlas/AtlasObject/AtlasObjectImpl.cpp:164 error: while searching for: void AtObj::set(const char* key, const wxString& value) { set(key, value.wc_str()); } void AtObj::set(const char* key, const wchar_t* value) error: patch failed: source/tools/atlas/AtlasObject/AtlasObjectImpl.cpp:187 Checking patch source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp... error: while searching for: else { wxString filePath = GetSelectedFilePath(); AtlasMessage::qVFSFileExists qry(filePath.wc_str()); qry.Post(); if (!filePath.IsEmpty() && qry.exists) { AtlasMessage::qVFSFileRealPath qry(filePath.wc_str()); qry.Post(); wxDynamicCast(FindWindow(ID_MapDialogFilename), wxTextCtrl)->ChangeValue(*qry.realPath); } error: patch failed: source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp:166 Checking patch source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp... Applying patch source/tools/atlas/AtlasObject/AtlasObjectImpl.cpp with 2 rejects... Rejected hunk #1. Rejected hunk #2. Applying patch source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp with 1 reject... Rejected hunk #1. Hunk #2 applied cleanly. Hunk #3 applied cleanly. Applied patch source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp cleanly. @Stan` Do you know why these git conflicts are happening? What can be done to fix them?
  12. @Stan` No, not a second time, I created a new git clone folder to test git apply functionality.
  13. Yep, so I have downloaded the diff file (D2399.diff) and saved it on my 0ad git base folder. when I do in the base git directory: git apply -p . D2399.diff I get: error: patch failed: libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp:18 error: libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp: patch does not apply Does anyone know how to fix this? git version 2.24.0 FreeBSD 12.1-RELEASE
  14. Hi @Stan`, Is there a way of applying the patches without having to manually replace every single of the files? Thanks!
  15. Hi @Stan`, not had time yet to try it out - I'll let you guys know when i find some time.
  16. Thanks Stan' Done! https://code.wildfiregames.com/D2399
  17. Thanks! I'll try to get arc to work on my desktop FreeBSD this weekend. Meanwhile here's the diff file (in case it's useful): diff --git a/libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp b/libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp index 272ab632e3..522be026e3 100644 --- a/libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp +++ b/libraries/source/fcollada/src/FCollada/FUtils/FUStringBuilder.hpp @@ -18,14 +18,28 @@ #include <float.h> #endif -#ifdef WIN32 -#define ecvt _ecvt -#endif // WIN32 - #ifndef SAFE_DELETE_ARRAY #define SAFE_DELETE_ARRAY(ptr) if (ptr != NULL) { delete [] ptr; ptr = NULL; } #endif +// The implementation of ecvt was taken from musl libc (musl/src/stdlib/ecvt.c) +char *ecvt_musl(double x, int n, int *dp, int *sign) +{ + static char buf[16]; + char tmp[32]; + int i, j; + + if (n-1U > 15) n = 15; + sprintf(tmp, "%.*e", n-1, x); + i = *sign = (tmp[0]=='-'); + for (j=0; tmp!='e'; j+=(tmp[i++]!='.')) + buf[j] = tmp; + buf[j] = 0; + *dp = atoi(tmp+i+1)+1; + + return buf; +} + template <class Char, class FloatType> void FloatToString(FloatType f, Char* sz) { @@ -34,7 +48,7 @@ void FloatToString(FloatType f, Char* sz) int decimal, sign; // ecvt rounds the string for us: http://www.datafocus.com/docs/man3/ecvt.3.asp - char* end = ecvt(f, digitCount, &decimal, &sign); + char* end = ecvt_musl(f, digitCount, &decimal, &sign); if (sign != 0) (*buffer++) = '-'; int count = digitCount;
  18. Thanks Stan' for the quick reply. It works successfully on Linux Fedora. https://code.wildfiregames.com/P186 https://trac.wildfiregames.com/ticket/1325#comment:10 I am sorry I am a complete noob with Phabricator and SVN!
  19. Hi Folks, Following https://trac.wildfiregames.com/ticket/1325#no1, which has not been updated in 6 years. I was trying to build 0ad on my FreeBSD desktop. I have successfully built FCollada using the musl libc implementation of ecvt(). Since musl libc is MIT licensed, would the following code be considered to be included on 0ad, as part of FUStringBuilder.hpp: char *ecvt_musl(double x, int n, int *dp, int *sign) { static char buf[16]; char tmp[32]; int i, j; if (n-1U > 15) n = 15; sprintf(tmp, "%.*e", n-1, x); i = *sign = (tmp[0]=='-'); for (j=0; tmp[i]!='e'; j+=(tmp[i++]!='.')) buf[j] = tmp[i]; buf[j] = 0; *dp = atoi(tmp+i+1)+1; return buf; } template <class Char, class FloatType> void FloatToString(FloatType f, Char* sz) { Char* buffer = sz + 1; static const int digitCount = 6; int decimal, sign; // ecvt rounds the string for us: http://www.datafocus.com/docs/man3/ecvt.3.asp char* end = ecvt_musl(f, digitCount, &decimal, &sign); if (sign != 0) (*buffer++) = '-'; int count = digitCount; if (decimal > digitCount) { // We use the scientific notation: P.MeX (*buffer++) = (*end++); // P is one character. (*buffer++) = '.'; // Mantissa (cleaned for zeroes) for (--count; count > 0; --count) if (end[count - 1] != '0') break; for (int i = 0; i < count; ++i) (*buffer++) = (*end++); if (buffer[-1] == '.') --buffer; // Exponent (*buffer++) = 'e'; uint32 exponent = decimal - 1; // X if (exponent >= 10) (*buffer++) = (Char) ('0' + (exponent / 10)); (*buffer++) = (Char) ('0' + (exponent % 10)); (*buffer) = 0; return; } else if (decimal > 0) { // Simple number: A.B for (int i = 0; i < decimal; ++i) (*buffer++) = (*end++); if (decimal < digitCount) (*buffer++) = '.'; count = digitCount - decimal; } else if (decimal < -digitCount) { // What case is this? decimal = count = 0; } else if (decimal < 0 || (decimal == 0 && *end != '0')) { // Tiny number: 0.Me-X (*buffer++) = '0'; (*buffer++) = '.'; for (int i = 0; i < -decimal; ++i) (*buffer++) = '0'; count = digitCount + decimal; } for (; count > 0; --count) if (end[count - 1] != '0') break; for (int i = 0; i < count; ++i) (*buffer++) = (*end++); if (decimal == 0 && count == 0) (*buffer++) = '0'; if (buffer[-1] == '.') --buffer; (*buffer) = 0; } I basically replaced the call to ecvt() by ecvt_musl(). What do you guys think? Cheers
  20. Thanks! I have updated the git repo of the map, including a few more screenshots. https://gitlab.com/CrazyBaboon/0ad_maps Let me know what you think of the map! Cheers
  21. Hi folks, I have finished this new South East Asia map for 6 players. https://gitlab.com/CrazyBaboon/0ad_maps What should I do to upload the map onto the 0ad servers? Thanks!
  22. Hi guys, What are the most popular license for new maps content? Cheers!
×
×
  • Create New...